Controlling iOS device - ios

Is it possible from my app to run in background, turn on/off other apps, control the iOS device without jailbreaking it? I understand that this app will not pass Apple's review/approval, but I am not planning it, instead, I just need to distribute it to clearly defined list of devices. I just prefer not to require to jailbreak device.. Is it possible?

I believe its possible without actually jailbreaking the physical device. Check out the second answer to this question for some more information. iOS app without developer program or jailbreak

Related

Can we lock a phone with iOS programatically?

I need to set a timer to lock an iPhone from my app. While using the application, after 3 to 5 minutes the phone should become locked.
Short answer: You can't.
Long Answer: For the security of iOS users, Apple does not allow any application to work with important hardware matters, such as locking the iPhone or controlling the usage of other apps. If your app even attempts to do such a thing (using any method, like external APIs), your app will immediately be rejected by Apple. It is not even worth trying.
You cannot lock the screen programmatically without any private API. Even if you use a private API, your app may probably be rejected by App Store.
However you can indeed achieve by sending keyboard events from paired bluetooth hardware devices. But that means your code depends on a Bluetooth connection and I cannot think of any practice use of that. To do this with Bluetooth, click here.

Not able to make app iphone only [duplicate]

I'm shipping two binaries; one for iPhone/iTouch and the other for iPad. It's the same application.
Will Apple ensure that the user will never receive an iPhone version of the app on the iPad? If YES, then I don't have anything to worry about, but if not then I do have a problem.
The reason I ask is the iPhone application will simply not work correctly on the iPad because the server knows it's an iPad and will deliver the iPad HD content to it and the iPhone cannot handle that. I would rather not hack my application to send the server a fake device type if running the iPhone app on the iPad in order to receive the correct resources.
Suggestions?
I've been looking for this for a while because I couldn't prevent the iPhone app to load on the iPad. Searched a bit to understand why this was happening, followed #hotpaw2 instructions and found this on the official apple store rules:
UPDATE:
2.4.1 To ensure people get the most out of your app, iPhone apps should run on iPad whenever possible. We encourage you to consider
building universal apps so customers can use them on all of their
devices. Learn more about Universal apps.
https://developer.apple.com/app-store/review/guidelines/
The SDK and/or App store rules prohibit you from preventing an iPhone app from running on an iPad in 1X or 2X zoom mode, unless there are other requirements listed in the app plist. Apple's app review is known to test iPhone-only app submissions (unless there are other requirements) on an iPad, and reject the app if it doesn't run properly.
Other requirements (as listed under UIRequiredDeviceCapabilities in the app's plist) might include your app requiring telephone capabilities (or healthkit, etc.), which might help you temporarily, but still won't prevent the app from running on some hypothetical future iPad product that includes telephony capabilities (and/or healthkit, etc.).
Actually you can.
Add telephony to UIRequiredDeviceCapabilities in your plist file.
But i really not recommend it and maybe you could get rejected because of gratuitously using this property.
I think you should handle that there are iPad versions and iPhone versions on iPads, use the second one as an iPhone.
Also don't forget that retina iPads will use upscaled applications at retina resolution while none retina ones use the standard resolution. And this behavior can tweaked using jailbreak tweaks like RetinaPad and FullForce.
In the plist settings, add Application requires iPhone environment and set the boolean to YES

Access apps inside an app

I'm new to iOS development, suppose I'm making an app for parental control over their kids which would have the apps that would be added by the parent so that the child is restricted to only certain apps. How will i access the apps on the device inside this app?
Sorry, but that won't be possible on an standard (un-jailbroken) iOS device. Apple sandboxes Apps so they can't access anything outside of their "sandbox". That includes the file system, the OS, settings and other apps on the device.
It might be possible to do it on a jailbroken iOS device, but even then you'll have to hack into Apple's OS and honestly it's probably not worth the effort, especially given that you could never submit such an app to the app store..

Need to lock all application on the iPhone by using an app

I am developing an app for one of my client,he wants me to provide a functionality to lock all available apps on his iPhone using this app,but i haven't much idea about it,i know about the screen lock like passcode app but not this one.
Please suggest some best tutorial link.
Thanks
You can't access another app functionality from your app according to Apple guidelines so it is not possible.
Unfortunately, it is not possible to lock the device programmatically. There is no available API for this.
It's not possible, Apple didn't allowed it.
This could've been possible in Android but sorry this is impossible in iOS. Apple doesnt allow that.
It's not possible for an app to lock itself down. However if you have access to the device you can set up Guided Access when the app is open, preventing it from being closed. If you have an enterprise setup you are also able to set up Supervised Mode where you should be able to configure Guided Access over wifi.

iOS Private API: lock device and power off the screen

I'm making an app for jailbreak that lock the device when the user launch the app. I've tried GSEventLockDevice(); from GraphicsServices.framework but this does not work properly because it locks the screen but does not power off the screen. Is there another way to lock the screen without MobileSubstrate?
Just as another alternative, check out this answer, which uses SBDimScreen(). You could use that in conjunction with GSEventLockDevice().
It appears that you may now (iOS 5+) need to add an entitlement to your app to use this call successfully. If you haven't done that before, here is an example of how to do so. Obviously, in this case, the entitlement in question must be changed to com.apple.backboard.client.
You also might see if #VictorRonin has experimented with this, as he commented on the question I linked to. I tested SBDimScreen() on a jailbroken iOS 4.2.1 device, but my newer devices are currently unavailable to run this test. I'll try it later on iOS 5.x and post an update.
Note: the answer I linked to from Elias has a different call altogether for iOS 6.
Look at these several questions:
Simulating System Wide Touch Events on iOS
Simulating System Wide Touch Events in iOS without jailbreaking the device
How to send a touch event to iPhone OS?
The idea is that you can simulate system wide events. One of events is power down event. If you simulate it, it will turn off device and will lock it.
BTW. You may be interested to google more on GSEvent which is the key for even simulation.
Here are couple of useful links:
http://iphonedevwiki.net/index.php/GSEvent
http://networkpx.blogspot.com/2009/08/gsevent-recording-and-playback-in-30.html
Also, this approach isn't limited to jailbroken phones. It works on jailed phone too (however, you won't be able to post it to AppStore).

Resources