Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23783] iOS: Handoff continueactivity is not firing from iOS10 to iOS8

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionCannot Reproduce
Resolution Date2019-10-03T17:10:06.000+0000
Affected Version/sRelease 5.5.0
Fix Version/sn/a
ComponentsiOS
Labelshandoff, qe-5.5.0
ReporterHarry Bryant
AssigneeAngel Petkov
Created2016-08-16T20:48:21.000+0000
Updated2019-12-02T23:06:27.000+0000

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.

Comments

  1. Chee Kiat Ng 2016-08-31

    [~htbryant] did you mention to me that there's an update on your findings here?
  2. Alan Hutton 2019-10-03

    Closing issue as “Cannot Reproduce”. Updating the code may not reproduce the issue reported, or be a valid test case. Axway Appcelerator Studio, build: 5.1.4.201909061933  macOS : 10.14.6 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.1 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.2.0.GA

JSON Source