xcodebuild gives an error for multiple implementation of AMSupportURLConnectionDelegate and AMSupportURLSession : "Which one is undefined."
Asked Answered
M

2

8

When I want to run any xcodebuild action it gives me the following error while the Xcode ide is working fine on Apple M1.

> xcodebuild -version
objc[72320]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1dc35ab90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ca42c8). One of the two will be used. Which one is undefined.
objc[72320]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1dc35abe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ca4318). One of the two will be used. Which one is undefined.
Xcode 13.2.1
Build version 13C100

Both classes are implemented in /usr/lib/libauthinstall.dylib and also im another module, so I wanted check the /usr/lib/libauthinstall.dylib but it is not accessible

> open /usr/lib/libauthinstall.dylib
The file /usr/lib/libauthinstall.dylib does not exist.
Marcenemarcescent answered 19/1, 2022 at 6:36 Comment(2)
did you fix this problem? @Mesut GUNESHarbard
@Vensislav's solution works but it requires building itMarcenemarcescent
H
5

I had the same issue again on M1. It seems the xcodebuild executable is Intel based. The error does not show if the xcodebuild process is started from a terminal running under Rosetta.

My Xcode was installed from the App Store.

Managed to fix it for terminal without Rosetta by removing Xcode and installing the 13.3 Xcode beta from: https://download.developer.apple.com/Developer_Tools/Xcode_13.3_beta/Xcode_13.3_beta.xip

Now the xcodebuild executable is compiled for Apple silicon and the issue is gone.

Harrietteharrigan answered 29/1, 2022 at 16:58 Comment(0)
I
1

I resolved by adding arm64 to the excluded architectures.

Steps to resolve:

  1. Click your target
  2. Click Build Settings tab
  3. Make sure "all" tab is selected
  4. Expand debug / release / other stages under "Excluded Architectures"
  5. Add "arm64" next to "Any iOS Simulator SDK

Incidence answered 26/4, 2022 at 0:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.