PebbleFramework 给了我很多警告和错误

Posted

技术标签:

【中文标题】PebbleFramework 给了我很多警告和错误【英文标题】:PebbleFramework is giving me a ton of warnings and errors 【发布时间】:2014-01-03 16:21:54 【问题描述】:

我拿了一个旧游戏并想添加 PebbleFramework,现在我收到了这些警告和错误。我正确地遵循了他们的文档。

任何帮助将不胜感激

Ld /Users/developer/Library/Developer/Xcode/DerivedData/TicTacToe-cjyphzfzstogbbegocrpujgsfhxp/Build/Products/Debug-iphonesimulator/TicTacToe.app/TicTacToe normal i386
    cd /Users/developer/Developer/ios/TicTac
    setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/developer/Library/Developer/Xcode/DerivedData/TicTacToe-cjyphzfzstogbbegocrpujgsfhxp/Build/Products/Debug-iphonesimulator -F/Users/developer/Library/Developer/Xcode/DerivedData/TicTacToe-cjyphzfzstogbbegocrpujgsfhxp/Build/Products/Debug-iphonesimulator -F/Users/developer/Developer/iOS/TicTac -F/Users/developer/Downloads/TicTac -filelist /Users/developer/Library/Developer/Xcode/DerivedData/TicTacToe-cjyphzfzstogbbegocrpujgsfhxp/Build/Intermediates/TicTacToe.build/Debug-iphonesimulator/TicTacToe.build/Objects-normal/i386/TicTacToe.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0 -framework CoreLocation -lz -framework ExternalAccessory -framework CoreBluetooth -framework CoreMotion -framework MessageUI -framework GameKit -framework iAd -framework AudioToolbox -framework AVFoundation -framework SystemConfiguration -framework AdSupport -framework CoreGraphics -framework QuartzCore -framework UIKit -framework PebbleVendor -framework PebbleKit -framework Foundation -framework RevMobAds -Xlinker -dependency_info -Xlinker /Users/developer/Library/Developer/Xcode/DerivedData/TicTacToe-cjyphzfzstogbbegocrpujgsfhxp/Build/Intermediates/TicTacToe.build/Debug-iphonesimulator/TicTacToe.build/Objects-normal/i386/TicTacToe_dependency_info.dat -o /Users/developer/Library/Developer/Xcode/DerivedData/TicTacToe-cjyphzfzstogbbegocrpujgsfhxp/Build/Products/Debug-iphonesimulator/TicTacToe.app/TicTacToe

ld: warning: directory not found for option '-F/Users/developer/Downloads/TicTac'
Undefined symbols for architecture i386:
  "_kCFErrorDomainCFNetwork", referenced from:
      -[QServer netService:didNotPublish:] in PebbleKit(QServer.o)
  "_kCFStreamErrorDomainNetServices", referenced from:
      -[QServer netService:didNotPublish:] in PebbleKit(QServer.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

以下是我在添加 PebbleKit 框架时遵循的说明。

## Integrating PebbleKit Manually

- Drag PebbleKit.framework into project
- Drag in PebbleVendor.framework into the project, or, drag the PebbleVendor.xcodeproj into project if you need to control the 3rd party components needed for PebbleKit.
- Link ExternalAccessory.framework, libz.dylib, CoreBluetooth.framework, CoreMotion.framework and MessageUI.framework
- Add "-ObjC" linker flag to your project's build settings
- Add the value "com.getpebble.public" to the "Supported external accessory protocols" (UISupportedExternalAccessoryProtocols) array in your app's Info.plist
- Optionally, add the value "App communicates with an accessory" (external-accessory) to the "Required background modes" (UIBackgroundModes) array in your app's Info.plist

【问题讨论】:

您遵循的说明已过时。你能告诉我们你在哪里找到它们吗?此处提供最新说明:developer.getpebble.com/2/mobile-app-guide/ios-guide.html 请提供您的评论作为答案,以便我给您的答案打勾! 【参考方案1】:

确保CFNetwork 也链接到您的应用。

【讨论】:

【参考方案2】:

您遵循的说明已过时。你能告诉我们你在哪里找到它们吗?

这里有最新的说明:http://developer.getpebble.com/2/mobile-app-guide/ios-guide.html

【讨论】:

以上是关于PebbleFramework 给了我很多警告和错误的主要内容,如果未能解决你的问题,请参考以下文章

我的代码的哪一部分给了我警告? [复制]

我可以使用 .pkl 文件,即使它给了我一个折旧警告?

ACM菜鸡退役帖——ACM究竟给了我什么?

我的 vim 中的 JSHint 将 'yield' 标记为警告。

修复弃用警告

警告执行已完成,带有警告存储过程