102

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: enter image description here

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.

Dumoko
  • 2,614
  • 3
  • 25
  • 34
  • 2
    Have you solved this problem? I'm facing this issue too, but it's GoogleMaps.bundle... – Johnny Aug 19 '15 at 14:54
  • 1
    No, not yet. Looks like it's a generic problem. – Dumoko Aug 19 '15 at 14:56
  • This is really annoying :(, I've asked on the Apple Developer forum, see if somebody else got this problem. https://forums.developer.apple.com/message/42851#42851 – Johnny Aug 19 '15 at 15:02
  • We're seeing this too in a new integration with Startapp. Also iOS 9 and Xcode 7 beta 5. – Trey Bean Aug 20 '15 at 01:07
  • 2
    Moataz from Instabug here. Can you replace the Instabug.bundle that you have with this one https://www.dropbox.com/s/37zwhaqzatfnz3n/Instabug.bundle.zip?dl=0, let me know how it goes – Moataz Soliman Aug 20 '15 at 13:42
  • @MoatazSoliman it worked... I got new errors, but I didn't get the Instabug bundle fail like i would expect. Please share your knowledge on this. – Dumoko Aug 20 '15 at 19:29
  • Here's the new link to the Instabug.bundle (https://www.dropbox.com/s/zzs7q2eygfa6wms/Instabug.bundle.zip?dl=0) – Moataz Soliman Aug 26 '15 at 13:52
  • I have this problem with Google App Indexing and Google+ library. May be more such errors, I don't know. My configuration is pretty much fit yours, we're using pods, and I disabled bitcode as well. – Mike Keskinov Sep 03 '15 at 22:20
  • Apple Developer Forums... I've seen tumbleweeds there the size of which you wouldn't believe! – Nicolas Miari Sep 04 '15 at 08:10
  • @Johnny you link is broken – Stoff81 Sep 15 '15 at 13:00
  • Had this in an app this week. Now I have to fix in some of our libs too. It's an Apple bug, in Xcode old versions, that they've decided to fix - but screw developers at the same time. There is NOTHING wrong with libs, but Apple changed the rules, and instead of making Xcode auto-fix the bug from old Xcode versions, they blame developers. Please: put blame where it's due - on Apple. Ask library devs to help - but it's not their fault! – Adam Oct 24 '15 at 00:50
  • This should automate your archiving : http://stackoverflow.com/a/38229037/1722474 – Maciej Stramski Jul 06 '16 at 16:32

12 Answers12

114

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.

starball
  • 20,030
  • 7
  • 43
  • 238
Sleiman
  • 1,620
  • 1
  • 12
  • 16
  • 2
    thank you for sharing your experience! So it IS the library author problem. But we, developers, should not do these tricks... For example, I use pods and a CI system. I cannot go to the CI and each time after pod install do this manual change. But at least we will have it working. So far I am looking for a generic solution. If it doesn't come soon, your I will mark your answer as the one that helps. Thank you again! – Dumoko Aug 20 '15 at 19:32
  • I can't do this. If I'm trying openning info.plist inside pod in Xcode, it told me that file locked and changes won't be save (and it doesn't). If I use external text editor, I can see that content of plist file somehow encoded, it's not a plain text. – Mike Keskinov Sep 03 '15 at 22:22
  • @MikeKeskinov, could this link be helpful: [http://apple.stackexchange.com/questions/68646/how-do-i-unlock-a-plist-file-so-that-i-can-change-it] ? It suggests finding the info.plist in the Finder and editing the file's permissions to allow you to edit it in Xcode. – Sleiman Sep 04 '15 at 13:19
  • I too had similar issue and reported to Apple. Your steps are absolutely correct as suggested by Apple. https://bugreport.apple.com/problem/viewproblem – Avinash Sep 05 '15 at 04:37
  • I wrote a shell script to remove this as a workaround. You add this as a run script during the Build Phases of your project: https://gist.github.com/brightredchilli/ca63430518f0daa4dfa9 – Ying Sep 23 '15 at 16:15
  • You can script this with `PlistBuddy`: `/usr/libexec/PlistBuddy -c "Delete CFBundleExecutable" BananaKit.framework/Resources/NMABundle.bundle/Info.plist` (note that if you put this in a script, it will fail if the key is already deleted—append `|| echo "Already deleted."` to avoid this. – Robert Atkins Nov 05 '15 at 17:29
  • Thank!! you!! but Important: Don´t edit anything in the info.plist of the main target, only inside of the specific bundle! – A. Trejo Jan 11 '16 at 20:47
53

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:

enter image description here

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:

enter image description here

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.

Adam S
  • 16,144
  • 6
  • 54
  • 81
  • Do you know what the side effects of this are? I am having this same issue with the Polljoy bundle. Do you think that entry is just in the plist erroneously? – Stoff81 Sep 15 '15 at 12:59
  • 1
    ["Xcode automatically adds this key to the information property list file of appropriate projects."](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101909) I'm sorry I can't tell you the side effects, however I suspect it's due to using an older library that hasn't been distributed with support for Frameworks, and then Xcode tries to treat it the same as one that _does_ have support for Frameworks. – Adam S Sep 15 '15 at 13:40
  • Unfortunately for some libraries (i.e. AppIndexing etc) the plist file content seems to be encripted. It allow you to view but doesn't save any changes. When tryting open file outside XCode, it's clear that file is encrypted (no plain text). – Mike Keskinov Sep 16 '15 at 17:18
  • this worked for google signin, and allowed me to upload to App store – James Oct 06 '15 at 18:12
  • 2
    I just enountered the same issue with Aviary and Cocoapods 0.39. Your suggested fix seems to work. Looks like it might be time to bite the bullet and switch to AdobeCreativeSDK :( – Keab42 Feb 01 '16 at 18:06
  • What could be the reason for this issue? @AdamS – KarenAnne Nov 10 '17 at 05:05
11

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.

enter image description here

enter image description here

enter image description here

9

Here's what worked for me

  1. Apple-Shift-F, search for CFBundleExecutable
  2. Click each one except "PODS" or your main target
  3. Delete it (delete key)

enter image description here

William Entriken
  • 37,208
  • 23
  • 149
  • 195
5

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:

enter image description here

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.

Manab Kumar Mal
  • 20,788
  • 5
  • 31
  • 43
5

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.

enter image description here

Umar Farooq
  • 735
  • 1
  • 10
  • 19
1

Just check your Build Settings => Enable Bitcode, and set it NO

InitialC
  • 17
  • 3
1

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.

Krunal Nagvadia
  • 1,083
  • 2
  • 12
  • 33
0

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.

jimejim
  • 594
  • 6
  • 8
0

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.

Quentin
  • 3,971
  • 2
  • 26
  • 29
0

I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

That was the issue

ascripter
  • 5,665
  • 12
  • 45
  • 68
0

a simple answer to this is just disable CODE_SIGNING_ALLOWED in the Podfile. and all working fine.

here is the code

post_install do |installer|
    react_native_post_install(installer)
    
    
    #############
      installer.pods_project.targets.each do |target|
            
        ### Added for Maps
        if target.name == 'RCT-Folly'
          target.build_configurations.each do |config|
            config.build_settings['HEADER_SEARCH_PATHS'] = "$(inherited) ${PODS_ROOT}/fmt/include"
            config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
          end
        end
        #### Added For Maps Ended 

        if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
          target.build_configurations.each do |config|
              config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
              config.build_settings["DEVELOPMENT_TEAM"] = "XXXW7BNX6K" 
          end
        end
      end
    ############


    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
    end
    #__apply_Xcode_12_5_M1_post_install_workaround(installer)
  
  end
end
Engr.Aftab Ufaq
  • 3,356
  • 3
  • 21
  • 47