我正在尝试将Swift框架集成到我的项目中:
http://developer.skobbler.com/download/SKMaps_iOS_2.4.0_withDemo_Swift.zip

当我尝试集成为嵌入式二进制xcode时,无法对符号进行编码并告诉我
“协同设计失败,退出代码为1”。

CodeSign /Users/k1x/Library/Developer/Xcode/DerivedData/TestMaps-dubiwcafqgeplbabdrqpjtokouxq/Build/Products/Debug-iphoneos/TestMaps.app/Frameworks/SKMaps.framework
    cd "/Users/k1x/Workspace iOS/SwitchMaps"
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer"

    /usr/bin/codesign --force --sign 56131F60BE8DA3BA4F04CBF6717C75951E93E4D6 --preserve-metadata=identifier,entitlements,resource-rules /Users/k1x/Library/Developer/Xcode/DerivedData/TestMaps-dubiwcafqgeplbabdrqpjtokouxq/Build/Products/Debug-iphoneos/TestMaps.app/Frameworks/SKMaps.framework

Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
/Users/k1x/Library/Developer/Xcode/DerivedData/TestMaps-dubiwcafqgeplbabdrqpjtokouxq/Build/Products/Debug-iphoneos/TestMaps.app/Frameworks/SKMaps.framework: invalid resource specification rule(s)
Command /usr/bin/codesign failed with exit code 1

我试图将框架放入“链接的框架和二进制文件”部分。但是我得到以下输出:
dyld: Library not loaded: @rpath/SKMaps.framework/SKMaps
  Referenced from: /private/var/mobile/Containers/Bundle/Application/B3686F36-2120-4007-97AB-B2D3B423C0A0/TestMaps.app/TestMaps
  Reason: image not found

我在Google上搜索并找到了有关此问题的其他帖子,但他们没有回答我的问题。
以防万一它的Objective C版本可以正常工作:
http://developer.skobbler.com/download/SKMaps_iOS_2.4.0_withDemo.zip

最佳答案

您需要使用cocoapods进行安装。

我遇到了同样的问题,我喜欢这个并且奏效了。

编辑:使用 cocoa pod ,您需要在Podfile中添加包含 pod 'ScoutMaps-iOS-SDK'的行,在终端中运行pod install并导入SKMaps/SKMaps.h header 以使用该库或导入SKMaps如果您使用的是Swift,则将/SKMaps.h header 添加到Objective-C桥接 header 中。

10-07 19:33