iOS Simulator should be able to simulate push notifications
| Originator: | jason | ||
| Number: | rdar://19632297 | Date Originated: | 2015-01-28 |
| Status: | Closed | Resolved: | Marked Duplicate of 8164566 |
| Product: | Developer Tools | Product Version: | |
| Classification: | Feature (New) | Reproducible: | Always |
Much as the simulator allows a simulated location today for location services, it would be extremely helpful if the simulator could cover more ground on push notifications. Notably, it should be able either: 1. Register for push with the APNS sandbox environment (This is possible with software-only solutions such as Safari Push Notifications, this feels consistent with that) -or- 2. Have a simulator-specific UI option for generating a push notification (much like the menu options for Hardware > Lock or Debug > Location > Apple) With enhanced push options now available, it is more efficient to be able to do initial testing across a variety of simulated device types, especially if it could be simulated without setting up app ids, apns certificates, etc. for early prototyping. My current solution is to invoke the app delegate's - application: didReceiveRemoteNotification: fetchCompletionHandler: code via lldb once my app is running in the simulator to simulate a push. This has some level of usefulness, but requires some small shim code in my app (wrapped in a #ifdef DEBUG section) that I'd rather not introduce, and it doesn't let me test behavior outside of the app for interactive notifications. It also doesn't let me effectively test scenarios around disabling of push by the user, etc.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!