How to debug “Invalid Bundle” error which happens

2020-01-30 03:44发布

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?

12条回答
兄弟一词,经得起流年.
2楼-- · 2020-01-30 04:34

Tried all the above solutions and did not work for me.

I was experiencing this issue in Xcode 10.1 recently and all my frameworks were referenced correctly (did otool -L and everything lined up).

Seems there were some changes in the apple validation process, may be a bug, may not be on Apple's end, but all my prior builds uploaded and validated fine -- and I did not add any new frameworks since.

Upon uploading the binary to iTunesConnect, I'd see the following error:

Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.

Invalid Bundle - The app uses Swift, but one of the binaries could not link to it because it wasn't found. Check that the app bundles correctly embed Swift standard libraries using the "Always Embed Swift Standard Libraries" build setting, and that each binary which uses Swift has correct search paths to the embedded Swift standard libraries using the "Runpath Search Paths" build setting.

MY SOLUTION:

  • After days of debugging, what worked for me was to disable 'Include bitcode for iOS content' upon uploading the archive from Xcode organizer. Seems that this option modifies the binary which caused the validator to fail.

enter image description here

  • Or you can disable bitcode in your Build Settings
查看更多
我欲成王,谁敢阻挡
3楼-- · 2020-01-30 04:40

We had the same problem, and even after going through all the steps (see "Missing Framework Bundle"), the only thing that worked was disabling Bitcode.

查看更多
Root(大扎)
4楼-- · 2020-01-30 04:41

After adding the custom Swift framework to my project I got this email after uploading the app to iTunes connect.

I got this email from iTunes store,

Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.

The fix is simple for this issue,

Step 1: Make sure your Custom framework is added to Embedded Binaries in General tab of your target. enter image description here

Step 2: Under build settings,

Set Always Embed Swift Standard Libraries = Yes for your main project target.

And Set Always Embed Swift Standard Libraries = No for your custom framework target.

This solved my problem and I was able to upload binary to iTunes connect.

Ref

查看更多
做个烂人
5楼-- · 2020-01-30 04:41

So I struggled on this for two days. What it turned out to be was I had UITests checked in Archive for the Build for the Scheme I was archiving.

After unchecking it from Archive, re-archiving it, validating it (although validating it before always passed), and "Upload to AppStore" I did not get the e-mail from Apple informing me of Invalid Swift Support. Instead I got the e-mail that it'd been processed and is good to go!

查看更多
beautiful°
6楼-- · 2020-01-30 04:42

Had same issue. This happened to me because one of my Framework target was added to main target in "Link Binary With Libraries" but was not added to "Target Dependencies" and "Embedded Binaries"

查看更多
Melony?
7楼-- · 2020-01-30 04:44

I had the same problem, it was due to one framework not being present in the Frameworks subfolder in the app bundle.

I fixed it by adding a Copy Fields build phase, and adding the missing .framework file there.

查看更多
登录 后发表回答