2013-07-09 21 views
27

所以,一切都很好,然后我决定开始的XCode 5 DP3和iOS7开发由于IOKit找不到

在升级之前,我的项目编译和运行在我的iPhone 3GS罚款(我做了一个有点软电话应用);但它并没有在我的iPhone 5上运行,我非常有信心,事实上,我还没有将其配置为包含armv7s架构。

我可以在模拟器上构建和运行一切正常,但(这是在配置应用程序以包含armv7s体系结构后),我无法让它在我的设备上运行。

我得到这个错误:

ld: framework not found IOKit 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我什至不知道如何使用一个-v看到调用。 我读了一些IOKit仅用于模拟器的地方......这是否意味着我应该在我的设备上构建时从我的库中取消链接?为什么我在使用3gs之前没有收到这个错误?

我的假设为什么它不再适用于我的3gs(虽然错误是相同的),事实上它是iOS 6,而SDK可能只支持iOS 7(我的iPhone 5目前是)。

回答

9

我有同样的问题,但我通过在Xcode 4.6.3中转到IOKit.framework,右键单击它并选择“在Finder中显示”来修复它。我只是将它复制到Xcode 5下的相同位置。

50

最好的事情是,直到Apple发布修复程序。表演时

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ iPhoneOS7.0.sdk/System/Library/Frameworks/IOKit.framework

sudo ln -s Versions/A/IOKit . # <- do not forget the dot!

请务必输入完整的目录地址:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/IOKit.framework 
sudo ln -s Versions/A/IOKit . 
+0

我可以证实这个解决方案在XCode 5和5.0.1 GM – nanoman

+0

工程很好,这也适用于我。 – Jirapong

+0

在Xcode 5和OSX 10.9.1中不起作用10.9.1 – Suge

3

为了解决这个问题,而不回滚您的Xcode软件,你可以通过输入以下命令,进入终端添加缺少的IOKit.framework符号链接作为终端的cd操作通常不会让您将目录更改为.app文件。

希望这能解决您的问题!

10

的Xcode版5.1.1(5B1008)

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/IOKit.framework 
sudo ln -s Versions/A/IOKit . 
+1

+1 - 它真的对我的问题有效,非常好,保持它。 – YumYumYum

+0

我得到了'ln:./IOKit:File exists'。 – AdamT

1

对于iPhoneOS10.2.sdk

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/System/Library/Frameworks/IOKit.framework 

须藤LN -s版本/ A /由于IOKit。

相关问题