IOS application - reopen application from background mode - ios

Is there a way to reopen my application from background mode ?

No. It is not possible to open an app automatically. However, you can use notifications to let user know about some event related to your app.

Technically it's actually possible but only on jailbroken devices. Use the following function from the SpringBoardServices framework:
SBSLaunchApplicationWithIdentifier(CFSTR("com.mycompany.bundleid"), NO);
On non-jailbroken devices, it's not really possible.

Related

disable internet on other ios apps

I'd like to create a very simple app to block internet access for certain app's between 7PM and 7AM on my iPhone.
However the mobile phone & imessage should stay usable, so it's no airplane modus.
This is to have some "no notification time" and don't see for example new e-mails coming in.
Would this be possible to archieve? Can an app control this behaviour for other app's?
Thanks a lot in advance for your answers!
Best regards,
Koen
No, you cannot do that. Apple "sandboxes" apps so that they have no ability to change the behavior of other apps.
If you did find a way to do that, Apple would reject your app, and probably quickly update the OS to prevent whatever method you used to do it.
EDIT:
You might be able to find a way to do this for jailbroken devices, but obviously those can't be released to the App store.
First thing, Such Apps are not allowed to be published on App Store.
I have worked with private-apis, and i know that this is not possible with only private apis. This may be possible once after you jailbreak your phone + using private libs, and may be you can create tweaks for jailbreak to achieve this functionality.

How to launch app automatically on recieve local notification without click on notification ios

I want to launch my application without any click on notification.Is it possible in ios?
No, you can not do it, maybe this can be done on jaibreak devices but it's can not be done on original devices.
It is impossible as of now in iOS devices.
Even it is possible, it is considered as a bad user experience practise.

XCUITest - How to simulate locking of the device

I am writing XCUITests for my app in Swift, and I was wondering if it's possible to simulate the locking and unlocking of a device. I've looked at XCUIApplication methods but there don't seem to be any that allow me to lock the device.
This is not possible at the moment.
According to this answer, there's a private method on XCUIDevice that you can call to lock the screen as follows:
XCUIDevice.shared.perform(NSSelectorFromString("pressLockButton"))
I'm not sure but may be it is possible to do via some magic sentence like:
let siri = XCUIDevice().XCUISiriService // available since SDK 10.3
siri.activate(voiceRecognitionText: "siri, please lock my device")

iOS development, Natively open an App in my App

I have a project where I have to open an App like Facebook inside my App.
I know the URL Scheme but it is not what I want. I don't want to left my App and have like a webview but for a native app (Facebook for exemple).
Same behavior than.
Is it possible ?
Thx a lot :-)
No, this is not possible. At least not on a non-jailbroken device (there might be hacks that can be done on a jailbroken device to achieve this that I'm not aware of).
No this is not possible. You cant open another app inside of your current app. You can open an app from within an app but you cant frame that app inside of yours.
Other than the fact that apple has prohibited and not made this available, it also will cause a poor guest experience. The apps are designed to run on the users device, not a smaller screen.
it's impossible to open another app in a running app, but you can open a webapp

Open an application from another (iOS)

I read that there is nothing like NSWorkspace for iOS
Equivalent of NSWorkspace for iOS
Unfortunately, I wanted a button in my app that can run some others applications (in background). Is it possible without NSWorkspace ?
Your first problem is that you can't run applications in the background in the same way that you can on the Mac.
But, assuming that just launching an app is enough, the answer is: it depends. The other app would need a URL scheme defined. Not all do, unfortunately. Then you just call [UIApplication openURL:].

Resources