You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
During "flutter build ipa" add validation to check if app is ready for release #97730
From that you can get the build settings from xcodeBuildResult.xcodeBuildExecution.buildSettings. IPHONEOS_DEPLOYMENT_TARGET will get you the minimum iOS version.
You can add property to BuildableIOSApp to the built appInfo.plist path, then parse the Info.plist to get the "name" CFBundleExecutable, the version CFBundleShortVersionString, and you could alternatively get MinimumOSVersion instead of from the build settings.
Similar to:
For the second approach(application_package.dart), I got the following error before hitting the breakpoint:
Encountered error while creating the IPA:
error: exportArchive: Failed to register bundle identifier
error: exportArchive: No profiles for 'io.flutter.examples.gallery' were found
Does this mean that I need to setup Apple dev account (register ID & download profile)?
Exactly, it means you don't have the right certs installed. For this bug you can ignore that, I think it makes sense to validate when the app archives successfully, even if it fails to create the IPA.
we may also want to validate the image size of app icons. Xcode gives warning about the wrong size, but developers may directly replace images without using Xcode (me, for example).
@jmagman another idea is to validate if splash screen (Default.png) is still using template file. Our template seems to be an empty image rather than Flutter icon, so it may be easier for devs to overlook.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
jmagman commentedon Oct 6, 2022
@hellohuanlin you can test

flutter_galleryAround here the
xcodeBuildResultproperty should be populated.flutter/packages/flutter_tools/lib/src/commands/build_ios.dart
Line 136 in e99fc8e
From that you can get the build settings from
xcodeBuildResult.xcodeBuildExecution.buildSettings.IPHONEOS_DEPLOYMENT_TARGETwill get you the minimum iOS version.You can add property to
BuildableIOSAppto the builtappInfo.plistpath, then parse the Info.plist to get the "name"CFBundleExecutable, the versionCFBundleShortVersionString, and you could alternatively getMinimumOSVersioninstead of from the build settings.Similar to:
flutter/packages/flutter_tools/lib/src/ios/application_package.dart
Lines 54 to 62 in dcde816
hellohuanlin commentedon Oct 10, 2022
The first approach (build_ios.dart) works.
For the second approach(application_package.dart), I got the following error before hitting the breakpoint:
Does this mean that I need to setup Apple dev account (register ID & download profile)?
jmagman commentedon Oct 11, 2022
Exactly, it means you don't have the right certs installed. For this bug you can ignore that, I think it makes sense to validate when the app archives successfully, even if it fails to create the IPA.
hellohuanlin commentedon Oct 17, 2022
In case we forgot: another idea is to check entitlements. This may require plugins to publish what permissions they need.
jmagman commentedon Oct 17, 2022
x-ref #39444
hellohuanlin commentedon Oct 27, 2022
Idea: check for
com.exampleplaceholder identifier, in case developers forget to updatehellohuanlin commentedon Nov 7, 2022
we may also want to validate the image size of app icons. Xcode gives warning about the wrong size, but developers may directly replace images without using Xcode (me, for example).
hellohuanlin commentedon Nov 18, 2022
@jmagman another idea is to validate if splash screen (Default.png) is still using template file. Our template seems to be an empty image rather than Flutter icon, so it may be easier for devs to overlook.
jmagman commentedon Dec 2, 2022
Thanks for all the work on these PRs, @hellohuanlin! I'm going to close this meta issue, we can open new individual issues as needed.
github-actions commentedon Mar 5, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.