A new Flutter project.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
- ios 目录下运行
pod install
[!] Automatically assigning platformiOS
with version12.0
on targetRunner
because no platform was specified. Please specify a platform for this target in your Podfile. Seehttps://guides.cocoapods.org/syntax/podfile.html#platform
.
解决方案: 需要将ios/Podfile
文件中的platform :ios, '12.0'
注释去掉。
- [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target
Runner
toTarget Support Files/Pods-Runner/Pods-Runner.profile.xcconfig
or include theTarget Support Files/Pods-Runner/Pods-Runner.profile.xcconfig
in your build configuration (Flutter/Release.xcconfig
).
解决方案:使用xcode 打开ios目录,修改runner - Configuration - Debug|Relase|Profile - 第二行的Runner 改为None
-
ios Podfile文件添加代码 post_install do |installer| installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' end end
target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' end
end end
- 根目录下 flutter pub get
- ios pod install