I have a lot of frameworks in my app. App works fine in adhoc/enterprise release. Only if I submit to the app store for testflight testing I get this error email from apple:
Dear developer,
We have discovered one or more issues with your recent delivery for "My app's name here". To process your delivery, the following issues must be corrected:
Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.
Once these issues have been corrected, you can then redeliver the corrected binary.
Regards,
The App Store team
there is no specific information here. How can I debug it?
My Problem: I had the same error with embedded frameworks.
The app built to the simulator and to devices with no problem but failed the Apple test, returning "Invalid Bundle".
I inspected the package just like Taha had been told to by Tech Support and everything was present and correct!
My Solution: I restructured the project so that the two custom frameworks sit side by side and one is no longer embedded within the other.
This looks to be an Apple validation problem since everything works fine on devices and the simulator but the work around was straight forward.
This error message is also addressed in Apple Technical Note TN2435 Embedding Frameworks In An App: https://developer.apple.com/library/archive/technotes/tn2435/_index.html
You can find the error message under the heading "Missing Framework Bundle" with troubleshooting steps.
I have encountered the same issue when uploading an app with watch support to the app store.
I was able to solve it with the hint from the first answer, using
otool -L
to analyze the binary from the ipa or xcarchive. However, the problem was not with my frameworks (at@rpath
) but with a swift lib. I noticed thatlibswiftWatchKit.dylib
was missing in the frameworks folder.The solution that worked for me was as simple as to set
EMBEDDED_CONTENT_CONTAINS_SWIFT=YES
in the build settings of the watch app (or the watch app extension, but not both). After that, all necessary swift libraries were correctly copied to the watch app path in the archive and upload to app store was working correctly.Apparently, the watch app works and upload passes if you provide the necessary swift libraries only in the main app's folder.
In my case, in the build settings, this was fixed when I added the following to the build settings for the library:
The clue was a linker warning: 'YourLibrary has an install name beginning with “/”, but it is not from the specified SDK'
I also received a similar mail from Apple:
I used my own framework for my watch app. I solved this issue by changing the framework option to "Embed Without Signing" in the Extension Target. The default option was "Do Not Embed".
Got an answer from Apple Developer Technical Support which says it is a bug on Apple's side. this is the suggested workaround below which did not work for me:
Please let me know if it works for you!