rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 84 forks source link

RMQClient (swift) works in debug but failed in achrive validation #153

Closed LanserShi closed 5 years ago

LanserShi commented 5 years ago

I used rabbitmq-swift-client in my project, and everything worked well in simulator. Development env. is Xcode10.1+swift4.2.

When I prepared to upload and validate the archive, an error was encounted: Code signing "CocoaAyncSocket.framework" failed

In IDEDistributionPipline.log I found: ".../RMQClient.framework/Framworks/CocoaAsyncSocket.framework: code object is not signed at all".

Any suggestion is appreciated.

LanserShi commented 5 years ago

I should post question to rabbitmq-users or Stack Overflow. Sorry for disturb.

michaelklishin commented 5 years ago

CocoaAsyncSocket.framework is a dependency of this client.

Reasons for this message seem to vary greatly from environment to environment, from bundle ID mismatches to build target mismatches to avoiding some? UTF-8 characters in directory name.

Some recommend rebuilding all dependencies from scratch with

carthage bootstrap --platform [platform] --no-use-binaries

A mismatch between target platform used by carthage bootstrap and XCode release target sounds plausible.

LanserShi commented 5 years ago

I resolved my problem. Hope it helps:

  1. move CocoaAsyncSocket.framework and JKVValue.framework from RMQClient.framework into iOS dir (in the same dir with RMQClient.framework)
  2. add link in XCode to the new target files ( 3. maybe not the required: use carthage copy-frameworks instead of embbed target, see https://stackoverflow.com/questions/52436575/code-signing-framework-fails-when-distributing-for-enterprise-in-xcode-10)

It seems Xcode disallow codesign to nesting framework.

michaelklishin commented 5 years ago

@LanserShi thank you for reporting back! Perhaps we should add a doc section of sorts to the README. Sorry about the state of the docs for this client.

I should have thought of carthage copy-frameworks, I believe cases like this is exactly why it exists 👍