question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

arm64 (m1 mac) IOS Simulator build failed

See original GitHub issue

Version of react-native-naver-map libraries

0.0.66

Version of react-native

0.66.4

Platforms you faced the error (IOS or Android or both?)

IOS

Expected behavior

IOS 시뮬레이터 빌드 성공이 되어야 합니다.

Actual behavior

`Undefined symbols for architecture x86_64: “OBJC_CLASS$_FlipperKitNetworkPlugin”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_SKIOSNetworkAdapter”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_FlipperKitReactPlugin”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_SKDescriptorMapper”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_FlipperClient”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_FlipperKitLayoutPlugin”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_RCTBridge”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_RCTBundleURLProvider”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_RNSplashScreen”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_FKUserDefaultsPlugin”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_RCTRootView”, referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

objc[7989]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f5adf7f0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1111b42c8). One of the two will be used. Which one is undefined. objc[7989]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f5adf840) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1111b4318). One of the two will be used. Which one is undefined. ** BUILD FAILED **

The following build commands failed: Ld /Users/{user_name}/Library/Developer/Xcode/DerivedData/app-axzhzchqkfykidbfhqumdsnwaosn/Build/Products/Debug-iphonesimulator/app.app/app normal (in target ‘app’ from project ‘app’) (1 failure)`

Tested environment (Emulator? Real Device?)

IOS 시뮬레이터 iPhone 13 IOS 15.0

Screen Shot

X


IOS 시뮬레이터에서 동작하지 않지만 실제기기에서는 잘 동작합니다.

실제기기: iPhone Xs IOS 15.2.1

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:19

github_iconTop GitHub Comments

7reactions
jhylmbcommented, Mar 17, 2022

m1 맥에서 시뮬레이터, 아이폰 빌드 방법입니다.


excluded1

  • xcode에서 YourProjectName 선택 → Build Settings 탭 선택→ 좌측 컬럼 PROJECT 선택 -> All, Combined 선택 → Excluded Architectures 하위의 Any iOS Simulator SDKarm64 입력

excluded2

  • xcode에서 YourProjectName 선택 → Build Settings 탭 선택→ 좌측 컬럼 TARGETS 선택 -> All, Combined 선택 → Excluded Architectures 하위의 Any iOS Simulator SDKarm64 입력

excluded3

  • xcode에서 Pods 프로젝트 선택 → Build Settings 탭 선택→ 좌측 컬럼 PROJECT 선택 -> All, Combined 선택 → Excluded Architectures 하위의 Any iOS Simulator SDKarm64 입력

podfile

pod 'NMapsMap','3.10.1' # 버전 3.10.1 명시

이제 기존 pods 폴더 및 lock 파일을 삭제하고 새로 인스톨하면 시뮬레이터, 아이폰에서 빌드됩니다.

$ cd /your/project/root/path/ios

$ rm -rf Pods/
$ rm Podfile.lock

$ pod install --repo-update

$ cd /your/project/root/path

# build for simulator
$ yarn ios

# build for physical device using ios-deploy https://stackoverflow.com/a/41632929 
$ yarn ios --device="your-iPhone-name"

xcode에서 빌드해도 잘 됩니다.


테스트환경은 다음과 같습니다.

  • 맥북프로 m1
  • xcode Version 13.2.1 (13C100)
  • 시뮬레이터 Version 13.2.1 (13C100)
  • 아이폰X Version 15.1
2reactions
eugenejeonmecommented, Apr 4, 2022

22년 4월 4일 기준으로 3.14.2 버전은 위 오류와 동일하게 나와서 빌드 실패하구요. 3.14.1 버전은 빌드 가능가능했습니다.

  • 기록을 위해 남깁니다. -
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build to simulator on Apple Silicon
It only popped up when trying to build on my new M1 MacBook Air and Xcode 12. I've tried everything that's been reported...
Read more >
Xcode error 'building for iOS Simulator, but linking in dylib built ...
The first error that I encountered without making any changes (but moved from Intel Mac to M1 Mac) is like below. building for...
Read more >
Apple M1 – Xcode error when build in simulator - Narlei Moreira
If you have seen this error: “Building for iOS Simulator, but linking in dylib built for iOS, file for architecture arm64.
Read more >
Build failing m1 Mac - Using Swift
What was working for me (usually happened with builds for simulator on the M1) is to exclude this architecture, or set to use...
Read more >
On M1, Build iOS Simulator Test APP Got “…for architecture ...
iOS simulator test APP must be built in arm64 on M1 processor instance. And it would lead the build error. We can use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found