Commit 7bd593e0 by Administrator

配置文件变更

1 parent 6b2a3eb2
...@@ -12,6 +12,11 @@ flutter run -d 00008030-001C75810E42402E --release ...@@ -12,6 +12,11 @@ flutter run -d 00008030-001C75810E42402E --release
flutter run -d 00008140-001068C93AB8801C --release flutter run -d 00008140-001068C93AB8801C --release
### 未曾测试
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
修改 Flutter 工程的 ios/Podfile 文件,显式声明更高版本的 iOS 平台。 修改 Flutter 工程的 ios/Podfile 文件,显式声明更高版本的 iOS 平台。
...@@ -27,3 +32,36 @@ cd .. ...@@ -27,3 +32,36 @@ cd ..
flutter build ios --build-number=2511061 flutter build ios --build-number=2511061
#### test
cd ios
rm -rf Pods Podfile.lock
pod deintegrate
pod install
# 1. 回到项目根目录
flutter clean
# 2. 进入 ios 目录
cd ios
# 3. 删除构建残留和 Pod 锁文件 (必须删 Lock 文件)
rm -rf Pods
rm -rf Podfile.lock
rm -rf .symlinks
rm -rf Flutter/Flutter.framework
rm -rf Flutter/App.framework
# 4. 清理 CocoaPods 本地缓存 (这一步很重要,ffmpeg 包很大,容易缓存损坏)
pod cache clean --all
# 5. 重新安装 Pods 并更新仓库索引
# 注意:这一步可能比较慢,因为 ffmpeg 库非常大(几百MB),请保持网络通畅
pod install --repo-update
# 6. 回到根目录
cd ..
cd /Users/ethanlam/works/gitlab/flutter_pros/appframe.git
# 1. 回到项目根目录
flutter clean
# 2. 进入 ios 目录
cd ios
# 3. 删除构建残留和 Pod 锁文件 (必须删 Lock 文件)
rm -rf Pods
rm -rf Podfile.lock
rm -rf .symlinks
rm -rf Flutter/Flutter.framework
rm -rf Flutter/App.framework
flutter pub get
#pod deintegrate
# 4. 清理 CocoaPods 本地缓存 (这一步很重要,ffmpeg 包很大,容易缓存损坏)
pod cache clean --all
# 5. 重新安装 Pods 并更新仓库索引
# 注意:这一步可能比较慢,因为 ffmpeg 库非常大(几百MB),请保持网络通畅
pod install --repo-update
# 6. 回到根目录
cd ..
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig" #include "Generated.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
#include "Generated.xcconfig" #include "Generated.xcconfig"
...@@ -30,6 +30,8 @@ pod 'SDWebImage', :git => 'https://gitee.com/mirrors/SDWebImage.git', :branch => ...@@ -30,6 +30,8 @@ pod 'SDWebImage', :git => 'https://gitee.com/mirrors/SDWebImage.git', :branch =>
pod 'SDWebImageWebPCoder', :git => 'https://gitee.com/mirrors_SDWebImage/SDWebImageWebPCoder.git', :branch => '0.13.0', :modular_headers => true pod 'SDWebImageWebPCoder', :git => 'https://gitee.com/mirrors_SDWebImage/SDWebImageWebPCoder.git', :branch => '0.13.0', :modular_headers => true
# pod 'Mantle', :git => 'https://gitee.com/mirrors/Mantle.git' , :tag => '2.0.2'
flutter_ios_podfile_setup flutter_ios_podfile_setup
target 'Runner' do target 'Runner' do
...@@ -39,6 +41,13 @@ target 'Runner' do ...@@ -39,6 +41,13 @@ target 'Runner' do
# pod 'SDWebImage', :modular_headers => true # pod 'SDWebImage', :modular_headers => true
# pod 'SDWebImageWebPCoder', :modular_headers => true # pod 'SDWebImageWebPCoder', :modular_headers => true
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
# ================= 添加下面这一行 =================
# 强制引入 FFmpeg 原生库 (版本 6.0 对应 ffmpeg_kit_flutter_new 3.2.0)
# 这会自动下载包含 FFmpegKitConfig.h 的 Framework
# pod 'ffmpeg-kit-ios-min-gpl', '~> 6.0'
# =================================================
target 'RunnerTests' do target 'RunnerTests' do
inherit! :search_paths inherit! :search_paths
end end
...@@ -47,5 +56,17 @@ end ...@@ -47,5 +56,17 @@ end
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) flutter_additional_ios_build_settings(target)
# 解决有些库构建版本不一致的问题
target.build_configurations.each do |config|
# 强制统一所有第三方库的 iOS 版本为 13.0,防止某些库仍然用旧版本编译导致头文件路径错误
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
# 解决 "signing for xxx requires a development team" 的报错
# 解决 M系列芯片(M4 Pro)可能的签名问题
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end end
end end
...@@ -7,7 +7,8 @@ import Foundation ...@@ -7,7 +7,8 @@ import Foundation
import connectivity_plus import connectivity_plus
import device_info_plus import device_info_plus
import ffmpeg_kit_flutter_new import ffmpeg_kit_flutter_new_audio
import ffmpeg_kit_flutter_new_video
import file_picker import file_picker
import flutter_image_compress_macos import flutter_image_compress_macos
import flutter_localization import flutter_localization
...@@ -29,6 +30,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ...@@ -29,6 +30,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FFmpegKitFlutterPlugin.register(with: registry.registrar(forPlugin: "FFmpegKitFlutterPlugin")) FFmpegKitFlutterPlugin.register(with: registry.registrar(forPlugin: "FFmpegKitFlutterPlugin"))
FFmpegKitFlutterPlugin.register(with: registry.registrar(forPlugin: "FFmpegKitFlutterPlugin"))
FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin")) FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin"))
FlutterLocalizationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalizationPlugin")) FlutterLocalizationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalizationPlugin"))
......
name: appframe name: appframe
description: "app frame project." description: "app frame project."
# The following line prevents the package from being accidentally published to publish_to: 'none'
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ">=3.5.0 <4.0.0" sdk: ">=3.5.0 <4.0.0"
# 1. 移除无效的 fluwx 配置块,改用原生配置
fluwx:
app_id: wx8c32ea248f0c7765
debug_logging: true # Logging in debug mode.
ios:
universal_link: https://dev.banxiaoer.net/path/to/wechat/
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
flutter_localizations: # 确保存在这一行 flutter_localizations:
sdk: flutter sdk: flutter
# --- 核心工具类 ---
archive: ^4.0.7 archive: ^4.0.7
connectivity_plus: ^7.0.0 connectivity_plus: ^7.0.0
device_info_plus: ^11.5.0 device_info_plus: ^11.5.0
dio: ^5.9.0 dio: ^5.9.0
# dio_http2_adapter: ^2.6.0
equatable: ^2.0.7 equatable: ^2.0.7
exif: ^3.3.0 get_it: ^8.2.0
# ffmpeg_kit_flutter_new_audio: ^1.1.0 logger: ^2.6.2
# ffmpeg_kit_flutter_new_video: ^1.1.0 path: ^1.9.1
ffmpeg_kit_flutter_new: ^3.2.0 path_provider: ^2.1.5
shared_preferences: ^2.5.3
uuid: ^4.5.1
# --- 路由与权限 ---
go_router: ^16.2.1
permission_handler: ^12.0.1
url_launcher: ^6.3.2
# --- UI 与 媒体 ---
file_picker: ^10.3.2 file_picker: ^10.3.2
flutter_bloc: ^9.1.1 flutter_bloc: ^9.1.1
flutter_localization: ^0.3.3 flutter_localization: ^0.3.3
flutter_image_compress: ^2.4.0 flutter_image_compress: ^2.4.0
flutter_sound: ^9.28.0 ffmpeg_kit_flutter_new_audio: ^1.1.0
fluwx: ^5.7.2 ffmpeg_kit_flutter_new_video: ^1.1.0
gallery_saver_plus: ^3.2.9
get_it: ^8.2.0 # 建议:如果项目中不需要 image_picker(被 wechat_assets_picker 替代),则保持注释或删除
geolocator: ^14.0.2
go_router: ^16.2.1
# image_picker: ^1.2.0 # image_picker: ^1.2.0
image: ^4.5.4 image: ^4.5.4
image_size_getter: ^2.4.1 image_size_getter: ^2.4.1
json_annotation: ^4.9.0
logger: ^2.6.2
mime: ^2.0.0 mime: ^2.0.0
mobile_scanner: ^7.0.1
# mqtt_client: ^10.11.1 # --- 微信生态 ---
network_info_plus: ^7.0.0 fluwx: ^5.7.2
open_file: ^3.5.10 # 这里的 Asset picker 和 Camera picker 需要在 Info.plist 配置相册/相机权限描述
path: ^1.9.1
path_provider: ^2.1.5
permission_handler: ^12.0.1
shared_preferences: ^2.5.3
# sqflite: ^2.4.2
# video_thumbnail: ^0.5.6
url_launcher: ^6.3.2
uuid: ^4.5.1
vibration: ^3.1.3
video_compress: ^3.1.4
video_player: ^2.10.0
webview_flutter: ^4.13.0
wechat_assets_picker: ^9.8.0 wechat_assets_picker: ^9.8.0
wechat_camera_picker: ^4.4.0 wechat_camera_picker: ^4.4.0
# squadron: ^7.2.0
# --- 音视频与直播 (重灾区) ---
# 确保 ffmpeg_kit 版本与你的架构兼容。
# 如果只是为了压缩视频,建议评估是否移除 video_compress,直接用 ffmpeg
#ffmpeg_kit_flutter_new: ^3.2.0
video_compress: ^3.1.4
video_player: ^2.10.0
# video_thumbnail 已被注释,确认是否需要生成缩略图,如果需要,ffmpeg_kit 也能做
flutter_sound: ^9.28.0
# --- 腾讯云服务 ---
tencent_cloud_chat_sdk: ^8.7.7201+2 tencent_cloud_chat_sdk: ^8.7.7201+2
tencent_cloud_chat_push: ^8.7.7201 tencent_cloud_chat_push: ^8.7.7201
# sig test
# crypto: ^3.0.7
# The following adds the Cupertino Icons font to your application. # --- 其他硬件功能 ---
# Use with the CupertinoIcons class for iOS style icons. geolocator: ^14.0.2
mobile_scanner: ^7.0.1
vibration: ^3.1.3
webview_flutter: ^4.13.0
# --- 杂项 ---
exif: ^3.3.0
gallery_saver_plus: ^3.2.9
json_annotation: ^4.9.0
network_info_plus: ^7.0.0
open_file: ^3.5.10
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.8
dev_dependencies: dev_dependencies:
...@@ -99,57 +87,13 @@ dev_dependencies: ...@@ -99,57 +87,13 @@ dev_dependencies:
build_runner: ^2.7.0 build_runner: ^2.7.0
json_serializable: ^6.11.0 json_serializable: ^6.11.0
flutter_launcher_icons: ^0.14.4 flutter_launcher_icons: ^0.14.4
# squadron_builder: ^8.0.0+1
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^6.0.0 flutter_lints: ^6.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter: flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets: assets:
- assets/ - assets/
- assets/dist.zip # 建议:不要直接引用 assets/ 根目录,这可能会导致打包进不必要的文件
# 最好精确到子文件夹
# - assets/dist.zip <-- 确认 zip 文件是否必须在运行时解压,这会增加包体积
- assets/images/login/ - assets/images/login/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!