我尝试使用以下内容创建文件:
'
platform :osx, '10.0'
use_frameworks!
target 'MyApp' do
pod 'SwiftyJSON', '~> 2.2.0'
end
这被重新调整:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "SwiftyJSON":
In Podfile:
SwiftyJSON (~> 2.2.0)
Specs satisfying the `SwiftyJSON (~> 2.2.0)` dependency were found, but they required a higher minimum deployment target.
我想也许这与平台有关,所以我去CoCaoPods.org上的SwiftJSON文档。
这是我发现的
哦,看起来可能代替'osx',它期待'macOS'。我将我的Podfile更新为:
platform :macOS, '10.0'
use_frameworks!
target 'Maconomi' do
pod 'SwiftyJSON', '~> 2.2.0'
end
并再次运行上一个命令,而不是得到此错误:
[!] Invalid `Podfile` file: Unsupported platform `macOS`. Platform must be `:ios`, `:osx`, `:tvos`, or `:watchos`..
# from /Users/travis.rivera/Documents/macOSAPP/Maconomi/Podfile:1
# -------------------------------------------
> platform :macOS, '10.0'
# use_frameworks!
# -------------------------------------------
所以现在我被卡住了。
platform :osx, '10.10'
use_frameworks!
target 'MyApp' do
pod 'SwiftyJSON', '~> 2.2.0'
end
然后
pod安装
我错过了osx最低版本号。