I couldn't find it in the documentation, so I'd ask: is there a way to get/set the ringtone for a specific user in the address book (programatically, of course)?
No, there isn't an official API to do that. Submiting a feature request is all you can do.
Related
I am creating an app where a user can store other peoples information and I would like to allow users to protect the information stored in my app using a passcode or Touch ID (If their device supports it).
I have already got the Touch ID part working thanks to apple's documentation, but I am kind of stuck on how to implement the passcode lock. Will i have to create another view controller for that passcode-entry? How can I ensure that my app does not have access to users passcodes (in case the app gets hacked or run on a jailbroken device)? Does Apple provide a framework or library for this purpose?
Can someone point me to some source code or documentation I can use?
You can try this library, which looks very promising and its written in Swift from #yankodimitrov.
SwiftPasscodeLock
You could use a library like VENTouchLock
Or you could look through its implementation and see how it works in order to replicate it.
I checked the documentation but could not find anywhere regarding assigning ringtone to a group of contacts programmatically. I was wondering is it even possible without using Private API and app store safe ?
My question is the duplicate of this and this but I checked this application, and it does what I was looking for so may be I am overlooking the documentation ?
Any insight on this would be great.
Its not possible to assign contact or group of contact pragmatically for App Store app but you can quietly do for jaibreak app.
Have a look on this.. Is it possible to set the ringtone file(name) for a phone number in a contact using codes?
Old post but still valid In short --
Apple will not allow any Application in app store which modifies user preferences..
Theoretically this is not allowed as per Apple guidelines because you are not allowed to change user preferences through a separate program. That's simply it is. This is specially true for groups since user doesn't have a way to revert the changes done through your program without his permission.
However, the program you have specified here might be using Address Book API methods to retrieve the group they want to change and modifying the ringtone information through a system command by allowing the current user to be root or admin. Just a thought if it can be done.
My app wants to know the current mute setting of iPhone. Is there a way to achieve this? I see some solutions in google, but they don't work on my iPhone5. Any example codes or open source solutions?
As far as i know you can't access the volume apis in your application. Those are private apis . If you are access theses api by any way then also it tends to reject your application by apple .
This is how you change the volume with public api:
[[MPMusicPlayerController applicationMusicPlayer] setVolume:currentVolume];
But to mute it I don't think there really is a public API.
Is it possible to programmatically upload a picture to twitter from iPhone?
Can this be done through twitter directly, or do I need to use a third-party service like Twitpic?
Thanks for editing your question. It makes more sense now. I'm leaving my original answer up so that this thread doesn't become confusing.
Anyway, the answer is short: the Twitter API doesn't provide a way for you to upload a photo directly with a status update, so I'm fairly certain you need to use a third-party service. The official Twitter client uses yFrog by default, but it lets you change the service to TwitPic, TweetPhoto, Mobypicture, Twitgoo, Posterous, img.ly, or a custom service.
Just use http://github.com/Gurpartap/GSTwitPicEngine.
Is there any way to change the default application? E.g. change mailto: behavior to launch 3rd party application when user selects an email address anywhere on iphone OR launch SMS application when user selects a phone number.
Thanks for your help!
Nicolas is correct. To use some of the default applications (you mentioned SMS) you simply need to call the appropriate URL handler.
Please refer to: http://iosdevelopertips.com/cocoa/launching-other-apps-within-an-iphone-application.html
You cannot override the default handlers. Apple have made it very clear that they do not want to confuse the user by providing applications that duplicate basic iPhone functionality. The most famous case is Google Voice (http://www.techcrunch.com/2009/07/27/apple-is-growing-rotten-to-the-core-and-its-likely-atts-fault/)
You need to use URL handlers. I'm not sure if you can override default handlers (mailto: http:...), but have a look at this guide:
http://www.mobileorchard.com/apple-approved-iphone-inter-process-communication/