问题
When I run my project directly from Xcode to my device it runs perfect without any crashes. But when I create an ipa file of that project and install that ipa into my device by using iTunes, when i click on the login button it crashes,later so many tries for logins after that it works fine.
if refer this issue on internet by it doesn't help for me. this are the links i refer
App works fine with developer build with xcode. But crashes when run using ipa file
Gameplay Crashes From ipa file but runs fine from Xcode?
i don't understand what is the actual problem with the achieve ipa file. why it does not crashes when I run it directly from Xcode. Is there any code compression or different mechanism of code compilation when running as an ipa or from Xcode.
Any help would be appreciated.
CrashLog
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x00000001010b25dc 0x100f74000 + 1304028
1 AppName 0x00000001001030c4 0x1000bc000 + 291012
2 Appname 0x00000001001062cc 0x1000bc000 + 303820
3 Alamofire 0x00000001004c9c9c 0x10047c000 + 318620
4 Alamofire 0x00000001004c899c 0x10047c000 + 313756
5 Alamofire 0x0000000100486d08 0x10047c000 + 44296
6 libdispatch.dylib 0x000000018571e1fc 0x18571d000 + 4604
7 libdispatch.dylib 0x000000018571e1bc 0x18571d000 + 4540
8 libdispatch.dylib 0x0000000185722d68 0x18571d000 + 23912
9 CoreFoundation 0x0000000186842810 0x186765000 + 907280
10 CoreFoundation 0x00000001868403fc 0x186765000 + 898044
11 CoreFoundation 0x000000018676e2b8 0x186765000 + 37560
12 GraphicsServices 0x0000000188222198 0x188216000 + 49560
13 UIKit 0x000000018c7b57fc 0x18c73b000 + 501756
14 UIKit 0x000000018c7b0534 0x18c73b000 + 480564
15 AppName 0x0000000100139e4c 0x1000bc000 + 515660
16 libdyld.dylib 0x00000001857515b8 0x18574d000 + 17848
Thread 1:
0 libsystem_kernel.dylib 0x0000000185863a88 0x185844000 + 129672
1 libsystem_pthread.dylib 0x0000000185927344 0x185926000 + 4932
2 libsystem_pthread.dylib 0x0000000185926d8c 0x185926000 + 3468
Thread 2:
0 libsystem_kernel.dylib 0x0000000185863a88 0x185844000 + 129672
1 libsystem_pthread.dylib 0x0000000185927160 0x185926000 + 4448
2 libsystem_pthread.dylib 0x0000000185926d8c 0x185926000 + 3468
Thread 3:
0 libsystem_kernel.dylib 0x0000000185863a88 0x185844000 + 129672
1 libsystem_pthread.dylib 0x0000000185927344 0x185926000 + 4932
2 libsystem_pthread.dylib 0x0000000185926d8c 0x185926000 + 3468
Thread 4:
0 libsystem_kernel.dylib 0x0000000185863a88 0x185844000 + 129672
1 libsystem_pthread.dylib 0x0000000185927344 0x185926000 + 4932
2 libsystem_pthread.dylib 0x0000000185926d8c 0x185926000 + 3468
Thread 5 name: com.apple.uikit.eventfetch-thread
Thread 5:
0 libsystem_kernel.dylib 0x0000000185845188 0x185844000 + 4488
1 libsystem_kernel.dylib 0x0000000185844ff8 0x185844000 + 4088
2 CoreFoundation 0x00000001868425d0 0x186765000 + 906704
3 CoreFoundation 0x00000001868401ec 0x186765000 + 897516
4 CoreFoundation 0x000000018676e2b8 0x186765000 + 37560
5 Foundation 0x00000001872ab26c 0x18729f000 + 49772
6 Foundation 0x00000001872cbdd0 0x18729f000 + 183760
7 UIKit 0x000000018d129c38 0x18c73b000 + 10415160
8 Foundation 0x00000001873a8e68 0x18729f000 + 1089128
9 libsystem_pthread.dylib 0x0000000185929850 0x185926000 + 14416
10 libsystem_pthread.dylib 0x0000000185929760 0x185926000 + 14176
11 libsystem_pthread.dylib 0x0000000185926d94 0x185926000 + 3476
Thread 6:
0 libsystem_kernel.dylib 0x0000000185862e1c 0x185844000 + 126492
1 libsystem_pthread.dylib 0x00000001859289c0 0x185926000 + 10688
2 libc++.1.dylib 0x00000001852513ec 0x18524a000 + 29676
3 JavaScriptCore 0x000000018b0725d0 0x18a799000 + 9278928
4 JavaScriptCore 0x000000018b072544 0x18a799000 + 9278788
5 JavaScriptCore 0x000000018b072424 0x18a799000 + 9278500
6 JavaScriptCore 0x000000018b0726d4 0x18a799000 + 9279188
7 libsystem_pthread.dylib 0x0000000185929850 0x185926000 + 14416
8 libsystem_pthread.dylib 0x0000000185929760 0x185926000 + 14176
9 libsystem_pthread.dylib 0x0000000185926d94 0x185926000 + 3476
Thread 7 name: com.apple.NSURLConnectionLoader
Thread 7:
0 libsystem_kernel.dylib 0x0000000185845188 0x185844000 + 4488
1 libsystem_kernel.dylib 0x0000000185844ff8 0x185844000 + 4088
2 CoreFoundation 0x00000001868425d0 0x186765000 + 906704
3 CoreFoundation 0x00000001868401ec 0x186765000 + 897516
4 CoreFoundation 0x000000018676e2b8 0x186765000 + 37560
5 CFNetwork 0x0000000186f73a70 0x186e94000 + 916080
6 Foundation 0x00000001873a8e68 0x18729f000 + 1089128
7 libsystem_pthread.dylib 0x0000000185929850 0x185926000 + 14416
8 libsystem_pthread.dylib 0x0000000185929760 0x185926000 + 14176
9 libsystem_pthread.dylib 0x0000000185926d94 0x185926000 + 3476
Thread 8 name: JIT Worklist Worker Thread
Thread 8:
0 libsystem_kernel.dylib 0x0000000185862e1c 0x185844000 + 126492
1 libsystem_pthread.dylib 0x00000001859289c0 0x185926000 + 10688
2 libc++.1.dylib 0x00000001852513ec 0x18524a000 + 29676
3 JavaScriptCore 0x000000018b05ad64 0x18a799000 + 9182564
4 JavaScriptCore 0x000000018ae32a5c 0x18a799000 + 6920796
5 JavaScriptCore 0x000000018ae32eac 0x18a799000 + 6921900
6 JavaScriptCore 0x000000018a7a300c 0x18a799000 + 40972
7 JavaScriptCore 0x000000018a7a2f1c 0x18a799000 + 40732
8 libsystem_pthread.dylib 0x0000000185929850 0x185926000 + 14416
9 libsystem_pthread.dylib 0x0000000185929760 0x185926000 + 14176
10 libsystem_pthread.dylib 0x0000000185926d94 0x185926000 + 3476
Thread 9 name: WTF Parallel Helper Thread
Thread 9:
0 libsystem_kernel.dylib 0x0000000185862e1c 0x185844000 + 126492
1 libsystem_pthread.dylib 0x00000001859289c0 0x185926000 + 10688
2 libc++.1.dylib 0x00000001852513ec 0x18524a000 + 29676
3 JavaScriptCore 0x000000018b05ad64 0x18a799000 + 9182564
4 JavaScriptCore 0x000000018b05a2e8 0x18a799000 + 9179880
5 JavaScriptCore 0x000000018b05a088 0x18a799000 + 9179272
6 JavaScriptCore 0x000000018a7a300c 0x18a799000 + 40972
7 JavaScriptCore 0x000000018a7a2f1c 0x18a799000 + 40732
8 libsystem_pthread.dylib 0x0000000185929850 0x185926000 + 14416
9 libsystem_pthread.dylib 0x0000000185929760 0x185926000 + 14176
10 libsystem_pthread.dylib 0x0000000185926d94 0x185926000 + 3476
Thread 10 name: com.apple.CoreMotion.MotionThread
Thread 10:
0 libsystem_kernel.dylib 0x0000000185845188 0x185844000 + 4488
1 libsystem_kernel.dylib 0x0000000185844ff8 0x185844000 + 4088
2 CoreFoundation 0x00000001868425d0 0x186765000 + 906704
3 CoreFoundation 0x00000001868401ec 0x186765000 + 897516
4 CoreFoundation 0x000000018676e2b8 0x186765000 + 37560
5 CoreFoundation 0x00000001867bbb44 0x186765000 + 355140
6 CoreMotion 0x000000018d631120 0x18d5c3000 + 450848
7 libsystem_pthread.dylib 0x0000000185929850 0x185926000 + 14416
8 libsystem_pthread.dyli 0x0000000185929760 0x185926000 + 14176
9 libsystem_pthread.dylib 0x0000000185926d94 0x185926000 + 3476
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000101524380 x1: 0x00000001702f4d00
x2:0x0000000000000008 x3: 0x00000001858a922c
x4: 0x0000000000000014 x5: 0x0000000000000010 x6:
0x0000000000000000 x7: 0x0000000000000600
x8: 0x00000001702f4900 x9: 0x00000001702f4900 x10:
0x0000000000000001 x11: 0xbaddc0dedeadbead
x12: 0x0000010000000100 x13: 0x206e6120676e6970 x14:
0x6c616e6f6974704f x15: 0x000a65756c617620
x16: 0x00000001858996b0 x17: 0x0000000000000000 x18:
0x0000000000000000 x19: 0x0000000170442eb0
x20: 0x0000000170e67400 x21: 0x0000000000000000 x22:
0x0000000000000000 x23: 0x0000000000000014
x24: 0x00000001ac178d20 x25: 0x0000000000000000 x26:
0xffffffffffffffff x27: 0x0000000170e67400
x28: 0x0000000002ffffff fp: 0x000000016fd415b0 lr:
0x00000001010b25dc
sp: 0x000000016fd415a0 pc: 0x00000001010b25dc cpsr: 0x20000000
thanks
回答1:
You should look at the crashing logs.
- connect you device to you Mac
- in Xcode, press cmd+shift+2.
- find you device, and press the log button
- wait a while. then you can see all crashing logs.
- find the ones with your app's name. If you don't understand it, post it here.
回答2:
I have also gone through same issue
You have to edit your scheme
Archive --> Build Configuration --> set this to Debug Try to archive and test your IPA now.. it should work fine.
回答3:
I assume that you build your app with different build configurations basically using the Debug
configuration when you run it from Xcode and the Release
configuration for deployment as ipa. We had a similar issue with unexplainable bugs in the release configuration and figured out that the Swift Optimization caused the problem. For now we switched from Fast, Whole Module Optimization
to Fast, Single-File Optimization
for the release builds until we can narrow down the problem.
Hope that helps!
来源:https://stackoverflow.com/questions/42871059/app-crashes-from-ipa-file-but-runs-fine-from-xcode