Moaz Khan Moaz Khan - 18 days ago 6
Swift Question

Unexpected CFBundleExecutable Key (Still Unable to Solve)

I have an issue which has been asked many times here and even has a lot of answers as well but still none of them worked for me.

'Unexpected CFBundleExecutable Key - The bundle at '/Payload/Currensee.app/CropViewController/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 installed GitHub PhotoCropEditor using Carthage (Here is the link https://github.com/sprint84/PhotoCropEditor )

What I have already tried (as mentioned in most answers)to change CFBundlePackageType to BNDL and to remove the CFBundleExecutable Key ( which I already did by searching the correct plist of PhotoCropEditor ). After doing that I am unable to run the app saying executable is required. Issue is AppStore keeps on rejecting the build saying the same thing so in short


  1. If I remove executable App doesn't work ( still tried to publish
    still build invalid )

  2. If I keep the executable same issue occurs



Note that same issue occurs when I tried to install the library manually. Other than that none of my pods directory is causing the issue only the one I installed using Carthage, as the library has no option for pods.

Some answers suggest removing .dsym files from copy bundle resources and I checked there are no .dsym files in my copy bundle resources section.

So what should I do so that my build on app store doesn't become invalid?

Answer

No one responded to my question, but after continuous search of trying to figure out a solution one thing finally worked. What I did was

  1. run carthage with --no-build option
  2. added the CropViewController library from Carthage/Checkouts to my project manually
  3. Opened the .plist of CropViewController and instead of removing CFBundleExecutable key I added this "$(EXECUTABLE_NAME)"
  4. Changed the OS Bundle OS Type Code to "BNDL"

Submitted the app and finally after 6 failed builds this build got accepted.