Opening iCloud.app in iPhone application - iphone

How to open iCloud.app in my own iPhone application? The only information I have ables me to open Setting.app through this line of code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
but I want to check if the calender is on/off in iCloud on the iPhone.
So when I run my own application I want to move directly in iCloud through my application.
How to access iCloud in iPhone applications?

There is no such app as the iCloud app. I presume you are talking about the iCloud menu in the settings app, there was a brief time in iOS 5.0 where you could use the prefs:// URL scheme to access menus in the settings app, however Apple disabled that in the very next update.
Hopefully it wills return in the future, but even if it does there will still be no way to programmatically determine the status of settings (such as icloud calendar sync) or manipulate the settings.

Related

Switching from View 1 to Bluetooth settings..can't possible?

I am facing problem in switching from view 1 to Bluetooth settings i.e in view 1 i have given 1 Button..on clicking on that button i want to switch to view 2(Bluetooth settings)..but it can't be possible in iPhone..since we can't access the default settings of iPhone..for that we have to create the application preferences..
Q.1 Is there any way to access the default settings of Bluetooth in iPhone?
Q.2 Is there any official link where it can be mention that we can't access the default settings?
I want suggestion..please help..
Thanks in advance
Apps cannot open the settings application to a specific screen. The reason that apps like MapMyFitness open preferences is because they ask for permission to use Bluetooth Low Energy. Asking for permission is managed by CBCentralManager on first usage.
These popups are shown automatically by the system framework. The message can be customized using the purpose property for location services, that is not possible in case of Bluetooth.
No private API was used for this, so there's no reason for the app to be rejected.
Credit goes to this bellow SO question
how some apps can open setting app programmatically within their app
que 2.
At previous we are opening Setting Page from app Using Bellow line of Code:-
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
But now upto ios5.0 it was working after that this one depreciated. and Till now Apple not providing the URL Schema for achieving this one in newer versions.
Links of similar question and it's Answer:-
Call the official *Settings* app from my app on iPhone
iPhone- Open Settings from my application iOS 6
is it possible to open Settings App using openURL?
Programmatically opening the settings app (iPhone)
How can I open the Settings app when the user presses a button?
iPhone: Opening Application Preferences Panel From App
Open UIPickerView by clicking on an entry in the app's preferences - How to?
Open the Settings app?

iPhone- Open Settings from my application iOS 6

I know there are many questions related to this.
1) is it possible to open Settings App using openURL?
2) Opening the Settings app from another app
3) iOS Launching Settings -> Restrictions URL Scheme
I have followed these questions for reference but that does not solve my query. I know that using openURL method you can open Settings but that was valid for only iOS 5.0 - 5.0.1. In iOS 5.1 it was deprecated.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
Still I have been seeing lot of Apps mainly location based which asks for user permission to turn on Location Services and takes directly to Location Services under Settings--> Privacy. The screenshot of an App, which is installed on iOS 6.1 running device, below shows that tapping on Settings take you to directly Location Services.
I tried to run code in my App but it is not working (I want to take user to Settings page to allow my app to access contact information directly from my App). If Apple has disabled URL Schemes for this how come many Apps are still using it?
For apps that tie into services such as Location, the first time they request access the OS will throw out the alert with buttons that link to Settings. This isn't actioned by the app, but by the underlying security of the OS.
iOS 6 removed the ability to do this yourself as you mentioned.
You can open settings app programmatically in iOS8, but not in earlier versions of iOS.
In Swift:
UIApplication.sharedApplication().openURL(NSURL(string:UIApplicationOpenSettingsURLString));
Swift 4:
if let url = NSURL(string: UIApplicationOpenSettingsURLString) as URL? {
UIApplication.shared.openURL(url)
}
In Objective-C
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

Autostart of an iphone app

I am building GPS Tracking app. I want the tracking functionality to be started
after a reboot of device. Now I did with background compatibility, It works fine on background, but I need to start tracking when the device is rebooted (switch on) without having to open the app to start the functionality.
How can I implement that. Please give me procedure for how to enable the autostart for
that app and how to invoke a method to start tracking.
If you watch the app like skype and webEx that are autostarted on iphone starts..
How these apps are working. I have no idea for enabling this autostart.
Please suggest me how to do?
Thanks in advance...
Add the UIBackgroundModes key to your app’s Info.plist file. Set the value of this key to an array that includes the voip string.
You can do that in xcode: Select your project root -> Capabilities -> Background Modes -> check 'Voice over IP'.
From the documentation:
"An app with this key is also relaunched in the background immediately after system boot".
No third party app can be launched on startup. Skype (and others) simple respond to push notifiactions
The only way to actually open an app from the user not explicitly opening it, is to call a [[UIApplication sharedApplication] openURL]; - or somehow otherwise open a URL, and you have to set your app up to have a custom URL scheme... see this page.
E.g: Doodle jump has URLs such as doodlejump://highscores - which you can open from an email from them or their website.

programmatically READ iPhone settings

I want to programmatically READ iPhone settings such as...
Enable 3G - YES/NO
Vibrate - ON/OFF
Message Alert - ON/OFF
etc.
Can anyone provide a solution?
I'm fairly certain you cannot: see Opening the Settings app from another app
You cannot. Because apple is not providing the API to access the iPhone settings app. But you can keep a bundle setting in your app so that user can change the settings of your app from iphone settings. If you are interested in this feature you can refer Apple doc.

An app used SMS functionality, how to publish the app to disallow ipod touch user download

I used some code like below:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"sms://123"]];
what would happen if it runs in ipod touch
how to target iphone user only when publish the app to the store.
In your app's Info.plist file, set the UIRequiredDeviceCapabilities property to contain sms as one of the keys. The App Store will handle whether or not to present your app to which devices that users browse the App Store with, and iTunes will know which devices it can sync your app to and which it can't.
You need to update your applications info.plist file. It lets you restrict the application to certain devices, OS:es etc.
Look at the UIRequiredDeviceCapabilities property which allows you to even specify that the device requires SMS :)