Push Notifications not working in Testflight
Issue resolved! we didn't properly set up our node environment in the server (needed NODE_ENV=production
)
Push Notifications problems iOS TestFlight
You need to add an entitlements file for this. In your case, somehow its not attached with your project when you have enabled push notifications from Capabilities. Please Turn off and turn on Push Notifications option. You may get the entitlements file added automatically in your project.
Update : Is server using the sandbox url or the disribution url ?
TestFlight push notifications not working
I regenerated the cert/profile/.p12 about 3 more times and it finally started working. Not a very satisfying answer, but there you go.
iOS app Push Notification not showing in Beta Tester user's device
You need to replace the Push certificate on your Push API server. APNS Distribution certificate is to be used in your case.
for that,
you need to export that certificates from keychain as a .p12 Or .pem file and add it to server API( API which you are using to send push notification). and you will need to set push notification mode in server API to release mode to get push notification in testflight build.
you can export certificates of push by following steps in this link:
https://medium.com/@ankushaggarwal/generate-apns-certificate-for-ios-push-notifications-85e4a917d522
Flutter - firebase FCM messages not working on Testflight release builds at all
Preface:
the issue was mine.
TL;DR
changed only 1 reference of CubeEnvironment
to PRODUCTION
.
There are multiple locations to change CubeEnvironment
:
- push_notifications_manager.dart#111
- push_notifications_manager.dart#111
- call_manager.dart#111
Suggestion to use, even better to add this in your "CallManagerService"'s init()
method:
bool isProduction = bool.fromEnvironment('dart.vm.product');
parameters.environment = isProduction ? CubeEnvironment.PRODUCTION : CubeEnvironment.DEVELOPMENT;
Debugging (process):
The debugging process (being somewhat unfamiliar with Swift & XCode) could have been better. I considered various provisioning profiles, aps-environment
settings, etc.
Since the issue only occurred on Testflight, it made debugging alot more challenging and time consuming as uploading a debug build had its own set of issues
Finally I added a bunch of logging, the one that was crucial was the CB-SDK debug entry (when a notification is received):
[
{
"subscription": {
"id": sub id,
"_id": "insert sub id",
"user_id": cube_user_id,
"bundle_identifier": "insert bundle id",
"client_identification_sequence": "insert client id",
"notification_channel_id": 6,
"udid": "insert-uuid",
"platform_id": 1,
"environment": "development",
"notification_channel": {
"name": "apns_voip"
},
"device": {
"udid": "insert-uuid",
"platform": {
"name": "ios"
}
}
}
}
]
specifically, the following entry.
environment": "development
This is due to APS used 2 different push notification environments, each with its own certificates (certificate is assigned to unique URL's where push notifications can come from). This, aps-environment
is set to 'production
(see on upload Archive screen right before you start uploading) but I'm receiving development
environment notifications - that needed fixing.
Reviewing my code, I finally found the issue (and fix mentioned above).
Related Topics
Error: Invalid Bitcode Version (Producer: '800.0.35.0_0' Reader: '703.0.31_0')
Path to Bundle of iOS Framework
Write Extend File Attributes Swift Example
(Swift) Storing and Retrieving Array to Nsuserdefaults
What Is "Error in _Connection_Block_Invoke_2: Connection Interrupted" in iOS
How to Present a Uiviewcontroller from Skscene
How to Add Image in Uitableviewrowaction
Why Is Uitextfield.Text an Optional
Raw Value for Enum Case Must Be a Literal
iPhone Is Not Available. Please Reconnect the Device
Could Not Load the "" Image Referenced from a Nib in the Bundle with Identifier
How to Show Alertview with Activity Indicator
How to Show a Collectionview Like Facebook Upload Image Using Swift 4
Prevent Uialertcontroller to Dismiss
Posting Photo to Facebook Fan Page via iOS App by Regular Non-Admin Users