facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.37k forks source link

Removal of class method sharedClient in XCAXClient_iOS class in Xcode 10.2 beta #1076

Open ElielCohen opened 5 years ago

ElielCohen commented 5 years ago

In Xcode 10.2 beta 1 and 2, Apple removed the class method + (id)sharedClient, causing WebDriverAgent to fail/crash.

The WDA does not crash per say, but it will not be able to perform any touch actions, and also will not be able to retrieve any information related to that class such as the list of active applications.

Here is the class_dump result for the previous Xcode (10.1) :

@interface XCAXClient_iOS : NSObject { id _applicationProcessTracker; id _remoteAXInterface; NSObject _queue; NSMutableDictionary _userTestingNotificationHandlers; NSMutableDictionary *_cachedAccessibilityLoadedValuesForPIDs; }

+ (id)sharedClient; @property(retain) NSMutableDictionary cachedAccessibilityLoadedValuesForPIDs; // @synthesize cachedAccessibilityLoadedValuesForPIDs=_cachedAccessibilityLoadedValuesForPIDs; @property(retain) NSMutableDictionary userTestingNotificationHandlers; // @synthesize userTestingNotificationHandlers=_userTestingNotificationHandlers; @property(retain) NSObject *queue; // @synthesize queue=_queue;

// Remaining properties @property(readonly, copy) NSString debugDescription; @property(readonly, copy) NSString description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass;

@end

And now for the new Xcode :

@interface XCAXClient_iOS : NSObject { id _applicationProcessTracker; id _remoteAccessibilityInterface; NSObject _queue; NSMutableDictionary _userTestingNotificationHandlers; NSMutableDictionary *_cachedAccessibilityLoadedValuesForPIDs; }

@property(retain) NSMutableDictionary cachedAccessibilityLoadedValuesForPIDs; // @synthesize cachedAccessibilityLoadedValuesForPIDs=_cachedAccessibilityLoadedValuesForPIDs; @property(retain) NSMutableDictionary userTestingNotificationHandlers; // @synthesize userTestingNotificationHandlers=_userTestingNotificationHandlers; @property(retain) NSObject *queue; // @synthesize queue=_queue; @property(readonly) id remoteAccessibilityInterface; // @synthesize remoteAccessibilityInterface=_remoteAccessibilityInterface; @property(readonly) id applicationProcessTracker; // @synthesize applicationProcessTracker=_applicationProcessTracker;

// Remaining properties @property(readonly, copy) NSString debugDescription; @property(readonly, copy) NSString description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass;

@end

mykola-mokhnach commented 5 years ago

Thanks for the report. WDA has been updated to support Xcode 10.2 SDK in Appium's WDA fork