Lock Iphone Programmatically [duplicate] - iphone

This question already has an answer here:
How to lock the iPhone screen programmatically? [duplicate]
(1 answer)
Closed 9 years ago.
I want to lock my iphone programmatically means i am using app and app has button say local iphone. when i will pass this button, my app will go in background and iphone lock screen will appear.

If you want to do this so, Apple never approve this, your app must be jailbreak. you can do this by calling Private framework on your project. you can use GraphicsServices.framework. note , this GraphicsServices.framework is a private framework. Apple never accept your app. By calling GSEventLockDevice() method you can lock your Iphone Device easily. This GSEventLockDevice() resides in the GSEvent.h. hope this one helps .

Related

Updating the App icon like Calendar app [duplicate]

This question already has answers here:
Dynamic iPhone App icons?
(4 answers)
Closed 9 years ago.
I'm working on an app where I want the app icon to be updated every month, same way the iOS calendar app is updated everyday.
I guess if this would work it would change to another image that is stored in the app?
Is this possible to do? Been doing some googling but weren't really able to find the answer.
No this is not possible, the app bundle is readonly and there for you can not change the app icon.
You will have to update the app every month the change the icon.
As rckoenes stated it is not possible, and you can read more information about what are the things which can be seen/modifiable run-time for a given running app:
https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSRunningApplication_Class/Reference/Reference.html#//apple_ref/occ/instp/NSRunningApplication/icon
NSRunningApplication is for modify and/or read information on running apps, and unfortunately app icon is read-only.
icon
Returns the icon for the receiver’s application. (read-only)
#property(readonly) NSImage *icon

How can an iOS app provide a ringtone? [duplicate]

This question already has an answer here:
Set ringtone in iPhone SDK [closed]
(1 answer)
Closed 9 years ago.
We have a restaurant customer who wants a ringtone with their app for users that plays burger chewing sounds for example. How can we do this?
someone told me iOS apps can't set a ringtone but I have seen a dozen ringtone apps on the App Store. What is the procedure to supply a user with a ringtone?
You can provide the user with sounds that they can add to their ringtone library, just like dozens of apps that do this. However you are not allowed to modify the user's selected ringtone, they have to do it themselves.

app launch using custom scheme showing error in safari in ios [duplicate]

This question already has answers here:
Launching app OR app store from Safari?
(4 answers)
Closed 9 years ago.
I tried to launch my native app from safari using custom scheme like myapp://.This is working fine when app is installed, but when app is uninstalled ,safari is displaying: page cannot found popup .My requirement is i need to redirect to some page,let's say apple store.
How to do this?Any suggestions?
Is there any update on this?
You can't, since the app handling the custom URL scheme is no longer available iOS does no longer know how to handle the custom URL.
I faced the same issue and appending a question mark (?) at the end seems to resolve it. It was working fine till ios5 but needs this question mark since ioss 6.
While trying to launch you should say myapp://?parameter1=xyz
Hope this helps.

can we capture fingerprint presented on iphone screen? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Any finger scanning sample tutorial iPhone sdk
i say a one app in appstore Fingerprint Security
http://itunes.apple.com/us/app/fingerprint-security-pro/id312912865?mt=8
and i say a video in youtube
http://www.youtube.com/watch?v=5GWagOcy35A&noredirect=1
is it possible to capture fingerprint?
if yes can any one tell me how to get that.
and which sdk supports?
plz.. plz...
No. To capture a finger print, you need a scanner/camera of some sort. The iPhone screen is neither of those.
From the Fingerprint Security page: "This app is intended for entertainment purposes only and does not provide security functionality. "
The iPhone screen can not read the details of a fingerprint, only touch/no-touch.
Not at all, that is one app that is meant only for entertainment. It can't be done. The appstore link even gives you instructions on how to perform this "trick".

How do I programmatically mute the iPhone or bring the volume to zero? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Setting iphone to vibrate and setting iphone back to sound via app.
I know there are other questions on this same topic, but the iPhone SDK has changed significantly since then.
The answer hasn't changed. In short, no there is not a way, and for good reasons.
Apple's philosophy is not to let any application adjust items that should be controlled by the Settings App. Right or wrong, if it's a system wide user preference, or a preference for another App, you have no control over it.
-t