0

I have an iOS project with a watchOS extension. I added Alamonfire and Promisekit as dependencies of the watchOS extension, but the watchos app crashes on startup with the following error:

dyld: Library not loaded: @rpath/PromiseKit.framework/PromiseKit
  Referenced from: /private/var/containers/Bundle/Application/7F00C2C1-34B5-4518-9B88-3F34B93C5A2B/CruiseWatch.app/PlugIns/CruiseWatch Extension.appex/CruiseWatch Extension
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/7F00C2C1-34B5-4518-9B88-3F34B93C5A2B/CruiseWatch.app/PlugIns/CruiseWatch Extension.appex/Frameworks/PromiseKit.framework/PromiseKit: code signature invalid for '/private/var/containers/Bundle/Application/7F00C2C1-34B5-4518-9B88-3F34B93C5A2B/CruiseWatch.app/PlugIns/CruiseWatch Extension.appex/Frameworks/PromiseKit.framework/PromiseKit'

I'm pretty sure that there is some signing problem, but I can not resolve it. I already tried to remove the derived data but with no luck.

Anyone has some suggestions?

LucaRoverelli
  • 1,116
  • 1
  • 9
  • 15
  • Does this answer your question? [OS X Framework Library not loaded: 'Image not found'](https://stackoverflow.com/questions/24993752/os-x-framework-library-not-loaded-image-not-found) – chirag90 Jan 20 '20 at 11:20

1 Answers1

0

Its related to PromiseKit . PromiseKit is not added properly in your project. If you are using Xcode 11, ensure that you have the PromiseKit framework added in Frameworks, Libraries, and Embed Content under Target settings for watch - General. Change Embed status from - 'Do not Embed' to 'Embed & Sign'

enter image description here

Jawad Ali
  • 13,556
  • 3
  • 32
  • 49