Skip to content

[WIP] XCFramework support#2881

Closed
tmspzz wants to merge 41 commits intoCarthage:masterfrom
tmspzz:feature/xcframeworks-support
Closed

[WIP] XCFramework support#2881
tmspzz wants to merge 41 commits intoCarthage:masterfrom
tmspzz:feature/xcframeworks-support

Conversation

@tmspzz
Copy link
Copy Markdown
Member

@tmspzz tmspzz commented Sep 26, 2019

No description provided.

@tmspzz tmspzz force-pushed the feature/xcframeworks-support branch 2 times, most recently from 23d2be8 to 75590db Compare September 26, 2019 20:25
@tmspzz tmspzz force-pushed the feature/xcframeworks-support branch from 75590db to e4fe16d Compare September 26, 2019 20:27
@hlineholm
Copy link
Copy Markdown
Contributor

Will this be merged any time soon?

@tmspzz
Copy link
Copy Markdown
Member Author

tmspzz commented Nov 7, 2019

@ikesyo do you have any idea of what is going on here with the CI?

@ikesyo
Copy link
Copy Markdown
Member

ikesyo commented Nov 7, 2019

It's unfortunate that GitHub removed (without any prior notice) macOS 10.14 and Xcode 10.x from GitHub Actions' virtual environment: https://github.blog/changelog/2019-11-06-github-actions-macos-virtual-environment-updated-to-catalina.

We switched the CI environment from Travis to GitHub Actions in #2884. We need to restore .travis.yml for the time being.

See also actions/runner-images#78.

@jdhealy
Copy link
Copy Markdown
Member

jdhealy commented Nov 7, 2019

It’s unfortunate…

…oof 😖at the (without any prior notice) removal of macOS 10.14 and Xcode 10.x from GitHub Actions' virtual environment

@tmspzz tmspzz marked this pull request as ready for review October 7, 2020 22:28
@bukira
Copy link
Copy Markdown

bukira commented Oct 9, 2020

ive checked out this branch and built with make install but then

MB000200:CL-Frameworks crissmyers$ carthage build --create-xcframework combined --no-use-binaries
Please update to the latest Carthage version: 0.36.0. You currently are on 0.34.0
Unrecognized arguments: --create-xcframework

@tmspzz
Copy link
Copy Markdown
Member Author

tmspzz commented Oct 9, 2020

@bukira You're not using the carthage you just built. Probably you are using a version from brew. Run brew unlink carthage and make install again

@bukira
Copy link
Copy Markdown

bukira commented Oct 9, 2020 via email

@tmspzz
Copy link
Copy Markdown
Member Author

tmspzz commented Oct 9, 2020

I cant build normal frameworks

I'll check that. Strange.

I'll check code signature but off the top of my head that should be left to the consumer. That is the app that you are using the frameworks in.

@bukira
Copy link
Copy Markdown

bukira commented Oct 9, 2020 via email

@bukira
Copy link
Copy Markdown

bukira commented Oct 9, 2020 via email

@bukira
Copy link
Copy Markdown

bukira commented Oct 9, 2020 via email

@bukira
Copy link
Copy Markdown

bukira commented Oct 9, 2020 via email

@gjeck
Copy link
Copy Markdown

gjeck commented Oct 9, 2020

I'm also running into problems building normal frameworks as mentioned by @bukira. Output is like:

*** Skipped building Alamofire due to the error:
Dependency "Alamofire" has no shared framework schemes for any of the platforms: tvOS, watchOS, iOS

Should we not be trying this out on Xcode 12? Perhaps I should try this on 11.7?

@tmspzz tmspzz changed the base branch from feature/xcframeworks-support to master October 10, 2020 15:37
@bukira
Copy link
Copy Markdown

bukira commented Oct 10, 2020

I'm also running into problems building normal frameworks as mentioned by @bukira. Output is like:

*** Skipped building Alamofire due to the error:
Dependency "Alamofire" has no shared framework schemes for any of the platforms: tvOS, watchOS, iOS

Should we not be trying this out on Xcode 12? Perhaps I should try this on 11.7?

If you want to checksum an xcframework you need Xcode 12 compiler I believe

@tmspzz
Copy link
Copy Markdown
Member Author

tmspzz commented Oct 10, 2020

