-
Notifications
You must be signed in to change notification settings - Fork 34
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
Push notifications not received in iOS debug builds #437
Comments
Push notifications are not delivered in debug builds due to https://issues.apache.org/jira/browse/CB-14264 (Error while reading embedded mobileprovision) This is fixed in cordova-ios@5.0.0 although there is a workaround listed as well. |
Build failure after upgrade. Failure is at this code fragment because
at this code
which was added by |
The change from 4.5.4 to 5.0.0 removed Let's check the plugin and see what happens about the constant |
Ah, the most recent version of the plugin, which has been significantly updated, only works for iOS 10+ https://github.com/katzer/cordova-plugin-local-notifications/blob/master/plugin.xml
So just updating to the latest version of the plugin won't work. |
This is not working even after the upgrade to cordova-ios@5.0.0
I get a server side error
The actual APNS token, as verified by the phone debug logs is |
ok so after poking around the push plugin issue list, it looks like the notification token that is generated an FCM token, not an APNS token. According to phonegap/phonegap-plugin-push#2784 APNS tokens look like this
while the token that we get looks like this
Now that I look at it more carefully, the token is also of type "FCM".
Let's try the fix in phonegap/phonegap-plugin-push#2784 and also investigate further. |
The fix is consistent with the code. Couple of notes in case this helps somebody else - since this is a debug build, we need to use the sandbox APNS server, which means that we need to use the
Under the hood, using
|
FYI: I am not sure how this ever worked. I checked the
Maybe this is because I didn't update the version of the iOS app in the stores after the GCM -> FCM switch (version updated Oct 31, 2018) but surely the others who tested this must have run into it... |
Switching to cordova-ios@5.0.0 also seems to remove the dependency on the legacy build system. Will have to test a bit more, and see if this is what others encounter as well. But that is a strong reason to make the switch. |
On further testing, it looks like switching to cordova-ios@5.0.0 breaks ionic deploy. The redirect works after the first install, but does not work subsequently although the redirect code is called correctly both times. First run
Second run
This is kind of a big deal because we use deploy for emevalzephyr :) |
Is this a race, it looks like we finish the reload before the platform was ready. In this case, how did this ever work with the older version? That plugin should also have finished before all the plugins were ready. Or is this some subtle change to plugin init complete behavior in cordova-ios@5.0.0? |
Probably a subtle change to plugin init behavior in cordova-ios@5.0.0 I worked around this by commenting out the |
This is the last hack to work with cordova-ios@5.0.0. If I have to make any more hacks, I am reverting to cordova-ios@4.5.4 |
Just a quick comment on the race -
from this code, we see
So there do not appear to be any restrictions on background operation; it is just that we reload the web view before all plugins are complete. Are plugins slower in the new cordova version? Are they executed in a different order? I am not sure, and of course, this is going to fall firmly into the category of |
And just to confirm, with the hacky fix, updates do work smoothly without resetting the UI. |
Closing this since hacky fix works |
I don't have the time to investigate in great detail right now, but this seems to have regressed android. I have frequently encountered the behavior that when launched from a cold start, the android UI load hangs. After waiting for ~ 1 hour, it shows up. I have multiple logs, and I have looked through at least one of them carefully, but I don't see anything indicating why the error occurred. Will just have to try to reproduce later with a more careful accounting of when the failures were detected. Reopening this for now.... |
In the interim, will just not enable ionic deploy on iOS |
It turns out that we have to switch to iOS 5 anyway because of the need to switch to WKWebView in order to upload apps to the app store. So let us continue to work through this and document our findings. |
I am now back at the failure due to the |
that fixes at least the compile problem. Next issue is that cocoapods are broken after the upgrade to Catalina. The first break was with auth, and I removed that since it is fairly self-contained. But then the comm plugin also needs
Removing |
For the record, since I was curious about this, we don't explicitly list the
However, the session fetcher is a dependency for GoogleSignIn
We should really add it as an explicit dependency for comm in case modularize auth further and want to remove |
We have had a ton of build/dependency issues, so I really want to enable reproducible setup and keep that ongoing checking going. I found this site on how to enable CI for iOS builds |
So the CI example there uses mint + brew + gems. That seems like a lot. Exploring whether we can standardize on one thing (e.g. brew) For the record, the current failure is:
|
It looks like homebrew takes ~ 7G. Tempted to uninstall it and then reinstall the parts that I want. Will uninstall mongodb, but maybe that will inspire me to use docker more often.
|
ok so I think that what I need is:
|
So that the workaround in e-mission/e-mission-docs#437 (comment) doesn't need to be manually applied any more
Reproducible setup complete: e-mission/e-mission-phone#700, e-mission/e-mission-phone#701 Closing this now. |
While rebuilding the app to test the local changes required for #433 et al, we stopped getting the silent push notifications on the iOS phones. Fixing this was a lot more complex than I originally thought, so documenting this just in case I have to revert and come back to this later.
The text was updated successfully, but these errors were encountered: