flutter run error:resource fork,

2019-05-15  本文已影响0人  微冷l

项目背景:原生为主工程+flutter模块
集成:按照flutter官方文档进行操作【传送】
以下内容为开发中问题记录

如题问题

xattr -rc .

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

run在真机

需要注意.ios/runing 项目的账户-证书-描述文件

flutter项目遇到构建失败

若xcode10.0+ 试试file -> workspace settings -> build system
设置为Legacy build system

flutter导航栏的问题

MaterialApp作为根nav导航,之后的页面都是Scaffold级

flutter IDE 里中断packages get,再次运行该命令提示 Waiting for another flutter command to release the startup lock...

找到flutter安装文件目录 flutter/bin/cache/lockfile 删掉

遇到软件已经损坏

sudo spctl --master-disable //关闭
sudo spctl --master-enable //打开

iOS原生内创建了环境变量mode,对应要在build setting中配置flutter对应的mode

Targets -> buildSettings -> user-Defined 添加一个FLUTTER_BUILD_MODE,之后把原生中的每一个mode对应Flutter的模式,Flutter模式有四种:debug、release、profile、test。
一般对应debug和release

flutter推荐使用stable稳定版本

flutter channel //查看当前版本
flutter channel master/stabel //切换环境
flutter version v1.7.8+hotfix.4 //stable下切换版本
每次切换环境后需要更新 flutter tool 和 ide tool
flutter build ios(flutter项目下) / flutter doctor -v / flutter channel / flutter packages get

flutter升级到1.9.1 hotfix4 需要注意

原生代码中channel注册方式更改
pod中所有的target bitcode NO

#podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

Permission denied

1570600215413.jpg

删掉 flutter/bin/cache/artifacts/engine/ios/Flutter.framework/_CodeSignature 文件夹

pod install时flutter内部插件安装失败

需flutter build iOS 安装ide tools

iOS13 dark模式对flutter影响

Xcode11中配置白名单字段 View controller-based status bar appearance
FlutterViewController 重写 preferredStatusBarStyle
此时flutter中全局配置有效

查看命令行的环境变量

printenv

上一篇下一篇

猜你喜欢

热点阅读