0

I'm trying to test Push notifications on a device, but can't get my app to install.

Take a look a this screen grab.

XCode Settings

I have provisioning profile attached that I've been using to successfully push to TestFlight and have used to push previous version to the App Store. But running it on my device locally and:

App installation failed
A valid provisioning profile for this executable was not found.

What's going on here?

I'm even more confused by "automatic" code signing. I turn it on, set my "Team" and:

App installation failed
A valid provisioning profile for this executable was not found.

Even if that did work, would the push notifications certs on the server now send to the right place?

nicholas
  • 14,184
  • 22
  • 82
  • 138

3 Answers3

0

Try go to xcode preferences, then accounts and under your apple id page, click on view details.

Check your signing identities if there is a reset button for your ios development. Click on the reset button if there is.

Also check your provisioning profiles. Download the profile that you need if there is a download button.

LuidonVon
  • 443
  • 6
  • 20
  • Thanks! Tried this too. Reset both my dev and dist identities, downloaded all profiles, but still none of the profiles, or "automatic" will let me install on my device. – nicholas Nov 11 '16 at 20:14
  • Have u try deleting your app on the device and install it again? – LuidonVon Nov 14 '16 at 03:41
  • Yeah - as it was, it wasn't installing even once. But I figured it out, stupid oversight in the end (answer below). Thanks for the help. – nicholas Nov 14 '16 at 03:45
0

There might be multiple scenarios.

  1. Check if your device UDID is there in the provisioning profile.
  2. In Xcode, Goto --> Build --> clean all targets.
  3. As you are using Distribution certificate, make sure your provisioning profile is also for distribution.
  4. Go to keychaing --> UnHide Expired Certificates --> Delete the expired certificates.
  5. Delete duplicate provisioning profile if any.

May be you can also check this SO question

App Installation Failed

Might be it can help you. Good Luck

Community
  • 1
  • 1
Sabby
  • 2,586
  • 2
  • 27
  • 41
  • Thanks. I tried all of this, but still get the same message. What baffles me, too, is that I'm logging to my "team", so shouldn't the "automatic" checkbox also take care of all of this? – nicholas Nov 11 '16 at 20:13
  • @nicholas, I have added one SO link, see if it can help you. – Sabby Nov 14 '16 at 03:50
  • That looks like exactly the issue I was having. Once I turned on automatic signing on the tests target, the app installed on my device find. – nicholas Nov 14 '16 at 03:53
0

Turns out my problem was pretty simple. I have two targets: MyApp and MyAppTest. When installing on a device locally, I guess it also installs the tests, as setting that to automatically sign and selecting the team seemed to fix it.

nicholas
  • 14,184
  • 22
  • 82
  • 138