-
Notifications
You must be signed in to change notification settings - Fork 242
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
feat(apple): build framework for tvos and watchos (+ sims) #56
Conversation
Merged #55, this also LGTM. Needs to be updated and then feel free to merge. Will be testing it out, aiming for a release today. |
Great! This one is a little more speculative of course, I'll re-base it against post-mergeof-#55 main branch but I'm not in a hurry on this one, I'm still playing with xcodebuild command line combinations between using 'destination' and 'sdk' arguments and seeing if I can generate an '-sdk macosx' build then I want to check a tvOS compile and a react-native-macosx compile. react-native-device-info has a macosx port I'm on the hook to merge so I'll have a native mac repro available to check with that one TL;DR: I'm probably going to let this one hang open for a little bit but thanks for checking all the #ifdef'ing, that definitely needed a look |
these framework artifacts are untested but do in general seem in harmony with the tvOS and watchOS and macOS platforms after the #if/#endif precompiler removal of areas those OSs don't support (tvOS just appears to show a badge and allow data payloads and that's it, for instance, watchOS doesn't have settings) macOS desktop target in particular has a similar "deep" framework archive directory structure (with 'Versions/Current' etc) and even worse it won't actually install in to the archive directory. But because of that if we specify a derived data path then do our own copy operation we may flatten the directory structure as part of the archive, and xcodebuild accepts the output when it makes the xcframework
03b92ed
to
9eb3095
Compare
@@ -406,7 +406,7 @@ | |||
PRODUCT_BUNDLE_IDENTIFIER = app.notifee.core.NotifeeCore; | |||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; | |||
SKIP_INSTALL = YES; | |||
TARGETED_DEVICE_FAMILY = "1,2"; | |||
TARGETED_DEVICE_FAMILY = "1,2,3,4,6"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's tvOS (3), watchOS (4), and macOS (6)
@@ -5,7 +5,13 @@ | |||
// Copyright © 2020 Invertase. All rights reserved. | |||
// | |||
|
|||
#import <UIKit/UIKit.h> | |||
#include <TargetConditionals.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This brings in 'TARGET_OS_IPHONE' which is a misnomer. That symbol means "Everything except mac Desktop via AppKit (i.e., not via UIKit aka Catalyst)" so is the easiest discriminator to say "am I the pure desktop macos native build?"
I did a second pass on this one today putting the macos target in place with appropriate (I think) porting via precompiler '#if' directives and handling the switch from UIKit to AppKit. I also added in the correct '@available' API minimums for catalyst tvos and watchos (I had missed those before) At this point I think the framework generation ( I should mark this as draft really - I'll do that. |
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 15 days until this gets closed automatically |
This builds on #55 by adding in tvos and watchos builds - it appears to successfully generate frameworks
The #if'ing out of various tvOS and watchOS missing parts was quick and dirty, no attempt at documentation was made.
That said, the firebase-ios-sdk team has had great luck saying effectively "hey, tvOS and watchOS are community driven, they might break, try it and let us know" and then just chucking it out there while updating things people confirm work. The very low-intensity resource-utilization solution to giving it a shot