How to jump to system settings on iOS? - ios

If my app detects that the network is disabled, I want to jump to the system network settings. How can I do this in iOS?

There is no way to do this with the current version of the API, and Apple specifically disallows this in their HIG. Presumably this means that if you find a way, your app will be rejected.

There are no documented public APIs allowing you to do this. You can however use Apple's private frameworks, but you won't get an app accepted on the app store this way. It can, however, be used for Ad Hoc distribution and even Cydia for jailbroken apps.
Here's a quick way to get started with the private frameworks.

Related

How to programmatically turn on/off WiFi in iOS? [Swift]

NOTE: I am aware that such a thing violates user's privacy and would be rejected by Apple. However, this specific component is purely for automated testing of buffering behavior when the user's connection is poor/nonexistent. It will NOT be publicly released.
With that said, does anyone know of a way to programmatically turn on/off WiFi in iOS?
I have not been able to find anything up-to-date. Pretty much every answer has to do with this being a violation of privacy and cautioning that they shouldn't do it. Doesn't apply in my case.
Closest I could find was using something like DeviceFarm to simulate it https://docs.aws.amazon.com/devicefarm/latest/developerguide/how-to-simulate-network-connections-and-conditions.html
However, in my case I want these tests to run entirely within the app (private test build). Setting up DeviceFarm for this purpose alone isn't worth it imo.
There is no provision provided by apple to change automate changing its settings because of apple's privacy rule. So you can't achieve by any way.
You can’t. Apple does not allow 3rd party apps to change global system settings like that.
There is no API available to control cellular data,wi-fi,bluetooth within in an app , User have to go to settings to enable or disable cellular data,wi-fi and bluetooth.
This is not possible in iOS unless you jailbroke your device. Apple is not allowing any apps developer to access wifi/bluetooth. You can only check wifi/tooth is connected or not.
You can’t do that using the iOS application. Apple not allowing it.
Legally there is no way to do it. Even somehow if you are manage to do it, Apple will reject your app while submitting to AppStore.

Does Apple accept iOS apps with statically linked OpenSSL in the app store?

This question is not really technical in nature but it is clearly answerable with yes/no and so I hope its fine if I ask it here on StackOverflow.
My scenario is as follows: In order to share code between iOS and Android I'm using C++ for much of the app's logic. I'm about to start writing network code for both platforms and I plan to utilize OpenSSL or one of its derivates (LibreSSL / BoringSSL) to be able to do HTTPS calls.
OpenSSL/LibreSSL/BoringSSL would be statically linked into my app and periodically be updated by releasing a new app version.
However, I'm unsure about whether Apple would accept such an app in its app store or not. As far as I know they take a closer look at what is inside the app and I want to prevent a situation where all code is written but eventually rejected when attempting to publish the app to the app store.
I'm looking for a clear yes/no answer whether Apple accepts such apps nowadays (2019). Preferably this answer is coming from someone who actually knows the answer i.e. from someone having done the same recently (2018/2019).
Did anyone recently succeed in publishing such an app into Apple's app store?
Not only does Apple allow this, that's exactly how one is supposed to use OpenSSL in an iOS app. The operating system doesn't provide OpenSSL for the apps, so the apps need to bring their own one.
You'll probably need to declare the use of encryption to comply with encryption export regulations. It is, however, required even when using the system encryption like TLS.

Is DeviceCheck or indentifierForVendor safe?

I am planning on using DeviceCheckor indentifierForVendor to ensure that the same device is not being used to redeem multiple times the same gift (free money for example sake) offered to new users. I am wondering however, if it is possible to trick this system on a jailbroken device? Or using a custom simulator or a botnet (do iOS botnets exist?)?
I haven't tried it myself, but I think it is possible to change the bundle identifier, resign the app and side load it to your device.
This will change the change the identifier for both DeviceCheck and indentifierForVendor.
Now, for this to really affect you, the user needs to get a hold of the ipa. Which is getting increasingly difficult with the newer versions of iOS.
If you are interested in trying what I've discussed, refer to this link.
https://coderwall.com/p/qwqpnw/resign-ipa-with-new-cfbundleidentifier-and-certificate
And probably AirSign (much easier). Its a paid app for the Mac. https://www.macupdate.com/app/mac/51845/airsign

How do I use private system API?

I'd like to use a private/hidden iOS method, for example clearIdleTimer from the SpringBoard class (example here). How do I do this? A lot of information references much older iOS versions.
This is just for experimentation, I recognize that private API's are not App Store approved. Also, my iOS device is registered for development but not jailbroken.
Edit: I found these iOS-Runtime-Headers but the samples are not working for me.
Not all private APIs are the same.
Some of them you can use in any app ... you just won't get them approved for the App Store.
Some of them you can use, but only if your app runs with root privileges, which requires a jailbroken phone (plus other steps).
Some of them you can use, but you need to grant your app an entitlement, which I believe also requires a jailbroken phone.
In the case of this API:
#interface SpringBoard <UIApplicationDelegate, SBWiFiManagerDelegate>
{
}
- (void)clearIdleTimer;
You are trying to directly invoke a method in the SpringBoard application. You normally can't directly invoke other apps' methods.
One way you can do this is to use Mobile Substrate (now called Cydia Substrate). This is a powerful code injection platform that would allow you to hook into the SpringBoard application, and use clearIdleTimer. But, using Mobile/Cydia substrate requires jailbreaking your phone.
Some SpringBoard-type features are designed to be invoked by other apps, and those live in SpringBoardServices, which is different from the SpringBoard application. You can try searching SpringBoardServices for equivalent functionality. Those APIs are private, but might not require jailbreaking (I can't recall ... my phone is jailbroken so I don't have to worry about it).
Not the answer you wanted, I suspect :(

Programmatically executing the application out of sandbox in iPhone

How to build an application which is capable of executing outside the sandbox in non-jail broken devices? Because I need to access the files and other informations like sms, call history etc ...
I'm afraid you will probably not be able to do this. The provided SDK, and terms of using the SDK do not allow you to operate outside of the sandbox.
Even if you were able to access the information, then the app would only ever be for your own use (unless you are an enterprise developer) as it would most likely get a rejection from the App Store approvals process.
The only access outside the sandbox that is allowed is mediated through Apple's SDK. You will only be able to access specific items, such as the Address Book or Photo library, through the iPhone OS framework.
If you have a more specific question about what you want to accomplish, perhaps we can answer based on what is currently allowed.
There's no method that I know of to perform access outside the sandbox that is defined by the iPhone SDK.
Even if there were, your app would not be available for non-jailbroken phones, as it wouldn't be approved by the app store.

Resources