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

Unable to set_location for iOS 12 simulator Xcode 10 beta 6 #490

Closed
fr0l opened this issue Aug 31, 2018 · 2 comments
Closed

Unable to set_location for iOS 12 simulator Xcode 10 beta 6 #490

fr0l opened this issue Aug 31, 2018 · 2 comments

Comments

@fr0l
Copy link
Contributor

fr0l commented Aug 31, 2018

When trying to set location using command

fbsimctl D2AFF37C-80DE-4681-8C1B-7DA7C6123E46 set_location 40.1 20.4

then get error

remote object does not recognize selector: 'accessibilityEnabled

Here is full stacktrace:

2018-08-31 06:30:35.648 fbsimctl[34780:1101958] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSDistantObject methodSignatureForSelector:]: remote object does not recognize selector: 'accessibilityEnabled''
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff54f0e2db __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fff7c0bac76 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff54f9fd7d +[NSException raise:format:] + 205
	3   Foundation                          0x00007fff56ff040d -[NSDistantObject methodSignatureForSelector:] + 1160
	4   CoreFoundation                      0x00007fff54e843c7 ___forwarding___ + 343
	5   CoreFoundation                      0x00007fff54e841e8 _CF_forwarding_prep_0 + 120
	6   FBSimulatorControl                  0x000000010d3b93d8 __40-[FBSimulatorBridge enableAccessibility]_block_invoke + 376
	7   FBControlCore                       0x000000010d5bbf45 __25-[FBFuture onQueue:fmap:]_block_invoke + 405
	8   FBControlCore                       0x000000010d5ba664 __39-[FBFuture onQueue:notifyOfCompletion:]_block_invoke + 36
	9   libdispatch.dylib                   0x00007fff7cca25fa _dispatch_call_block_and_release + 12
	10  libdispatch.dylib                   0x00007fff7cc9adb8 _dispatch_client_callout + 8
	11  libdispatch.dylib                   0x00007fff7ccaf217 _dispatch_queue_serial_drain + 635
	12  libdispatch.dylib                   0x00007fff7cca2166 _dispatch_queue_invoke + 373
	13  libdispatch.dylib                   0x00007fff7ccaff0d _dispatch_root_queue_drain_deferred_wlh + 332
	14  libdispatch.dylib                   0x00007fff7ccb3d21 _dispatch_workloop_worker_thread + 880
	15  libsystem_pthread.dylib             0x00007fff7cfebfd2 _pthread_wqthread + 980
	16  libsystem_pthread.dylib             0x00007fff7cfebbe9 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1]    34780 abort      fbsimctl D2AFF37C-80DE-4681-8C1B-7DA7C6123E46 set_location 42.131393 23.33932

Did quick analysis of class-dump

class-dump --sdk-ios /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sd /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app/Contents/Resources/Platforms/iphoneos/usr/libexec/SimulatorBridge

and I see that property accessibilityEnabled was removed from SimulatorBridge (see full diff lower)

--- SimulatorBridge.h.x9	2018-08-31 06:42:58.000000000 +0200
+++ SimulatorBridge.h.x10	2018-08-31 06:43:03.000000000 +0200
@@ -5,23 +5,54 @@
 //
 
 //
-// SDK Root: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sd.sdk
+// SDK Root: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sd.sdk
 //
 
 #pragma mark -
 
 //
-// File: /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/Resources/Platforms/iphoneos/usr/libexec/SimulatorBridge
-// UUID: B6D18279-4B94-32B3-8809-637892D4C950
+// File: /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app/Contents/Resources/Platforms/iphoneos/usr/libexec/SimulatorBridge
+// UUID: 495C0F0B-49E0-3E5C-B570-CE366CB8A9F6
 //
 //                           Arch: x86_64
-//                 Source version: 851.2.0.0.0
+//                 Source version: 869.4.0.0.0
 //            Minimum iOS version: 8.1.0
-//                    SDK version: 11.3.0
+//                    SDK version: 12.0.0
 //
 // Objective-C Garbage Collection: Unsupported
 //
 
