Sajid Zeb
Sajid Zeb

Reputation: 1978

App installation failed: The application bundle does not contain an executable in Swift Xcode

I am getting this issue while installing application into my iphone 6s plus device.

enter image description here

This is whats happened. Twitter kit was creating a problem. I deleted the POD folder and pod install and pod update TwitterKit. Everything sets up. added twitterkit framework in project. After clean build an build. Everything looks fine. Then i go to install app in device with the cable. I am getting this issue now.

Tried following ways

None of the above solutions make it work. Any help will be appreciated. Thanks

Upvotes: 1

Views: 6026

Answers (5)

cmatic
cmatic

Reputation: 51

I had the same message and resolved this by changing the build system in the workspace settings. In my case, the build system for "shared workspace settings" was on "new build system" and the build system fro "pre user workspace settings" was on legacy. Putting both on new build solved the problem.

Upvotes: 0

Chiron
Chiron

Reputation: 984

In my case, the error was caused by mis-setting of framework dependency.

Correct framework dpendency without error:

enter image description here

Problematic dependency giving The application bundle does not contain an executable error:

enter image description here

Conclusion:

make sure there are no duplicate framework dependency.

Upvotes: 0

Sajid Zeb
Sajid Zeb

Reputation: 1978

Thanks Ying and Sachin for your help and time. I appreciate that. But I have figured out what went wrong.

The problem was with TwitterCore.framework in TwitterKit.

I looked into TwitterKit frameworks in Pods/TwitterKit/iOS/TwitterKit.framework/Info.plist, there was a key 'Executable file' with string value of 'TwitterKit' in it.

When i go in the same place in TwitterCore Pods/TwitterKit/iOS/TwitterCore.framework/Info.plist, 'Executable file' key was missing. i added it with string 'TwitterCore'.

Problem solved. :)

Upvotes: 3

Sachin Dobariya
Sachin Dobariya

Reputation: 744

  • Remove all your extensions from Build Phases > Target Dependencies and Build Phases > Embed App Extensions stages.
  • Run Product > Clean
  • Try compiling
  • Add your extensions one by one and do Product > Clean + Product > Run after adding each of them.

Hope this helps.

Upvotes: 1

YingYang
YingYang

Reputation: 418

Check your pinfo.list, if this setting is existing, if not add it:

<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>

Upvotes: 2

Related Questions