Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24489

iOS: Ti.TouchID - Callback error with Ti.Network.createHTTPClient

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.1.0
    • Component/s: None
    • Environment:

      6.0.1.GA

    • Sprint:
      2017 Sprint 09 SDK

      Description

      This doesn't seem to work:

      var touchId = require("ti.touchid");
      touchId.authenticate({
          reason: "Place your finger on the home button to login",
          callback: function(e) {
              if (e.success === true) {
                  // Success
              } else {
                  // Cancel
              }
          }
      });
      

      But this works:

      var touchId = require("ti.touchid");
      touchId.authenticate({
          reason: "Place your finger on the home button to login",
          callback: function(e) {
              if (e.success === true) {
                  // if you don't do this, Ti.Network fails later if it's
                  // called from an event running in this callback
                  setTimeout(function() {
                          // Success
                  },0);
              } else {
                  // Cancel
              }
          }
      });
      

      If you don’t use the timeout 0:

      • on simulator it’s fine (with our without liveview)
      • on device with liveview it’s fine
      • on device without liveview it fails

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              clement Clément Blanco
              Reviewer:
              Vijay Singh
              Tester:
              Eric Wieber (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10551
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration