Is it possible to shake the iphone when the home screen is displayed and make my app open?
for eg : triggering
(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event to open my app. Is it possible in ios5 using public sdk?
I am more interested in the technical aspects than the usability so please, if you think that's a horrible idea or you want to ask me what would I do such a thing, then I would say thanks but I understand that!
I dont want to hack into OS, use a jailbroken phone...but more curious to know can an app in itself have the complete logic to achieve the same?
EDIT
I accepted the answer "not possible" but then got another answer/comment from #skippy saying it might be possibel so I am going back to figuring it out mode. Will update accepted answer accordingly!
This is not possible. Even if it was its not a good idea, think about what would happen if two apps could do this...
Unfortunately no. You can handle shake-style events only when your application is already running.
I think it's possible, but complicated.
The first app run in background (read about required background modes).
This app must call the second app in case of shake.
It's strange behaviour, read about:
Launch an app from within another
Related
I’m starting with native iOS development and been looking for answer but didn’t found one. I would like to know how to get lock/unlock events even if app is in background or terminated. Probably I need to get use of those: applicationProtectedDataWillBecomeUnavailable
and applicationProtectedDataDidBecomeAvailable
It’s for sure somehow possible, since this app is doing exactly what I need: https://apps.apple.com/pl/app/screen-time-challenge/id1498412012
Thanks for any advices 😁
Ps. I don’t want to use any private API
Recently i visited a restaurant and they use iPad for ordering. When i tried to close the app by pressing the home button it did not close. Rather it blinked (may be went to background and came up again i don't know). then i was prompted for admin password.
But when i searched stack overflow most answers suggest that it is not possible. As per my understanding i can use development certificate and implement this in my personal device. May be the restaurant might have also done that.
Can someone shed some light on how to achieve this functionality?
You can put an iPad into Kiosk mode.
This will essentially lock it into a particular app with a pass key required to do anything else.
http://www.ipadenclosures.com/blog/posts/your-ipad-into-a-kiosk
This has nothing to do with objective-c. It's a feature on iPhones and iPads called Guided Access: http://support.apple.com/kb/HT5509?viewlocale=en_US&locale=en_US
There are a few ways you can do it - One of the simplest is through guided access
Another, even more secure, is through Apple Configurator - When you supervise a device you can lock it to one app and disable the controls just as with the guided access method. With this method you can supervise multiple devices and apply standard configurations quickly by simply plugging them into your Mac's USB port.
I have been asked to develop an app that will record and later "play back" touches and gestures onto another app running in the foreground.
From my experience and knowledge, this is not possible unless both apps are setup to send/receive data between them through notifications or other methods. Also, it would be a huge risk for apps and their data to be exposed to anybody.
I am 99% sure this is not possible, but was just curious if anyone else has come across something similar (or documentation that specifically states this is forbidden).
Nope not possible, no way no how, dont even try.
Expanded answer, if this runs on a jailbroken phone.......
Yes.... but good luck,
check Saurik's Veency code for this sort of functionality, it would have to be refactored signifcantly but basically it allows for virtualization of taps.
https://github.com/iceNuts/TouchTest
http://gitweb.saurik.com/veency.git
if you want to access another application in your iPhone ,you can set the url scheme parameter and so on.You can add callback in your url,then you can return back your application.
It's actually possible with facebook's idb:
https://github.com/facebook/idb/
As it stated:
Remote Automation. idb has a “companion” that runs on macOS and a python client and cli that runs anywhere. This enables scenarios such as a “Device Lab” within a Data Center or fanning out commands to large numbers of iOS Simulators.
As facebook stop support on WebDriverAgent, it's the best option we have right now
Let me first begin by explaining my goal for this app. I am looking for ideas on the best way to accomplish my goal (or at least close to my goal). This app is completely internal and thus does not need to comply with any apple guidelines (aka, can use private api's).
Our company has ~20 iOS devices. These devices are used by multiple people throughout the organization. Often times we are looking for a specific device and need to be able to track it down. So I am looking for a way to track who has what device.
My initial thought was to make an app that allows the user to pick their name from the list and then have a server that keeps track of who has what device. This worked well for a while, but now people have decided its too much work and have stopped using it. Users can just not open the app or press the home button to exit it. So now I'm looking for alternatives.
Here are some ideas that didn't work:
Custom Lock Screen - (Requires jailbroken devices so not an option)
"Lock To App" from Apple Configurator - (No way to exit our app. We don't want to hinder normal use. Note exit(0) will just cause iOS to restart our app)
MDM options - (Didn't see any that would provide this functionality. Let me know if otherwise. We would like to implement it ourselves, but a 3rd party is an option)
At this point I'm just looking for ideas or knowledge. Any help would be appreciated.
Thanks
I would add a sticker on each device and then, if i need a specific device, i would push a notification with a message like: "person with the device X ..we need it in room Y " .Then it's up to the person who has it to return it (or smth).
The sticker itself would be a numbered decal... or a picture..or something like that.
It's just an idea
So,
[[UIApplication sharedApplication]
openURL:[NSURL URLWithString:#"tel: 14165551212"]];
calls a phone number on the iPhone.
What other things can we do, though? I'm trying to make a simple app that has a list of phone numbers. It dials the first one in that list, and re-dials if it is engaged. Is this possible?
You can certainly open a link in Safari. It should also be possible to go to the Mail app and create an email. I heard that you can also go to the Messages app.
And, I don't think that what you described is possible. Your app can't do much from the background. And I'm pretty sure that it can't control/monitor any other apps(including Phone), so it will not be possible to re-dial it.
Hope it helps
What you are describing is partially possible starting with iOS 4.0 and even better with iOS 5. You may initiate dialling a number from your app with telprompt URL schema and when iOS finishes with the call it will open your app again, see Stackoverflow answer
What is problematic is getting the result of the call: whether it was successful or engaged, etc. You may want to have a look at CTCallCenter class reference.