ios simulator - where is settings>notifications>appname? - ios

I built a VOIP app for iphone where if you receive a call, you will hear a telephone ring tone. Some users have complained that they don't hear any ringtone. I discovered later that on the physical device, you can go to Settings>Notifications>TheAppName, and adjust your notification settings. One of htese settings is to disable sounds or allow sound, which corresponds to whether you get the ringtone or not when receiving a call. However, some users still don't seem to hear the ringtone at all despite having the most permissive sound settings.
I wanted to reproduce their issues in the iOS simulator. But I can't seem to find the Settings>NOtifications in the simulator. How do I locate this?

You cannot test push notification services on the simulator. You have to use a device to test it.

Related

iOS: Silencing Device in xCode

We were creating an app that requires us to silence the notifications and ringers of our device. When the app is being used it must silence the device, and when it is done it needs to restore the volume and sounds.
We've thought of three ways to do this. We would like our app to be approved by the App store.
AVSystemController -> not approved
Setting a silent audio file as ringtone and notification
Tricking the device into thinking the headphones are plugged in.
Any suggestions? This is the biggest obstacle we've had.
This cannot be achieved.
I believe even if you find someway to overcome this issue, probably/definitely apple will reject it.
According to Apple's Review Guidelines
10.5 Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, will be rejected

How to simulate Apple Watch disconnection from phone

Is there any way to simulate the phone being disconnected from the Apple Watch - on the iOS Simulator?
The only thing I can think of so far is uninstalling the phone app while the watch app is running.
I'd like to know as I haven't seen a definitive answer on what the behaviour is when the phone disconnects e.g. what happens to data on screen on the watch - is it removed or does it stay there read-only.
I can't find the post on the Apple Developer forums right now, but all indications are that you can't test that scenario in the simulator.
EDIT: Found it. This thread should help a bit: https://devforums.apple.com/thread/254576?tstart=0
Just close the iPhone simulator once the simulators open and show paired connection

Bluetooth beacon launch app or generate push notification

Is it possible to achieve something like geofenced launching of an application, but using bluetooth beacons instead of GPS? I.e. when the phone gets a close to a device with a particular id it will launch the app (or somehow generate a push notification which could in turn launch the app)?
No, not in iOS 6 or 5. You would be interested to look at the docs for the upcoming release however. You might find something in there to be pleasantly surprising.

Turn iOS Device into AirPlay Speaker

I'm fiddling with an app, and I'm also aware that apps made by developers that allow an iOS Device to receive an audio stream from another iOS Device or iTunes. So I'd like to implement it and possibly find a method within Apple's guidelines, allowing audio to be streamed. I've tried looking for everything, but I can't find where to start. Any ideas, a place to start, maybe even a point of direction would be great.
chekout the airspeaker project on github.
https://github.com/chenkaigithub/AirSpeaker
I was able to run it on iOS simulator 6.0 and then use my iphone to stream audio.
However if I try to stream from iTunes 11 it does not work ( iTunes lists the device in airplay list but , on selection , prompts with error "airplay device is not compatible with this version of iTunes." )

Toggle iPhone Charging through OS X or XCode

I'm currently writing an iOS application and am receiving battery status change notifications. Of course, when I'm debugging my app it would be nice if I could toggle the battery status without unplugging my phone. Is there any way to do this via OS X or XCode, that is, while having the phone plugged in tell it to stop charging so I can test my notifications and actions?
Due to Apple's sandboxing regulations and firmware, you can not tell the phone to stop charging. This is a service extremely close to the core of the phone, and it can not be programmatically accessed.
Of course, when I'm debugging my app it would be nice if I could toggle the battery status without unplugging my phone.
Since you can't do that (per the accepted answer), an alternative that will help you debug is to create and send your own battery status notifications. The notifications are regular old NSNotification objects, and you can create and send your own with the name set to UIDeviceBatteryLevelDidChangeNotification or UIDeviceBatteryStateDidChangeNotification. That should let you trace through any code that would normally run when your app receives those notifications.

Resources