Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
452 views
in Technique[技术] by (71.8m points)

xcode - Minimum iOS deployment version of flutter package

I have written a flutter package for local use and I am trying to get the minimum deployment version working so that no devices < 11.0 can use it.

I have set the following in the library using xcode (never sure whether to use xCode or edit the files manually)

enter image description here

And also have edited the libraries ios/<LIBRARY_NAME>.podspec file manually to have the following

  s.dependency 'Flutter'
  s.platform = :ios, '11.0'
  s.ios.deployment_target = '11.0'

When i ran pod install (also tried pub get) in the IOS directory of an app using the library it prints the following

[!] The platform of the target `Runner` (iOS 9.0) may not be compatible with `<LIBRARY_NAME> (x.x.x)` which has a minimum requirement of iOS 11.0.

And I have also set the app to have ios 9.0 (which should error) in the ios/Podfile

e.g.

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'

When I run the app builds, installs and runs fine. I have also tried cleaning the pod cache in between pod installs.

Can somebody explain what I have done wrong or am missing, trial and error isn't really working when the builds are like 5-10 minutes :(

Also I don't really understand what s.platform = :ios, '11.0' is setting in the iOS podspec when there is also deployment_target?

Thanks

question from:https://stackoverflow.com/questions/65876258/minimum-ios-deployment-version-of-flutter-package

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...