Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push Notifications in Mavericks iOS Simulator

I can't find anything about this, and I have never done anything with push notifications (but I know vaguely how they work). In Mavericks, now that OS X can receive push notifications from various things like websites, can iPhone Simulator receive push notifications? I've found plenty of answers from mid-2013 and earlier saying "no", but all of them are outdated because Mavericks was just recently released with its new push features.

I'm about to start working on an app for a school project that should use push notifications unless I want to be cheap and just poll the server. I understand that you NEED an iOS developer account to use push notifications, but it would make my life a lot easier if I could test on my computer.

like image 298
sudo Avatar asked Feb 12 '14 22:02

sudo


People also ask

Can we send push notification to iOS 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.

How do I set up push notifications on iOS?

Setting up Push Notifications in iOS. Go back to the iOS project you created earlier and select the main target. Under the Signing & Capabilities tab, click on the + Capability button, then select Push Notifications. This will enable your app to receive push notifications from OneSignal.

Does FCM work on iOS simulator?

'FCM does not work on the iOS simulator, you must test them using a real device. This is a restriction enforced by Apple.


2 Answers

iOS 8 and Xcode 6 did indeed add some additional integration to push notifications. If you select the iPhone 6 or iPhone 6 Plus simulator your app will now appear under Settings with a full featured notifications settings screen (see attached) and will show the in app modal when requesting push notification permissions for the first time. This is only true for the iPhone 6 and iPhone 6 Plus simulators.

Screenshot 2

Screenshot 1

Screenshot 3

However, in iOS 8 you will still get message in console as 'remote notifications are not supported in the simulator' and hence you have to use device only.

Screenshot 4

like image 81
Kevin Sylvestre Avatar answered Sep 29 '22 11:09

Kevin Sylvestre


No, there is still no API to support push notifications in the simulator. You’ll have to use a device.

like image 23
Noah Witherspoon Avatar answered Sep 29 '22 13:09

Noah Witherspoon