Skip to content

Commit 2c7671e

Browse files
Browserのトップ画面のOriginの修正。
1 parent fac4ce1 commit 2c7671e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDeviceUtil.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ - (void)discoverDevices:(DiscoverDeviceCompletion)completion
9595
[request setApi: DConnectMessageDefaultAPI];
9696
[request setProfile: DConnectServiceDiscoveryProfileName];
9797
[request setAccessToken:accessToken];
98-
[request setString:[self packageName] forKey:DConnectMessageOrigin];
98+
[request setString:@"file://" forKey:DConnectMessageOrigin];
9999
[manager sendRequest: request callback:^(DConnectResponseMessage *response) {
100100
if (response != nil) {
101101
if ([response result] == DConnectMessageResultTypeOk) {
@@ -129,7 +129,7 @@ - (void)callRequestAccessTokenAPI:(DiscoverDeviceCompletion)completion {
129129

130130

131131

132-
[DConnectUtil asyncAuthorizeWithOrigin: [self packageName]
132+
[DConnectUtil asyncAuthorizeWithOrigin: @"file://"
133133
appName: @"Browser"
134134
scopes: scopes
135135
success: ^(NSString *clientId, NSString *accessToken) {

dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHSettingViewModel.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ - (BOOL)switchState:(SecurityCellType)type
238238
- (void)checkOriginAndLocalOAuth:(BOOL)isOn type:(int)type copmletion:(void (^)())completion
239239
{
240240
if (type == SecurityCellTypeOrigin
241-
&& [[NSUserDefaults standardUserDefaults] boolForKey:IS_USE_LOCALOAUTH]
242-
&& [[NSUserDefaults standardUserDefaults] boolForKey:IS_ORIGIN_ENABLE]) {
241+
&& [DConnectManager sharedManager].settings.useLocalOAuth
242+
&& [DConnectManager sharedManager].settings.useOriginEnable) {
243243
NSString *message = @"下記の機能がアプリのOriginを参照するため下記もOFFに切り替わります。\n- LocalOAuth\nよろしいですか?";
244244
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"警告" message:message preferredStyle:UIAlertControllerStyleAlert];
245245
[alertController addAction:[UIAlertAction actionWithTitle:@"はい" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
@@ -261,8 +261,8 @@ - (void)checkOriginAndLocalOAuth:(BOOL)isOn type:(int)type copmletion:(void (^)(
261261

262262
[[self rootViewController] presentViewController:alertController animated:YES completion:nil];
263263
} else if (type == SecurityCellTypeLocalOAuth
264-
&& ![[NSUserDefaults standardUserDefaults] boolForKey:IS_USE_LOCALOAUTH]
265-
&& ![[NSUserDefaults standardUserDefaults] boolForKey:IS_ORIGIN_ENABLE]) {
264+
&& ![DConnectManager sharedManager].settings.useLocalOAuth
265+
&& ![DConnectManager sharedManager].settings.useOriginEnable) {
266266
NSString *message = @"本機能はアプリのOriginを参照するため、下記もONに切り替わります。\n- Origin(有効/無効)\nよろしいでしょうか?";
267267
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"警告" message:message preferredStyle:UIAlertControllerStyleAlert];
268268
[alertController addAction:[UIAlertAction actionWithTitle:@"はい" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

0 commit comments

Comments
 (0)