构建iOS应用程序main.m正常arm64 Objective-c com.apple.compilers.llvm.clang.1_0.compiler时出错(在项目“YourApp”的目标“YourApp”中)

问题描述 投票:0回答:1

我正在尝试通过 fastlane 构建我的 React Native iOS 应用程序,但我无法克服这个问题

CompileC /Users/du/Library/Developer/Xcode/DerivedData/YourApp-foebefkgvngyxaaoudhbitahrqts/ArchiveIntermediates/YourApp/IntermediateBuildFilesPath/YourApp.build/Release-iphoneos/YourApp.build/Objects-normal/arm64/main.o /Users/du/repos/safepush/ios/YourApp/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'YourApp' from project 'YourApp')

我在将react-native0.65.1升级到0.71.12后遇到了这个问题 我也在使用 Xcode 14

这是我的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, 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(["Debug", "StagingDebug", "StagingRelease", "Release"])

permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways/Permission-LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse/Permission-LocationWhenInUse.podspec"

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

use_frameworks! :linkage => :static

target 'YourApp' do
  config = use_native_modules!

  # 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 => true,
    # 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 'YourAppTests' 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 => true
    )
    # __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end
ios xcode react-native cocoapods fastlane
1个回答
0
投票

同样的问题,你找到解决办法了吗?

© www.soinside.com 2019 - 2024. All rights reserved.