Add xcframework to ios out#22506
Conversation
gaaclarke
left a comment
There was a problem hiding this comment.
LGTM I just had a few python nits, also I'd just make sure that --help works correctly. It would be nice to have a very simple test for create_xcframework.py
| # Copyright 2013 The Flutter Authors. All rights reserved. | ||
| # Use of this source code is governed by a BSD-style license that can be | ||
| # found in the LICENSE file. | ||
|
|
There was a problem hiding this comment.
nit: google python style guide requires some future imports:
https://google.github.io/styleguide/pyguide.html#from-__future__-imports
There was a problem hiding this comment.
Not sure what the minimum python version we support (I have 2.7.16 on my machine), I ran it through futurize.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import errno
import os
import shutil
import subprocess
import sys
This matches the other places we use from __future__ import
https://github.com/flutter/engine/blob/8f060b99547944606c9f5a7b1f0daea13b94f86e/build/copy_info_plist.py#L16-L23
https://github.com/flutter/engine/blob/b7e5940e3b1859a3dcd9aac86d3ac11770de8aac/build/git_revision.py#L7-L15
| output_dir = os.path.abspath(args.location) | ||
| output_xcframework = os.path.join(output_dir, '%s.xcframework' % args.name) | ||
|
|
||
| try: |
There was a problem hiding this comment.
nit: if !os.path.exists(output_dir)
| '-quiet', | ||
| '-create-xcframework'] | ||
|
|
||
| [command.extend(['-framework', os.path.abspath(framework)]) for framework in args.frameworks] |
There was a problem hiding this comment.
nit: typically list comprehensions are used for constructing lists, here you are constructing a list but ignoring the result. A for loop would be idiomatic python here.
There was a problem hiding this comment.
Thanks for the idiomatic tips, my python-foo is zero.
@gaaclarke Can you point me to an existing example? The only one I see is |
|
I'm not sure there is an example for you. All tests are run through |
Created flutter/flutter#70654. |
Scenarios.app won't build if the Flutter.xcframework is missing. That's about the same coverage we had with any of the other framework build subscripts, like install_framework_headers.py. |
Description
Create Flutter.xcframework in the
out/ios_*directories. It only contains theFlutter.frameworkin the same out directory, and will allow us to start testing XCFrameworks in the tool with--local-engineflags.This doesn't publish
Flutter.xcframeworkas a downloadable engine artifact.Related Issues
Local engine support part of flutter/flutter#60109, which is a dependency to support macOS ARM simulators flutter/flutter#64502
Tests
Adopted the generated
Flutter.xcframeworkin the Scenario app to prove it's working.Checklist
Reviewer Checklist
Breaking Change
Did any tests fail when you ran them? Please read [handling breaking changes].