@gjeck @bukira it should be fixed. Please pull.

@gjeck
Copy link
Copy Markdown

gjeck commented Oct 10, 2020

@gjeck @bukira it should be fixed. Please pull.

Can build normal frameworks now! Thanks @tmspzz 😄

@chrisballinger chrisballinger mentioned this pull request Oct 10, 2020
5 tasks
@bcosescu
Copy link
Copy Markdown

@tmspzz Thanks for the hard work on getting this feature in Carthage. The scenario I've tried is an .xcframework attached to a Github release or served via an https server. Here is the output for the current Carthage release(0.36) and the version from your branch:

Official Carthage Release 0.36

  1. Binary https source:
*** Downloading binary-only framework My at "file:///Users/bogdan.cosescu/work/https_server/My.json"
*** Downloading My.framework binary at "1.1.1"
Invalid archive - Found multiple frameworks with the same unarchiving destination:
* 	file:///var/folders/7b/d_bvnq5s5c14xdjd09szkdjcxdn9gf/T/TemporaryItems/(A%20Document%20Being%20Saved%20By%20carthage%207)/carthage-archive.YsmATH/My.xcframework/ios-x86_64-simulator/My.framework/
	file:///var/folders/7b/d_bvnq5s5c14xdjd09szkdjcxdn9gf/T/TemporaryItems/(A%20Document%20Being%20Saved%20By%20carthage%207)/carthage-archive.YsmATH/My.xcframework/ios-arm64/My.framework/ 
		to:
	file:///Users/bogdan.cosescu/work/samples/TestCarthage/Carthage/Build/iOS/My.framework/
  1. Binary attached for Github Release:
*** Downloading MyRepo.framework binary at "Release1"
***  Skipped installing MyRepo.framework binary due to the error:
	"Invalid archive - Found multiple frameworks with the same unarchiving destination:
* 	file:///var/folders/7b/d_bvnq5s5c14xdjd09szkdjcxdn9gf/T/TemporaryItems/(A%20Document%20Being%20Saved%20By%20carthage%206)/carthage-archive.AEg7bC/My.xcframework/ios-x86_64-simulator/My.framework/
	file:///var/folders/7b/d_bvnq5s5c14xdjd09szkdjcxdn9gf/T/TemporaryItems/(A%20Document%20Being%20Saved%20By%20carthage%206)/carthage-archive.AEg7bC/My.xcframework/ios-arm64/My.framework/ 
		to:
	file:///Users/bogdan.cosescu/work/samples/TestCarthage/Carthage/Build/iOS/My.framework/"

    Falling back to building from the source
*** Skipped building MyRepo due to the error:
Dependency "MyRepo" has no shared framework schemes for any of the platforms: iOS

Carthage build from this branch:

  1. Binary https source:
*** Downloading binary-only framework My at "file:///Users/bogdan.cosescu/work/https_server/My.json"
*** Downloading My.framework binary at "1.1.1"
file:///Users/bogdan.cosescu/work/samples/TestCarthage/Carthage/Build/ios/My.xcframework/ is not a valid bundle. Binary is not Mach-O or filetype is not supported.
  1. Binary attached for Github Release:
*** Downloading MyRepo.framework binary at "Release1"
***  Skipped installing MyRepo.framework binary due to the error:
	"file:///Users/bogdan.cosescu/work/samples/TestCarthage/Carthage/Build/ios/My.xcframework/ is not a valid bundle. Binary is not Mach-O or filetype is not supported."

    Falling back to building from the source
*** Skipped building MyRepo due to the error:
Dependency "MyRepo" has no shared framework schemes for any of the platforms: iOS

Although failing, the xcframework is present in the Carthage/Build/ios folder.

Will these scenarios be covered by your PR?

@tmspzz
Copy link
Copy Markdown
Member Author

tmspzz commented Oct 10, 2020

@bcosescu

As I mentioned in a comment:

  • .version files don't work
  • binary downloads of xcframewroks don't work

They will be covered as some point. Probably not for the first release in the wild of this PR.

@bukira
Copy link
Copy Markdown

bukira commented Oct 10, 2020 via email

@elliottwilliams
Copy link
Copy Markdown
Contributor

Closing this since 0.37.0 with #3071 just shipped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.