IOS13 iPad 已付费应用的设置崩溃
IOS13 iPad Settings crashing for already paid app
我们在 AppStore 上的应用 运行 多年来一直没有任何问题。然而,自 iOS 13 发布以来,虽然应用程序仍然可以正常运行,但进入
iPad Settings -> MyApp
崩溃和设置应用程序将结束,以前的 iOS 版本没有任何问题。
我查看了 XCODE 管理器的设备日志,可以在日志中看到以下内容:
Incident Identifier: DC00F244-958C-407F-BDC9-CFD7D6C3D8C8
CrashReporter Key: e5b2979fc92fb936e83ef8fdab74fbd1c0707ce3
Hardware Model: iPad6,4
Process: Preferences [530]
Path: /Applications/Preferences.app/Preferences
Identifier: com.apple.Preferences
Version: 161.2 (1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.apple.Preferences [634]
Date/Time: 2019-10-05 06:18:38.6274 +0100
Launch Time: 2019-10-05 06:18:17.3730 +0100
OS Version: iPhone OS 13.1.2 (17A860)
Release Type: User
Baseband Version: 7.00.01
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001a581fefc
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [530]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x00000001a581fefc specialized _assertionFailure+ 2154236 (_:_:file:line:flags:) + 440
1 libswiftCore.dylib 0x00000001a581fefc specialized _assertionFailure+ 2154236 (_:_:file:line:flags:) + 440
2 libswiftCore.dylib 0x00000001a563b64c _assertionFailure+ 169548 (_:_:file:line:flags:) + 32
3 SettingsUIKitPrivate 0x00000001bfce0c24 0x1bfcda000 + 27684
4 SettingsUIKitPrivate 0x00000001bfce0fd4 0x1bfcda000 + 28628
5 SwiftUI 0x00000001cd28d86c Binding.init+ 6629484 (get:set:) + 144
6 SettingsUIKitPrivate 0x00000001bfcdf654 0x1bfcda000 + 22100
7 SettingsUIKitPrivate 0x00000001bfcdca54 0x1bfcda000 + 10836
8 SettingsUIKitPrivate 0x00000001bfcdc44c 0x1bfcda000 + 9292
9 SwiftUI 0x00000001cccf88e4 DynamicPropertyBody.update+ 776420 (context:) + 1768
10 SwiftUI 0x00000001cccf9070 protocol witness for static UntypedAttribute._update+ 778352 (_:graph:attribute:) in conformance DynamicPropertyBody<A> + 36
11 AttributeGraph 0x00000001c248e458 partial apply + 28
12 AttributeGraph 0x00000001c2476a60 AG::Graph::UpdateStack::update+ 14944 () + 984
13 AttributeGraph 0x00000001c2476d24 AG::Graph::update_attribute+ 15652 (unsigned int, bool) + 372
14 AttributeGraph 0x00000001c2479e9c AG::Graph::value_ref+ 28316 (AG::attribute_t, AGTypeID, bool*) + 116
15 AttributeGraph 0x00000001c24815ac AG::Graph::EntryExit::update_entry+ 58796 () const + 64
16 AttributeGraph 0x00000001c2476a60 AG::Graph::UpdateStack::update+ 14944 () + 984
17 AttributeGraph 0x00000001c2476d24 AG::Graph::update_attribute+ 15652 (unsigned int, bool) + 372
18 AttributeGraph 0x00000001c2479e9c AG::Graph::value_ref+ 28316 (AG::attribute_t, AGTypeID, bool*) + 116
19 AttributeGraph 0x00000001c24879e4 AGGraphGetValue + 48
20 SwiftUI 0x00000001cce25c20 ViewGraph.sizeThatFits+ 2010144 (_:) + 100
21 SwiftUI 0x00000001cd2e0520 specialized ListItemHost<>.hostSizeThatFits+ 6968608 (width:) + 120
22 SwiftUI 0x00000001ccefb250 @objc ListCoreCellHost.sizeThatFits+ 2884176 (_:) + 48
23 UIKitCore 0x000000019c666b98 -[UITableViewCell systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:] + 592
24 UIKitCore 0x000000019c6dce38 -[UITableView _heightForCell:atIndexPath:] + 436
25 UIKitCore 0x000000019c6c544c __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 2568
26 UIKitCore 0x000000019c971d08 +[UIView+ 15129864 (Animation) performWithoutAnimation:] + 96
27 UIKitCore 0x000000019c6c495c -[UITableView _configureCellForDisplay:forIndexPath:] + 248
28 UIKitCore 0x000000019c6d5a04 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 796
29 UIKitCore 0x000000019c6a338c -[UITableView _updateVisibleCellsNow:] + 2608
30 UIKitCore 0x000000019c6c04b0 -[UITableView layoutSubviews] + 160
31 SwiftUI 0x00000001ccef4438 UpdateCoalescingTableView.layoutSubviews+ 2855992 () + 56
32 SwiftUI 0x00000001ccef45e4 @objc UpdateCoalescingTableView.layoutSubviews+ 2856420 () + 28
33 UIKitCore 0x000000019c97f270 -[UIView+ 15184496 (CALayerDelegate) layoutSublayersOfLayer:] + 2140
34 QuartzCore 0x000000019ee6b5f8 -[CALayer layoutSublayers] + 284
35 QuartzCore 0x000000019ee6fe28 CA::Layer::layout_if_needed+ 1396264 (CA::Transaction*) + 480
36 QuartzCore 0x000000019ee7b894 CA::Layer::layout_and_display_if_needed+ 1443988 (CA::Transaction*) + 136
37 QuartzCore 0x000000019edc49f0 CA::Context::commit_transaction+ 694768 (CA::Transaction*, double) + 304
38 QuartzCore 0x000000019edee890 CA::Transaction::commit+ 866448 () + 676
39 QuartzCore 0x000000019edef284 CA::Transaction::observer_callback+ 868996 (__CFRunLoopObserver*, unsigned long, void*) + 92
40 CoreFoundation 0x0000000198463c48 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
41 CoreFoundation 0x000000019845eb34 __CFRunLoopDoObservers + 416
42 CoreFoundation 0x000000019845f100 __CFRunLoopRun + 1308
43 CoreFoundation 0x000000019845e8bc CFRunLoopRunSpecific + 464
44 GraphicsServices 0x00000001a22ca328 GSEventRunModal + 104
45 UIKitCore 0x000000019c4f46d4 UIApplicationMain + 1936
46 Preferences 0x0000000104869974 0x104860000 + 39284
47 libdyld.dylib 0x00000001982e9460 start + 4
Thread 1:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 3 name: com.apple.uikit.eventfetch-thread
Thread 3:
0 libsystem_kernel.dylib 0x00000001982bd5f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001982bca60 mach_msg + 72
2 CoreFoundation 0x0000000198464068 __CFRunLoopServiceMachPort + 216
3 CoreFoundation 0x000000019845f188 __CFRunLoopRun + 1444
4 CoreFoundation 0x000000019845e8bc CFRunLoopRunSpecific + 464
5 Foundation 0x000000019879e994 -[NSRunLoop+ 31124 (NSRunLoop) runMode:beforeDate:] + 228
6 Foundation 0x000000019879e874 -[NSRunLoop+ 30836 (NSRunLoop) runUntilDate:] + 88
7 UIKitCore 0x000000019c58c49c -[UIEventFetcher threadMain] + 152
8 Foundation 0x00000001988cf0b0 __NSThread__start__ + 848
9 libsystem_pthread.dylib 0x00000001982031ec _pthread_start + 124
10 libsystem_pthread.dylib 0x0000000198206aec thread_start + 8
Thread 4:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x00000001982bd5f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001982bca60 mach_msg + 72
2 CoreFoundation 0x0000000198464068 __CFRunLoopServiceMachPort + 216
3 CoreFoundation 0x000000019845f188 __CFRunLoopRun + 1444
4 CoreFoundation 0x000000019845e8bc CFRunLoopRunSpecific + 464
5 CFNetwork 0x000000019b6d9e68 0x19b6d8000 + 7784
6 Foundation 0x00000001988cf0b0 __NSThread__start__ + 848
7 libsystem_pthread.dylib 0x00000001982031ec _pthread_start + 124
8 libsystem_pthread.dylib 0x0000000198206aec thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0xe000000000000000 x1: 0x0000000280915800 x2: 0x0000000000000007 x3: 0x00000001981ce0dc
x4: 0x0000000000000000 x5: 0x000000016b59a5f0 x6: 0x0000000000000072 x7: 0x0000000000000c70
x8: 0x00000000dfc24834 x9: 0x000000000000007f x10: 0x0000000000000031 x11: 0x00000000000007fb
x12: 0x00000000000007fd x13: 0x0000000000000000 x14: 0x00000000dfe25000 x15: 0x000000000000004a
x16: 0x0000000080000000 x17: 0x000000005fe00000 x18: 0x0000000000000000 x19: 0x00000001bfcfd020
x20: 0x0000000000000002 x21: 0x0000000000000000 x22: 0x00000000000000a8 x23: 0x0000000000000000
x24: 0xe000000000000000 x25: 0x000000000000000b x26: 0x0000000000000000 x27: 0x0000000000000095
x28: 0x00000001bfce0fbc fp: 0x000000016b59a790 lr: 0x00000001a581fefc
sp: 0x000000016b59a710 pc: 0x00000001a581fefc cpsr: 0x60000000
esr: 0xf2000001 Address size fault
我正在为这个问题摸不着头脑,应用程序运行良好,只是设置有这个问题。
我有一个关于如何诊断和修复的计划,希望能尽快解决,但想知道是否有人看到过这个?
谢谢
最后,经过几个小时的设置、代码等,我终于修好了。
方法是:
1) 编辑我的 APP 设置的 info.plist 文件(作为文本)并将所有部分取出到文本编辑器中,文件几乎变成空白。
2) 在 iPad -> STOP APP -> Go to Settings -> 点击 APP 重新编译和 运行认为一定是有什么原因造成了这一切。
3) 开始将部分部分粘贴回 info.plist 文件,直到我终于找到有问题的部分,如下所示:
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string>8101</string>
<key>IsSecure</key>
<string>No</string>
<key>Key</key>
<string>Admin_iTaxi Server Port</string>
<key>KeyboardType</key>
<string>NumberPad</string>
<key>Title</key>
<string>Server Port </string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
4) 看起来非常奇怪和离奇,...我的意思是上面的块可能有什么问题?!...为什么直到最新的 iOS13 才在所有 iOS 上运行!? ...
5) 检查所有拼写,重新排序列表,使其与另一个有效的列表相似,更改键盘类型,其他项目,...开始-停止,检查设置,同样的事情,.. . 还在崩溃!...
6)最后我把变量名从"Admin_iTaxi Server Port"改成"Admin_iTaxi Server XXXPort",重新编译,成功了...嗯...为什么!?...
7) 回到启动代码,注意到我正在使用以下设置变量(如果它们不存在):
if (!IsConfigKeyExist(@"Admin_iTaxi Server Port"))
{
TempServerPortAdmin = 8102;
[[NSUserDefaults standardUserDefaults] setInteger:TempServerPortAdmin forKey:@"Admin_iTaxi Server Port"];
}
8) 转念一想,info.plist文件里有KEY和TYPE,都设置成 , 想不起来设置了 any 还是 etc,所以。
9) 将上面的代码改成:
if (!IsConfigKeyExist(@"Admin_iTaxi Server Port"))
{
TempServerPortAdmin = 8102;
[[NSUserDefaults standardUserDefaults] setValue:[NSString stringWithFormat:@"%li", TempServerPortAdmin] forKey:@"Admin_iTaxi Server Port"];
}
10) 恢复了 info.plist 上的原始变量名,开始-停止-检查,... Eureeka,.. 现在可以工作了...
结论:不知何故,Apple 在他们将 Integer 读入 String 变量时决定让设置应用程序崩溃......为什么!?......我不知道,但修复(如前所述上面),不是将您的设置存储为 "Integer" 并且仅感染存储为 "String",特别是如果您要在 info.plist 文件中使用这些设置。
这解决了应用设置因 EXC_BREAKPOINT (SIGTRAP)
崩溃的问题
希望对您有所帮助。
祝你好运!
我们在 AppStore 上的应用 运行 多年来一直没有任何问题。然而,自 iOS 13 发布以来,虽然应用程序仍然可以正常运行,但进入
iPad Settings -> MyApp
崩溃和设置应用程序将结束,以前的 iOS 版本没有任何问题。
我查看了 XCODE 管理器的设备日志,可以在日志中看到以下内容:
Incident Identifier: DC00F244-958C-407F-BDC9-CFD7D6C3D8C8
CrashReporter Key: e5b2979fc92fb936e83ef8fdab74fbd1c0707ce3
Hardware Model: iPad6,4
Process: Preferences [530]
Path: /Applications/Preferences.app/Preferences
Identifier: com.apple.Preferences
Version: 161.2 (1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.apple.Preferences [634]
Date/Time: 2019-10-05 06:18:38.6274 +0100
Launch Time: 2019-10-05 06:18:17.3730 +0100
OS Version: iPhone OS 13.1.2 (17A860)
Release Type: User
Baseband Version: 7.00.01
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001a581fefc
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [530]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x00000001a581fefc specialized _assertionFailure+ 2154236 (_:_:file:line:flags:) + 440
1 libswiftCore.dylib 0x00000001a581fefc specialized _assertionFailure+ 2154236 (_:_:file:line:flags:) + 440
2 libswiftCore.dylib 0x00000001a563b64c _assertionFailure+ 169548 (_:_:file:line:flags:) + 32
3 SettingsUIKitPrivate 0x00000001bfce0c24 0x1bfcda000 + 27684
4 SettingsUIKitPrivate 0x00000001bfce0fd4 0x1bfcda000 + 28628
5 SwiftUI 0x00000001cd28d86c Binding.init+ 6629484 (get:set:) + 144
6 SettingsUIKitPrivate 0x00000001bfcdf654 0x1bfcda000 + 22100
7 SettingsUIKitPrivate 0x00000001bfcdca54 0x1bfcda000 + 10836
8 SettingsUIKitPrivate 0x00000001bfcdc44c 0x1bfcda000 + 9292
9 SwiftUI 0x00000001cccf88e4 DynamicPropertyBody.update+ 776420 (context:) + 1768
10 SwiftUI 0x00000001cccf9070 protocol witness for static UntypedAttribute._update+ 778352 (_:graph:attribute:) in conformance DynamicPropertyBody<A> + 36
11 AttributeGraph 0x00000001c248e458 partial apply + 28
12 AttributeGraph 0x00000001c2476a60 AG::Graph::UpdateStack::update+ 14944 () + 984
13 AttributeGraph 0x00000001c2476d24 AG::Graph::update_attribute+ 15652 (unsigned int, bool) + 372
14 AttributeGraph 0x00000001c2479e9c AG::Graph::value_ref+ 28316 (AG::attribute_t, AGTypeID, bool*) + 116
15 AttributeGraph 0x00000001c24815ac AG::Graph::EntryExit::update_entry+ 58796 () const + 64
16 AttributeGraph 0x00000001c2476a60 AG::Graph::UpdateStack::update+ 14944 () + 984
17 AttributeGraph 0x00000001c2476d24 AG::Graph::update_attribute+ 15652 (unsigned int, bool) + 372
18 AttributeGraph 0x00000001c2479e9c AG::Graph::value_ref+ 28316 (AG::attribute_t, AGTypeID, bool*) + 116
19 AttributeGraph 0x00000001c24879e4 AGGraphGetValue + 48
20 SwiftUI 0x00000001cce25c20 ViewGraph.sizeThatFits+ 2010144 (_:) + 100
21 SwiftUI 0x00000001cd2e0520 specialized ListItemHost<>.hostSizeThatFits+ 6968608 (width:) + 120
22 SwiftUI 0x00000001ccefb250 @objc ListCoreCellHost.sizeThatFits+ 2884176 (_:) + 48
23 UIKitCore 0x000000019c666b98 -[UITableViewCell systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:] + 592
24 UIKitCore 0x000000019c6dce38 -[UITableView _heightForCell:atIndexPath:] + 436
25 UIKitCore 0x000000019c6c544c __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 2568
26 UIKitCore 0x000000019c971d08 +[UIView+ 15129864 (Animation) performWithoutAnimation:] + 96
27 UIKitCore 0x000000019c6c495c -[UITableView _configureCellForDisplay:forIndexPath:] + 248
28 UIKitCore 0x000000019c6d5a04 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 796
29 UIKitCore 0x000000019c6a338c -[UITableView _updateVisibleCellsNow:] + 2608
30 UIKitCore 0x000000019c6c04b0 -[UITableView layoutSubviews] + 160
31 SwiftUI 0x00000001ccef4438 UpdateCoalescingTableView.layoutSubviews+ 2855992 () + 56
32 SwiftUI 0x00000001ccef45e4 @objc UpdateCoalescingTableView.layoutSubviews+ 2856420 () + 28
33 UIKitCore 0x000000019c97f270 -[UIView+ 15184496 (CALayerDelegate) layoutSublayersOfLayer:] + 2140
34 QuartzCore 0x000000019ee6b5f8 -[CALayer layoutSublayers] + 284
35 QuartzCore 0x000000019ee6fe28 CA::Layer::layout_if_needed+ 1396264 (CA::Transaction*) + 480
36 QuartzCore 0x000000019ee7b894 CA::Layer::layout_and_display_if_needed+ 1443988 (CA::Transaction*) + 136
37 QuartzCore 0x000000019edc49f0 CA::Context::commit_transaction+ 694768 (CA::Transaction*, double) + 304
38 QuartzCore 0x000000019edee890 CA::Transaction::commit+ 866448 () + 676
39 QuartzCore 0x000000019edef284 CA::Transaction::observer_callback+ 868996 (__CFRunLoopObserver*, unsigned long, void*) + 92
40 CoreFoundation 0x0000000198463c48 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
41 CoreFoundation 0x000000019845eb34 __CFRunLoopDoObservers + 416
42 CoreFoundation 0x000000019845f100 __CFRunLoopRun + 1308
43 CoreFoundation 0x000000019845e8bc CFRunLoopRunSpecific + 464
44 GraphicsServices 0x00000001a22ca328 GSEventRunModal + 104
45 UIKitCore 0x000000019c4f46d4 UIApplicationMain + 1936
46 Preferences 0x0000000104869974 0x104860000 + 39284
47 libdyld.dylib 0x00000001982e9460 start + 4
Thread 1:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 3 name: com.apple.uikit.eventfetch-thread
Thread 3:
0 libsystem_kernel.dylib 0x00000001982bd5f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001982bca60 mach_msg + 72
2 CoreFoundation 0x0000000198464068 __CFRunLoopServiceMachPort + 216
3 CoreFoundation 0x000000019845f188 __CFRunLoopRun + 1444
4 CoreFoundation 0x000000019845e8bc CFRunLoopRunSpecific + 464
5 Foundation 0x000000019879e994 -[NSRunLoop+ 31124 (NSRunLoop) runMode:beforeDate:] + 228
6 Foundation 0x000000019879e874 -[NSRunLoop+ 30836 (NSRunLoop) runUntilDate:] + 88
7 UIKitCore 0x000000019c58c49c -[UIEventFetcher threadMain] + 152
8 Foundation 0x00000001988cf0b0 __NSThread__start__ + 848
9 libsystem_pthread.dylib 0x00000001982031ec _pthread_start + 124
10 libsystem_pthread.dylib 0x0000000198206aec thread_start + 8
Thread 4:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x0000000198206ad8 start_wqthread + 0
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x00000001982bd5f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001982bca60 mach_msg + 72
2 CoreFoundation 0x0000000198464068 __CFRunLoopServiceMachPort + 216
3 CoreFoundation 0x000000019845f188 __CFRunLoopRun + 1444
4 CoreFoundation 0x000000019845e8bc CFRunLoopRunSpecific + 464
5 CFNetwork 0x000000019b6d9e68 0x19b6d8000 + 7784
6 Foundation 0x00000001988cf0b0 __NSThread__start__ + 848
7 libsystem_pthread.dylib 0x00000001982031ec _pthread_start + 124
8 libsystem_pthread.dylib 0x0000000198206aec thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0xe000000000000000 x1: 0x0000000280915800 x2: 0x0000000000000007 x3: 0x00000001981ce0dc
x4: 0x0000000000000000 x5: 0x000000016b59a5f0 x6: 0x0000000000000072 x7: 0x0000000000000c70
x8: 0x00000000dfc24834 x9: 0x000000000000007f x10: 0x0000000000000031 x11: 0x00000000000007fb
x12: 0x00000000000007fd x13: 0x0000000000000000 x14: 0x00000000dfe25000 x15: 0x000000000000004a
x16: 0x0000000080000000 x17: 0x000000005fe00000 x18: 0x0000000000000000 x19: 0x00000001bfcfd020
x20: 0x0000000000000002 x21: 0x0000000000000000 x22: 0x00000000000000a8 x23: 0x0000000000000000
x24: 0xe000000000000000 x25: 0x000000000000000b x26: 0x0000000000000000 x27: 0x0000000000000095
x28: 0x00000001bfce0fbc fp: 0x000000016b59a790 lr: 0x00000001a581fefc
sp: 0x000000016b59a710 pc: 0x00000001a581fefc cpsr: 0x60000000
esr: 0xf2000001 Address size fault
我正在为这个问题摸不着头脑,应用程序运行良好,只是设置有这个问题。
我有一个关于如何诊断和修复的计划,希望能尽快解决,但想知道是否有人看到过这个?
谢谢
最后,经过几个小时的设置、代码等,我终于修好了。
方法是:
1) 编辑我的 APP 设置的 info.plist 文件(作为文本)并将所有部分取出到文本编辑器中,文件几乎变成空白。
2) 在 iPad -> STOP APP -> Go to Settings -> 点击 APP 重新编译和 运行认为一定是有什么原因造成了这一切。
3) 开始将部分部分粘贴回 info.plist 文件,直到我终于找到有问题的部分,如下所示:
<dict> <key>AutocapitalizationType</key> <string>None</string> <key>AutocorrectionType</key> <string>No</string> <key>DefaultValue</key> <string>8101</string> <key>IsSecure</key> <string>No</string> <key>Key</key> <string>Admin_iTaxi Server Port</string> <key>KeyboardType</key> <string>NumberPad</string> <key>Title</key> <string>Server Port </string> <key>Type</key> <string>PSTextFieldSpecifier</string> </dict>
4) 看起来非常奇怪和离奇,...我的意思是上面的块可能有什么问题?!...为什么直到最新的 iOS13 才在所有 iOS 上运行!? ...
5) 检查所有拼写,重新排序列表,使其与另一个有效的列表相似,更改键盘类型,其他项目,...开始-停止,检查设置,同样的事情,.. . 还在崩溃!...
6)最后我把变量名从"Admin_iTaxi Server Port"改成"Admin_iTaxi Server XXXPort",重新编译,成功了...嗯...为什么!?...
7) 回到启动代码,注意到我正在使用以下设置变量(如果它们不存在):
if (!IsConfigKeyExist(@"Admin_iTaxi Server Port"))
{
TempServerPortAdmin = 8102;
[[NSUserDefaults standardUserDefaults] setInteger:TempServerPortAdmin forKey:@"Admin_iTaxi Server Port"];
}
8) 转念一想,info.plist文件里有KEY和TYPE,都设置成 , 想不起来设置了 any 还是 etc,所以。
9) 将上面的代码改成:
if (!IsConfigKeyExist(@"Admin_iTaxi Server Port")) { TempServerPortAdmin = 8102; [[NSUserDefaults standardUserDefaults] setValue:[NSString stringWithFormat:@"%li", TempServerPortAdmin] forKey:@"Admin_iTaxi Server Port"]; }
10) 恢复了 info.plist 上的原始变量名,开始-停止-检查,... Eureeka,.. 现在可以工作了...
结论:不知何故,Apple 在他们将 Integer 读入 String 变量时决定让设置应用程序崩溃......为什么!?......我不知道,但修复(如前所述上面),不是将您的设置存储为 "Integer" 并且仅感染存储为 "String",特别是如果您要在 info.plist 文件中使用这些设置。
这解决了应用设置因 EXC_BREAKPOINT (SIGTRAP)
崩溃的问题希望对您有所帮助。
祝你好运!