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 #6060

Merged
merged 4 commits into from
Sep 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions apidoc/Titanium/App/iOS/iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,22 @@ properties:
osver: {ios: {min: "8.0"}}
since: "3.4.0"

- name: applicationOpenSettingsURL
summary: Returns a URL to open the app’s settings.
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.

var settingsURL = Ti.App.iOS.applicationOpenSettingsURL;
if (Ti.Platform.canOpenURL(settingsURL)) {
Ti.Platform.openURL(settingsURL);
}

type: String
permission: read-only
osver: {ios: {min: "8.0"}}
since: "3.4.0"

events:
- name: notification
summary: Fired when a local notification is received by the application.
Expand Down
8 changes: 8 additions & 0 deletions iphone/Classes/TiAppiOSProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ -(NSNumber*)NOTIFICATION_ACTIVATION_MODE_FOREGROUND
return NUMINT(0);
}

-(NSString*)applicationOpenSettingsURL
{
if ([TiUtils isIOS8OrGreater]) {
return UIApplicationOpenSettingsURLString;
}
return nil;
}

MAKE_SYSTEM_STR(EVENT_ACCESSIBILITY_LAYOUT_CHANGED,@"accessibilitylayoutchanged");
MAKE_SYSTEM_STR(EVENT_ACCESSIBILITY_SCREEN_CHANGED,@"accessibilityscreenchanged");

Expand Down