2016-09-28 53 views
0

原谅我初学者的问题, 我试图做的iOS,安装通过POD库安装,仍然得到“没有这样的模块”

source 'https://github.com/CocoaPods/Specs.git' 
platform :ios, '8.0' 
use_frameworks! 

pod 'NetworkKit' 

,然后

安装一个名为 NetworkKit库,并按照 their instruction

pod install

但仍然在迅速文件,我在该行import NetworkKit得到了错误“没有这样的模块”。

任何想法如何解决这个问题?由于

更新:这是pod install --verbose

Analyzing dependencies 

Inspecting targets to integrate 
    Using `ARCHS` setting to build architectures of target 
    `Pods-networkingexamle`: (``) 
    Using `ARCHS` setting to build architectures of target 
    `Pods-networkingexamleTests`: (``) 
    Using `ARCHS` setting to build architectures of target 
    `Pods-networkingexamleUITests`: (``) 

Finding Podfile changes 
    - NetworkKit 

Resolving dependencies of `Podfile` 

Comparing resolved specification to the sandbox manifest 
    - NetworkKit 

Downloading dependencies 

-> Using NetworkKit (1.3.2) 
    - Running pre install hooks 

Generating Pods project 
    - Creating Pods project 
    - Adding source files to Pods project 
    - Adding frameworks to Pods project 
    - Adding libraries to Pods project 
    - Adding resources to Pods project 
    - Linking headers 
    - Installing targets 
    - Installing target `NetworkKit` iOS 8.0 
     - Generating Info.plist file at `Pods/Target Support 
     Files/NetworkKit/Info.plist` 
     - Generating module map file at `Pods/Target Support 
     Files/NetworkKit/NetworkKit.modulemap` 
     - Generating umbrella header at `Pods/Target Support 
     Files/NetworkKit/NetworkKit-umbrella.h` 
    - Installing target `Pods-networkingexamle` iOS 8.0 
     - Generating Info.plist file at `Pods/Target Support 
     Files/Pods-networkingexamle/Info.plist` 
     - Generating module map file at `Pods/Target Support 
     Files/Pods-networkingexamle/Pods-networkingexamle.modulemap` 
     - Generating umbrella header at `Pods/Target Support 
     Files/Pods-networkingexamle/Pods-networkingexamle-umbrella.h` 
    - Installing target `Pods-networkingexamleTests` iOS 8.0 
     - Generating Info.plist file at `Pods/Target Support 
     Files/Pods-networkingexamleTests/Info.plist` 
     - Generating module map file at `Pods/Target Support 
     Files/Pods-networkingexamleTests/Pods-networkingexamleTests.modulemap` 
     - Generating umbrella header at `Pods/Target Support 
     Files/Pods-networkingexamleTests/Pods-networkingexamleTests-umbrella.h` 
    - Installing target `Pods-networkingexamleUITests` iOS 8.0 
     - Generating Info.plist file at `Pods/Target Support 
     Files/Pods-networkingexamleUITests/Info.plist` 
     - Generating module map file at `Pods/Target Support 
     Files/Pods-networkingexamleUITests/Pods-networkingexamleUITests.modulemap` 
     - Generating umbrella header at `Pods/Target Support 
     Files/Pods-networkingexamleUITests/Pods-networkingexamleUITests-umbrella.h` 
    - Running post install hooks 
    - Writing Xcode project file to `Pods/Pods.xcodeproj` 
    - Generating deterministic UUIDs 
    - Writing Lockfile in `Podfile.lock` 
    - Writing Manifest in `Pods/Manifest.lock` 

Integrating client project 

Integrating target `Pods-networkingexamle` (`networkingexamle.xcodeproj` project) 

Integrating target `Pods-networkingexamleTests` (`networkingexamle.xcodeproj` project) 

Integrating target `Pods-networkingexamleUITests` (`networkingexamle.xcodeproj` project) 
    - Running post install hooks 
    - cocoapods-stats from 
    `/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-1.0.0/lib/cocoapods_plugin.rb` 

Sending stats 
     - NetworkKit, 1.3.2 
    Pod installation complete! There is 1 dependency from the Podfile and 1 total 
    pod installed. 

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice. 

更新2输出:

答案是清范的和砂眼的Jali的评论:我要开xcworkspace安装吊舱后,而不是xcproject

+0

这发生在我身上的时候。我只是清理项目并构建它,错误消失。似乎是一个Xcode的错误。 –

+0

刚刚尝试过,没有帮助,请任何其他技巧? –

+0

如果NetworkKit已成功安装,请检查'pod install --verbose'。 –

回答

0

让我把答案这里未来的读者:

pod install --verbose输出指示吊舱已成功安装。但是,您必须打开由CocoaPods生成的.xcworkspace文件,而不是.xcproject文件。

还值得一提的是,吊舱可以在Xcode的7编译但由于它并没有被这个帖子的时候更新到2.3雨燕3.0也不Xcode中没有8。

+0

最近Card.IO已经更新以支持Swift 3.0吗? – Jargen89

-1

这是import NewsstandKit,在import NewtworkKit不工作。

+0

他们是不同的框架。 –

+0

很抱歉与类名混淆。两者都从'NK'开始 –

0
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly. 

NetworkKit没有配置最新的swift语法。所以,使用这个链接Xcode 8 Beta 3 Use Legacy Swift issue来解决它。