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

Xcode 12.5 support #488

Closed
chenxiao0228 opened this issue May 5, 2021 · 1 comment · Fixed by #497
Closed

Xcode 12.5 support #488

chenxiao0228 opened this issue May 5, 2021 · 1 comment · Fixed by #497

Comments

@chenxiao0228
Copy link
Collaborator

chenxiao0228 commented May 5, 2021

Bluepill crashes on Xcode 12.5 either with

'NSInvalidArgumentException', reason: '-[__NSCFString identifierString]: unrecognized selector sent to instance 0x7fdb5d606b30'

or with

error: -[BluepillTests testRunUITest] : Selector _IDE_initiateControlSessionForTestProcessID:protocolVersion: is not part of the remote interface "XCTestManager_DaemonConnectionInterface" (NSGenericException)
@YangSun33
Copy link
Contributor

YangSun33 commented May 11, 2021

After some investigation, here are some issues I found caused by the changes in 12.5 SDK:

  1. In XCTestConfiguration, testsToRun & testsToSkip change from NSSet to XCTTestIdentifierSet, and the elements inside change from NSString to XCTTestIdentifier.
    Issue:
    The test app will crash as it tries to access [element identifierString], which is available for XCTTestIdentifier but not for NSString.
    Solution:
    a) Change from the infra level for BPConfiguration: make testCasesToSkip, testCasesToRun & allTestCases to be arrays of XCTTestIdentifier rather than NSString.
    b) Workaround by adding a category for NSString, returning self for selector 'identifierString'.

  2. The functions in protocol XCTestManager_DaemonConnectionInterface have been deprecated.
    Issue:
    The test app could be launched but no tests would be run due to connection failed.
    Facts:
    We call function _IDE_initiateControlSessionForTestProcessID:protocolVersion: in [BPTestDaemonConnection connect], and it has been refactored into protocol XCTMessagingRole_ControlSessionInitiation.
    We call function _IDE_initiateSessionWithIdentifier:forClient:atPath:protocolVersion: in [BPTestBundleConnection connect], and it has been refactored into protocol XCTMessagingRole_RunnerSessionInitiation.
    We need to change the logics in BPTestDaemonConnection & BPTestBundleConnection to get the correct object in DTXConnection so that the functions can be called.
    Solution:
    For now, I'm not sure what to do for this issue.

@ob ob pinned this issue May 11, 2021
@ob ob changed the title Add Xcode 12.5 support Xcode 12.5 support May 11, 2021
@ravimandala ravimandala unpinned this issue Jun 30, 2021
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

Successfully merging a pull request may close this issue.

2 participants