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] Update OneSignal framework #18

Closed
chmiiller opened this issue Jan 26, 2017 · 7 comments
Closed

[iOS] Update OneSignal framework #18

chmiiller opened this issue Jan 26, 2017 · 7 comments

Comments

@chmiiller
Copy link
Collaborator

When trying to update module's One Signal framework with the last one on their github repo, the app crashes when I send a notification and app is opened, or attempt to open the app from notification.
The message is:

-[TiApp application:didReceiveRemoteNotification:]: unrecognized selector sent to instance 0x1701f0900
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TiApp application:didReceiveRemoteNotification:]: unrecognized selector sent to instance 0x1701f0900'

Not sure what they've changed about it =/
Do you guys have a solution for this by any chance?
Thanks

@aurusapps
Copy link
Contributor

Not fully sure but you should check remote notifications settings in your plist file as that was another feature added to one signal SDK probably later than the original SDK used in the module

@chmiiller
Copy link
Collaborator Author

I do have the:

<key>UIBackgroundModes</key>
    <array>
         <string>remote-notification</string>
         <string>fetch</string>
     </array>

On my tiapp.xml, should be enough I think

@aurusapps
Copy link
Contributor

Just out of curiosity are you able to replicate the error without liveview on?

@chmiiller
Copy link
Collaborator Author

I'm not using liveview at all

@aurusapps
Copy link
Contributor

@williamrijksen any ideas on how we can make this work? I think #13 should get auto resolved along with this and we are missing out on sending pictures and videos with notifications on iOS 10+

@hansemannn
Copy link
Contributor

hansemannn commented Jan 31, 2017

The error means that the didReceiveRemoteNotification: method cannot be called. Looking into the SDK, it only get's generated when you have the USE_TI_NETWORKREGISTERFORPUSHNOTIFICATIONS macro defined, which gets generated during build-time as soon as you use Ti.Network.registerForPushNotifications. I hope that helps.

#ifdef USE_TI_NETWORKREGISTERFORPUSHNOTIFICATIONS
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
    ...
}
...
#endif

@aurusapps
Copy link
Contributor

@williamrijksen @chmiiller Any thoughts on @hansemannn input? Ill give it a try if you aren't, just that Im not strong on the iOS skills ...

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

3 participants