-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Provide pre-compiled universal binary #3867
Comments
would mind a PR for this? But I think there is already a binary in derivedData. |
The framework in the DerivedData folder is not a universal binary - it won't run on both the simulator and an actual device. It would also require cloning and building the project manually. Providing a pre-compiled universal binary would allow developers to download just the framework, instead of the entire codebase. For example, see the *.tar.gz files attached to this project release: https://github.com/gk-brown/Lima/releases/tag/1.0.3 To use the framework, developers just need to extract the framework from the zip file and drag it to the "Embedded Binaries" section of their Xcode project. |
is there any automated way to generate it? Welcome a PR. But this isn't a high priority for us |
Yes, running the script generates the framework bundle. I'll see if I can submit a PR. |
@gk-brown I mean can github or any service like travisCI has such feature? Running the script and upload it is still some kinds of manual work for us. a one click job is much preferred, though I wonder this isn't such service. why not use carthage or pod if you don't want the source code? While I'm writing this, I recall carthage seems to have a feature called 'pre-built framework' support. Realm seems already using it. So maybe carthage is a better choice. |
I provide universal binaries for my own projects because I don't want users to have to use a 3rd-party dependency management tool like CocoaPods or Carthage. They just need to drag the framework to the "Embedded Binaries" section of their Xcode project, as described here: https://github.com/gk-brown/Lima#getting-lima Carthage does provide support for pre-built frameworks, but you still need to build them yourself and add them to your repo. Additionally, users would have to use Carthage to consume them. |
I see. what's your thought @jjatie @petester42 ? |
I might be a good idea now that swift is more stable from version to version. I know that for a while Apple didn’t recommend distributing precompiled frameworks. Has that changed? I would wait until swift 5 is out since it should be finally “stable” |
That's a good point. My earlier releases were all Objective-C, so binary compatibility was not an issue. Swift 5 was released yesterday - I'll do some testing and update the ticket. |
Module Stability is not here yet. It is the goal for Swift 5.1 |
You are right - just read that on the Swift blog. Maybe Xcode 11 will provide out-of-the-box support for building frameworks, so this script will no longer be necessary. |
so... we just wait for now? closing this is ok? @gk-brown |
Closing is fine, although I do think it would be useful to provide a pre-compiled framework once the binary compatibility issues are resolved. |
sure. when the time comes. |
Hi, sorry to open this but I need to add this as .framework in my project.... done the script but when running in simulator I get XXX.xcodeproj Building for iOS Simulator, but the linked and embedded framework 'Charts.framework' was built for iOS. I added the Release-universal to the project Any help please? |
@TGWC I ended up using the Swift package instead, which has worked well. |
how to do it ? Any tutorial ? Sorry |
Unfortunately, it looks like the project maintainers still don't provide any instructions on how to use Charts as a Swift package. Maybe this will help: https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app |
I think we already supported Swift Package? There is a config file already. I don't realize the issue @gk-brown |
You do support using Charts as a Swift package. However, unlike Cocoapods and Carthage, I don't believe this is documented anywhere. |
There is now an SPM Install section, mirroring the detail common in popular iOS libraries. If you feel further instructions are required for less common use cases, please submit a PR. |
Thanks for all of the hard work you've put into the Charts framework - it's very much appreciated. Just wanted to suggest providing a pre-compiled universal binary in addition to your current CocoaPods and Carthage support. The following shell script can be used to generate a framework binary that will run in both the iOS simulator and on an actual device:
Place the script in the project root directory and make sure it has execute permission. See this article for more information:
https://gkbrown.org/2017/10/11/creating-a-universal-framework-in-xcode-9/
For an example that also supports tvOS, see:
https://github.com/gk-brown/Lima/blob/master/package.sh
The text was updated successfully, but these errors were encountered: