I have developed an iOS app which uses a third party framework for showing Ads inside the app.
I would like to know whether to enable push notifications for the AppId While submiting App?
its depends on how the Ads SDK works.
most likely it works without the APNS (apple push notification server), but its also possible that it does, and from that screenshot, there is a good chance.
I would recommend enabling push notification, just in case.
go to the apple's developer member center, go to your App, press edit, enable "push notifications" and create certificate for production, and also new provisioning profiles.
Don't forget to download the APNS certificate, create a PEM file to implement it on the server side (most likely they'll require that in case they do use APNS)
for more information on how it's done:
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
Enabling push notification is not required for Ad integration while submitting app to the App Store.
Related
I am new at mobile app developing, and i have been looking into push notification and , i understand that you have local notification, static on the device and remote notification, send from a notification server (which is not the application server), i am trying to use
this library, quite a popular one for doing push notification:
https://github.com/zo0r/react-native-push-notification
I can understand how to set it up in the react native project and use local notification since i found a specific tutorial for it, but the tutorial only show how to use the local notification.
I have been searching for more documents on how to use this library for remote notification step by step, from setting up the notification server to use it in the react native app, but they are all so vague explanations or use different tools.
You can use services such as oneSignal & FCM. Here are some libraries for push notification
https://github.com/geektimecoil/react-native-onesignal (one signal)
Tutorial : https://medium.com/differential/react-native-push-notifications-with-onesignal-9db6a7d75e1e
You can use the below library for FCM if you need any other firebase services such as authentication, dynamic links etc.. go for this
https://github.com/invertase/react-native-firebase (fcm)
If you just need only push notification services, you can use
https://github.com/evollu/react-native-fcm
Some helpful blogs for the integration
https://medium.com/react-native-training/react-native-push-notifications-with-amazon-pinpoint-ios-b2efa89ced32
https://medium.com/differential/how-to-setup-push-notifications-in-react-native-ios-android-30ea0131355e
Firstly go to rnfirebase and follow the process..
You will have do stuffs like yarn add (app/messaging), pod install, some changes in podfile, configure appDelegate.m firapp, notification etc.. and then mostly the problem comes with developer.apple.com
YES, you compulsory require developer account
Create identifier with push notification checked
-> Using key chain generate => Certificate Assistat > Request A Certificate from Certificate Authority to create certificate in below steps.
-> Press Configure on push notification and create certificate which will create apple push services for both development and production for release and debug and download and click it on add on keychain
-> Generate .p12 file of both certificate release and production using Keychain all you have to do it click in the certificate you just add on keychain you can verify with expiry date if is confusing... then right click export to create .p12 file put password that you wont forget
-> Put your .p12 file on Firebase Cloud Messaging under project settings > cloud messaging (Here you will need the password you set)
-> go to user developer account and create profiles both IOS development and App Store and please select the required certificate while creating AppStore Production profile
-> Now run app using development profile on Xcode and Archive using production/distribution profile
-> Test notification using Cloud Messaging Notification tools provided by firebase if it work it works if it don't check then above step throughly
I searched some notification library for react-native.
https://github.com/zo0r/react-native-push-notification
This works well for Android but it requires Apns for ios
I would like to find some libraries that doen not require Apns and simple.
There is no avoiding using APNS for remote push notifications.
In order to receive data in certain scenarios, such as having your app running in the background, phone being offline and later receiving a notification once it is back online, your device must have a unique app-specific device token generated by Apple. You can then use a service such as FCM or AWS SNS to deliver the notification to clients.
Also, for Android, you will need to use GCM to generate the device token.
You can, for testing purposes, you can use react-native-push-notifications' PushNotification.localNotificationSchedule to create a dummy local notification.
Here is a good tutorial for setting up remote push notifications with APNS and FCM: https://www.appcoda.com/firebase-push-notifications/.
I've tried to following the instructions
Configuring push services for Android devices
However, the steps mention 'Click Push Notifications on the left-side navigation' but they don't exist...
Once you've created a Google API project with GCM enabled, you need to update your application's settings page in Dashboard with the API key and sender ID you generated.
To configure Arrow for push notifications using Dashboard:
Open Dashboard and select your application from the Apps drop-down menu.
Click Push Notifications on the left-side navigation <-- MISSING.
Select the Android Push tab.
Enter the server key in the GCM API Key field and the GCM sender ID in the GCM Sender ID field.
Here's a screenshot to show what's listed...
If I look under Arrow (where I suspect it might be expecting to be listed) that's empty (I'm not using Arrow - I thought it was an alternative UI using declarative XML)...
I've checked the subscription that I'm on (Indie) and it shows that I should have the ability to send up to 1 million push notifications for free..
Does anyone know how I can associate the Appcelerator Titanium project to the GCM server key??
Also, when I looked in Googles developer console, my application (which is live on their app store) wasn't listed, so I've created a new application called 'Gcm'. The Appcelerator Titanium seemed to confirm that I needed to 'create' the application, I was just too worried to call it the same name as the live application. How does the 'Google Developer Console' Application relate to the 'Google Play' application?! - if at all?
UPDATE
I've just discovered in TiApp.xml that I can enable some 'Cloud' settings and this has unlocked the 'Push' menu - so I think all is good now, could someone confirm that this is the right thing to do and answer my related question about Google play applications v google developer console applications?
Update 2
I started to get this error
[ERROR] : GooglePlayServicesUtil: The Google Play services resources
were not found. Check your project configuration to ensure that the
resources are included.
[INFO] : CloudPush.retrieveDeviceToken error: INVALID_SENDER
I'm simply calling this to try and register for Android push notifications ...
CloudPush.retrieveDeviceToken({
success : function(e) {
console.info("CloudPush.retrieveDeviceToken success");
},
error : function(e) {
console.info("CloudPush.retrieveDeviceToken error:"+e.error);
}
});
I have tried with and without the ti.cloud module (I think it got added when I clicked the 'Enable Services' button which meant that I could see the 'Push Notifications' tab, but it seems to still be listed whether the ti.cloud module is elected or not)..
Before..
Q - How to stop the Google Play error and retrieve the device token (oddly I was getting the token before enable services.
Q - Is ti.cloud used to receive the push notification, or is ti.cloudpush sufficient for this?
Thanks for the detailed question :) Let me go into some of the things you mention and clarify what I can.
If I look under Arrow (where I suspect it might be expecting to be listed) that's empty
As you later found out you have to enable platform services for your app which will create an ArrowDB app with the same name as your app. This app will have the Push Notifications in the sidebar to configure. I've updated the guide's wordings to make clear we mean the ArrowDB app, not the Titanium app.
(I'm not using Arrow - I thought it was an alternative UI using declarative XML)...
Don't confuse Arrow with Alloy - which is the MVC framework for Titanium which indeed uses XML.
How does the 'Google Developer Console' Application relate to the 'Google Play' application?! - if at all?
It doesn't. You can even have multiple apps share the same GCM sender.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found.
What did you use to test? A Genymotion emulator without Google Apps installed perhaps? You'll need that.
Is ti.cloud used to receive the push notification, or is ti.cloudpush sufficient for this?
ti.cloud is the module to communicate with ArrowDB, subscribe to channels etcetera. On Android you need ti.cloudpush (or as #Shawn mentioned another module) to retrieve the device token where on iOS you can use a Ti. API for that. Follow this guide for all steps.
You can ignore the Google Play Service error, but it seems your GCM Sender ID and/or API Key is wrong. Read through the tutorial and make sure you put down the right ones.
If you are using Appcelerator Cloud Service to send push notifications, you need ti.cloud to register the devices.
To get the device token and to receive push notifications, you use ti.cloudpush. There are other modules that you can use instead of ti.cloudpush.
I implemented the Urban Airship library into my application and I can successfully send push notifications to a specific device in development mode. After startup I get the device token and save it into a mysql database. However, when I use the app in ad-hoc mode, the device token is always (null).
APP_STORE_OR_AD_HOC_BUILD is set to YES
and the APP Key and APP-Secret for both production and development are correct.
Any ideas how to get the device token in ad-hoc/appstore mode?
Edit:
Identical question has been posted in the Urban Airship Forum.
For me also same thing happened. What we did to solve problem is just recreated new adHoc provisioning profile. Then we got alert asking to install push notification. Its one of the major issue in iOS push notification. We must configure push nofitiation SSL certificate before creating provisioning profile.
Hi I have just released my app update with push notifications added into it. I was worried that it would not work properly so I did a bunch of testing. First with just a development certificate and then a production certificate using adhoc. Both ended up working and I was pleased when the adhoc worked.
Anyways the update has been live for about 8 hours now and for some reason push isn't working. I checked with my friend and have realized that the user is not being asked whether he wants to accept push notifications from my app. Which means when the token gets sent to my server, its appearing as (null). I have no idea why this is happening. When he goes into device settings --> notifications ---> my app does not appear on any of the lists (receiving push notifications or not receiving).
This is the code in my delegate that should trigger the request:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
If anyone knows why this is happening, input would be much appreciated. Thanks!
We thought we were having this same issue but found out that the app was actually working correctly. The user is only prompted once even if they uninstall and reinstall the app.
We were testing it by uninstalling the app and then reinstalling. iOS would remember how we had responded previously on that device and would not prompt again leading us to think there was a problem.
We found the best way to test is with the simulator and doing a "Reset Content and Settings".
After configuring your app for push notifications and generating your SSL certificates you must also generate new provisioning profiles.
The developer portal displays this message on the App ID configuration page:
After you have generated your Client SSL certificate, create a new provisioning profile containing the App ID you wish to use for notifications.
If you did not update your App Store provisioning profile after setting up push the OS will not provide you with a push token.
If this is your problem you just need to generate a new App Store distribution profile and submit a recompiled version signed with that profile.