I have developed a simple app for iPad which has push notifications in it as a feature.
I created its app id and enabled the push notifications and downloaded the certificates for development as well as distribution.
I created .pem files for both as well.
While using development profile, everything worked fine and push notifications were working perfect.
But when I started checking it with distribution profile push notifications didn't come.
I also got the php file changed and removed sandbox from it. I checked everything but I cannot seem to find what is missing.
Do we need to do anything exclusive for Enterprise apps for enabling push notifications in them?
Thanks in advance.
Best regards
Related
I have an issue with FCM and TestFlight. I have an app which is written via Objective C. It uses push notification service via Firebase. I use APNs key instead of certificates.
The issue is when I run my app in debug and in release mode via Xcode I get push notifications. When I sign app with distribution profile and send it to TestFlight and install it via TestFlight on same device push notifications not received.
We are using php server for the app. And push notifications are sent from that server via firebase. I have all the settings in AppDelegate file as it is stated in Firebase SDK docs. So all proper delegates are set and firapp configure called and so on like here. https://firebase.google.com/docs/cloud-messaging/ios/first-message Also I've checked entitlements file that APS-environment is set to Production when sending to TestFlight.
I've tried to set type of device token in didRegisterForRemoteNotificationsWithDeviceToken via [[FIRMessaging messaging] setAPNSToken: type:] to sandbox or prod whether it is debug or release mode of schema. Also I've using this code instead of that now [FIRMessaging messaging].APNSToken = deviceToken. But neither of the options work in TestFlight.
Our back-end dev says that on server push notifications are sent properly. So I suppose that it may be something related to device token.
Also I've update Firebase pods recently form version 3 to version 6. May be firebase lib on server should be updated as well?
Do you know what the issue can be? Any help is appreciated.
Update. I've found that this issue has began after updating firebase ios lib not from 3 to 6 version but from version 6.18 to 6.31.1. So my issue was bug stated in issue #6553 on official GitHub of Firebase iOS SDK. This bug was fixed in version 7.0.0. And after updating my issue was solved.
https://github.com/firebase/firebase-ios-sdk/issues/6553
I have recently joined a startup who has been using an offshore team up until now. Our app in built in Obj-C with a PHP backend, both of which I am fairly new to (I come from a JS background). I have been wanting to make some alterations to the current in-app notifications (banners), but have been unable to figure out how to test them. I am aware that testing notifications on the simulator is not possible, and have installed the developer build to my device. However, I am still not receiving any notifications when I would normally receive them in the production build, such as when a friend posts a message. If anyone has any experience with this I would love to hear it. I am currently developing in Xcode 8.2.1
This might get closed as too broad a question, but for what it's worth here are some checkpoints:
The app is enabled for notifications in iPhone Settings
The app is requesting a push token from APNS
(registerForRemoteNotificationTypes)
It receives a valid token from APNS and
passes it to your PHP server (didRegisterForRemoteNotificationsWithDeviceToken)
Your server is storing the token correctly
Your server is triggering a push notification correctly
Your development certificate is correct
(read this post iPhone APNS Device Tokens in sandbox vs. production)
If you want to test push without the server in the loop, checkout PushMeBaby (there are several on GitHub).
try it:
if app is already launched in App Store: they enabled the production certificated ... and u r running the application through Xcode ,u will not get the notifications in ur device... for that u need to create IPA file for ur project and run through iTunes...
My app is a 'clickconf app', and I used the AdHoc distribution in order to allow my client to install the app on their device for testing. I am hosting my app on a TestFlight server and then installing it on the device from MobileSafari.
The problem is that when the app is almost installed, a new icon is displayed saying "Installing".
I don't know whether this is an issue from iOS side or PHP side because from PHP side it is allowing the app to install on the device.
Can anyone help me fix this issue?
I know its been long time but i got the answer for my question. Its issue ob mismatch bundle-identifier in plist and IPA.
So make sure bundle identifier should be same.
we have developed an application that use push notifications by following the very good guide created by David Mytton.
The push service worked great on the development profile. But now that it is finished we have changed to the customers distribution profile. The application is an in-house application using an Enterprise account.
We have changed the certificate on the server and we have changed to the production url as specified in the tutorial. We have also replaced the profile used when building the application and installed it to the tester iPhone. Everything seems to work on the server, and no error messages is returned but the push is never recieved on the iPhone. We are pretty clueless right now and don't know where to start debugging on this. We have checked that the tokenId is updated after replacing the profile.
Has anyone any experience in this and might know what's wrong or where to start debugging? Thanks!
I have no idea what was wrong here but i finally got it to work..
After hours of debugging without results i threw in the towel and created a new developer certificate, app id, push sertificate and distribution profile. I cleaned the project added the new profile and replaced all files on server.
And it worked! No problems at all... Sometimes i hate being an iPhone/Apple developer :\
A few things that you could try:
Make sure your phone is plugged in to a power source (sometimes not having this causes delayed notifications).
Use the following PHP library:
http://code.google.com/p/php-apns/
This allows you to debug the communication with the server and see where the error occurs. Specifically it allows you to debug if your token id is incorrect.
You could try using an incorrect token id on the server and see the behavior. Compare this with using the correct token id.
Any in-house distribution profile gives out a same tokenID, how ever
this tokenID varies across different devices.
Other only issue could be only with the ProductionURL.
I have also notices that the push notification reception is delayed sometimes, mostly when used with production URL.
Hope this helps.
I need to implement push/C2DM notifications on my website, I installed the Android 3.0 platform sdk, simulator, and I installed the application from an .apk file.
Now, I'm using a ZF powered sites and I want to test my notification, is it possible through the simulator?
I didn't write the actual Android Application, and I'm not able to do anything on it, but what should I know to use it with PHP?
Thank you
You cannot push C2DM messages to third-party applications - not without their active participation. Google's technical implementation explicitly forbids that.
An app specifies a Google account it wishes to receive notifications from; in order to send notifications, you need to log on with a Google account. For everything to work, the account has to be the same. So unless you know what account does the app wants messages from, and you know the password to that account, no C2DM for you.