Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13218

ionic on iOS 11 freeze UI while fetching contacts.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • cordova-ios@4.4.0
    • None
    • None
    • Cordova version: 7.0.1, cordova-plugin-contacts 2.3.1, ionic 3.9.2, "cordova-ios": "^4.4.0"

    • Important

    Description

      Ionic on iOS 11 freeze UI while fetching contacts.

      The method "navigator.contacts.find" should be asynchronously, but on iOS 11 it blocks UI until all contacts will be fetched.

      Additionally, in XCode 9 console, I can see the new output about "Increasing interest" and "Fetching in bulk 250 contacts":

      2017-08-16 12:54:12.784355+0300 Myapp[502:71606] Ionic Native: deviceready event fired after 2281 ms
      2017-08-16 12:54:15.578481+0300 Myapp[502:71683] Resetting interest
      2017-08-16 12:54:15.578545+0300 Myapp[502:71683] Increasing interest: 1
      2017-08-16 12:54:15.581007+0300 Myapp[502:71683] Increasing interest: 2
      2017-08-16 12:54:15.582130+0300 Myapp[502:71683] Increasing interest: 3
      2017-08-16 12:54:15.583154+0300 Myapp[502:71683] Increasing interest: 4
      2017-08-16 12:54:15.584084+0300 Myapp[502:71683] Increasing interest: 5
      2017-08-16 12:54:15.585352+0300 Myapp[502:71683] Fetching in bulk 250 contacts!
      2017-08-16 12:54:15.919986+0300 Myapp[502:71683] Fetching in bulk 250 contacts!
      2017-08-16 12:54:16.226411+0300 Myapp[502:71657] Fetching in bulk 250 contacts!
      2017-08-16 12:54:16.559840+0300 Myapp[502:71657] Fetching in bulk 250 contacts!
      2017-08-16 12:54:16.867234+0300 Myapp[502:71657] Fetching in bulk 250 contacts!
      2017-08-16 12:54:17.215888+0300 Myapp[502:71658] Fetching in bulk 250 contacts!
      2017-08-16 12:54:17.548900+0300 Myapp[502:71658] Fetching in bulk 250 contacts!
      2017-08-16 12:54:17.883738+0300 Myapp[502:71658] Fetching in bulk 250 contacts!
      2017-08-16 12:54:18.209814+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:18.588213+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:18.942062+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:19.295545+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:19.702245+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:20.092949+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:20.449420+0300 Myapp[502:71657] Fetching in bulk 250 contacts!
      2017-08-16 12:54:20.837158+0300 Myapp[502:71657] Fetching in bulk 250 contacts!
      2017-08-16 12:54:21.220039+0300 Myapp[502:71657] Fetching in bulk 250 contacts!
      2017-08-16 12:54:21.593841+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:21.932923+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:22.327521+0300 Myapp[502:71738] Fetching in bulk 250 contacts!
      2017-08-16 12:54:22.869730+0300 Myapp[502:71738] Resetting interest
      2017-08-16 12:54:22.869790+0300 Myapp[502:71738] Increasing interest: 1
      2017-08-16 12:54:22.871022+0300 Myapp[502:71738] Increasing interest: 2
      2017-08-16 12:54:22.872016+0300 Myapp[502:71738] Increasing interest: 3
      2017-08-16 12:54:22.873033+0300 Myapp[502:71738] Increasing interest: 4
      2017-08-16 12:54:22.873850+0300 Myapp[502:71738] Increasing interest: 5
      2017-08-16 12:54:22.878584+0300 Myapp[502:71738] Fetching in bulk 250 contacts!
      2017-08-16 12:54:23.222158+0300 Myapp[502:71738] Fetching in bulk 250 contacts!
      2017-08-16 12:54:23.557272+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:23.872468+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:24.178993+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:24.503080+0300 Myapp[502:71738] Fetching in bulk 250 contacts!
      2017-08-16 12:54:24.902068+0300 Myapp[502:71738] Fetching in bulk 250 contacts!
      2017-08-16 12:54:25.263960+0300 Myapp[502:71738] Fetching in bulk 250 contacts!
      2017-08-16 12:54:25.410705+0300 Myapp[502:71679] void SendDelegateMessage(NSInvocation *): delegate (webView:identifierForInitialRequest:fromDataSource:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
      2017-08-16 12:54:25.644994+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:26.047446+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:26.418006+0300 Myapp[502:71670] Fetching in bulk 250 contacts!
      2017-08-16 12:54:26.773450+0300 Myapp[502:71738] Fetching in bulk 250 contacts!
      2017-08-16 12:54:27.204144+0300 Myapp[502:71738] Fetching in bulk 164 contacts!
      2017-08-16 12:54:27.979844+0300 Myapp[502:71606] Fetch contacts: 12627ms
      

      During 12627ms UI if freezed.

      I found that root case of "Fetching in bulk" this line https://github.com/apache/cordova-plugin-contacts/blob/master/src/ios/CDVContact.m#L1081

      Attachments

        Activity

          People

            Unassigned Unassigned
            shalva Shalva Usubov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: