Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TC-4653 : Add access to iOS App Setting URL #6017

Merged
merged 2 commits into from Sep 11, 2014
Merged

TC-4653 : Add access to iOS App Setting URL #6017

merged 2 commits into from Sep 11, 2014

Conversation

benbahrenburg
Copy link
Contributor

Add access to the iOS8 UIApplicationOpenSettingsURLString. This allows the developer to launch directly into the iOS8 App Settings Screen using Ti.Platform.canOpenURL.

For example:

var settingsURL = Ti.App.iOS.applicationOpenSettingsURL;
if(settingsURL!=undefined){
    if(Ti.Platform.canOpenURL(settingsURL)){
        Ti.Platform.openURL(settingsURL);
    }else{
    alert('cannot open URL');
 }
}

Add access to the iOS8 UIApplicationOpenSettingsURLString. This allows the developer to launch directly into the iOS8 App Settings Screen using Ti.Platform.canOpenURL.

For example:

~~~
var settingsURL = Ti.App.iOS.ApplicationOpenSettingsURL;
if(settingsURL!=undefined){
	if(Ti.Platform.canOpenURL(settingsURL)){
		Ti.Platform.openURL(settingsURL);
	}else{
 	alert('cannot open URL');
 }
}

~~~
@cheekiatng
Copy link
Contributor

Hi Ben, code looks good and tested. Note in sample code, it should be Ti.App.iOS.applicationOpenSettingsURL, with a small a for applicationOpenSettingsURL.
please update the doc as well and I'll accept it.

@cb1kenobi
Copy link
Contributor

@benbahrenburg Yeah, @cheekiatng is right with the case sensitivity. This would be on par with Ti.Filesystem.applicationDataDirectory, etc.

@benbahrenburg
Copy link
Contributor Author

@cheekiatng documentation added to the PR

description: |
Used to create a URL that you can pass to the [openURL](Titanium.Platform.openURL) method.
When you open the URL built from this string, the system launches the Settings app and displays the app’s custom settings, if it has any.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description looks good. But line 259 to line 263, remove the 'tabs', the doc generator will fail when 'tabs' are encountered. In github, you can 'view whole file' and you will see what i mean.

@jonalter jonalter merged commit cc749c0 into tidev:master Sep 11, 2014
@jonalter
Copy link
Contributor

Doc formatting issues fixed. Thanks for the PR @benbahrenburg !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants