You are here
Home > Technology > react-native > class AMSupportURLConnectionDelegate is implemented in both.. ERROR

class AMSupportURLConnectionDelegate is implemented in both.. ERROR

If you are trying to run an application on an M1 chip Mac, you may come across the following error. You may also come across it while porting your app onto a different machine.

objc[10684]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x2179a78b0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10608c2c8). One of the two will be used. Which one is undefined.

objc[10684]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x2179a7900) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10608c318). One of the two will be used. Which one is undefined.

Solution

You don’t need to explicitly exclude arm64 architecture in the ios project or make changes to the Post_Install script. Just do one thing and it will take care of the rest:

1. Replace 5.0 to 5.2 in the following block of your main ios project.pbxproj file.

LIBRARY_SEARCH_PATHS = (
                     "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
                     "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.2/$(PLATFORM_NAME)\"",
                     "\"$(inherited)\"",
                 );

2. cd ios && pod install
It essentially makes the following changes besides updating cocoa pods version and checksum in podfile:

run npx react-native run-ios and it should work now.

5 1 vote
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Top
0
Would love your thoughts, please comment.x
()
x