swift - 使用 Xcode 在 Swift 中将默认选项设置为 OSX 而不是 IOS 的 Pod Init?

标签 swift xcode cocoa cocoapods podfile

我关闭了我的 Xcode 项目并进入项目目录并输入

pod init

它制作了一个Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Test1' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Test1

end

注意第二行 - platform :ios, '9.0' 但我的是 Mac 桌面应用程序

所以我不得不手动更改它以使用platform :osx, '10.12'

# Uncomment the next line to define a global platform for your project
# platform :osx, '10.12'

target 'Test1' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Test1

end

是否可以直接为 Mac 桌面应用程序创建一个选项,例如 pod init --mac 或类似的东西?

最佳答案

此时没有选项 --mac 或任何等效项。

您可以在此处检查 pod init 的所有可用选项:https://guides.cocoapods.org/terminal/commands.html#pod_init

关于swift - 使用 Xcode 在 Swift 中将默认选项设置为 OSX 而不是 IOS 的 Pod Init?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52089602/

相关文章:

iphone - AVAudioPlayer 错误与 m4a 但不是 mp3

ios - 为什么我会收到以下错误 : "fatal error: unexpectedly found nil while unwrapping an Optional value"? - 如何具体修复它?

objective-c - 问题: Parsing XML File in Objective-C/Cocoa Project for iOS

objective-c - 核心数据和多个窗口的单独撤消管理器?

ios - Collection View (创建可拖动的 UICollectionViewCell) fatal error

ios - 使用时属性显示为零,但在使用前打印到调试控制台?

swift - Xcode Swift 使用 Toggles 将 Label 增加 1 并保存 Toggles 的值

swift - 有没有办法用 switch 语句测试 OptionSet?

swift - 缺少自动布局的 Xcode 11 引脚菜单(在 Main.storyboard 下) - 仅在此项目上

iphone - 如何查看 nib/xib 文件的代码?