Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS callback when the app is killed #98

Open
Ayyagaries opened this issue Feb 6, 2020 · 0 comments
Open

IOS callback when the app is killed #98

Ayyagaries opened this issue Feb 6, 2020 · 0 comments

Comments

@Ayyagaries
Copy link

Ayyagaries commented Feb 6, 2020

Ti.App.iOS.addEventListener('usernotificationsettings', function eventUserNotificationSettings() {
   		// Remove the event again to prevent duplicate calls through the Firebase API
   		Ti.App.iOS.removeEventListener('usernotificationsettings', eventUserNotificationSettings);

   		// Register for push notifications
   		Ti.Network.registerForPushNotifications({
   			success: function(e) {
   				Ti.API.info("*************************************************");
   				console.log("----SUCCESS IOS ----" + JSON.stringify(e));

   				Ti.API.info("*************************************************");

   			},
   			error: function() {
   				Ti.API.info("*************************************************");
   				console.log("----ERROR IOS ----");
   				Ti.API.info("*************************************************");

   			},
   			callback: function(e) {
   				Ti.API.info("*************************************************");
   				console.log("----CALLBACK IOS ----" + e.data["gcm.notification.message"]);
   				Ti.API.info("*************************************************");
   		      } 
   		});
   	});

When the app is killed in IOS the call back is not called. The lastdata is only for android? what is the equivalent in IOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant