Xcode Build Succeeded but not run on iPhone/Simulator

Viewed 10136

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.

4 Answers

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.

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.

Related