Enabling Apple Push Notifications for ad hoc distribution environment - push-notification

I have successfully implemented APN for development Environment. But i am facing problems while implementing the same for ad-hoc distribution environment.
Can anybody please suggest me do i need to create different App Id , Certificate and Provisioning Profile for that?
And is there any change in Sandbox?
A tutorial of steps will be very much appriciated.
Thanks
Saleel Karkhanis

For Adhoc distribution, Please follow the instructions below:
In Provisioning Portal, Create a Distribution certificate.
Get the "Device ID" of the iPhone that you intend to use for testing. Open iTunes -> Connect your device -> Select your device -> In Summary Pane, Click on Serial Number label, it will change to identifier (40 Hex characters) -> Choose Edit, Copy.
In Provisioning portal, Go to Devices -> Add new Device -> Enter the copied Device ID and give it a name.
In Provisioning portal, Create a Distribution Provisioning Profile. (Go to Provisioning -> Distribution). For Distibution type , Check "AdHoc". Select the App Id, If you have a distribution certificate, it will automatically be selected here. Select the newly entered device and Submit. Download this Provisioning Profile.
In Xcode, Window -> Organiser. Click on Devices and select Library -> Provisioning Profiles. If you are the admin, then Clicking on Refresh should fetch the newly created provisioning profile. If not, Drag and Drop the Adhoc Provisioning Profile to this list.
In Xcode, in your project Build Settings -> Code Signing Identity -> Release section, Select "iPhone Distribution". For "Any iOS SDK", Select the newly created Provisioning Profile. It will be available in the list.
In Xcode, Product -> Archive. Once it finishes, Archiving, it will open the Archive window automatically. Select the project and click Distribute, In the Distribute window, Select "Save for Enterprise or AdHoc Deployment" -> Select the "Code Signing Identity" which corresponds to the new Provisioning Profile. Continue the process and this will create an ".ipa" file.
Send this .ipa file and the new provisioning profile for testing adHoc distribution.
How to load the adHoc distribution on the test device:
Open iTunes, Connect your test device.
Drag and Drop the new provisioning profile to iTunes.
Drag and Drop the .ipa file iTunes.
Sync ur device. This would load the app.
For Push Notifications to work on Adhoc distribution:
Use the production certificates.
Use production APN Host: gateway.push.apple.com
Use production APN Feedback Host: feedback.push.apple.com.

I had major problems with this as well. I had absolutely no errors in my code. I just never got a push notification on the phone in Ad Hoc.
It turns out that I had some sort of problem with my certificates. I created
I'm not really certain what the problem was, exactly, but I solved it by logging into my developer account as the team agent and recreating everything under that login. I had originally created the certificates as a team admin.
Your development mode may work just fine, since any team member can create development distribution profiles. But only certain team members can create distribution profiles. Have your team agent create everything and try it again.

