美文网首页
2024-09-06 flutter+rn 多target 在i

2024-09-06 flutter+rn 多target 在i

作者: TsingQue | 来源:发表于2024-09-05 15:00 被阅读0次
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, '15.0'
prepare_react_native_project!
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

flutter_application_path = '../vr'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

config = use_native_modules!

def share_pods
  use_frameworks!
  
  pod 'Toast-Swift', '5.0.1'
  pod 'Alamofire','5.9.1'
  
end


target 'iOS' do
  share_pods
  
  use_react_native!(
    :path => config[:reactNativePath],
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
  install_all_flutter_pods(flutter_application_path)
end

target 'iOS_Beta' do
  share_pods
  
  use_react_native!(
    :path => config[:reactNativePath],
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
  install_all_flutter_pods(flutter_application_path)
end


target 'iOS_Dev' do
  share_pods
  
  use_react_native!(
    :path => config[:reactNativePath],
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
  install_all_flutter_pods(flutter_application_path)
end


pre_install do |installer|
     installer.pod_targets.each do |pod|
       if pod.name.eql?('RNReanimated')
         def pod.build_type
           Pod::BuildType.static_library
        end
    end
  end
end

post_install do |installer|
  # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
  flutter_post_install(installer) if defined?(flutter_post_install)
  react_native_post_install(
    installer,
    config[:reactNativePath],
    :mac_catalyst_enabled => false,
    # :ccache_enabled => true
  )
  installer.pods_project.targets.each do |target|
    ... # Here are some configurations automatically generated by flutter
    target.build_configurations.each do |config|
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',
         'PERMISSION_CAMERA=1',
         'PERMISSION_PHOTOS=1',
      ]
    end
  end
end

相关文章

  • 搜索插入位置

    for i in range(len(nums)): if target <= nums[i]: ...

  • 字符串KMP+子串的拼接

    KMP(str, target): 使用next数组(位置 i 前面有长度为next[i]的子串和target前面...

  • 多target

    那么为什么在XCode中使用多个target? 在XCode中使用多个target的最大优势在于,您可以使用此功能...

  • 多target

    1.复制 2.修改target名、info.plist名、修改schemes 4.修改podfile pod更新前...

  • 按既定顺序创建目标数组

    题目: 题目的理解: 创建一个target数组,然后将nums[i]的值插入到target的索引index[i]中...

  • iOS 多Target环境配置

    iOS 多Target环境配置iOS 多Target环境配置

  • iOS:多环境配置

    1.多target配置配合多Scheme 1.1.创建多个target 点击Duplicate,创建target,...

  • iOS多Target开发相似App

    iOS多Target开发相似App iOS多Target开发相似App

  • a small target

    I have a small target in 2018 ——learning to be a speaker....

  • Xcode工程配置

    多环境配置 多target,多Configuration target:一个project中可以创建多个targe...

网友评论

      本文标题:2024-09-06 flutter+rn 多target 在i

      本文链接:https://www.haomeiwen.com/subject/tozrljtx.html