user1019042
user1019042

Reputation: 2218

Xcode project run in one device but not in another

I'm testing my Xcode project in simulator and in 2 iPhones 6. Both iPhones are identical and actually bought together on the same time. That was couple of years ago. Now Phone #1 is running on iOS 9.3.2 and Phone #2 is running on 9.3.1. I have Xcode pros with deployment target of 9.3. Xcode version is 7.3

I can run my Xcode project in the simulator fine and when I plugged phone #2, but on #1, it will execute fewer lines than #2 and then stops.

I have went though all the paths in this article and deleted all of these one at time:

I have also tried restarted the Xcode in every of the steps above, and restarting my iPhone then plugging it when it loads. Nothing worked

Like I said the code for phone #1 actually runs a little bit, but then stops executing further lines. I stepped through code to see why and where my phone #1. There was no error, the execution just stops, sometimes at the same place, sometimes a little earlier. Phone #2 runs all code just fine and returns results.

What's going on!? Why does it work in one iPhone but not in the other, even though both are running the same phone and same version!? Is there another cache path that I should try to also delete!?

UPDATE #1: per @daneejela questions: The line where it stops is different each time. When I setup the provision profile happened a while ago. Phone#1 was if not the only phone, was the first one I would test my provision setup or not. It was only couple of weeks ago where it stopped working on phone#1.

UPDATE #2: somehow my profile in apple developer got all messed up and was showing invalid. I had to regenerate it and it worked right away.

Upvotes: 0

Views: 1230

Answers (2)

user3126427
user3126427

Reputation: 855

I've seen strange behavior with apple developer importing/exporting. One thing that is worth trying is, if feasible, to regenerate your provision profile at the apple developer if you are still at the developer phase. If that makes it work, try not to touch those settings again or perform any operations against them.

Upvotes: 2

Idali
Idali

Reputation: 1023

If you have already checked device setting: wifi, airplaneMode.... Then try to delete app from both device and retry first on iPhone#2. (may be you have saved a different value in a userDefault during previous testing kind of staff that remains in device.. that you are using in your request). Also try with another user or new user (your server may have association between device-user). also show your request detail and explain how your server handle users

Upvotes: 0

Related Questions