Mute IPhone prorammatically is legal? - ios

I gonna start working on an app that have basic functionality to mute phone(no sound from any app, ring tone).
I searched over net and found some private api's to do what I want.
Mute iPhone programatically
https://github.com/forensix/BBSettings
But found some articles saying that Apple will not approve such kind of apps. And when I searched over store I got an app link below
https://itunes.apple.com/us/app/autosilent/id474777148?mt=8
This is auto silent app, that put iphone to mute state.
So now I want all my seniors to let me know whether I can do this app or not?

The application that you mentioned has the purpose of muting the phone. Someone downloading it expects it to mute the phone. That's probably why it was accepted on the store.
If your app mutes the phone, and the user didn't expect it, they could very likely miss important phone calls unexpectedly, which could be very damaging. So you would need a very, very good reason to have that functionality in your code.

Related

Control Spotify background music in iOS app

I'm making an app that uses gestures to change the current background music e.g Pause, Skip, etc. Currently I can do this fine for music that is playing through the native MPMusicPlayerController class.
However I am unable to control the music when it is coming from Spotify (or other music playing apps for that matter). I believe this is to do with Apple's sandboxing policy between apps.
I'm not too hopeful, but does anyone know a way to trigger a universal music control notification? Something similar to what must happen on the iOS lockscreen when background music is playing? All my research tells me this almost definitely done through a private API, but am unable to get confirmation.
Alternatively, is there any Spotify specific way to achieve this?
Unfortunately the answer is No.
You can't get any information/Notifications about other apps, even regarding what's now playing.
As you wondered, it's all regarding the Sandboxing policy of Apple.

iOS App to Ping Users Like Find My iphone "Play a Sound"

I have an idea for an app and have the design created but unsure how to go about doing it programatically. The idea is simple... ping a silent phone the way "Find My Phone" can make a silent phone make a sound. The idea is to have the app read an incoming text message with a command embedded in the text from an "authorized" user.
Example: #URGENT from my wife would make my phone sound even if it was on silent but #URGENT from my friend would not cause any action because he is not "Authorized" in my app.
From what I have found online, reading text messages in iOS is prohibited unless you build your own API/SKD (BMW reads the text from the notification center for their iDrive function) which will then get rejected by the app store. Is this correct or is there a way to do this?
My questions:
Can an app trigger an event by reading text messages with embedded commands like on Android?
In iOS is there any way to make a silent phone create a sound at full volume?
I've found that this is possible for Android, but I want to see if it is possible for iOS.
Unfortunately, the answer is no.
In order:
An iOS app has no access to the text messages of the user at all, so there's no way to trigger anything that way.
Not as a notification sound, but it's possible that by using a background audio session you could play a sound on a phone that is silenced, but still has the media volume up. However, Apple might not like this (you'd be using media playback APIs for alert noises, Apple doesn't want anyone circumventing the users decision to silence the phone).

How to prevent recording of iOS screen using quicktime

So with iOS 8, we can now record the screen of iOS devices. I've searched extensively and cannot find a way to detect, let alone prevent, this recording. The app I'm working on deals with some potentially sensitive information and images and would like to prevent this if at all possible.
Thank you in advance for your responses and insights!
Anthony
Apparently, there is some way to detect whether a display or QuickTime streaming is connected, because the Netflix app will show an error when that is the case (which also means you can't just use an iOS device and stream to your computer to watch it in big). The app works perfectly if QuickTime streaming is off with the cable is plugged in.
Maybe it just detects whether an external display is connected, and screen recording behaves like that, so basically you might have some success with these APIs and notifications.
Also, you could use an encrypted HTTP Live Stream according to Apple which would be blacked out in the stream / the recording.

Is there inter-app communication when apps start in iOS?

I am relatively new to iOS app development and I'm just trying to figure out some things that, to me, are more abstract. How do apps know when other apps start? The closest example I can think of to what I'm trying to ask is when music is playing in the background and you open another app that has sound and the music stops. Is that the new app taking authority or is there inter app communication? If there is communication how does that communication work? Like is it a message that could be accessed or what?
Sorry if that didn't make much sense, I tried to elaborate the best I could. I couldn't find anything on this on apple's developer website. Thanks in advance!
There is no inter-app communication. Each app is living in its own world, and as far as your app is concerned, it's the only app on the phone. The way communication happens is that an app talks to the system, and the system talks to your app. The way the system sends messages to your app is usually in the delegate of the framework you're working with. In your example, opening your app to play audio will send a message to the system, and the system will tell the other app to stop audio playback. That other app has no idea it was your app that initiated the stop. Another example is the AppDelegate. The app delegate will send your app messages such as application:didFinishLaunchingWithOptions:, which in this method is where you do custom initialization of the app or applicationWillResignActive: which is normally sent when the user presses the home button or receives a phone call, so here you might want to save your game, etc.
In fact the iOS system is quite complicated, much to complicated to be explained in detail here so I highly suggest reading the Apple Developer Documentation, some of it can be a little dry, but they do their best to be coherent with even absolute beginners.

iOS: read sms while app is active, like Drivesafe.ly does

Can you point me to a method which allow an app read sms messages while the app is active.
I know many people say it's not possible, but Drivesafe.ly does it and I know some bank apps do that. The only condition for that to work is that the app is currently active (shown on the screen).
Many thanks!
Iam afraid its still not possible on iPhone. If you check the iTunes page for Drivesafe.ly app, there is a notice about that.
It says:
...the application does not read native text messages out loud that come directly from your wireless carrier. Unfortunately, this is not technically possible on iOS devices today...

Resources