There is a separate persistent connection to the push service for each environment (Development and Production). The operating system establishes a persistent connection to the sandbox environment for development builds; ad hoc and distribution builds connect to the production environment.
If you are using GCM. Go to your AppDelegate.swift. Find method: didRegisterForRemoteNotificationsWithDeviceToken and replace
registrationOptions = [kGGLInstanceIDRegisterAPNSOption:deviceToken,
kGGLInstanceIDAPNSServerTypeSandboxOption:true]
with
registrationOptions = [kGGLInstanceIDRegisterAPNSOption:deviceToken,
kGGLInstanceIDAPNSServerTypeSandboxOption:false

In addition to Sushma Satish's answer ,
When you change certificates from developement to distributon , the device token generated for your phone is different.
So make sure you're changing the device token on the server.

Related

Informatica Admin Console - Clear Started By field when reviewing execution statistics

I am using Informatica Developer 10.2. When I run a mapping or workflow, I often monitor it from the administrator console.
However, the mappings/workflows are run by a service account (not my own profile); and the admin console defaults to having my user id in the Started By field. This means I have to constantly clear this field.
Is there a means to default this to be empty?
Thanks

Firebase OTP only works in some devices - Swift 4

I am using firebase authentication in my device. I have followed every steps in firebase documentation. The OTP works in the devices that I used for testing purpose. But when I download the app from AppStore, It does not work. Please help me to get rid of this issue. Thanks in advance.
I got the answer.
There were 2 things wrong with what I was done.
When I created SSL certificate (For push notification) from App Ids under 'Certificates, Identifiers & Profiles' tab in developer.apple.com, The certificate was not created for production. So I created one for production.
I forgot to create APNs key. So I created APNs key from Keys under 'Certificates, Identifiers & Profiles' tab in developer.apple.com. Then I uploaded it in the firebase App (console.firebase.google.com). After you select your project, you can find a gear icon in the firebase website. Select project settings from there and click on the cloud messaging tab. And there you can find the option to upload APNs certificate.

Manage server keys in Firebase Cloud Messaging

I've just opened a Firebase Cloud Messaging project intended for Android push messages.
The gear icon shows one server key (obfuscated here for obvious reasons):
I would like to have more than one key, so I can distribute them to servers and developers and revoke compromised keys if necessary.
How do I manage (add and delete) server keys in Firebase?
Update:
As of the moment, the way it should be done in order to generate a new Server Key, as stated in the docs:
Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.
For the project migration steps, see my answer here.
For generating Server Keys, there is no way to generate one in the Firebase Console. It can be done via the Google Developers Console:
Go to your Google Developers Console
On the left-pane, click on Credentials
Under the Credentials Tab, Click on Create Credentials
Select API Key
Steps retrieved from my answer here
After you select API Key, it will directly create an API key without asking what type of key (Server, Android, Browser, iOS) it is. It will only allow you to set some Restrictions that was visible depending on which API Key you intend to generate.
By default, the key generated has No Restrictions, this makes a key vulnerable, that's why it is highly encouraged for you to add a restriction for your API key. In this case, since you are using it for FCM (Server Key is needed), you must add an IP Address restriction and only allow specific server IP addresses.
With that said, I don't know how you plan to integrate multiple server keys to a single Firebase Project though. Why not just make use of the IP Addresses restriction and remove the server IP address that are deemed compromised?
It's not possible to have multiple cloud messaging server keys per project. I'd suggest you to have multiple Firebase projects for your application development staging environments.
If needed, you can then re-generate the server key in the Google Developer Console.
On the top-left corner of the screen, verify that the correct
project is selected.
On the left-side panel, click Credentials.
Under Credentials tab, click Server key (auto created by Google
Service).
Click Regenerate key button
A confirmation box will show up asking if you'd like to replace the current key, then click Replace key button.
Note that the new key will be available immediately. The current key will be deactivated permanently in 24 hours.
After all of these steps, you can check that the cloud messaging server key of your Firebase project is now updated.
In Firebase, the Server Key is auto-generated. If you check out the Firebase project in the Google Developer Console, it will be listed as such. You can then create more Keys from there (but will not be listed in the Firebase Console, from what I can tell).
Basically, you can better manage the keys thru the Google Developer Console.
Hope this helps!
You should avoid distributing API keys for the same project. If any one of those using the API keys are found to be abusing it then the entire project will be throttled, affecting all keys for the project.
If you do want to have multiple developers send notifications to your application then have each developer create a Firebase project then have the client register with each sender ID. You will still have the ability to rotate the API key for each developer, or have the client delete the token for a developer that you no longer want to receive messages from. This way any abuse from one developer does not negatively affect the project as a whole.

Push notification for enterprise windows store app

Is there any way to push notifications to a windows store app that isn't deployed on the store ? My application is an enterprise one, deployed by side loading.
Thank you,
Mathieu.
This post about deploying Enterprise Apps is mentioning the following about push notifications without deploying the app to the Windows Store:
http://msdn.microsoft.com/en-us/library/windows/apps/jj657971.aspx
Note In order to use some features, such as Windows Push Notification Services (WNS), you’ll need to use a Windows Store developer account to reserve a name for your app and then associate your package with the the package identity (package name and publisher name) assigned to your app by the Windows Store. You will need to sign the app with a certificate that matches the publisher name assigned by the Windows Store and which is trusted on your PCs. While app names are released after one year if the app is not published in the Windows Store, the app’s package identity will remain associated with your app, and you can continue to use these features in your app even if you never publish it in the Store.

Creating APN Development Profile Error, "Valid signing identity not found"

I have an iOS App projects that needs push notifications. I followed tutorials on how to create a provisioning profiles for APN such as
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
https://www.youtube.com/watch?v=nFjEcLCTPM0
but I am always having this error in Provisioning Profile section under Devices
Valid Signing Identity not found
and in Code Signing Identities i have the error
Profile doesn't match any valid certificate/private key pair in your settings
Or is it somehow related to the fact that I already have 2 existing provisioning profiles for an app? I will greatly appreciate tips to fix this problem. Thanks!
Create the provisioning profile using xCode organizer instead of iOS Dev Centre.
Generate CSR using Keychain Access. You can specify any email
address
Create an APP ID at iOS Dev Center. Specify the certSigningRequest file created in step 1
Create the Provisioning Profile using xCode organizer
Generate the PEM files

Resources