Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift embedded library -> Command /usr/bin/codesign failed with exit code 1

I'm trying to integrate swift framework to my project: http://developer.skobbler.com/download/SKMaps_iOS_2.4.0_withDemo_Swift.zip

When I try to integrate as embedded binary xcode couldn't code sign and tells me "codesign failed with exit code 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

And I tried to put the framework in "Linked frameworks and binaries section". But I've got following output:

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

I googled and found another posts for this issue but they didn't answer my question. Just in case everything works correct with Objective C version of it: http://developer.skobbler.com/download/SKMaps_iOS_2.4.0_withDemo.zip

like image 367
ik1 Avatar asked Nov 09 '22 17:11

ik1


1 Answers

You need to use cocoapods for install it.

I had the same problem, I like this and it worked.

Edit : With cocoa pods, you need to add a line containing pod 'ScoutMaps-iOS-SDK' to your Podfile, run pod install in the Terminal and import the SKMaps/SKMaps.h header in order to use the library or import the SKMaps/SKMaps.h header to your Objective-C bridging header if you are using Swift.

like image 162
Betcha Avatar answered Nov 14 '22 22:11

Betcha