2

Every time I install an Ad-hoc build to my device via Xcode->USB, the app freezes at splash screen. Even killing the app and restarting it doesn't work.

I have to Restart my phone to get it work.

I tried:

  • deleting previously installed app
  • deleting previous app and restarting phone before installing new ad-hoc build
  • deleting provision profile. window-> Device & Simulators -> right click on my device-> show provision profile -> Delete previous provision profile.

--

Edit: I tried with disabling Debug mode for Ad-Hoc mobile provision, the installing took a long time. Seems like with Debug mode disabled, archiving(takes a lot of time-energy) happens before installing app in to phone.

I would go with debug-on and re-start to save time.

Bista
  • 7,869
  • 3
  • 27
  • 55

2 Answers2

0

It look like some process hold your app.
Can you try just using developer mobile provision instead Ad hoc?
If you need install you're app like "production application", you can use TestFlight.
Also TestFlight true way to delivery you're app to testers/client/someone.

Update
developer mobile provision - enable debug mod for application
Ad hoc mobile provision - disabled debug mod for application

Maybe you have some logs at start application?
Also you can recheck Capability in both mobile provisions.

Eysner
  • 584
  • 4
  • 15
  • 1
    Using developer profile is working, but why does ad hoc requires phone to restart? – Bista Jun 18 '19 at 08:54
  • @Bista how you install application on device? Run build with Release scheme or Install ipa file? If you install with compile (just click run), Xcode try debug you're build and we have problem with connections debug on prod app. – Eysner Jun 18 '19 at 09:54
  • I am directly installing app on my device using USB cable with AdHoc profile. – Bista Jun 21 '19 at 06:02
  • @Bista Can you get log http://osxdaily.com/2018/07/12/how-view-ios-logs-on-mac/ ? Maybe you have some error in install or start run application. – Eysner Jun 21 '19 at 08:24
  • How to " disabled debug mod for application"? – Bista Jun 26 '19 at 08:18
  • @Bista If i understand correctly, then you need open Product -> Scheme -> Edit Scheme. And you can see Debug executable option. Some info about it - https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/debugging_tools.html#//apple_ref/doc/uid/TP40015022-CH8-SW22 and about – Eysner Jun 26 '19 at 10:44
  • I tried with disabling Debug for AdHoc mobile provision, the installing took a long time. Seems like with Debug mode disabled, archiving happens before installing app in to phone. :/, I would go with debug-on and re-start in this case. – Bista Jun 29 '19 at 04:07
0

If you want to debug your application using Xcode then you need to use developer provisioning profile.

If you try to install the app using an Ad-Hoc provisioning profile then it always kills app after installing an app, because of Ad-hoc provisioning profile is used to check your application at the distribution level (it means test app before submitting to the apple store)

Ad Hoc Distribution Authorizes a Limited Set of Devices to Run Your App

iOS developers enrolled in the Standard Program can also distribute an app outside of the App Store on up to 100 different devices for testing purposes only. To use ad hoc distribution, create an archive of your app, or have a teammate send you an iOS App Store Package (.ipa) of the archived app.

Note:- See the following steps to install the application using AdHoc provision profile via iTunes.

https://mercdev.com/support/running-ios-ad-hoc-builds

AtulParmar
  • 4,358
  • 1
  • 24
  • 45
  • Kill application is NOT restart phone. And if you install app (how sign with Ad Hoc) with iTunes Application or Fabric (for example), app don’t crash after install. App don’t kill always after installing. Application with Ad Hoc have crash only if you try debug this application. – Eysner Jun 20 '19 at 13:24
  • @Eysner Ad-Hoc profile is not used for installing the application from the Xcode. An ad-hoc provisioning profile is used later in the development process, If you want to test your app with debugger and everything what Xcode provides, you have to use the development profile. – AtulParmar Jun 20 '19 at 13:29
  • Can you read my comments? Are you sure that i say about we need debug with Ad hoc? I know how work Ad Hoc. I just say we don’t answer for question “Why Bista need RESTART phone with Ad Hoc profile” – Eysner Jun 20 '19 at 13:48
  • @Eysner Yes, to debug we need development profile.I do no want debugger support with AdHoc. But cant we install an AdHoc application directly via USB cable from Xcode? Why phone restart is needed? The links looks promising I'll try and let you know. – Bista Jun 21 '19 at 06:05