2016-09-28 17 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來解決它。

相關問題