I have a xamarin.forms app. I would like to debug push notifications for iOS on an emulator. I have read that in newer versions on xCode I should be able to do that, but for some reason it doesn't work for me. Though the push notifications do come to my app on a real iPhone, it doesn't happen on the emulator. What can I be missing? Again, it does work on a real iPhone. And I just updated the xCode.
As of Xcode 11.4, it is now possible to simulate push notifications by dragging and dropping an .apns file onto the iOS simulator. The Xcode 11.4 release notes have the following to say about the new feature:
Simulator supports simulating remote push notifications, including
background content fetch notifications. In Simulator, drag and drop an
APNs file onto the target simulator. The file must be a JSON file with
a valid Apple Push Notification Service payload, including the “aps”
key. It must also contain a top-level “Simulator Target Bundle” with a
string value matching the target application‘s bundle identifier.
simctl also supports sending simulated push notifications. If the file
contains “Simulator Target Bundle” the bundle identifier is not
required, otherwise you must provide it as an argument (8164566):
xcrun simctl push <device> com.example.my-app ExamplePush.apns
Therefore, I guess the general method to push notification can not register the device for apple push server. You'd better send the identifier of device or simulator by using xcrun simctl push manually.
Command code:
xcrun simctl push <the identifier of device or simulator> <bundle identifier> <path to apns file>
More info can refer to this discussion.
Related
I followed the instructions in the Rocket.chat documentation:
Removed the check mark from the gateway
added GCM keys from firebase
rebooted the server
Pushs seem to come, but the listener "pushnotificationreceived" is triggered only if I open the application immediately after the push should come or I am in the application during the push, if I have minimized the application and send myself a message, then there is no push.
If I throw the push myself through the firebase API, then the push works out as needed.
There is a suspicion that this is due to the fact that Rocket.chat sends push data in the data key, not notification (https://github.com/RocketChat/Rocket.Chat/blob/develop/app/push/server/gcm.js).
I also have an error in the Rocket logs.Chat:
"For devices running Android 8.0 or later, you need to specify the android_channel_id identifier. See https://github.com/raix/push/issues/341 for more information", but even with this error, push writes that it was sent successfully.
Please, checkout this post:
https://forums.rocket.chat/t/apple-push-notification-service-update-from-legacy-binary-protocol/12425/4
Also, consider asking dev questions at:
https://open.rocket.chat/channel/dev
Currently I'm using Pushy to send Push Notification for iOS devices. Everything is working fine, except I'm getting exceptions for some devices with response (DeviceTokenNotForTopic)
Do we have any way to decode Device Token to get Topic associated?
The device token example as 195d2ab5bce448b692dbb6de91452e0fbac0e6c09a599525bce52accc8a6b34a
Thanks,
DeviceTokenNotForTopic can occur for the following reasons:
The iOS Bundle ID was changed since device was registered for notifications
The iOS Bundle ID configured in the Pushy Dashboard doesn't match the actual Bundle ID of the app installed on the device
The iOS device uninstalled your app, rendering the device token invalid.
The APNs Auth Key you uploaded to the Pushy Dashboard belongs to a different Apple Developer Account than the one your app is distributed under.
Please check the following:
Do the Pushy device tokens you're trying to send still have your app installed on those devices?
Does the iOS Bundle ID in Pushy Dashboard precisely equal the Bundle ID string in Xcode? Copy-paste to make sure there are no typos
Please uninstall your app completely on a test device. Install it and call pushy.register(). What device token is returned? Try sending a notification immediately to that device.
Please ensure you uploaded an APNs Auth Key to the Pushy Dashboard from the right Apple Developer Account that owns the app.
I have followed the steps given in https://firebase.google.com/docs/cloud-messaging/ios/client.
There are no errors while running the app but I am unable to receive the push notifications.
GoogleService-Info.plist has been added.
Enabled push notification services apple account as well as in the Xcode under capabilities.
Build the app in an external device rather than the simulator.
Is there any piece of code or step that I have missed out? Can someone help me sort this out?
When implementing Push notification using IBM MobileFirst Platform. I noticed that when i send more then one message, the notification gets over write each other. And i am able to see only last notification in status bar.
The issue is the same with this article for Android phone. It recommends to use different Notification ID.
Android: Manage multiple push notification in device of an app
The question is: how I can fix this problem in IBM MFP v7.1 ?
This blog post shows how you can override the default push notifications implementation by adding your own, that will create the "Inbox" style notifications: https://www.ibm.com/developerworks/community/blogs/worklight/entry/inboxstyle_notifications_in_android?lang=en
If you do not want to create your own notification implementation, you can add the following property to the wlclient.properties file in your generated Android project:
showAllNotificationsInTray=true
This properly is available only if your are using the latest 7.1 iFix from IBM Fix Central.
I am trying to make an app with push notification support. I already did everything in the apple documentation tutorial and I am sending the JSON payload from my server but the notification never arrive to my device (iPhone 3g). I also tried with Urban Airship and XtiFy but I got the same result...nothing arrive to my device.
I set my app id with push notification support, my provisioning profile, and I added an entitlemen.plist file to my app and I pasted the information in the provisioning profile file in it (everthing inside in the entitlements key).
The provisioning profile also has the " aps-enviroment " key and its value is development.
I do my .p12 file from my apple iOS push certificate and also contain his private key.
I don't know what should I do. I don't get any error in xcode nor my server nor Urban Airship nor XtiFi.
But the notification still doesn't arrive.
Thanks for any help.