-
Notifications
You must be signed in to change notification settings - Fork 149
[RNTester] Add CocoaPods based macOS target. #211
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
Conversation
Libraries/ART/React-ART.podspec
Outdated
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } |
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 indicates a pod is available for a specific deployment target.
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec" | ||
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec" | ||
pod 'Folly', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec" | ||
pod 'boost-for-react-native', :podspec => "#{prefix}/third-party-podspecs/boost-for-react-native.podspec" |
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.
Are we using the autolink-ios.rb file for Mac? Probably worth cleaning it up by making an autolink-apple.rb file that has everything shared between ios/mac and then autolink-ios and autolink-mac (you'll have to make this) would pull it in.
Then where we consume the autolink-ios.rb file right now we would just conditionally include the appropriate platform extension version based off the platform.
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.
Good question; yes and no.
The “autolinking” that’s being referred to in this version of the Podfile is an earlier incarnation, the current version lives in react-native-community/cli. That one will definitely need updating for macOS, but I’ll do that in a follow-up PR [when I make a little RN macOS example app I have in mind].
As-is, the old version in this repo works for macOS too and is simply named autolinking-ios
rather than actually only working for iOS.
b762e17
to
c07f79e
Compare
@HeyImChris Ok, this should be good to go for another review pass. I did some more work around launching the macOS product. |
At least for now so we’re in sync with upstream v0.60.0
This change is already made upstream in commit facebook@9ece5bda, so when that is merged in this commit can be skipped. Until then, not making this change will just lead to file thrashing.
This change is already made upstream in commit facebook@c1845810, so when that is merged in this commit can be skipped. Until then, not making this change will just lead to file thrashing.
As per https://www.thecave.com/2015/08/10/dispatch-async-to-main-queue-doesnt-work-with-modal-window-on-mac-os-x/#update2 the main queue is already executing a block when we start the new modal runloop and as the main queue is a serial queue it won’t perform new work until the current block is finished. In short, the task is queued, but will never be performed by GCD. This change side-steps GCD and instead directly invokes -dismiss on the main thread.
c07f79e
to
b26a060
Compare
|
||
platform :ios, '9.0' | ||
|
||
require_relative '../scripts/autolink-ios' |
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.
Still seems wrong to pull in and use "autolink-ios" for both Mac and iOS, but given that we're trying to reduce diffs between us and facebook, it's probably not a blocking issue to get cleaned up right now. Ideally we'd have an autolink-apple, autolink-mac, and autolink-ios
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.
Still seems wrong to pull in and use "autolink-ios" for both Mac and iOS, but given that we're trying to reduce diffs between us and facebook, it's probably not a blocking issue to get cleaned up right now. Ideally we'd have an autolink-apple, autolink-mac, and autolink-ios
Just in case this was missed before, this comment addresses the plan #211 (comment)
Oh, well, now it worked 🤷♂ |
Part of #215
Summary
Updates podspecs to exclude iOS/tvOS source files and add macOS specific source files.
This is not a comprehensive pass through all the podspecs, rather just to get the RNTester macOS target up and running. We’ll likely need to go through it with a comb at some point and I’d also like two invert some of the file selections so we don’t need so much exclusion of files (but for now doing it this way will make it easier to sync from upstream).
Changelog
[macOS] [Added] - Add CocoaPods based RNTester target.
Test Plan
I have gone through half the samples to check if they work similarly to the product of the static Xcode project, I will continue to do so for the rest of the examples.