File tree Expand file tree Collapse file tree
dConnectDeviceLinking/dConnectDeviceLinking/Classes/beacon
dConnectDeviceSphero/dConnectDeviceSphero/Classes
dConnectSDK/dConnectSDKForIOS/DConnectSDK/Classes/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,12 +293,16 @@ - (void) removeRawDataDelegate:(id<DPLinkingBeaconRawDataDelegate>)delegate {
293293
294294- (void ) startBeaconScanInternal {
295295 DCLogInfo (@" startBeaconScanInternal" );
296- [[BLEConnecter sharedInstance ] startPartialScanDevice ];
296+ dispatch_async (dispatch_get_main_queue (), ^{
297+ [[BLEConnecter sharedInstance ] startPartialScanDevice ];
298+ });
297299}
298300
299301- (void ) stopBeaconScanInternal {
300302 DCLogInfo (@" stopBeaconScanInternal" );
301- [[BLEConnecter sharedInstance ] stopPartialScanDevice ];
303+ dispatch_async (dispatch_get_main_queue (), ^{
304+ [[BLEConnecter sharedInstance ] stopPartialScanDevice ];
305+ });
302306}
303307
304308- (void ) startCheckConnectionOfBeacon {
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ - (instancetype)init
6060// アプリがバックグラウンドに入った
6161- (void )applicationDidEnterBackground
6262{
63- // // センサーのマスクを保持
63+ // センサーのマスクを保持
6464 _streamingMask = [RKSetDataStreamingCommand currentMask ];
6565 [RKRobotDiscoveryAgent stopDiscovery ];
6666 [RKRobotDiscoveryAgent disconnectAll ];
@@ -210,7 +210,9 @@ - (void)handleRobotStateChangeNotification:(RKRobotChangedStateNotification*)n {
210210 }
211211 case RKRobotDisconnected: {
212212 [self updateManageServices ];
213- [RKRobotDiscoveryAgent startDiscovery ];
213+ dispatch_async (dispatch_get_main_queue (), ^{
214+ [RKRobotDiscoveryAgent startDiscovery ];
215+ });
214216 break ;
215217 }
216218 default :
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ + (void) convertUriOfMessage:(DConnectMessage *) response
104104 NSArray *keys = [response allKeys ];
105105 for (NSString *key in keys) {
106106 NSObject *obj = [response objectForKey: key];
107- if ([key isEqualToString: @" uri" ]) {
107+ if ([obj isKindOfClass: [ NSString class ]] && [ key isEqualToString: @" uri" ]) {
108108 NSString *uri = (NSString *)obj;
109109
110110 // http, httpsで指定されているURLは直接アクセスできるのでFilesAPIを利用しない
You can’t perform that action at this time.
0 commit comments