App crashing on launch in iPhone x?

Viewed 2981

I have developed an app with swift 4 & Xcode 9. Whenever i launch the app its crashes. It does not give any error on Console.

I studied it that it is the issue of the font.

Existing app crashes on startup on iPhone X Simulator

But my font is in my project and plistenter image description here

Some of them said that it is storyboard issue as the controller must have safe area margin. But few days back I run my app on iPhone X but it did not crash although it was not using safe area.

My app crashes in appdelegate as below screenshot

enter image description here

Does anyone know why this happens?

4 Answers

You have to add font extension also Ex. roboto.ttf

enter image description here

In my opinion it's not specifically iPhone x simulator problem, you can run it on other simulators or real device to be sure about it.

you can find the step by step adding font to the Xcode project in this thread

Step 1: Include your fonts in your XCode project

Step 2: Make sure that they’re included in the target

Step 3: Double check that your fonts are included as Resources in your bundle

Step 4: Include your iOS custom fonts in your application plist

Step 5: Find the name of the font

Step 6: Use UIFont and specify the name of the font and also make sure that you've added the phone to the bundle resources:

Bundle Resources: enter image description here

there is also another possibility of crash because of the font which is the incorrect font name in the code (if you used it programmatically). check the font name from UIFont.familyNames

Thanks to all for thier answers & helping me. Below are some points I would like to mention:

  1. It was not a font issue for me.
  2. It not a permission issue for me.

The library which I used is known as "ROLLBAR" was causing app to crash. When I removed the code for this library, I am able to run my app on iPhone X.

Possibly, this is a permission issue. Please check the required permissions in your app and give the appropriate permission strings.

If the problem persists, reset your simulator. This will make the simulator run fresh.

Please keep me posted.

Related