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

iOS: Handoff continueactivity is not firing from iOS10 to iOS8

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 5.5.0
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      iPhone 6S (10.0, 9.3.3, 8.2) Device
      Mac OSX El Capitan 10.11.6
      Ti SDK: 5.5.0.v20160816120242
      Appc Studio: 4.7.0.201607250649
      Appc NPM: 4.2.7
      App CLI: 6.0.0-25
      Xcode 8.0 beta 6 (8S193k)
      Node v4.4.7

    • Story Points:
      1
    • Sprint:
      2019 Sprint 20, 2019 Sprint 21, 2019 Sprint 22, 2019 Sprint 23, 2019 Sprint 24, 2019 Sprint 25

      Description

      When attempting to handoff a titanium app from an iOS10 device to an iOS8 device, continueactivity does not fire. This issue does NOT occur between an iOS9 -> iOS8 or iOS10 -> iOS9.

      Note: It takes ~35 seconds for the iOS8 device to see the handoff app from the iOS10, this may be related to the iOS8 devices refresh time on Apple's side, but it may be worth investigating why it doesn't initially register the app as available for handoff, as it does between iOS9/8.

      TEST CODE:

      Ti.API.info("Creating activity...");
      var win = Ti.UI.createWindow();
      win.add(Ti.UI.createLabel({text: "Check logs",color: "white"}))
      var activity =  Ti.App.iOS.createUserActivity({
          activityType:'com.foo.message',
          title:'Handoff Messenger',
          userInfo:{
              msg: 'Tag! You\'re it!'
          }
      });
       
       
      //if(!activity.isSupported()){
      //    alert('activity is not supported');
      //} else {
      	Ti.API.info("Activity is supported...");
          activity.becomeCurrent();
      //}
       
      activity.addEventListener('useractivitywascontinued', function(e) {
          alert('Activity moved to a different device.');
      });
       
      Ti.App.iOS.addEventListener('continueactivity', function(e){
          Ti.API.info("continueactivity was fired");
          if (e.activityType === 'com.foo.message' && e.userInfo.msg) {
              alert(e.userInfo.msg);
          }
      });
       
      win.open();
       
      /** -- tiapp.xml --
       
      <ios>
      	<plist>
      		<dict>
      		<key>NSUserActivityTypes</key>
      		<array>
      			<string>com.foo.message</string>
      			<string>com.foo.bar</string>
      		</array>
      		</dict>
      	</plist>
      </ios>
       
      **/
      

      Steps to Reproduce

      1. Ensure that both iOS8 / iOS9 devices are:

      • Logged into the same iCloud account.
      • Connected to the same WiFi Network.
      • Bluetooth enabled.
        2. Create a classic mobile application.
        3. Apply the above test code to the app.js file.
        4. Run the app to both devices.
        5. Launch the app on the iO10 device.
        6. Launch the app through Handoff on the iOS8 device either by:
      • Swiping up from the app icon present on the lock screen.
      • Double tapping the home button and selecting the app.

      Actual Result

      iOS10: Activity moved to a different device.
      iOS8: App Launches but continueactivity does not appear as an alert or in the console logs.

      Expected Result

      iOS10: Activity moved to a different device.
      iOS8: continueactivity was fired should appear as an alert & in the console logs.

        Attachments

          Activity

            People

            • Assignee:
              apetkov Angel Petkov
              Reporter:
              htbryant Harry Bryant
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration