Infinite loading with ionic 1 and ios 11

Hi !

I’ve got a big issue with my ionic 1 app. When I try it on iOS 11, the app gets stuck on the splashscreen loading page.

  • I tried with a new blank app, it works like a charm. But when i copy/paste my code in it, the bug appears.
  • When i start the app with the cli "ionic cordova emulate ios --debug --lcs --target “iphone-X”, it works on the emulator.
  • When i run the app with xcode right after on an iphone 5S under iOS11, it works only if the local server for logging (launched with ionic cordova emulate) is still on and if the phone is on the same wifi network as the computer. If I close the local server and restart the app, the bug comes back.

It looks like the internal ionic module to serve html pages, images and js files to the webview doesn’t work with ios11…

Any idea ?

Thanks a lot !

Can you post the logs you are seeing from within XCode?

And have you tried to open the Safari debugging tools when you are using your app?

Hello DaDanny, Thank’s for the answer !

I tried to open Safari debugging tools but same as Android/chrome debugging, i have no logs (from my console.log or any) since few weeks and i don’t understand why… That didn’t help me :frowning:

This is my ionic info

    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:

    cordova (Cordova CLI) : 6.4.0 

local packages:

    Cordova Platforms : ios 4.3.1
    Ionic Framework   : ionic1 1.3.0

System:

    Android SDK Tools : 25.2.2
    ios-deploy        : 1.9.2 
    ios-sim           : 6.1.2 
    Node              : v6.9.1
    npm               : 2.15.11 
    OS                : macOS Sierra
    Xcode             : Xcode 9.0 Build version 9A235 

Misc:

    backend : pro

There is the logs from XCode with the IPhone 8 emulator (IOS 11)

2017-10-05 09:51:42.857258+0200 MyApp[4615:126350] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/tech/Library/Developer/CoreSimulator/Devices/EA14F40B-A1C0-478B-A681-82FB249A24DE/data/Containers/Data/Application/AE98FFA3-820B-4CEA-880E-C315D89E7CFB/Library/Cookies/com.myapp.binarycookies
2017-10-05 09:51:42.915802+0200 MyApp[4615:126350] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2017-10-05 09:51:42.920438+0200 MyApp[4615:126350] Apache Cordova native platform version 4.3.1 is starting.
2017-10-05 09:51:42.921047+0200 MyApp[4615:126350] Multi-tasking -> Device: YES, App: YES
2017-10-05 09:51:43.378379+0200 MyApp[4615:126350] [MC] Lazy loading NSBundle MobileCoreServices.framework
2017-10-05 09:51:43.379339+0200 MyApp[4615:126350] [MC] Loaded MobileCoreServices.framework
2017-10-05 09:51:43.380923+0200 MyApp[4615:126350] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/tech/Library/Developer/CoreSimulator/Devices/EA14F40B-A1C0-478B-A681-82FB249A24DE/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-10-05 09:51:43.391316+0200 MyApp[4615:126350] Using UIWebView
2017-10-05 09:51:43.393446+0200 MyApp[4615:126350] [CDVTimer][handleopenurl] 0.127971ms
2017-10-05 09:51:43.395669+0200 MyApp[4615:126350] Unlimited access to network resources
2017-10-05 09:51:43.396018+0200 MyApp[4615:126350] [CDVTimer][intentandnavigationfilter] 2.380013ms
2017-10-05 09:51:43.396225+0200 MyApp[4615:126350] [CDVTimer][gesturehandler] 0.088990ms
2017-10-05 09:51:43.429792+0200 MyApp[4615:126350] [CDVTimer][splashscreen] 33.390999ms
2017-10-05 09:51:43.439152+0200 MyApp[4615:126350] [CDVTimer][statusbar] 9.208024ms
2017-10-05 09:51:43.441423+0200 MyApp[4615:126350] [MC] Filtering mail sheet accounts for bundle ID: com.myapp, source account management: 1
2017-10-05 09:51:43.500119+0200 MyApp[4615:126350] [CDVTimer][socialsharing] 60.754001ms
2017-10-05 09:51:43.507437+0200 MyApp[4615:126350] [CDVTimer][keyboard] 7.107019ms
2017-10-05 09:51:43.507669+0200 MyApp[4615:126350] [CDVTimer][TotalPluginStartup] 114.402950ms
2017-10-05 09:51:43.521766+0200 MyApp[4615:126350] DidFinishLaunchingWithOptions
2017-10-05 09:51:43.547: <FIRMessaging/INFO> FIRMessaging library version 1.2.0
2017-10-05 09:51:43.564237+0200 MyApp[4615:126818] [Firebase/Core][I-COR000001] Configuring the default app.
2017-10-05 09:51:43.567 MyApp[4615] <Debug> [Firebase/Core][I-COR000001] Configuring the default app.
2017-10-05 09:51:43.571: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-10-05 09:51:43.572: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2017-10-05 09:51:43.573: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-10-05 09:51:43.588796+0200 MyApp[4615:126817] <FIRAnalytics/INFO> Firebase Analytics v.3403000 started
2017-10-05 09:51:43.589 MyApp[4615:] <FIRAnalytics/INFO> Firebase Analytics v.3403000 started
2017-10-05 09:51:43.591585+0200 MyApp[4615:126817] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-10-05 09:51:43.595 MyApp[4615:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-10-05 09:51:43.663: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator}
2017-10-05 09:51:43.675885+0200 MyApp[4615:126350] app become active
2017-10-05 09:51:43.679: <FIRMessaging/WARNING> FIRMessaging registration is not ready with auth credentials
2017-10-05 09:51:43.678992+0200 MyApp[4615:126350] Unable to connect to FCM. Error Domain=com.google.fcm Code=501 "(null)"
2017-10-05 09:51:43.692155+0200 MyApp[4615:126817] [Firebase/Core][I-COR000018] Already sending logs.
2017-10-05 09:51:43.700 MyApp[4615] <Debug> [Firebase/Core][I-COR000018] Already sending logs.
2017-10-05 09:51:44.213000+0200 MyApp[4615:126846] [BoringSSL] Function boringssl_context_get_peer_sct_list: line 1754 received sct extension length is less than sct data length
2017-10-05 09:51:44.230978+0200 MyApp[4615:126846] [BoringSSL] Function boringssl_context_get_peer_sct_list: line 1754 received sct extension length is less than sct data length
2017-10-05 09:51:44.286977+0200 MyApp[4615:126350] Resetting plugins due to page load.
2017-10-05 09:51:44.333963+0200 MyApp[4615:126818] NSURLConnection finished with error - code -1100
2017-10-05 09:51:44.370765+0200 MyApp[4615:126820] NSURLConnection finished with error - code -1100
2017-10-05 09:51:44.371264+0200 MyApp[4615:126820] NSURLConnection finished with error - code -1100
2017-10-05 09:51:44.582289+0200 MyApp[4615:126820] [Firebase/Core][I-COR000019] Clearcut post completed.
2017-10-05 09:51:44.583 MyApp[4615] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
2017-10-05 09:51:44.590215+0200 MyApp[4615:126845] TIC Read Status [1:0x0]: 1:57
2017-10-05 09:51:44.590336+0200 MyApp[4615:126845] TIC Read Status [1:0x0]: 1:57
2017-10-05 09:51:44.680796+0200 MyApp[4615:126880] [Firebase/Core][I-COR000019] Clearcut post completed.
2017-10-05 09:51:44.682 MyApp[4615] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
2017-10-05 09:51:44.685439+0200 MyApp[4615:126845] TIC Read Status [3:0x0]: 1:57
2017-10-05 09:51:44.686237+0200 MyApp[4615:126845] TIC Read Status [3:0x0]: 1:57
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 4615, TID: 126821, Thread name: (none), Queue name: FIRAnalyticsQueue, QoS: 9
Backtrace:
4   MyApp                             0x000000010d4efbd6 __38+[FIRAnalytics createAppDelegateProxy]_block_invoke + 53
5   libdispatch.dylib                   0x000000010fe4343c _dispatch_client_callout + 8
6   libdispatch.dylib                   0x000000010fe449c7 dispatch_once_f + 297
7   MyApp                             0x000000010d4eebd0 __47+[FIRAnalytics startWithConfiguration:options:]_block_invoke_2 + 101
8   libdispatch.dylib                   0x000000010fe423f7 _dispatch_call_block_and_release + 12
9   libdispatch.dylib                   0x000000010fe4343c _dispatch_client_callout + 8
10  libdispatch.dylib                   0x000000010fe4b95b _dispatch_queue_serial_drain + 1162
11  libdispatch.dylib                   0x000000010fe4c2df _dispatch_queue_invoke + 336
12  libdispatch.dylib                   0x000000010fe4f1f9 _dispatch_root_queue_drain + 772
13  libdispatch.dylib                   0x000000010fe4ee97 _dispatch_worker_thread3 + 132
14  libsystem_pthread.dylib             0x00000001103065a2 _pthread_wqthread + 1299
15  libsystem_pthread.dylib             0x000000011030607d start_wqthread + 13
2017-10-05 09:51:44.727104+0200 MyApp[4615:126821] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 4615, TID: 126821, Thread name: (none), Queue name: FIRAnalyticsQueue, QoS: 9
Backtrace:
4   MyApp                             0x000000010d4efbd6 __38+[FIRAnalytics createAppDelegateProxy]_block_invoke + 53
5   libdispatch.dylib                   0x000000010fe4343c _dispatch_client_callout + 8
6   libdispatch.dylib                   0x000000010fe449c7 dispatch_once_f + 297
7   MyApp                             0x000000010d4eebd0 __47+[FIRAnalytics startWithConfiguration:options:]_block_invoke_2 + 101
8   libdispatch.dylib                   0x000000010fe423f7 _dispatch_call_block_and_release + 12
9   libdispatch.dylib                   0x000000010fe4343c _dispatch_client_callout + 8
10  libdispatch.dylib                   0x000000010fe4b95b _dispatch_queue_serial_drain + 1162
11  libdispatch.dylib                   0x000000010fe4c2df _dispatch_queue_invoke + 336
12  libdispatch.dylib                   0x000000010fe4f1f9 _dispatch_root_queue_drain + 772
13  libdispatch.dylib                   0x000000010fe4ee97 _dispatch_worker_thread3 + 132
14  libsystem_pthread.dylib             0x00000001103065a2 _pthread_wqthread + 1299
15  libsystem_pthread.dylib             0x000000011030607d start_wqthread + 13
2017-10-05 09:51:47.877740+0200 MyApp[4615:126880] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-10-05 09:51:47.878 MyApp[4615:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-10-05 09:51:48.289286+0200 MyApp[4615:126350] Cordova view ready
2017-10-05 09:51:48.344722+0200 MyApp[4615:126350] Finished load of: file:///Users/tech/Library/Developer/CoreSimulator/Devices/EA14F40B-A1C0-478B-A681-82FB249A24DE/data/Containers/Bundle/Application/0DA5A9C8-1F1A-4C3E-99C9-0B80CF7F8392/MyApp.app/www/index.html
2017-10-05 09:51:48.619841+0200 MyApp[4615:126880] <FIRAnalytics/INFO> Firebase Analytics enabled
2017-10-05 09:51:48.621 MyApp[4615:] <FIRAnalytics/INFO> Firebase Analytics enabled
2017-10-05 09:51:48.623422+0200 MyApp[4615:126846] [MC] Reading from private effective user settings.
2017-10-05 09:51:48.824026+0200 MyApp[4615:126820] TIC Read Status [4:0x0]: 1:57
2017-10-05 09:51:48.825048+0200 MyApp[4615:126820] TIC Read Status [4:0x0]: 1:57
2017-10-05 09:51:48.945049+0200 MyApp[4615:126846] TIC Read Status [5:0x0]: 1:57
2017-10-05 09:51:48.945706+0200 MyApp[4615:126846] TIC Read Status [5:0x0]: 1:57

Hi, did you solve the issue?
Thanks!