crossplatformkorea / react-native-kakao-login

react-native native module for Kakao sign in.
MIT License
350 stars 133 forks source link

Undefined symbols for architecture x86_64: 문제 #33

Closed dotkebi closed 4 years ago

dotkebi commented 5 years ago
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_KOSession", referenced from:
      objc-class-ref in libRNKakaoLogins.a(RNKakaoLogins.o)
  "_OBJC_CLASS_$_KOSessionTask", referenced from:
      objc-class-ref in libRNKakaoLogins.a(RNKakaoLogins.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

해당 이슈가 발생합니다.

hyochan commented 5 years ago

얼핏 드는 생각이 expo를 쓰시고 계시진 않으신가요? Expokit 환경이시면 pod 환경이시기 때문에 아래 이슈에서처럼 수정을 해주셔야합니다. 여기를 참고해주세요.

dotkebi commented 5 years ago

@hyochan 안녕하세요. 프로젝트 생성단계에서는 expo를 이용했었지만 현재 detach 한 상태입니다. expokit은 사용하고 있지 않습니다.

hyochan commented 5 years ago

@dotkebi expodetach한 상태의 환경을 expokit 환경이라고 합니다만 이해가 되지 않는군요 ^^; 어떻게 프로젝트를 구성하셨는지 설명이 더 필요해보입니다.

dotkebi commented 5 years ago

@hyochan 혹시 expo 라이브러리를 쓰고 있지 않은데 expokit 환경이라고 봐야 하나요?

아래는 package.json 입니다. 기타 정보 필요한게 있을까요?


{
  "name": "myapp",
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "test": "node ./node_modules/jest/bin/jest.js --watchAll"
  },
  "jest": {
    "preset": "react-native"
  },
  "dependencies": {
    "apollo-boost": "^0.1.23",
    "apollo-cache-inmemory": "^1.3.12",
    "apollo-client": "^2.4.8",
    "apollo-link-http": "^1.5.9",
    "firebase": "^5.7.3",
    "graphql": "^14.0.2",
    "graphql-tag": "^2.10.0",
    "prop-types": "latest",
    "react": "16.6.3",
    "react-apollo": "^2.3.3",
    "react-native": "^0.57.8",
    "react-native-awesome-alerts": "^1.2.0",
    "react-native-default-preference": "^1.3.2",
    "react-native-fbsdk": "^0.8.0",
    "react-native-gesture-handler": "^1.0.12",
    "react-native-kakao-logins": "^1.3.0",
    "react-native-marquee": "^0.3.2",
    "react-native-naver-login": "^1.2.0",
    "react-native-swiper": "^1.5.14",
    "react-navigation": "^3.0.9",
    "react-navigation-redux-helpers": "^2.0.9",
    "react-redux": "^6.0.0",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "babel-preset-expo": "^5.0.0",
    "jest": "^23.6.0",
    "redux-devtools": "^3.5.0"
  },
  "private": true
}
hyochan commented 5 years ago

안녕하세요. 프로젝트 생성단계에서는 expo를 이용했었지만 현재 detach 한 상태입니다.

말씀을 위처럼 하셔서 대화에 혼돈이 있었습니다. pod 환경이신가요?

real0131 commented 5 years ago

안녕하세요 저도 비슷한 문제가 발생하여 이슈남깁니다.

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_KOSessionTask", referenced from:
      objc-class-ref in libRNKakaoLogins.a(RNKakaoLogins.o)
  "_OBJC_CLASS_$_KOSession", referenced from:
      objc-class-ref in AppDelegate.o
      objc-class-ref in libRNKakaoLogins.a(RNKakaoLogins.o)
ld: symbol(s) not found for architecture arm64

expo를 사용하다가 expokit으로 detach한 상태입니다. RNKakaoLogin build Setting의 Header Path 스크린샷 같이 첨부합니다.

2019-02-08 9 05 49
hyochan commented 5 years ago

여기를 참고해보시겠어요? 빌드세팅에 문제가 있는 것 같습니다.

dotkebi commented 5 years ago

@hyochan 이거 뭔가 빌드가 잘못된 상태가 아닌가 합니다.

target이 시뮬레이터면 x86_64 아키텍처가 없다고 나오고, 아이폰이면 arm64 아키텍처가 없다고 나오네요.

real0131 commented 5 years ago

일단 저는 Build Settings -> Linking -> Other Linker Flags에 -force_load $(SRCROOT)/KakaoOpenSDK.framework/KakaoOpenSDK 를 추가하니까 정상적으로 빌드가 되네요

여기한번 참고해보세요

dotkebi commented 5 years ago

어떻게 어떻게 재설치하고 해서 해결은 했습니다.

SeunghyunWoo99 commented 2 years ago

저도 비슷한 에러 발생했습니다. M1 환경이시면 podfile을 다음과 같이 바꿔보세요.

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
      end
    end
  end

변경 후 다음 커맨드 실행

pod deintegrate && pod setup && pod install