我关闭了我的 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/