Alamofire 프레임워크 에러

dyld[1457]: Library not loaded: @rpath/Alamofire.framework/Alamofire 에러발생

리액트 네이티브로 개발진행 중입니다.
‘npm install @react-native-seoul/kakao-login’ 명령어를 이용하여 설치 후 ‘pod install’ 명령어 실행 후 빌드 시 앱이 튕겨지는 에러가 발생합니다.

애플 개발자 계정또한 결제를 진행해 둔 상태입니다.

안녕하세요.

사용하시는 Alamofire 버전이 어떻게 되실까요?

현재 설치된 건 5.8.0버전입니다

해당 라이브러리로 RN 개발 시 정상 동작하는 것을 확인 하였습니다.
해당 커뮤니티에서 안내하는 예제와 Podfile 을 참고하시어 구성되어 있는지 확인 부탁드립니다.

또한, Pods 경로 삭제 및 다시 update 후, xcode clean build 부탁드립니다.

관련된 예제를 보지 못한 것 같습니다. 그것에 관련한 링크를 주실 수 있으실까요?

https://github.com/crossplatformkorea/react-native-kakao-login/tree/main/KakaoLoginExample

예제를 봐도 햇갈려 다시 질문 드립니다.

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'#min_ios_version_supported
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  #use_modular_headers! :linkage => linkage.to_sym
  use_frameworks! :linkage => linkage.to_sym
end

target 'theRoundPro' do
  config = use_native_modules!

  permissions_path='../node_modules/react-native-permissions/ios'

  pod 'Permission-PhotoLibrary',:path=>"#{permissions_path}/PhotoLibrary"
  pod 'Permission-Camera',:path=>"#{permissions_path}/Camera"
  pod 'Alamofire', '~> 5.5'
  pod 'KakaoSDK'

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'theRoundProTests' do
    inherit! :complete
    # Pods for testing
  end

#  post_install do |installer|
#    react_native_post_install(
#      installer,
#      # Set `mac_catalyst_enabled` to `true` in order to apply patches
#      # necessary for Mac Catalyst builds
#      :mac_catalyst_enabled => false
#    )
#    __apply_Xcode_12_5_M1_post_install_workaround(installer)
#  end
end

이게 현재 제 Podfile입니다만 어디를 어떻게 수정해야 할까요?

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'#min_ios_version_supported
prepare_react_native_project!

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'theRoundPro' do
  config = use_native_modules!

  permissions_path='../node_modules/react-native-permissions/ios'

  pod 'Permission-PhotoLibrary',:path=>"#{permissions_path}/PhotoLibrary"
  pod 'Permission-Camera',:path=>"#{permissions_path}/Camera"
  pod 'Alamofire', '~> 5.5'
  pod 'KakaoSDK'

  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    :flipper_configuration => flipper_config,
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'theRoundProTests' do
    inherit! :complete
    # Pods for testing
  end
end

주석 부분이 이상하게 나와 지우고 다시 올려봅니다…

해당 라이브러리에서 KakaoSDK 를 참조하고 있고, KakaoSDK는 Alamofire를 참조 합니다.
위 코드 제거 및 클린 빌드 후 테스트 부탁 드립니다.

알려주신대로 진행하여 봤으나, 같은 에러가 여전히 발생합니다. 혹시 Xcode에서 작업해 줘야할 게 있는 건가요? Info.plist와 Delegate파일은 카카오 가이드대로 수정해 놓은 상태입니다.

+혹시나 하여 여쭙습니다만 Alamofire만 지우면 되는건가요? 아니면 KakaoSDK까지 지워야 하는건가요?

둘 다 제거 부탁드립니다.
또한 ios 폴더의 Pods 폴더 제거후 다시 설치 부탁드립니다.

그리고 @react-native-seoul/kakao-login는 카카오에서 제공하는 라이브러리가 아니기에
해당 라이브러리에서 모듈 참조 문제는 해당 커뮤니티에 문의 부탁드립니다.

제일 처음에 적었던 ‘npm install @react-native-seoul/kakao-login’자체가 잘못되었다고 말씀하시는 것일까요??
그러면 카카오 로그인을 사용하기 위해서는 어떤 라이브러리를 사용해야하나요?

아닙니다.
문의하신 분께서는 React Native 프로젝트를 개발하고 계시고, 여기에 카카오 로그인을 사용하기 위해 @react-native-seoul/kakao-login 모듈을 사용하고 있습니다.

해당 모듈의 podspec 파일에서 카카오 로그인에 필요한 KakaoSDK 를 참조 하고 있으니 문의하신 분의 PodFile에는 추가하지 말라는 이야기였습니다.

아쉽지만, React Native용 카카오 공식 라이브러리는 제공하고 있지 않습니다.
@react-native-seoul/kakao-login 와 같은 오픈 소스 모듈을 사용 부탁드립니다.

참고로 해당 모듈은 내부에서 iOS/Android용 Kakao SDK를 사용하고 있기에 기능상 차이점이 없습니다.