Skip to content

Move iOS package from framework to xcframework #8805

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

Merged
merged 11 commits into from
Aug 24, 2021

Conversation

guoyu-wang
Copy link
Contributor

@guoyu-wang guoyu-wang commented Aug 21, 2021

Description: Move iOS package from framework to xcframework

Motivation and Context

"OTHER_CPLUSPLUSFLAGS" => "-fvisibility=hidden -fvisibility-inlines-hidden",
}
spec.user_target_xcconfig = {
spec.xcconfig = {
Copy link
Contributor Author

@guoyu-wang guoyu-wang Aug 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to make this change, otherwise the pod lib lint will fail since we don't include arm64 ios-simulator yet, hopefully this can be removed after we enable the arm64 ios-simulator build #Resolved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there documentation for the xcconfig attribute? I didn't see it here https://guides.cocoapods.org/syntax/podspec.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this on stackoverflow, this is not in the official podspec syntax, we should be able to get rid of this soon

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed after the latest commits

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :)

snnn
snnn previously approved these changes Aug 21, 2021
{'sysroot': 'iphoneos', 'arch': 'arm64'},
{'sysroot': 'iphonesimulator', 'arch': 'x86_64'},
]
# We by default will build below 3 archs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3

nit: if we don't mention the number it won't need to be updated again. could make this change next time though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove in a later PR

@@ -50,6 +52,8 @@ def main():
# copy the necessary files to the staging directory
framework_dir = args.framework_dir.resolve()
shutil.copytree(framework_dir, staging_dir / framework_dir.name, dirs_exist_ok=True)
public_headers_dir = args.public_headers_dir.resolve()
shutil.copytree(public_headers_dir, staging_dir / public_headers_dir.name, dirs_exist_ok=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public_headers_dir

is public_headers_dir.name required to be "Headers" now? that seems to be the case from the template file

@@ -50,6 +52,8 @@ def main():
# copy the necessary files to the staging directory
framework_dir = args.framework_dir.resolve()
shutil.copytree(framework_dir, staging_dir / framework_dir.name, dirs_exist_ok=True)
public_headers_dir = args.public_headers_dir.resolve()
shutil.copytree(public_headers_dir, staging_dir / public_headers_dir.name, dirs_exist_ok=True)
copy_repo_relative_to_dir(["LICENSE"], staging_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LICENSE

do we need to copy the license file here if it's also copied to the xcframework in build_ios_framework.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we don't need to copy in multiple steps, we can copy everything from the framework_out directly, since it contains everything we need here,
Can change in a later PR

@guoyu-wang guoyu-wang merged commit 8992e31 into master Aug 24, 2021
@guoyu-wang guoyu-wang deleted the gwang-msft/xc_framework branch August 24, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants