flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.67k stars 27.35k forks source link

[flutter_tools] Consider build configuration dependent .plist files in migrations #107575

Open KammererTob opened 2 years ago

KammererTob commented 2 years ago

Use case

While upgrading to Flutter 3.0 i noticed that CADisableMinimumFrameDurationOnPhone was automatically added to my Info.plist (as per https://github.com/flutter/flutter/issues/99880 this was automatically migrated). Since i needed to be able to test locally i need to have different .plist files depending on the build configuration (as described here: https://docs.flutter.dev/development/add-to-app/ios/project-setup#local-network-privacy-permissions). It would be really nice if the migrations would also consider other .plist files than the default Info.plist.

Proposal

I am not sure how doable/feasible this is, but it probably needs to be added/changed in https://github.com/flutter/flutter/blob/3f1f0a81704f30246f56710d79f4cb2470da13ec/packages/flutter_tools/lib/src/xcode_project.dart and then used inside the migrations.

jmagman commented 2 years ago

Ah thought we had already done this. defaultHostInfoPlist logic https://github.com/flutter/flutter/blob/abe35c54e5367e3e81b9e172c0899e7b62110e57/packages/flutter_tools/lib/src/xcode_project.dart#L32 will need similar logic to the bundle identifier where the path is parsed from buildSettingsForBuildInfo INFOPLIST_FILE as done in #47993. Previously the Info.plist was only used to cheaply guess the bundle identifier, but now the path is checked to be used in migrations.

jmagman commented 2 years ago

Related to https://github.com/flutter/flutter/pull/106889

flutter-triage-bot[bot] commented 1 year ago

This issue is missing a priority label. Please set a priority label when adding the triaged-ios label.