I used OneSignal for push notification service.

(Development) I set Provision Profile of push notification service for my app

When I run from Xcode,everything works fine on every device.

But,when I create archive(.ipa) with Debug Scheme and install via iTunes,the device seem to connect to OneSignal Push Notification service.But,can't receive notification from our backend service that was connected to OneSignal.

So,I think there is a problem with APNS

Any help with that?Did I do something wrong.

If there was,please guide me?how to test push notification of iOS Development profile with archive (.ipa)?

2 Answers 11

As you have able to recieve the push notification on every device when you run from the Xcode so it did not problem in APNS or Provision Profile. I thought it might be a problem at OneSignal service.

For checking the push notication please look into the Mac application which created by noodlewerk.

Please download and open it. After that It will ask for provide the .p12 file(which you will get from the keychain) and device token. After that click on the "Push" button which will send you the sample push notification message on respective device.

Hope it will help you.

upvote
  flag
Thanks,I got it now,I will post an answer – Thiha Aung
upvote
  flag
@6245Htarwara : Ok, kindly let me know the reason why you have downvote my answer. – user5773826
upvote
  flag
Because it was problem with provision profile.When I archive it,I choose provisioning for team development which was auto generated by Xcode for testing on device.That is the reason why my Notification didn't work when installing .ipa that was generated by Xcode with default provision profile. – Thiha Aung
upvote
  flag
As you stated that the problem on select the wrong provision profile right, I got it. But my answer is not wrong because the problem is selection not creation you got it, so that's why I had told you that there is not problem in developement provision profile. And you have asked for testing the push notification which I had addressed it. So it is unacceptable to downvote my answer. – user5773826
upvote
  flag
@6245Htarwara : Thanks for your appreciation, it will worth for me as a beginner. – user5773826
upvote
  flag
Ok my apologies that i have stated my question unclearly.But,really thanks for your help.Cheer up! – Thiha Aung
up vote 4 down vote accepted

The reason why notification didn't come in when I install with my custom .ipa that was create by Xcode archive manager was,it did set default provision profile generated by Xcode for testing on Devices which wasn't include for APNS.

So,in order to make it work when testing development APNS using .ipa files installation via iTunes instead of Xcode build,you need to use your custom provision profile that was created by yours for testing APNS for iOS Development(Not Distribution APNS).

1.Go to Product>Scheme>Edit Scheme and set the Archive Tab to Debug

2.Then connect to your device and tap Product>Archive

3.Then your Xcode will create Archive for your file that you can upload or export as .ipa.Do like these picture

Choose

Save for Development Deployment

Then it will ask you which provision profile that you gonna use,choose like me at below if u set custom provision profile at your build setting

Use Local Signing Aspects

Then export as .ipa for all compatible devices.And then you can receive notifications like you run from Xcode by installing that .ipa via iTunes

Happy Testing!!!

Not the answer you're looking for? Browse other questions tagged or ask your own question.