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

iOS: Handoff crashes from iOS9 to iOS8

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.4.0
    • Fix Version/s: Release 5.5.0
    • Component/s: iOS
    • Environment:

      iPhone 6S (9.3.3) Device & iPhone 6 Plus (8.3) Device
      Mac OSX El Capitan 10.11.6
      Ti SDK: 5.4.0.v20160804185318
      Appc Studio: 4.7.0.201607250649
      Appc NPM: 4.2.7
      App CLI: 5.4.0-40
      Xcode 7.3.1
      Node v4.4.7

      Description

      This is NOT a Regression.
      When using the handoff feature between iOS devices, it was found that a titanium app crashes when handing off from an iOS9 device -> iOS8 device. See below:

      Handing off from iOS9Device1 to iOS9Device2:
      iOS9Device1: Activity moved to a different device.
      iOS9Device2: continueactivity was fired.
      Logs: [ERROR] : UIAlertController is up and showing an alert. ABORTING showing of modal controller

      Handing off from iOS9Device to iOS8Device:
      iOS9Device: Activity moved to a different device.
      iOS8Device: App crashes.
      Xcode Logs:

      Aug  4 15:31:23 Spam kernel[0] <Notice>: xpcproxy[1079] Container: /private/var/mobile/Containers/Data/Application/326B7AB3-16DB-4C33-94A6-B8BC41EF6A71 (sandbox)
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>: SOASTA TouchTest Build : 8244.160
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>: SOASTA TouchTest initializing...
      Aug  4 15:31:23 Spam locationd[60] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>: Process delegate TiApp(o) : TiHost : NSObject
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>:   added ctDidFinishLaunchingWithOptions
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>:   watching application:didFinishLaunchingWithOptions: : success
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>:   added ctOpenURL
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>:   watching openURL : success
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>: SOASTA TouchTest initialized in 103 msec (#51)
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Error>: assertion failed: 12D508: libxpc.dylib + 71792 [3C982BC2-5B46-305A-9A09-3C3D15332820]: 0x7d
      Aug  4 15:31:23 Spam Unknown[1079] <Error>: 
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>: [DEBUG] Reading stylesheet from: /private/var/mobile/Containers/Bundle/Application/9A54667A-1524-4020-B04D-7E23BBB19F46/SamusTheBold.app/stylesheet.plist
      Aug  4 15:31:23 Spam SamusTheBold[1079] <Warning>: [INFO] SamusTheBold/1.0 (5.4.0.16921ce)
      Aug  4 15:31:23 Spam sharingd[59] <Notice>: 15:31:23.340 : Requesting Handoff payload
      Aug  4 15:31:23 Spam sharingd[59] <Notice>: 15:31:23.643 : Received a new Handoff advertisement from "SAMWISE"
      Aug  4 15:31:23 Spam sharingd[59] <Warning>: [Warning] No delegate was registered that could handle protobuf BC060AC5-021F-4A2D-883F-5FDA9A177137
      Aug  4 15:31:23 Spam sharingd[59] <Warning>: [Warning] No delegate was registered that could handle protobuf BC060AC5-021F-4A2D-883F-5FDA9A177137
      Aug  4 15:31:23 Spam sharingd[59] <Notice>: 15:31:23.719 : Received requested Handoff payload from "SAMWISE" ((null))
      Aug  4 15:31:23 Spam ReportCrash[1080] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
      Aug  4 15:31:23 Spam ReportCrash[1080] <Notice>: ReportCrash acting against PID 1079
      Aug  4 15:31:23 Spam ReportCrash[1080] <Notice>: Formulating crash report for process SamusTheBold[1079]
      Aug  4 15:31:23 Spam SpringBoard[53] <Warning>: BSXPCMessage received error for message: Connection invalid
      Aug  4 15:31:23 Spam mediaserverd[22] <Notice>: '' com.appc.SamusTheBold(pid = 1079) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
      Aug  4 15:31:23 Spam com.apple.xpc.launchd[1] (UIKitApplication:com.appc.SamusTheBold[0xbad1][1079]) <Notice>: Service exited due to signal: Segmentation fault: 11
      Aug  4 15:31:23 Spam SpringBoard[53] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.
      Aug  4 15:31:23 Spam SpringBoard[53] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.
      Aug  4 15:31:23 Spam mediaserverd[22] <Notice>: 'FigPlayer - 29' (pid = 29) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
      Aug  4 15:31:23 Spam ReportCrash[1080] <Notice>: Saved report to /var/mobile/Library/Logs/CrashReporter/SamusTheBold_2016-08-04-153123_Spam.ips
      Aug  4 15:31:23 Spam SpringBoard[53] <Warning>: Application 'UIKitApplication:com.appc.SamusTheBold[0xbad1]' crashed.
      Aug  4 15:31:23 Spam assertiond[63] <Warning>: pid_suspend failed for <BKNewProcess: 0x154e16170; com.appc.SamusTheBold; pid: 1079; hostpid: -1>: Unknown error: -1, Unknown error: -1
      Aug  4 15:31:23 Spam assertiond[63] <Warning>: Could not set priority of <BKNewProcess: 0x154e16170; com.appc.SamusTheBold; pid: 1079; hostpid: -1> to 2, priority: No such process
      Aug  4 15:31:23 Spam assertiond[63] <Warning>: Could not set priority of <BKNewProcess: 0x154e16170; com.appc.SamusTheBold; pid: 1079; hostpid: -1> to 4096, priority: No such process
      Aug  4 15:31:23 Spam SpringBoard[53] <Warning>: Unable to deliver -[UIRemoteApplication showTopMostMiniAlertWithSynchronizationPort:] message to port 0: (ipc/send) invalid destination port
      Aug  4 15:31:23 Spam sharingd[59] <Notice>: 15:31:23.896 : Stopping Handoff scanning
      

      Handing off from iOS8Device to iOS9Device:
      iOS8Device: Activity moved to a different device.
      iOS9Device: continueactivity was fired.

      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){
          alert("continueactivity was fired");
          if (e.activityType === 'com.foo.message' && e.userInfo.msg) {
              Ti.API.info(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 iOS9 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

      App crashes with no error.

      Expected Result

      App should handoff from the iOS9 device to the iOS8 device successfully.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                htbryant Harry Bryant
                Reviewer:
                Angel Petkov
                Tester:
                Harry Bryant
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • It looks like Backbone Issue Sync is not enabled for your project.

                    Git Source Code