0
votes

i got some problem when i trying to include framework within framework. i try to make subframework in swift language. when i run in simulator work perfectly but in device i have error “Reason: no suitable image found. Did find:”

the following is an error message:

dyld: Library not loaded: @rpath/xxx.framework/xxx Referenced from: /private/var/containers/Bundle/Application/81D1C716-915E-4DCA-893D-F934D56C8BAD/customDemo.app/Frameworks/custom.framework/custom Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/81D1C716-915E-4DCA-893D-F934D56C8BAD/customDemo.app/Frameworks/custom.framework/Frameworks/xxx.framework/xxx: mmap() error 1 at address=0x00169000, size=0x000E8000 segment=__TEXT in Segment::map() mapping /private/var/containers/Bundle/Application/81D1C716-915E-4DCA-893D-F934D56C8BAD/customDemo.app/Frameworks/custom.framework/Frameworks/xxx.framework/xxx

1
i fix it by build all sub framework to universal - Dodi

1 Answers

0
votes

You are not allowed to submit an app to the App Store with a framework embedded inside another framework. All frameworks must be inside the main app bundle's Frameworks folder. This does not mean you cannot link one framework against another, though. Just specify framework B inside framework A's Link Binary With Libraries build phase, and don't embed it.