flutter iOS Xcode打包并导出ipa文件安装包 1、 Xcode配置 1、 启动打包 1、 等待打包 1、 打包完成、准备导出ipa 1、 选择模式 1、 选择配置文件 1
flutter iOS Xcode打包并导出ipa文件安装包
1、 Xcode配置
1、 启动打包
1、 等待打包
1、 打包完成、准备导出ipa
1、 选择模式
1、 选择配置文件
1、 导出
1、 选择导出位置
1、 得到ipa
podfile文件如下
# Uncomment this line to define a global platfORM for your projectplatform :iOS, '12.0'use_frameworks!# CocoaPods analytics sends network stats synchronously affecting Flutter build latency.ENV['COCOAPODS_DISABLE_STATS'] = 'true'project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release,}def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"endrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)flutter_ios_podfile_setuptarget 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) pod 'DKPhotoGallery','0.0.17', :modular_headers => true pod 'SDWEBImage','5.17.0', :modular_headers => true pod 'FirebaseSessions','10.12.0', :modular_headers => true pod 'FirebaseCore','10.6.0', :modular_headers => true pod 'FirebaseCoreExtension','10.12.0', :modular_headers => true pod 'FirebaseInstallations','10.12.0', :modular_headers => true pod 'GoogleDataTransport','9.2.3', :modular_headers => true pod 'GoogleUtilities','7.11.4', :modular_headers => true pod 'nanopb','2.30909.0', :modular_headers => true use_frameworks!endpost_install do |installer|//会因为下面这块run不起来,但是product- arcHive打不了包# installer.generated_projects.each do |project|# project.targets.each do |target|# target.build_configurations.each do |config|# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'# end# end# end installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) # Start of the permission_handler configuration target.build_configurations.each do |config| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', 'PERMISSION_CAMERA=1', 'PERMISSION_MICROPHONE=1', ] end # End of the permission_handler configuration endend
原来是这样子的,删掉了一部分代码
post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) # Start of the permission_handler configuration target.build_configurations.each do |config| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', 'PERMISSION_CAMERA=1', 'PERMISSION_MICROPHONE=1', ] end # End of the permission_handler configuration endend
来源地址:https://blog.csdn.net/weixin_44911775/article/details/131976719
--结束END--
本文标题: flutter 打包iOS安装包
本文链接: https://www.lsjlt.com/news/392474.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0