The bundle at 'my_app.app/ResearchKit/ResearchKit/Info.plist' does not contain a bundle executable - ios

Update
XCode Version: 8.2
iOS Target: 9
Hopefully some can point out to me that this is not a bug. Very simply I pulled the latest stable version of researckKit, and I dropped the .xcodeproj file into my new iOS project, added the embedded binary. I created a couple steps that look fine in the simulator. My app builds fine and even the archive validates OK. Upload to app store is fine, but then I am receiving emails from the app store with 6 entries all look about the same, for 6 different Info.plist files inside the ReserachKit framework:
Unexpected CFBundleExecutable Key - The bundle at
'my_app.app/ResearchKit/ResearchKit/Info.plist' does not contain a
bundle executable. If this bundle intentionally does not contain an
executable, consider removing the CFBundleExecutable key from its
Info.plist and using a CFBundlePackageType of BNDL. If this bundle is
part of a third-party framework, consider contacting the developer of
the framework for an update to address this issue.
I have found quite a few answers on Stack Overflow, many people agreeing to do what was suggested in the error message: simply remove the CFBundleExecutable Key from the .plist files. I tried that, but then my archive will not even validate with the following error:
iTunes Store operation failed. Invalid Bundle Structure - The binary
file 'my_app.app/Frameworks/ResearchKit.framework/ResearchKit' is not
permitted. Your app can’t contain standalone executables or libraries,
other than the CFBundleExecutable of supported bundles. Refer to the
Bundle Programming Guide at
https://developer.apple.com/go/?id=bundle-structure for information on
the iOS app bundle structure.
** UPDATE **
Granted I pulled a fresh version of the ResearchKit framework from github for this project. So instead I just tried a copy of a version of ResearchKit from another Xcode Project that I have successfully deployed on the app store recently, i figure if it worked for that app it should go through for this app. But Alas, I am getting the same email error from the App Store about the Unexpected CFBundleExecutable Key.
Again this is an apple-supported free framework. There are simple instructions for how to use it on the github page, which I followed. I have used it before and submitted an app with this framework recently, which had no problems and is currently active in Test Flight Beta Testing. I also filed an issue on the GitHub project page.

I met this problem like yours,and I fixed it by:
Remove Executable file in ResearchKit
Find info.plist in ResearchKit,do:
delete info.plist in ResearchKit.
Or you can add Bundle version,Bundle identifier,Bundle versions in this info.plist,they should be same as your parameters in your own info.plist
check Target - Info - URL Types,check if there is illegal identifier

I contacted Apple Technical Support and they helped me solve the problem. Like I had suspected it was NOT necessary to alter the ResearchKit framework in any way for this to work correctly.
For me, the issue was that I was copying the entire source code, test cases, Xcode projects, and the rest of ResearchKit into the app.
I must have done this at an early step and didn't realize. What was helpful for me was to go to the Build Phases tab in XCode and look in the different sections. My error was that I had the researchkit framework in the sections: Link Binary With LIbraries and Copy Bundle Resources. I needed to remove those.
The correct configuration, which you get by dragging the xcodeproj file to the project and embedding the binary will just add on line to the Target Dependencies and Embed frameworks sections in Build Phases.
Here is a screenshot of my corrected configuration:

Related

TwitterKit 3.0.4 - ITMS-90535: Unexpected CFBundleExecutable Key [duplicate]

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

How to debug "Invalid Bundle" error which happens only after submitting to app store

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?
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:
To diagnose this issue, you should export the IPA you are sending to
the App Store from Xcode. Since IPAs are zip files, you can
decompress it by right clicking and saying Open With > Archive
Utility. You should find your main executable inside the unzipped
folder structure and run otool at the command line to see the library
list: otool -L
The list of paths you get should match what you find inside of your
IPA. All of your libraries should start with #rpath. A simple
comparison of everything in this list with the unzipped IPA folders
should reveal what is missing.
Once you know what is missing, go to your Xcode build phases setup.
There should be a build phase for either Copy Files or Embed
Frameworks that includes the missing library — you should just add the
library to the list. If you don’t see either of these build phases,
you can recreate it by adding a new Copy Files build phase, setting
the Destination to Frameworks, and adding the library to the list,
ensuring that Code Sign On Copy is checked.
If you don’t find anything missing in your main binary, make sure to
do the same search on any other binaries you may have, like for a
watchOS app or an iOS app extension.
If you find that all of the frameworks are in this build phase, please
take a look at the Embedded Binaries section of your app target’s
General page, and let me know if you see multiple levels of ../ next
to the binary that you found is missing.
Please let me know if it works for you!
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 that libswiftWatchKit.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.
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.
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
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.
Or you can disable bitcode in your Build Settings
My Problem:
I had the same error with embedded frameworks.
The App project has Custom Framework project
Inside the Custom Framework project is another Custom Framework project
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.
In my case, in the build settings, this was fixed when I added the following to the build settings for the library:
DYLIB_INSTALL_NAME_BASE = #rpath
The clue was a linker warning: 'YourLibrary has an install name beginning with “/”, but it is not from the specified SDK'
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"
I also received a similar mail from Apple:
Dear Developer,
We identified one or more issues with a recent delivery for your app,
"********. Please correct the following issues, then
upload again.
ITMS-90562: Invalid Bundle - One or more dynamic libraries that are
referenced by your app are not present in the dylib search path.
Best regards,
The App Store Team
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".
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.
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.
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.
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!
In my case, I've had to add a framework from Notification App Extension to the main target (embed & sign in the main target, do not embed in the extension) - even though there was no mention about it in otool -L output.
Funny thing that Iterable official doc says that the framework should be embedded & signed in the extension - which would lead to another upload problem because of nested bundles.

Unable to upload build in iTunes when using Google Plus through Pods [duplicate]

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

ERROR ITMS-90535: Unexpected CFBundleExecutable Key. Google Plus and Play Games Xamarin Component

I've been using the Google Plus and Play Games Xamarin Component (link) in the iOS version of my cross-platform app. I haven't had any trouble uploading it to the store in the past, but after upgrading to Xcode7, I receive the following error when trying to submit my .ipa through Application Loader:
ERROR ITMS-90535: "Unexpected CFBundleExecutable Key. The bundle at 'Payload/Brushfire.iOS.app/GooglePlus.bundle/GPPShareboxSharedResources.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue."
Since this is a Xamarin Component, I don't believe I have access to the plist file to change this value, so I can't use the solution posed in ITMS-90535 Unable to publish iOS app with latest Google Signin SDK. I don't want to have to wait for an update to the component from Xamarin. Are there any workarounds that could help me get my app into the store?
Xamarin is currently working on a solution to this issue, though we do not have an exact ETA currently on when the component will be out.
I can be sure to let you know on this thread when the updated version is released.
You can also follow along on our forums here:
https://forums.xamarin.com/discussion/50817/google-maps-for-ios-component-update#latest
Thanks!
Step 1: Update to Xcode 7.1 Xcode
Step 2: deleted (Info.plist file, such as a third-party static library included) App excess Info.plist
Step 3: Remove third-party App resource package Info.plist (Uniform Resource Check App in .bundle package inside if there Info.plist, consider deleting or delete items inside CFBundleVersion and CFBundleIdentifier)

Unexpected CFBundleExecutable key

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

Resources