Ionic AppFlow - Build with iOS Push Notifications - ionic-framework

I am building an app via AppFlow for both iOS and Android. The app supports push notifications.
Both Android and iOS build successfully. The Android version works as expected, and push notifications are functional. On iOS, push notifications are NOT functional.
Does anyone have any thoughts on how to configure the certificate for AppFlow such that iOS will build with Push Notification allowances?
I am not familiar with building iOS apps (thus the reason I'm using AppFlow) and am unsure how to proceed.
To clarify after more research on my part, I need to accomplish two things:
Configure the Push Notification entitlement.
Associate the Google Services plist file with the iOS build.
Both tasks must be done without xcode (since I'm using appflow to build)

We use phonegap-plugin-push for notifications, and that plugin takes care of the Push Notification entitlement. Within the plugin's plugin.xml, there is an entry:
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="PushNotification">
<param name="ios-package" value="PushPlugin"/>
</feature>
</config-file>
To add the Google Services plist file, include the following entry in config.xml, within the ios platform:
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />

Remember, Push notifications don’t work in a simulator, so you’ll need an actual device
You have to get the IOS Credentials, register device and then get the certificate.
Configure your app and register it with the Apple Push Notification service (APNs).
Send a push notification from a server to specific devices via APNs.
Use callbacks in the app to receive and handle push notifications.
Once done you can Publish to Appstore
Using swift is another better option to implement push notifications.

Related

Push Notification not delivered when using local Xcode

Push Notifications are not delivering to apps deployed via Xcode, but work perfectly when build is deployed via TestFlight? What could this problem be?
The iPhone Simulator is unable to receive push notifications or successfully register for them.
But, you can create a local APNS file and test PN on the simulator. Check this;
https://betterprogramming.pub/how-to-send-push-notifications-to-the-ios-simulator-2988092ba931

OneSignale works without IOS Push Up Certificate?

I want to public my App. Some people test my App with TestFlight. The Push Up Noticication works very good. Now i read the "Ionic & Capacitor SDK Setup" again and there is one ponit that makes me confused. https://documentation.onesignal.com/docs/generate-an-ios-push-certificate
The Push Up Certificate is required but it works without.
My guess: It works, because the App is downloaded from TestFlight (?). If i download the App from the App Store, the push up Noticication without the Certificate doesnt work? Or i need the Certificate just for security?
Push certificate is required for IOS.
You can simply use this tool. https://onesignal.com/provisionator
Then continue with step 3.

Why don't I receive iOS Push Notifications with a debug build connected to Xcode debugger?

When I test the app using a TestFlight version built by the CI machine, the device receives push notifications.
But when I rebuild the app under Xcode locally with the debugger connected, the device doesn't receive any push notifications.
To validate things further I again tested locally with a push notifications tester, and the device indeed received a push notification.
So the code isn't omitted due to it being a #DEBUG build as the grant and registrations pass.
What is my local build possibly missing?
When you build your app in debug locally your app will generate a unique device token that doesn't receive production push notifications. When you build your app with a distribution provisioning profile it generates a different device token that does work on production.
Apple will reject a development device token unless you are specifically requesting a push notification using your APNS Sandbox certificate.
So if you haven't already you'll have to go through the certificate creation process all over again but this time for a sandbox certificate and use that one instead.
The solution ended up being that our server with the Houston gem needed to configure its APNS support to be in development mode, and not in production mode. 👍

AWS Pinpoint: How to get notification when app install/run directly from Xcode into device?

We have created project in Mobile Hub and manage AWS Pinpoint to send push notification in iOS devices and setup AWS Pinpoint console for push notification. We have uploaded development certificate .p12 and download the demo app from our application(project) which is created using 'AWS Mobile Hub' web service(Screen shot attached). We are getting notification while installing it from adhoc IPA. But, We are unable to get notification when we are installing directly from Xcode into my device.
So, how to get notification when app install/run directly from Xcode ?
Thanks
Previously, the Pinpoint console didn't support sending push notifications via the APNs Sandbox development environment.
Note: This feature was supported earlier only by invoking the API (not through the console). You can make a call to the API to do the following:
To register the APNs Sandbox Channel.
Register a device as an APNs Sandbox endpoint.
Send messages/campaign pushes to it.
As of yesterday (10/03/2017) Pinpoint fully supports APNs Sandbox environment through the console as well. In order to register a device as an APNs Sandbox endpoint, use the latest version of the AWS iOS SDK (v2.6.2 or above) and enable the debug flag. This corresponds to the Sandbox development environment.
You can enable the debug flag by using the following code snippet
AWSPinpointConfiguration *config = [AWSPinpointConfiguration defaultPinpointConfigurationWithLaunchOptions:launchOptions];
[config setDebug:YES];
AWSPinpoint *_pinpoint = [AWSPinpoint pinpointWithConfiguration:config];

How do I debug production push notifications using Xcode?

I would like to be able to debug handling of push notifications that originate from the production environment using Xcode. However, it appears that only distribution provisioning profiles can be used with an aps-environment entitlement value of "production". Is there a way to debug production messages on the device using Xcode?
You should use the development push certificates for this. Send your push notifications to ssl://gateway.sandbox.push.apple.com:2195 rather than ssl://gateway.push.apple.com:2195
Refer to Apple Documentation for more info.