Jes*_*ica 6 xcode ios cocoapods swift xcode8
我最近升级到Xcode 8和现有项目到Swift 3.在与Cocoapods有各种各样的问题后,我决定从头开始.运行后pod deintegrate和删除Podfile,Podfile.lock以及[Project].xcworkspace,我有一个空白的石板尽可能的CocoaPods担心.
然后我采取了以下行动:
在项目位置打开终端并运行pod init,然后pod install(使用pod init创建的存根Podfile ).
这似乎是成功的,但附带以下两个警告:
[!] The `Xena [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Xena [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
此时,打开Xcode并构建项目会产生"No such module"错误,这是完全可以预料到的.
按照此问题的说明解决了这个问题,重新运行pod install是成功的.
关闭Xcode,将我正在使用的模块添加到Podfile(见下文),pod install再次运行.根据终端输出,这是成功的.
打开Xcode并构建项目.我再次收到"No such module"错误,具体而言No such module 'ReactiveCocoa'
我已经确认SnapKit,Hue,KMPlaceholderTextView,KeychainSwift和Siren会出现同样的问题,具体取决于import语句的顺序.出于某种原因,没有任何Google模块受此问题的影响.
我的Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Xena' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Xena
pod 'ReactiveCocoa', :git => 'https://github.com/ReactiveCocoa/ReactiveCocoa.git'
pod 'SnapKit', '~> 3.0.2'
pod 'Hue', '~> 2.0.1'
pod 'KMPlaceholderTextView', '~> 1.3.0'
pod 'GooglePlacePicker'
pod 'GooglePlaces'
pod 'GoogleMaps'
pod 'KeychainSwift', '~> 7.0'
pod 'Siren'
target 'XenaTests' do
inherit! :search_paths
# Pods for testing
end
target 'XenaUITests' do
inherit! :search_paths
# Pods for testing
end
end
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15732 次 |
| 最近记录: |