Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS app crashes using adhoc distribution profile

i creates iOS app and it works completely using development profile in device. it never crashes in device using development provisioning profile.

But when i create its adhoc distribution profile and creates ipa with it then the app crashed at many point. But the problem is that with the distributed profile i cant debug so i unable to see crash log. so i cant understand why the app crash which is complete run over the development profile... and how to resolve this problem?

Thanx to all

like image 967
Ashish Ramani Avatar asked Apr 21 '14 07:04

Ashish Ramani


2 Answers

Your ad-hoc distribution profile may crash the app the first time it is run on your device, but run fine the second time, in alternate ways. The following steps will help you resolve the problem.

  1. Create the .ipa file.
  2. Install the .ipa file into iTunes.
  3. Finally install the .ipa file to your device via iTunes.

If you're still getting crashes, connect your device to your Mac and view its logs in XCode.

  1. In XCode, Go to Window -> Devices.
  2. Choose your connected device, then choose View Device Logs.

Here you are able to check your logs, errors and crash reports, which should tell you why the app is crashing.

like image 183
Anbu.Karthik Avatar answered Sep 19 '22 17:09

Anbu.Karthik


I followed @Anbu's tip to check the device logs via Xcode > Window > Devices > View Device Logs.

The problem for me was that I am using a custom font which is integrated into my project via CocoaPods. During development time, the app runs smoothly because my computer can see where the font files are. However, Xcode doesn't bundle the font files from the pod into the project, so I had to either:

  • Add the font files into Build Phases > Copy Bundle Resources and adding the font files into my main project folder (without copying them; only as references).
  • Or, remove the custom font as a CocoaPods dependency and copy-paste the font files to my project instead.

I went with the second one since I might accidentally delete one of the references to the font files and encounter the problem again.

like image 45
MLQ Avatar answered Sep 21 '22 17:09

MLQ