Error: No code signature found

Xcode: 12.5.1
macOS: 11.5.2

I have an app I'm building in Xcode that has several dependencies (Cocoapods). After adding one framework in particular (Wikitude AR framework), my build succeeds but I can no longer install the app on my device (iPhone 11, 14.7.1). The install fails with the following error:

Unable to install "my-cool-app"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
--
No code signature found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
User Info: {
    DVTRadarComponentKey = 261622;
    MobileDeviceErrorCode = "(0xE800801C)";
    "com.apple.dtdevicekit.stacktrace" = (
	0   DTDeviceKitBase                     0x00000001246963b8 DTDKCreateNSErrorFromAMDErrorCode + 220
	1   DTDeviceKitBase                     0x00000001246d4ae1 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
	2   DVTFoundation                       0x0000000108ef2bac DVTInvokeWithStrongOwnership + 71
	3   DTDeviceKitBase                     0x00000001246d4822 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
	4   IDEiOSSupportCore                   0x000000011867d999 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.294 + 3534
	5   DVTFoundation                       0x0000000109025921 __DVT_CALLING_CLIENT_BLOCK__ + 7
	6   DVTFoundation                       0x000000010902754b __DVTDispatchAsync_block_invoke + 1191
	7   libdispatch.dylib                   0x00007fff20165623 _dispatch_call_block_and_release + 12
	8   libdispatch.dylib                   0x00007fff20166806 _dispatch_client_callout + 8
	9   libdispatch.dylib                   0x00007fff2016c5ea _dispatch_lane_serial_drain + 606
	10  libdispatch.dylib                   0x00007fff2016d0ad _dispatch_lane_invoke + 366
	11  libdispatch.dylib                   0x00007fff20176c0d _dispatch_workloop_worker_thread + 811
	12  libsystem_pthread.dylib             0x00007fff2030d45d _pthread_wqthread + 314
	13  libsystem_pthread.dylib             0x00007fff2030c42f start_wqthread + 15
);
}
--


System Information

macOS Version 11.5.2 (Build 20G95)
Xcode 12.5.1 (18212) (Build 12E507)
Timestamp: 2021-08-16T14:42:04-04:00

I assume that this means the framework needs to be signed somehow. However, if I add the framework to "Frameworks, Libraries, and Embedded Content", the build immediately fails with the following error:

Multiple commands produce 'my-cool-app/ios/Build/Products/Debug-iphoneos/my-cool-app.app/Frameworks/WikitudeSDK.framework':
1) Target 'my-cool-app' has copy command from 'my-cool-app/node_modules/react-native-wikitude-sdk/ios/WikitudeSDK.framework' to 'my-cool-app/ios/Build/Products/Debug-iphoneos/my-cool-app.app/Frameworks/WikitudeSDK.framework'
2) That command depends on command in Target 'my-cool-app': script phase “[CP] Embed Pods Frameworks”

How can I install and run my application on my device? I've tried about 100 different solutions from SO and other sources -- none have made a difference. Any help is appreciated.

Replies

I assume that this means the framework needs to be signed somehow.

Yes, something in your bundle is not being signed and is causing an installation failure. It looks like it is the path below but it's hard to say for sure:

my-cool-app/ios/Build/Products/Debug-iphoneos/my-cool-app.app/Frameworks/WikitudeSDK.framework

One way to figure out what is not being signed is to look at the signature on your exported build to disk. For example, on your main bundle and all of the embedded executables.

$ codesign -dvvvvv yourExecutable

In general I would contact your vendor about installation instructions for your framework, but TN2435 also would be a great reference to take a look at while you debug this issue.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
  • Followed your advice and used the codesign utility, the WikitudeSDK framework executable is definitely not signed. However, the OpenSSL framework executable is also not signed. The thing is, the Wikitude framework is linked via Cocoapods -- pod install. Your reference link to TN2435 talks about adding the framework to "Frameworks, LIbraries, and Embedded Content" but I can't do that. The build immediately fails with the error above, since then multiple commands are trying to copy the framework. Is there anything else I could try? Perhaps adding a build phase to my project that signs the framework after its copied into place?

Add a Comment

Followed your advice and used the codesign utility, the WikitudeSDK framework executable is definitely not signed. However, the OpenSSL framework executable is also not signed

Okay, these frameworks will need to carry a signature though if they contain an executable.

Regarding:

Is there anything else I could try? Perhaps adding a build phase to my project that signs the framework after its copied into place?

I am not sure how Cocoapods set's up and loads your Frameworks into the Xcode project, but essentially you would need to get to a situation similar to the following:

  1. Create a new iOS blank Xcode project with the app template type.
  2. Create a new iOS Xcode project with the template type of Framework.
  3. Build the new Framework project and then take the built Framework and drag it into your new iOS blank project and set Embed & Sign.
  4. Build and sign the project from step 1.
  5. Check out the actual built results for your app, you will see the built and signed framework from 2 embedded into your iOS project.
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com

Signing frameworks (pods) is required if you have added pods_****.framework and selected Embed & Sign, otherwise if you just add framework and select Do Not Embed it will not throw this error during installation on real device

  • I tried using embed and sign but still getting the same error

    Code: -402620388

    No code signature found.

    is there any other solution?

Add a Comment