Skip to content

build ios --config-only doesn't handle arm64 workaround logic #141716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stuartmorgan-g opened this issue Jan 17, 2024 · 2 comments
Open

build ios --config-only doesn't handle arm64 workaround logic #141716

stuartmorgan-g opened this issue Jan 17, 2024 · 2 comments
Labels
P2 Important issues not at the top of the work list platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team

Comments

@stuartmorgan-g
Copy link
Contributor

(This is extremely niche so we may never fix it, but filing in case it comes up again.)

STR:

  1. Check out flutter/packages at [google_maps_flutter] Restore the arm64 workaround packages#5915, or whatever hash that lands as.
  2. cd into packages/google_maps_flutter/google_maps_flutter_ios/examples/ios12
  3. git clean -xfd .
  4. flutter build ios --debug --no-codesign --config-only
  5. Attempt to build for a simulator from the Xcode UI

The build fails at this point. If you look at Generated.xcconfig it will show EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386

Then do:
6. flutter build ios --debug --no-codesign

Now Generated.xcconfig correctly shows arm64 as an excluded architecture, and builds from the Xcode UI will work.

Expected behavior here is that --config-only is enough to successfully build from Xcode, with a correct Generated.xccofig.

@stuartmorgan-g stuartmorgan-g added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. team-ios Owned by iOS platform team labels Jan 17, 2024
@jmagman
Copy link
Member

jmagman commented Jan 17, 2024

updateGeneratedXcodeProperties is running before pod install.

await updateGeneratedXcodeProperties(
project: project,
targetOverride: targetOverride,
buildInfo: buildInfo,
);
await processPodsIfNeeded(project.ios, getIosBuildDirectory(), buildInfo.mode);

However the generated EXCLUDED_ARCHS logic relies on pod install having been run and generating the Pods.xcodeproj
final Directory podXcodeProject = hostAppRoot
.childDirectory('Pods')
.childDirectory('Pods.xcodeproj');
if (!podXcodeProject.existsSync()) {
// No plugins.
return true;
}

(so how does this work without --config-only)

@hellohuanlin hellohuanlin added P2 Important issues not at the top of the work list triaged-ios Triaged by iOS platform team labels Jan 22, 2024
@jmagman
Copy link
Member

jmagman commented Feb 8, 2024

@gaaclarke also reported this #143133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team
Projects
None yet
Development

No branches or pull requests

3 participants