+@protocol AXPTranslationRuntimeHelper <NSObject>
+
+@optional
+- (void)handleNotification:(unsigned long long)arg1 data:(id <NSObject><NSCopying><NSSecureCoding>)arg2 associatedObject:(AXPTranslationObject *)arg3;
+@end
+
+@protocol NSObject
+@property(readonly, copy) NSString *description;
+@property(readonly) Class superclass;
+@property(readonly) unsigned long long hash;
+- (struct _NSZone *)zone;
+- (unsigned long long)retainCount;
+- (id)autorelease;
+- (oneway void)release;
+- (id)retain;
+- (_Bool)respondsToSelector:(SEL)arg1;
+- (_Bool)conformsToProtocol:(Protocol *)arg1;
+- (_Bool)isMemberOfClass:(Class)arg1;
+- (_Bool)isKindOfClass:(Class)arg1;
+- (_Bool)isProxy;
+- (id)performSelector:(SEL)arg1 withObject:(id)arg2 withObject:(id)arg3;
+- (id)performSelector:(SEL)arg1 withObject:(id)arg2;
+- (id)performSelector:(SEL)arg1;
+- (id)self;
+- (Class)class;
+- (_Bool)isEqual:(id)arg1;
+
+@optional
+@property(readonly, copy) NSString *debugDescription;
+@end
+
 @protocol SimulatorBridge
 - (void)setLocationWithLatitude:(double)arg1 andLongitude:(double)arg2;
 - (void)setLocationScenarioWithPath:(in bycopy NSString *)arg1;
@@ -36,6 +67,7 @@
 - (_Bool)performIncrementAction:(NSDictionary *)arg1;
 - (_Bool)performDecrementAction:(NSDictionary *)arg1;
 - (_Bool)performPressAction:(NSDictionary *)arg1;
+- (NSData *)processPlatformTranslationRequestWithData:(in bycopy NSData *)arg1;
 - (void)sendRemoteButtonInput:(float)arg1 toButtonA:(_Bool)arg2;
 - (void)sendGameControllerPausedEvent:(_Bool)arg1;
 - (void)sendGameControllerData:(in bycopy NSData *)arg1;
@@ -48,15 +80,16 @@
 - (id)objectForKeyedSubscript:(id)arg1;
 @end
 
-@interface SimulatorBridge : NSObject <SimulatorBridge>
+@interface SimulatorBridge : NSObject <AXPTranslationRuntimeHelper, SimulatorBridge>
 {
     _Bool _accessibilityEnabled;
+    NSDistantObject<AccessibilityNotificationUpstream> *_accessibilityUpstreamProxy;
+    NSObject<OS_dispatch_queue> *_accessibilityUpstreamQueue;
     struct __AXObserver *_axEventObserver;
     CLSimulationManager *_locationSimulationManager;
 }
 
 @property(retain, nonatomic) CLSimulationManager *locationSimulationManager; // @synthesize locationSimulationManager=_locationSimulationManager;
-@property(nonatomic) _Bool accessibilityEnabled; // @synthesize accessibilityEnabled=_accessibilityEnabled;
 @property(nonatomic) struct __AXObserver *axEventObserver; // @synthesize axEventObserver=_axEventObserver;
 - (void).cxx_destruct;
 - (void)sendRemoteButtonInput:(float)arg1 toButtonA:(_Bool)arg2;
@@ -81,8 +114,19 @@
 - (struct __AXUIElement *)_copyElementFromElementDictionary:(id)arg1;
 - (void)enableAccessibility;
 - (void)_initializeAccessibility;
+- (void)handleNotification:(unsigned long long)arg1 data:(id)arg2 associatedObject:(id)arg3;
+- (void)setupAccessibilityUpstreamObject;
+- (_Bool)requiresAXRuntimeInitialization;
+- (_Bool)isSystemWideElement;
 - (void)handleScreenChange;
+- (id)processPlatformTranslationRequestWithData:(in bycopy id)arg1;
 - (void)setHardwareKeyboardEnabled:(_Bool)arg1 keyboardType:(unsigned char)arg2;
 
+// Remaining properties
+@property(readonly, copy) NSString *debugDescription;
+@property(readonly, copy) NSString *description;
+@property(readonly) unsigned long long hash;
+@property(readonly) Class superclass;
+
 @end
 
@fr0l
Copy link
Contributor Author

fr0l commented Aug 31, 2018

Although I did apply temporary workaround for the issue — commented out one check in FBSimulatorBridge.m

#pragma mark Interacting with the Simulator

- (FBFuture<NSNull *> *)enableAccessibility
{
  return [[self
    interactWithBridge]
    onQueue:self.workQueue fmap:^(SimulatorBridge *bridge) {
      // Set the Bridge to a good state.

      [bridge enableAccessibility];
//      if (![bridge accessibilityEnabled]) {
//        return [[FBSimulatorError
//          describeFormat:@"Could not enable accessibility for bridge '%@'", bridge]
//          failFuture];
//      }
      return [FBFuture futureWithResult:NSNull.null];
    }];
}

@galkahana
Copy link

@fr0l hi, did you manage to solve this?

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

No branches or pull requests

2 participants