Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we test iOS push notification on Xcode 8 simulator without having programmer membership ?

I am just a beginner and trying to implement push notification in my app, but not getting any proper guide. The main problem is that I don't have the programmer membership. If it is possible to do without having actual membership, please explain it in clear and straight forward way.

like image 501
Shreekant Avatar asked Oct 19 '16 13:10

Shreekant


People also ask

Can we test iOS push notifications on simulator?

“Simulator supports simulating remote push notifications, including background content fetch notifications. In Simulator, drag and drop an APNs file onto the target simulator. The file must be a JSON file with a valid Apple Push Notification Service payload, including the “aps” key.

Can we test push notification on emulator?

Teams often end up using Android emulators for testing mobile applications and its push notifications. However, the many limitations of emulators and simulators prevent testers from getting accurate test results from them. Emulators are only suitable for testing in the initial stages of development.


2 Answers

Upgrade your machine to Catalina OS, download Xcode 11.4.

Collect simulator device identifier, bundle identifier and .apns file

Add this test content in .apns file

{ "aps":{ "alert":"Test drop", "sound":"default", "badge":3 } }

Run this command : xcrun simctl push <.apns file name>

Example : xcrun simctl push 8E1C327E-4B05-4190-AEA1-0646E73A3A49 com.Pushnotification test.apns

And run this command

Reference has taken from this link

like image 178
rahul bandal Avatar answered Nov 10 '22 13:11

rahul bandal


No.

Push notifications go from your server to Apple's server to a device that registered for those notifications. That cannot work without Apple's cooperation somewhere in the middle, so a developer membership is needed.

like image 45
gnasher729 Avatar answered Nov 10 '22 14:11

gnasher729