Comments (6)
I'm definitely up for us doing this in general, if you have an example of the type of config you ship that kinda thing with that would be great (or if you want to PR it! 🙏🏻 )
from kronos.
statically linking Kronos in your xcframework is normally Lyft's preferred way to include 3rd party binaries as well
from kronos.
tl;dr: my PR above breaks Kronos
for carthage
users who mix Swift with Obj-C, i'm reverting it if that's ok with you.
hi again @keith 👋
i've just found out BUILD_LIBRARY_FOR_DISTRIBUTION
is incompatible with Obj-C bridging headers.
if the client app has a bridging header / mixes Swift&ObjC then it cannot use a framework built with this build setting.
this WWDC session somehow mentions it (but leaves it unclear).
i'm raising a new one to revert it, sorry about raising the first PR too early!
it probably makes sense to let the user choose between downloading binary directly (build for distro) and building from the source (NOT built for distro).
SPM and Cocoapods don't have such a mechanism; carthage has no-use-binaries
flag but AFAIK you can't choose which dependencies to use binaries and which not to, so this is not a viable option neither.
from what i understand, the effort for distributing binaries of an open-source project isn't worth the juice; it looks like it only makes sense for closed-source frameworks. after all, they can cache their dependencies in their ways after building from the source.
this topic turned out to be much more complex than i initially expected, please let me know if i'm missing something or if you have a different idea 👂
from kronos.
yea it seems like this has always been a huge pain, which is why I love building our dependencies from source in a way that we define 🙃 . I think having a separate binary on each release would be fine with me though, and we could override that setting, if needed, in that build, separate from the CocoaPods or manual project integration routes.
from kronos.
i thought it wasn't a pain anymore with xcframework
and build_for_distro
setting... but i turned out to be wrong :(
my initial idea was that if DatadogSDK
and Kronos
provide binaries then our regular users (who use SPM/cocoapods/carthage) can download both binaries easily with the help of package managers.
but due to that bridging header limitation, providing binaries via package managers is not really an option.
please let me do a bit more research while keeping the issue open ⏳ (but i will probably close the issue without further action)
we as Datadog still may need to provide binaries but this will be for non-package-manager-users and i think it makes more sense to provide a single standalone binary for them (only Datadog.xcframework
which statically contains Kronos
inside).
from kronos.
hi again @keith 👋
i'm closing the issue. for now we decided to go with providing standalone binaries (a zip file containing OurFramework.xcframework
and Kronos.xcframework
in Github releases) for the users who don't use package managers.
i want to correct a mistake i made above:
Obj-C incompatibility issue was actually a mistake in my test project. when i set BUILD_LIBRARY_FOR_DISTRIBUTION = YES
in the xcconfig
for my framework target it was also affecting my app target (xcconfig
was shared indirectly among both targets).
in short, BUILD_LIBRARY_FOR_DISTRIBUTION
cannot be used in app targets but you can use it in framework targets without problem 👌
it still doesn't look like a good idea to distribute binaries via SPM and Cocoapods.
from kronos.
Related Issues (20)
- Async/Await HOT 1
- How does Kronos handle lack of connection / reachability changes? HOT 2
- Xcode 14.3 compatibility needed to resolve error: libarclite_iphonesimulator.a file not found HOT 2
- Showing All Messages The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. HOT 1
- Nil always returns on Clock.now HOT 2
- Address Sanitizer: heap-buffer-overflow HOT 4
- Kronos not working on cellular data but only on Wifi? HOT 5
- Install with Swift packager issue HOT 2
- Not working with Catalyst HOT 1
- Dangling pointer in Data+Byte.swift
- Apple Watch support HOT 1
- Kronos warning for not being Swift 5 HOT 4
- Is it possible to use multiple NTP hosts? HOT 4
- Crash in NTPPacket.swift HOT 5
- Data race in static Kronos.Clock.annotatedNow.getter HOT 2
- Authorisation asked for local network on iOS 14 on cellular network HOT 4
- Support for dylib for SPM? HOT 1
- Synced Clock for AR Session
- Swift runtime failure: Double value cannot be converted to UInt32 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kronos.