Xcode Build Succeeded but not run on iPhone/Simulator
Asked Answered
K

5

12

I am facing a little strange problem with Xcode, that is when I run my app is Xcode shows Succeeded but my app does not run automatically on iPhone or Simulator. I have to manually click on app icon then it runs. I have already tried all the solutions I could find. I have tried the following points:

  1. Adding in armv6
  2. Restarting xcode
  3. Restarting device/simulator
  4. Removing device from the organizer then adding it back.
  5. Restarting Mac Book Pro.
  6. Cleaning project and rebuilding
  7. Check plist
  8. Check target
  9. Check product>edit scheme > select run option (and info tab) ==> all is fine there

Please note I am using these frameworks via pods name are:

pod 'IQKeyboardManager'
pod 'GooglePlacePicker'
pod 'Firebase/Messaging'
pod 'Google'
pod 'Google/SignIn'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'

The app does not run automatically even after Xcode show Build succeeded on simulator/iPhone.

Kopple answered 4/6, 2017 at 20:48 Comment(3)
I have the same problem with at least all of the releases of Xcode 8.3.x. This looks like a bug that could be reported via Apple Bug Reporter.Pacesetter
In our project which has 150K+ lines of code we don't use CocoaPods but we do have a lot of static and dynamic frameworks in dependencies. The symptom though is exactly the same: "Build succeeded" but the app is not run.Pacesetter
The community has decided that it prefers title not to have homemade tags inserted at the start or end. I've removed it in this case, but equally sometimes a "tag" can be merged into a title, such as Xcode Build Succeeded but not run on iPhone/Simulator in iOS.Therine
I
12

I had a very similar problem after adding Cocoapods to my project. I was also using the Swifter framework at the same time and somehow the new .xcworkspace had the wrong scheme selected.

Similar to how Ravi fixed his issue. I changed the scheme under Product > Scheme > Choose Scheme (Keyboard shortcut ^0 ) back to the original Scheme (basically the name of my project) and everything worked again.

Inquest answered 14/12, 2020 at 20:1 Comment(4)
I am using Cordova projects, and this is worked. Thank you very much.Ensoll
My Cordova project was stuck building the Cordova Library, changing schemes to the scheme with the name of my application solved the problem, thank you!Slaton
This worked for me as well. I was in the process of signing for production, when a scheme change caused the issue. Or didn't cause it... developer error I'm sure :)Elodea
This fixed my problem when downloading another users Xcode project from Github. The Charts framework hijacked the Scheme so nothing was building on my iPhone. Thanks!Battista
A
2

Very frustrating issue. Solution is, inside Xcode:

  1. From top menu click Product -> Scheme -> Choose Scheme
  2. Now change selected one from the opened small Scheme box
  3. Done, it will work now

Or if that does not work:

  1. From top menu click Product -> Scheme -> Edit Scheme
  2. Inside Info tab, uncheck Debug executable. If the checkbox is not active, select Debug from the top selector, select your app name (YourAppName.app) from the second selector and now you can uncheck it.
  3. That is it, it should work now.
Abyssinia answered 4/10, 2022 at 6:21 Comment(0)
A
1

There is one more possible problem that I can think of and that is, you're using a developer account on this project that is not trusted/verified on your iphone. After running your app for once on this device. Go to Settings > General > Device Management. Then select the developer account that you have used to build this app and finally tap "trust".

Alcyone answered 4/6, 2017 at 23:3 Comment(2)
FINALLY found solution : In my case it works like a magic : Go to product>edit scheme > select run with info tab and un-check Debug executable . Magic started!! Run project again. I hope it should work in your case also. Thanks All...Kopple
@Kopple Thank you for posting your answer, that did the trick for me. You can post your answer and accept it so others can find it more easily :)Screenplay
B
0

Did you set the initial view controller? step one. select the view controller you want to show. step two. select the attributes inspector. step three. check the is initial view controller.

Bolzano answered 4/6, 2017 at 20:52 Comment(3)
Yes I have cross checked, all is fine there. It seems after installed frameworks via pods I got this issue, because before installation pod , app does start automatically . But I not sure for this. Apart from this, other my projects/app runs automatically without any issue. ThanksKopple
Did you add the GoogleServices-info.plist file?Bolzano
Yes I have already added GoogleServices-info.plist file in my projectKopple
S
0

I had a similar issue. The build would succeed but then XCode would show an alert "Unable to connect to XYZ's iPhone" (even though the phone was connected and unlocked and showing up as a valid build target). After checking Xcode -> Window -> Devices and Simulators the panel that appeared warned me there was an incompatibility between my iPhone model + iOS version and XCode. To fix the issue, I had to uninstall XCode and reinstall the version that it expected.

Shoat answered 20/7, 2021 at 18:57 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.