QuadFlask / react-native-naver-map

🗺️naver map for react-native
MIT License
163 stars 149 forks source link

arm64 (m1 mac) IOS Simulator build failed #132

Open qnrjs42 opened 2 years ago

qnrjs42 commented 2 years ago

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: "_OBJCCLASS$_FlipperKitNetworkPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_SKIOSNetworkAdapter", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_FlipperKitReactPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_SKDescriptorMapper", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_FlipperClient", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_FlipperKitLayoutPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_RCTBridge", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_RCTBundleURLProvider", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_RNSplashScreen", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_FKUserDefaultsPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_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

yunyeop commented 2 years ago

same issue. any solution?

solidchu commented 2 years ago

전 실제 기기에서도 빌드가 되지 않습니다. 실제 기기 : iPhone 13 Pro

yunyeop commented 2 years ago

전 실제 기기에서도 빌드가 되지 않습니다. 실제 기기 : iPhone 13 Pro

본문과 동일 에러 인가요? 실제 기기에서 삽질한 경험이 있어서 혹시 도움이 될까 해서요

solidchu commented 2 years ago

네 동일한 에러로 보입니다. 하기 에러 사항 입니다.

Undefined symbols for architecture arm64: "_OBJCCLASS$_NMFCameraPosition", referenced from: objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCMETACLASS$_NMFNaverMapView", referenced from: _OBJCMETACLASS$_RNNaverMapView in libreact-native-nmap.a(RNNaverMapView.o) "_OBJCCLASS$_NMFAlignType", referenced from: objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCCLASS$_NMFPolygonOverlay", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPolygonOverlay.o) "_OBJCCLASS$_NMFPolylineOverlay", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPolylineOverlay.o) "_OBJCCLASS$_NMGLatLng", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapCircleOverlay.o) objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCCLASS$_NMFCircleOverlay", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapCircleOverlay.o) "_OBJCCLASS$_NMFNaverMapView", referenced from: _OBJCCLASS$_RNNaverMapView in libreact-native-nmap.a(RNNaverMapView.o) "_OBJCCLASS$_NMGPolygon", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPolygonOverlay.o) "_OBJCCLASS$_NMGLatLngBounds", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapViewManager.o) objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_NMF_LAYER_GROUP_TRAFFIC", referenced from: _68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUPBICYCLE", referenced from: 68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUP_CADASTRAL", referenced from: _68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUPBUILDING", referenced from: 68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUP_MOUNTAIN", referenced from: _68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_OBJCCLASS$_NMFCameraUpdate", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapViewManager.o) objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCCLASS$_NMFOverlayImage", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapMarker.o) objc-class-ref in libreact-native-nmap.a(RNNaverMapPathOverlay.o) "_OBJCCLASS$_NMGLineString", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPathOverlay.o) objc-class-ref in libreact-native-nmap.a(RNNaverMapPolylineOverlay.o) objc-class-ref in libreact-native-nmap.a(RNNaverMapPolygonOverlayManager.o) "_OBJCCLASS$_NMFPath", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPathOverlay.o) "_NMF_LAYER_GROUPTRANSIT", referenced from: 68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_OBJCCLASS$_NMFMarker", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapMarker.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

note: Removed stale file '/Users/peter/Library/Developer/Xcode/DerivedData/nmaptest-ekoiwjlrjexjvaebhreyflvwqglc/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/YogaKit.build/Script-08E6F0E51C5D750A3C1E3566693E61EE.sh'

objc[47029]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f91d6b90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105a2c2c8). One of the two will be used. Which one is undefined. objc[47029]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f91d6be0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105a2c318). One of the two will be used. Which one is undefined. BUILD FAILED

yunyeop commented 2 years ago

네 동일한 에러로 보입니다. 하기 에러 사항 입니다.

Undefined symbols for architecture arm64: "_OBJCCLASS$_NMFCameraPosition", referenced from: objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCMETACLASS$_NMFNaverMapView", referenced from: _OBJCMETACLASS$_RNNaverMapView in libreact-native-nmap.a(RNNaverMapView.o) "_OBJCCLASS$_NMFAlignType", referenced from: objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCCLASS$_NMFPolygonOverlay", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPolygonOverlay.o) "_OBJCCLASS$_NMFPolylineOverlay", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPolylineOverlay.o) "_OBJCCLASS$_NMGLatLng", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapCircleOverlay.o) objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCCLASS$_NMFCircleOverlay", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapCircleOverlay.o) "_OBJCCLASS$_NMFNaverMapView", referenced from: _OBJCCLASS$_RNNaverMapView in libreact-native-nmap.a(RNNaverMapView.o) "_OBJCCLASS$_NMGPolygon", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPolygonOverlay.o) "_OBJCCLASS$_NMGLatLngBounds", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapViewManager.o) objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_NMF_LAYER_GROUP_TRAFFIC", referenced from: _68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUPBICYCLE", referenced from: 68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUP_CADASTRAL", referenced from: _68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUPBUILDING", referenced from: 68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_NMF_LAYER_GROUP_MOUNTAIN", referenced from: _68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_OBJCCLASS$_NMFCameraUpdate", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapViewManager.o) objc-class-ref in libreact-native-nmap.a(RCTConvert+NMFMapView.o) "_OBJCCLASS$_NMFOverlayImage", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapMarker.o) objc-class-ref in libreact-native-nmap.a(RNNaverMapPathOverlay.o) "_OBJCCLASS$_NMGLineString", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPathOverlay.o) objc-class-ref in libreact-native-nmap.a(RNNaverMapPolylineOverlay.o) objc-class-ref in libreact-native-nmap.a(RNNaverMapPolygonOverlayManager.o) "_OBJCCLASS$_NMFPath", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapPathOverlay.o) "_NMF_LAYER_GROUPTRANSIT", referenced from: 68-[RNNaverMapViewManager setLayerGroupEnabled:withGroup:withEnabled:]_block_invoke in libreact-native-nmap.a(RNNaverMapViewManager.o) "_OBJCCLASS$_NMFMarker", referenced from: objc-class-ref in libreact-native-nmap.a(RNNaverMapMarker.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

