Реакция встроенной сборки iOS не удалась из-за следующей ошибки: символы не найдены для архитектуры arm64 - PullRequest
0 голосов
/ 25 ноября 2018

Привет, я пытаюсь построить проект React Native на iOS, он имеет react-native-maps с ним.

Мой подфайл выглядит так

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'APP_NAME' do
    # Pods for APP_NAME
    rn_path = '../node_modules/react-native'
    rn_maps_path = '../node_modules/react-native-maps'

    # See http://facebook.github.io/react-native/docs/integration-with-existing-apps.html#configuring-cocoapods-dependencies
    pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"

    pod 'React', path: rn_path, subspecs: [
        'Core',
        'CxxBridge',
        'DevSupport',
        'RCTActionSheet',
        'RCTAnimation',
        'RCTGeolocation',
        'RCTImage',
        'RCTLinkingIOS',
        'RCTNetwork',
        'RCTSettings',
        'RCTText',
        'RCTVibration',
        'RCTWebSocket',
    ]

    # React Native third party dependencies podspecs
    pod 'DoubleConversion', :podspec => "#{rn_path}/third-party-podspecs/DoubleConversion.podspec"
    pod 'glog', :podspec => "#{rn_path}/third-party-podspecs/glog.podspec"
    # pod 'GLog', :podspec => "#{rn_path}/third-party-podspecs/GLog.podspec"
    pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"


    # react-native-maps dependencies
    pod 'react-native-maps', path: rn_maps_path
    pod 'react-native-google-maps', path: rn_maps_path  # Remove this line if you don't want to support GoogleMaps on iOS
    # pod 'GoogleMaps'  # Remove this line if you don't want to support GoogleMaps on iOS
    # pod 'Google-Maps-iOS-Utils' # Remove this line if you don't want to support GoogleMaps on iOS

    # Pods for APP_NAME
    pod 'Firebase/Core', '~> 5.11.0'
    pod 'Firebase/Firestore', '~> 5.11.0'
    pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
    pod 'RNBackgroundFetch', :path => '../node_modules/react-native-background-fetch'
    pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
    pod 'Interactable', :path => '../node_modules/react-native-interactable'

    target 'APP_NAME-tvOSTests' do
        inherit! :search_paths
        # Pods for testing
        pod 'RNBackgroundFetch', :path => '../node_modules/react-native-background-fetch'

    end

    target 'APP_NAMETests' do
        inherit! :search_paths
        # Pods for testing
    end

end


post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'react-native-google-maps'
            target.build_configurations.each do |config|
                config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
            end
        end
        if target.name == "React"
            target.remove_from_project
        end
    end
end


target 'APP_NAME-tvOS' do
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
    # use_frameworks!

    # Pods for APP_NAME-tvOS

    #target 'APP_NAME-tvOSTests' do
 #   inherit! :search_paths
        # Pods for testing
#  end

end

Я получаю следующую ошибку каждый развремя.

Я перепробовал все решения, перечисленные здесь Неопределенные символы для архитектуры arm64

Но ни один из них не работает для меня.

Undefined symbols for architecture arm64:
  "YGConfig::YGConfig(int (*)(YGConfig*, YGNode*, YGLogLevel, char const*, char*))", referenced from:
      _YGConfigNew in libyoga.a(Yoga.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 Ответ

0 голосов
/ 05 марта 2019

У меня были похожие ошибки при обновлении React Native до 0.58.6

Чтобы исправить все ошибки symbol not found, мне пришлось добавить / повторно добавить все библиотеки с проблемами в цели проекта Linked frameworks and libraries в xCode:

enter image description here

Я также заметил, что для RN 0,58 нет необходимости иметь какие-либо зависимости React или RN в файле pod.

Более подробную информацию о моем файле pod можно найти здесь:

https://stackoverflow.com/a/54999642/1979861

Также проверьте возможные проблемы со скриптом здесь:

https://stackoverflow.com/a/48953119/1979861

...