App crashes on launch on iOS 10

I have my app building successfully in Xcode 8 for iOS 10, but as soon as the app launches in the simulator, it crashes without breaking in Xcode. Here is the log output:


2016-06-15 14:40:20.850188 Engagement[70147:1457290] bundleid: com.acstechnologies.Realm.Engagement, enable_level: 0, persist_level: 0, propagate_with_activity: 0
2016-06-15 14:40:20.850685 Engagement[70147:1457290] subsystem: com.apple.UIKit, category: HIDEvents, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-15 14:40:20.854881 Engagement[70147:1457258] Created DB, header sequence number = 252
2016-06-15 14:40:20.878082 Engagement[70147:1457258] Created DB, header sequence number = 252
2016-06-15 14:40:20.887804 Engagement[70147:1457258] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-15 14:40:21.063438 Engagement[70147:1457258] subsystem: com.apple.FrontBoard, category: Common, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-15 14:40:21.141565 Engagement[70147:1456663] subsystem: com.apple.UIKit, category: General, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-15 14:40:21.142159 Engagement[70147:1456663] [General] Splitview controller <UISplitViewControllerClassicImpl: 0x7fc0e1346ce0> is expected to have a view controller at index 0 before it's used!
2016-06-15 14:40:21.182739 Engagement[70147:1456663] subsystem: com.apple.UIKit, category: GestureEnvironment, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-15 14:40:21.255352 Engagement[70147:1457291] subsystem: com.apple.network, category: , enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-15 14:40:21.256076 Engagement[70147:1457258] [] nw_endpoint_handler_start [1 e.onrealm.org:443 initial path (null)]
2016-06-15 14:40:21.256436 Engagement[70147:1457258] [] nw_connection_endpoint_report [1 e.onrealm.org:443 initial path (null)] reported event path:start
2016-06-15 14:40:21.257215 Engagement[70147:1457258] [] nw_connection_endpoint_report [1 e.onrealm.org:443 waiting path (satisfied)] reported event path:satisfied
2016-06-15 14:40:21.257981 Engagement[70147:1457258] subsystem: com.apple.SystemConfiguration, category: SCPreferences, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-15 14:40:21.258980 Engagement[70147:1457258] [] nw_connection_endpoint_report [1 e.onrealm.org:443 in_progress resolver (satisfied)] reported event resolver:start_dns
2016-06-15 14:40:21.259926 Engagement[70147:1457258] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-06-15 14:40:21.260278 Engagement[70147:1457258] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-06-15 14:40:21.260801 Engagement[70147:1457291] [] nw_endpoint_resolver_update [1 e.onrealm.org:443 in_progress resolver (satisfied)] Adding endpoint handler for 52.87.111.146:443
2016-06-15 14:40:21.261158 Engagement[70147:1457291] [] nw_endpoint_resolver_update [1 e.onrealm.org:443 in_progress resolver (satisfied)] Adding endpoint handler for 52.201.206.38:443
2016-06-15 14:40:21.261545 Engagement[70147:1457291] [] nw_connection_endpoint_report [1 e.onrealm.org:443 in_progress resolver (satisfied)] reported event resolver:receive_dns
2016-06-15 14:40:21.261902 Engagement[70147:1457291] [] nw_endpoint_resolver_start_next_child [1 e.onrealm.org:443 in_progress resolver (satisfied)] starting child endpoint 52.87.111.146:443
2016-06-15 14:40:21.262226 Engagement[70147:1457291] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-06-15 14:40:21.262524 Engagement[70147:1457291] [] nw_endpoint_resolver_start_next_child [1 e.onrealm.org:443 in_progress resolver (satisfied)] starting next child endpoint in 250ms
2016-06-15 14:40:21.262820 Engagement[70147:1457291] [] nw_endpoint_handler_start [1.1 52.87.111.146:443 initial path (null)]
2016-06-15 14:40:21.263124 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 initial path (null)] reported event path:start
2016-06-15 14:40:21.263664 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 waiting path (satisfied)] reported event path:satisfied
2016-06-15 14:40:21.263936 Engagement[70147:1457291] [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable, [libsystem_network.dylib: nw_endpoint_get_hostname :: incorrect endpoint type 1]
2016-06-15 14:40:21.264343 Engagement[70147:1457291] [] nw_endpoint_get_hostname incorrect endpoint type 1, dumping backtrace:
        [x86_64] libnetcore-805.0.0.2.2
    0   libsystem_network.dylib             0x000000010cc7437f __nw_create_backtrace_string + 123
    1   libsystem_network.dylib             0x000000010cc7646e nw_endpoint_get_hostname + 75
    2   libnetwork.dylib                    0x000000010dc08be7 nw_endpoint_proxy_handler_should_use_proxy + 125
    3   libnetwork.dylib                    0x000000010dc1604f nw_endpoint_handler_path_change + 1509
    4   libnetwork.dylib                    0x000000010dc158a2 nw_endpoint_handler_start + 570
    5   libnetwork.dylib                    0x000000010dc2c026 nw_endpoint_resolver_start_next_child + 2050
    6   libdispatch.dylib                   0x000000010c9cd1e8 _dispatch_call_block_and_release + 12
    7   libdispatch.dylib                   0x000000010c9f9dee _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x000000010c9d4a1d _dispatch_queue_serial_drain + 239
    9   libdi
2016-06-15 14:40:21.265623 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-06-15 14:40:21.313958 Engagement[70147:1457291] [] nw_endpoint_handler_start [2 media.onrealm.org:443 initial path (null)]
2016-06-15 14:40:21.314326 Engagement[70147:1457291] [] nw_connection_endpoint_report [2 media.onrealm.org:443 initial path (null)] reported event path:start
2016-06-15 14:40:21.314943 Engagement[70147:1457291] [] nw_connection_endpoint_report [2 media.onrealm.org:443 waiting path (satisfied)] reported event path:satisfied
2016-06-15 14:40:21.315815 Engagement[70147:1457291] [] nw_connection_endpoint_report [2 media.onrealm.org:443 in_progress resolver (satisfied)] reported event resolver:start_dns
2016-06-15 14:40:21.361667 Engagement[70147:1457291] [] nw_endpoint_flow_protocol_connected [1.1 52.87.111.146:443 in_progress socket-flow (satisfied)] Output protocol connected
2016-06-15 14:40:21.362672 Engagement[70147:1457291] [] nw_endpoint_flow_connected_path_change [1.1 52.87.111.146:443 ready socket-flow (satisfied)] Connected path is satisfied
2016-06-15 14:40:21.363108 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 ready socket-flow (satisfied)] reported event flow:finish_connect
2016-06-15 14:40:21.363603 Engagement[70147:1457291] [] nw_connection_endpoint_report [1 e.onrealm.org:443 ready resolver (satisfied)] reported event flow:finish_connect
2016-06-15 14:40:21.364459 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 ready socket-flow (satisfied)] reported event flow:changed_viability
2016-06-15 14:40:21.364845 Engagement[70147:1457291] [] nw_connection_endpoint_report [1 e.onrealm.org:443 ready resolver (satisfied)] reported event flow:changed_viability
2016-06-15 14:40:21.365566 Engagement[70147:1457291] [] nw_endpoint_start_tls_while_connected [1.1 52.87.111.146:443 ready socket-flow (satisfied)]
2016-06-15 14:40:21.366889 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 in_progress socket-flow (satisfied)] reported event flow:start_secondary_connect
2016-06-15 14:40:21.367307 Engagement[70147:1457291] [] nw_connection_endpoint_report [1 e.onrealm.org:443 in_progress resolver (satisfied)] reported event flow:start_secondary_connect
2016-06-15 14:40:21.367675 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-06-15 14:40:21.368072 Engagement[70147:1457291] [] nw_connection_endpoint_report [1 e.onrealm.org:443 in_progress resolver (satisfied)] reported event flow:start_connect
2016-06-15 14:40:21.368396 Engagement[70147:1457291] [] nw_endpoint_flow_protocol_connected [1.1 52.87.111.146:443 in_progress socket-flow (satisfied)] Transport protocol connected
2016-06-15 14:40:21.368745 Engagement[70147:1457291] [] nw_connection_endpoint_report [1.1 52.87.111.146:443 in_progress socket-flow (satisfied)] reported event flow:finish_transport
2016-06-15 14:40:21.369120 Engagement[70147:1457291] [] nw_connection_endpoint_report [1 e.onrealm.org:443 in_progress resolver (satisfied)] reported event flow:finish_transport
[fg127,127,127;2016-06-15 14:40:21:388 Engagement[70147:1457289] GET 'https:/ 
[;[fg127,127,127;2016-06-15 14:40:21:389 Engagement[70147:1457289] ["User-Agent": "Engagement/1.0.0 (iPhone; iOS 10.0; Scale/1.00)", "X-CLIENT-KEY": "3e512f7a-c9c2-4b67-b23e-c7032c1996d0", "Accept-Language": "en;q=1"]
[;[fg214,57,30;2016-06-15 14:40:21:388 Engagement[70147:1456663] didFailToRegisterForRemoteNotificationsWithError: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator}
[;[fg127,127,127;2016-06-15 14:40:21:392 Engagement[70147:1456663] didRegisterUserNotificationSettings: <UIUserNotificationSettings: 0x7fc0dbf0a230; types: (UIUserNotificationTypeAlert UIUserNotificationTypeBadge UIUserNotificationTypeSound);>
[;[fg127,127,127;2016-06-15 14:40:21:392 Engagement[70147:1457289] GET 'https:/ 
[;[fg127,127,127;2016-06-15 14:40:21:393 Engagement[70147:1457289] ["User-Agent": "Engagement/1.0.0 (iPhone; iOS 10.0; Scale/1.00)", "X-CLIENT-KEY": "3e512f7a-c9c2-4b67-b23e-c7032c1996d0", "Accept-Language": "en;q=1"]
[;[fg127,127,127;2016-06-15 14:40:21:393 Engagement[70147:1457289] GET 'https:/ 
[;[fg127,127,127;2016-06-15 14:40:21:393 Engagement[70147:1457289] ["Accept": "image/"]
[;2016-06-15 14:40:21.399933 Engagement[70147:1456663] subsystem: com.apple.photos, category: Generic, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
[fg127,127,127;2016-06-15 14:40:21:404 Engagement[70147:1457289] GET 'https:/ 
[;[fg127,127,127;2016-06-15 14:40:21:404 Engagement[70147:1457289] GET 'https:/ 
[;[fg127,127,127;2016-06-15 14:40:21:404 Engagement[70147:1457349] GET 'https:/ 
[;2016-06-15 14:40:21.405485 Engagement[70147:1457351] [] nw_endpoint_handler_start [3 unity-stg-content.s3.amazonaws.com:443 initial path (null)]
[fg127,127,127;2016-06-15 14:40:21:405 Engagement[70147:1457350] GET 'https:/ 
[;2016-06-15 14:40:21.406171 Engagement[70147:1457351] [] nw_connection_endpoint_report [3 unity-stg-content.s3.amazonaws.com:443 initial path (null)] reported event path:start
2016-06-15 14:40:21.406868 Engagement[70147:1457351] [] nw_connection_endpoint_report [3 unity-stg-content.s3.amazonaws.com:443 waiting path (satisfied)] reported event path:satisfied
2016-06-15 14:40:21.407826 Engagement[70147:1457351] [] nw_connection_endpoint_report [3 unity-stg-content.s3.amazonaws.com:443 in_progress resolver (satisfied)] reported event resolver:start_dns

Replies

I'm getting the exact same kind of crash. When i compile and run for ios 9 everything's good. Only happens when i build for ios10.

I'm also getting same error anybody please help.

This may not help, but I was having a similar log output with no app crash. I spoke to an Apple engineer at WWDC and he said it should be fixed for the next seed of Xcode 8 (they caught the issue too late for the initial beta version) so I won't see the logs when that's released. Maybe it'll be improved for you too.

I also have the same issue with no error warning and build success, but app crashed after lanch in the beginning view...


2016-06-17 16:41:26.256268 Zokoma[2320:195369] [] nw_endpoint_resolver_start_next_child [1 api.parse.com:443 in_progress resolver (satisfied)] starting child endpoint 54.165.171.4:443
2016-06-17 16:41:26.256744 Zokoma[2320:195369] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-06-17 16:41:26.257665 Zokoma[2320:195369] [] nw_endpoint_resolver_start_next_child [1 api.parse.com:443 in_progress resolver (satisfied)] starting next child endpoint in 250ms
2016-06-17 16:41:26.258235 Zokoma[2320:195369] [] nw_endpoint_handler_start [1.1 54.165.171.4:443 initial path (null)]
2016-06-17 16:41:26.258773 Zokoma[2320:195369] [] nw_connection_endpoint_report [1.1 54.165.171.4:443 initial path (null)] reported event path:start
2016-06-17 16:41:26.259679 Zokoma[2320:195369] [] nw_connection_endpoint_report [1.1 54.165.171.4:443 waiting path (satisfied)] reported event path:satisfied
2016-06-17 16:41:26.260172 Zokoma[2320:195369] [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable, [libsystem_network.dylib: nw_endpoint_get_hostname :: incorrect endpoint type 1]
2016-06-17 16:41:26.264323 Zokoma[2320:195369] [] nw_endpoint_get_hostname incorrect endpoint type 1, dumping backtrace:
        [x86_64] libnetcore-805.0.0.2.2
    0   libsystem_network.dylib             0x0000000105f9137f __nw_create_backtrace_string + 123
    1   libsystem_network.dylib             0x0000000105f9346e nw_endpoint_get_hostname + 75
    2   libnetwork.dylib                    0x0000000106204be7 nw_endpoint_proxy_handler_should_use_proxy + 125
    3   libnetwork.dylib                    0x000000010621204f nw_endpoint_handler_path_change + 1509
    4   libnetwork.dylib                    0x00000001062118a2 nw_endpoint_handler_start + 570
    5   libnetwork.dylib                    0x0000000106228026 nw_endpoint_resolver_start_next_child + 2050
    6   libdispatch.dylib                   0x0000000105cea1e8 _dispatch_call_block_and_release + 12
    7   libdispatch.dylib                   0x0000000105d16dee _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x0000000105cf1a1d _dispatch_queue_serial_drain + 239
    9   libdi
libc++abi.dylib: terminating with uncaught exception of type NSException

That's really....

I had a similar issue, found an answer on this forum


Turns out - the app will crash if you call EventKit, ContactsKit, Microphone, Camera etc etc that requires permissions without Info.plist keys like

Privacy - Location When In Use Usage Description

Privacy - Media Library Usage Description

...

Hey this is awesome, thanks a lot!

I added a "Privacy - Photo Library Usage Description" key to my info.plist, since my projects uses the Photos api, and the project now runs on ios10 !

Mine doesn't crash, but she spits out the same errors.

I have the same error.

You may right! But... I don't have the kit you list, I use coredata, parse, blts, UIKit, which are not what u said. I check the info.plist relate to "privacy - " it have 37 items, therefore, should I add all 37 items to be true into the info.plist file?

manueIC


can u tell me what value did u enter in "Privacy - Photo Library Usage Description", is Yes or No?

I add all 16 privacy - on my info.plist...but it still has the error on AppDelegate.swift with the error "Thread 1: signal SIGABRT"


class AppDelegate: UIResponder, UIApplicationDelegate {

I've also tried to add all privacy statement in the info.plist, but still no luck. There is an openradar issue https://openradar.appspot.com/26843578 for similar issue. It could be an assertion in CFNetwork for our case. See the openradar post for more detail.

I had the same exact issue for an iOS app that uses EventKit.

I had crash with 10.0 simulator, with no XCode8 message on exit, while running smooth in 9.3 simulator.

I then added in info.plist the key NSCalendarsUsageDescription with a value string "Calendar access needed" (or whatever).

Tha app now runs.

Found here:

https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW15

the related documentation.

Thanks to all for this thread that helped me to fix this issue.

I also experienced the similar crash for one of my app. It turned out to be that I need to set AppDelegate's Window property in didFinishLaunchingWithOptions. I don't know if this is an iOS 10 SDK bug or something new.