note: Removed stale file '/Users/peter/Library/Developer/Xcode/DerivedData/nmaptest-ekoiwjlrjexjvaebhreyflvwqglc/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/YogaKit.build/Script-08E6F0E51C5D750A3C1E3566693E61EE.sh'

objc[47029]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f91d6b90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105a2c2c8). One of the two will be used. Which one is undefined. objc[47029]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f91d6be0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105a2c318). One of the two will be used. Which one is undefined. BUILD FAILED

흠.. 제 경우랑은 좀 다르네요 저는 11 pro max 기종으로 테스트 했고 정상적으로 동작 했습니다 혹시 몰라서 아래 소스코드 첨부 드립니다 도움이 되었으면 좋겠네요 https://github.com/yunyeop/locaring/blob/feat/migration-naver-map/app/

solidchu commented 2 years ago

위의 예시로 보내 드린 파일 보니, Podfile에서 아래와 같이 버전을 명기 하여 주셔서 그대로 버전을 명기하여 Pod install 다시 하고 빌드하니, 잘 작동합니다.(아직 시뮬레이터는 동일한 에러 발생합니다.)

pod 'NMapsMap','3.10.1'

도움 주셔서 감사합니다.

yunyeop commented 2 years ago

저두 시뮬에선 에러 발생합니다 ㅠㅠ 도움이 되어서 다행이네요!

jhylmb commented 2 years ago

@solidchu @yunyeop 두 분처럼

pod 'NMapsMap','3.10.1'

을 명시하는 경우엔 m1에서 아이폰 기기(iphone X)로 빌드됩니다. (시뮬레이터에선 안 되고요 ㅠㅠ) 특히 버전을 3.10.1로 정확하게 명시한 경우만 됐습니다. NMapsMap 3.14.1이 최신 버전인 것 같은데 이 버전에선 안 되었습니다.

조만간 좋은 해결책이 나오길 ㅠㅠ

jhylmb commented 2 years ago

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


excluded1


excluded2


excluded3


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에서 빌드해도 잘 됩니다.


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

ghost commented 2 years ago

amd64 -> arm64??

jhylmb commented 2 years ago

amd64 -> arm64??

@JalibGit 네 오타입니다.

qnrjs42 commented 2 years ago

@solidchu @yunyeop 두 분처럼

pod 'NMapsMap','3.10.1'

을 명시하는 경우엔 m1에서 아이폰 기기(iphone X)로 빌드됩니다. (시뮬레이터에선 안 되고요 ㅠㅠ) 특히 버전을 3.10.1로 정확하게 명시한 경우만 됐습니다. NMapsMap 3.14.1이 최신 버전인 것 같은데 이 버전에선 안 되었습니다.

조만간 좋은 해결책이 나오길 ㅠㅠ

오잉 이상하네요 저는 굳이 명시 안 해줬습니다.

// ios/Podfile
platform :ios, '11.0'

target 'app' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  ...(생략)

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  pod 'NMapsMap'

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end
// ios/Podfile.lock
...
- NMapsMap (3.14.1)

- react-native-nmap (0.0.66):
    - NMapsMap
    - React
eugenejeonme commented 2 years ago

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

hasunpark commented 2 years ago

현재 3.15.0에서 apple silicon arch 지원 가능하게되었습니다

taekeunn commented 2 years ago

M1에서 3.15.0 빌드 성공하신분 계신가요? 저는 여전히 같은 에러 발생하면서 안됩니다

TaeKyeongKim commented 2 years ago

M1 에서 3.15.0 버전 시뮬레이터 arm64 지원 해주는거 확인했습니다~!

nunnu1028 commented 1 year ago

M1에서 3.15.0 버전으로 하고, @QuadFlask 님이 올려주신 대로 해보았으나, 시뮬레이터 빌드가 안됩니다. 이제 좀 개발해보려나 했는데 M1 에서는 빌드가 안되네요 ㅋㅋㅋㅠㅠ... 혹시 다른 버전으로 해야하나요?

hasunpark commented 1 year ago

@nunnu1028 Pods 폴더, podfile.lock, pod 캐시 삭제 이렇게 한번 모두 시도해보시겠어요?

nunnu1028 commented 1 year ago

@nunnu1028 Pods 폴더, podfile.lock, pod 캐시 삭제 이렇게 한번 모두 시도해보시겠어요?

3.14.1 버전으로 변경 후, 다시 따라하여 빌드에 성공했습니다. 감사합니다.