File tree Expand file tree Collapse file tree
dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes Expand file tree Collapse file tree Original file line number Diff line number Diff 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) {
Original file line number Diff line number Diff 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) {
You can’t perform that action at this time.
0 commit comments