0

I am having a weird issue with the latest build of my app where it runs fine on my phone when I launch it through Xcode but if I launch it later by tapping the app Xcode installed on my phone it crashes immediately after the launch screen has been displayed.

So to be clear it runs fine on my iPhone when plugged in to my computer and launched from Xcode.

It crashes after the launch screen if not plugged in to my computer.

I recently upgraded to Swift 2 and this is the first time I've tried it on my phone since.

Any ideas as to what could be causing this problem? I have no idea how to debug it since the error only occurs not plugged in.

Crash report from the device log:

Date/Time:           2015-10-20 21:31:47.47 -0600
Launch Time:         2015-10-20 21:31:47.47 -0600
OS Version:          iOS 9.0.2 (13A452)
Report Version:      105

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001007d0f5c
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib              0x00000001007d0f5c 0x100690000 + 1314652
9
  • You can access your device crash logs from Xcode, check them and see what error you get Commented Oct 20, 2015 at 22:53
  • Update your question with details about the crash. Commented Oct 20, 2015 at 22:53
  • @Vladimir how do I go about accessing those crash logs? Commented Oct 20, 2015 at 22:54
  • 1
    You can launch it on the device and then connect debug in Xcode with "Attach to Process" . Just for debugging you can also add an empty view controller with a button that goes to your actual First VC. Then you will have time to connect in Xcode while still launching from the device. If it crashes before pushing the button, the problem is in AppDel, if it doesn't it's in ViewDidLoad of the first VC. You will now also have access to the normal debug workflow. Commented Oct 21, 2015 at 0:49
  • 1
    Symbolicate the crash log and see where in your Swift code the app is crashing. Commented Oct 21, 2015 at 3:54

1 Answer 1

1

By following Vladimir's instructions to view the device log I was able to pin point where the crash was happening.

window -> devices (or shift-cmd-2) and there you'll see "View device log" button

Sign up to request clarification or add additional context in comments.

1 Comment

was it something that could happen to others? if so maybe explain it in your answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.