-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Broken in iOS10 beta? #1034
Comments
The code this plugin uses is 100% deprecated in iOS 10. Any app built for iOS 10, the notifications won't trigger. They need to use the new User Notifications API |
Dear, iam using windows phone 8 not ios
|
@MohamedFekry007 That is not relevant to this specific issue |
Dear, ok sorry, Could you check my issue please?
|
@MohamedFekry007 No, I only work with iOS, sorry. |
Ok thanks
|
@NorthMcCormick Thank you so much for replying. What would you recommend as a solution for local notifications in iOS10 (for a cordova based app)? Are you available for hire / interested in coding a solution? |
Dear, of course why not
|
jokiamo what's the status on your fork? Is it working on ios 10 prerelease? |
i tested on beta2 and work! |
@jokiamo Are you open to PRs for more features with the new notifications? |
yes |
@jokiamo you are the best!! Can't wait to test your code. Incredibly grateful. |
@jokiamo Well done my friend. |
@jokiamo Works brilliantly! Thank you so so so much! |
Hey -- appears I jumped the gun slightly - while notifications appear, they don't seem to go off at the proper time. If I schedule a notification for an hour from now, the notification appears almost instantly, within a minute or so. Seems like great progress though! |
jokiamo solution does not work for me, for example it does not trigger events.... (line 151)
I have changed the method too,
|
a couple of notes: the repo referenced above hardcodes a test notification to fire in 5 seconds, more work is needed to add full plugin functionality. There's an earlier and slightly more complete example of how to do this at https://github.com/ChenYilong/iOS10AdaptationTips second: I found I needed to include the NotificationCenter.framework in my Xcode Linked Frameworks and Libraries else it wouldn't compile (duh) also: the example repos use the @import directive, you must enable modules in your Xcode project (Build Settings, search for 'modules', then Enable Modules (C and Objective-C) on) In my experiments (Xcode8b5 and ios10b5) trying to grab the plugin's fireDate and rejigger it for the new framework, I could get a notification to schedule without reporting an error but it didn't fire. Then without explanation my app wouldn't run anymore. I'm chalking that up to beta-ville, but it ran once and after that single run it can't get past the splash screen. Ugh. @katzer I hope you're nearly finished with those other two plugins! |
Have you tested my solution? In my application it is working fine. |
I have not... mostly because by reading it I didn’t understand how you solved the deprecated API issue. It is however, possible that Apple won’t be making the old API go away immediately and that your fix solves another issue—so I’ll try it. If I can get the dang thing to work in Xcode8b5 on iOS10b5 that is. Q: what prompted you to approach the problem this way?
|
@malloc32 I tried your solution today (file changes to -original- plugin, still uses the deprecated API), did not get notification to fire on iOS10b6 (iPhone5). Built in Xcode7.3(7D175), delivered to iPhone via TestFlight. |
Yes,it uses the deprecated api, I m only be able to do small changes,not iOS native programing...but it is working on an iPad,now I can not tell you the beta versión, but it works... |
@malloc32 I tried the code with the same specs as @Tawpie and was also unable to get it working. The GM has got to be dropping soon, - it would be ideal to have a solution before then so we can update our projects in time for the official release. If I knew objective-c I'd try to contribute myself -- hopefully someone or @katzer will find a solution soon. If there is anything productive I can do to help I'd very much like to. |
Hey @jokiamo ! Tried your fork on iOS10 GM but it does not seem to work. It is an awesome plugin and it will great to have it working with iOS 10. Does anybody else has got it working as yet? |
And, @malloc32 , tried your changes on iOS 10 GM. While notifications are scheduled and triggered, they are not shown. |
I can confirm @mkn20 - I tried as well. |
Works well for me here on Xcode 8 && iOS10, but I have only required it to fire a local notification straight away. |
thanks @spk0611, have tried that but it fails to build on Cordova. Details: Builds fine with the ‘stock’ Katzer plugin though. Error message: So I’m stumped.
|
@Tawpie I got it working with:
That adds the plugin at the specific commit referenced above where "iOS 10 - all events fired as other iOS versions" was added as noted by @ccj242 |
@Tawpie can you please go to XCode -> Preferences -> Locations and check if Command Line Tools is set to XCode 8 for you? Or is it set to XCode 7? |
Thank you @spk0611. On a quick test it seems to work in ios 10 GM. I'm scheduling multiple notifications at different dates and times and, for some reason, it fires only the first but somehow not the later ones. I'm using cordova ios 4.1.0. @acianti it is interesting. Does it work okay for you with @malloc32 's change on both iOS 9 and iOS 10? |
ah. 7.3. Resetting to 8, although I was able to get it to build using the sequence provided by @CookieCookson. next step: test! (yay, finally—will be testing with command line tools set to 8) Thank you all!
|
I think I'm seeing the trigger is not being fired in my case when my future date is in different timezone. For instance, if device is in PDT timezone, the scheduled notifications, as long as device timezone is still the same for the dates, seem to work fine. But when the timezone changes, say to PST, which has 1 hour difference from PDT, scheduled notification are not fired. Is there then a way to schedule a notification for PST, while the device is still in PDT, so that notification is fired in future at the correct time in future when the device timezone changes from PDT to PST? Hopefully it makes sense! Any ideas in that regard? |
@spk0611 Been fighting with this all afternoon, but when I use your repo everything will (finally) build, but cordova.plugins.notification is undefined. Stock Katzer is fine though. Any clues for me? (Thanks) |
A couple of notes while I wait to see if the notification will fire...
Otherwise cordova/Xcode will crash when you attempt to build. I also left in the cordova-plugman engine definition in plugin.xml (it was commented out in one of Katzer's commits) as that "seems" to be the key to not losing cordova.plugins.notification. I didn't do the back and forth to be certain, but with that definition left in I regain access to the plugin. AND. Victory! A date and time based notification just fired and tapping it launches my app. No sound oddly, but it's a start. MANY, many thanks to all of you! (now we build for testflight and see what new surprises Apple has in store there eh?) |
Hi all, sorry I haven't yet had the time to look into it. Even the update for the background-mode plugin is paused as I don't know what to do first... It looks like to support iOS10 it will need more that just a hot fix. Damn Apple... |
Again, @spk0611's PR #1093 works for me on iOS10GM - with the caveat that @sparsh0611 mentioned. My issues have been resolved for the time being, thank you all! Shall I keep the issue open as a courtesy to others? |
It's not safe to blindly schedule in the |
For me, I'm getting some inconsistent results when using the released iOS 10. I'm scheduling multiple notifications at different dates and times in future (by passing them as an array to the schedule method for the plugin) and, for some reason, it fires only some of them but not all. On the other hand, all are fired just fine when using iOS 9. Not sure what I'm missing. |
To echo @mkn20, I have noticed some inconsistent results as well compared to iOS9 - I can't identify any pattern to them - they seem random. Still, grateful to have something half working for iOS10 rather than not at all. |
@ccj242 Looking at the issues others (and you) are facing, I don't think this issue should be closed for now. |
+1 Working but not as stable as it used to work prior to iOS 10. |
@katzer i understand it will take time to fix this damn ios10 update properly but is there anyway to commit a half patch commit on master branch ? (to satisfy a part of the plugin users and let them wait a few days more to the final fix) ? |
@lucbonnin I agree, if you didn't see this and need it in the mean time (or anyone else who needs to use the plugin patch, here is how to do that): #1093 (comment) |
Hey all, I've merged the PR #1093 into the iOS10 branch! |
Hello everyone, will iOS10 branch be merged to the master branch sometime? |
I am working on it already. I haven't yet done any commits but the new version will not be compatible anymore with iOS 9 because of the new UserNotifications API. |
I've updated the ios10 branch. It supports both iOS9+iOS10. Its still a work in progress but most things do work. It does not yet contain any new features provided by the new SDK. |
Thank you @katzer it was not a breaking one for me, but I followed this bug and I really want to take a moment to give thanks for the work done. |
@katzer thank you for making this plugin, I'm attempting to use the ios10 branch in my application, but I'm getting really inconsistent results when attempt to schedule multiple notifications. For example, when I schedule 8 notifications, 2 minutes apart (just so i can test that the delayed notifications work) I will get the first notification, but then none of the others. I was wondering if these issues were going to be resolved anytime soon, since it appears this has been an issue for the past 4-5 months already. I was hoping to use this plugin in my application because my needs for notifications aren't that large, but if scheduling notifications for the future just doesn't work at all, then I would need to use push notifications since this is the only local notifications plugin. |
Please use 0.9-beta - thanks |
While the scheduling example for "5 seconds from now" works in the 9.3beta of iOS, it seems to break in the iOS10beta2. The success function fires, but no notification appears. Wonderful plugin, thank you a thousand times over!
The text was updated successfully, but these errors were encountered: