Skip to content

Commit 4a0ca8c

Browse files
authored
[RNTester] Add CocoaPods based macOS target. (#211)
* [RNTester] Check-in pod install artefacts * [RNTester] Add CameraRoll pod dependency back At least for now so we’re in sync with upstream v0.60.0 * [RNTester] First pass at adding CocoaPods based macOS target * [RNTester] Add notifications pod to macOS target * [CocoaPods] Make RCTText pod build for macOS * [CocoaPods] make RCTLinking pod build for macOS * [CocoaPods] Exclude more files from RCTText pod * [CocoaPods] Make Core pod build for macOS * [CocoaPods] Exclude turbomodule sample from macOS * [RNTester] Update CocoaPods artefact * [RNTester] Update macOS target to follow non-pods version * [CocoaPods] Tag all macOS changes to ease updating #214 * [RNTester] Remove development team references 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. * [RNTester] Import Xcode artefact 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. * [RNTester] Start Metro on launch of macOS product * [RCTRedBox] Fix -[RCTRedBoxWindow dismiss] on macOS 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.
1 parent a6c1ff6 commit 4a0ca8c

35 files changed

+345
-80
lines changed

Libraries/ART/React-ART.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
2424
s.homepage = "http://facebook.github.io/react-native/"
2525
s.license = package["license"]
2626
s.author = "Facebook, Inc. and its affiliates"
27-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
27+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2828
s.source = source
2929
s.source_files = "**/*.{h,m}"
3030
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/ActionSheetIOS/React-RCTActionSheet.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
s.documentation_url = "https://facebook.github.io/react-native/docs/actionsheetios"
2626
s.license = package["license"]
2727
s.author = "Facebook, Inc. and its affiliates"
28-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2929
s.source = source
3030
s.source_files = "*.{h,m}"
3131
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/Blob/React-RCTBlob.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
2424
s.homepage = "http://facebook.github.io/react-native/"
2525
s.license = package["license"]
2626
s.author = "Facebook, Inc. and its affiliates"
27-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
27+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2828
s.source = source
2929
s.source_files = "*.{h,m,mm}"
3030
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/Image/React-RCTImage.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
s.documentation_url = "https://facebook.github.io/react-native/docs/image"
2626
s.license = package["license"]
2727
s.author = "Facebook, Inc. and its affiliates"
28-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2929
s.source = source
3030
s.source_files = "*.{h,m}"
3131
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/LinkingIOS/React-RCTLinking.podspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ Pod::Spec.new do |s|
2525
s.documentation_url = "https://facebook.github.io/react-native/docs/linking"
2626
s.license = package["license"]
2727
s.author = "Facebook, Inc. and its affiliates"
28-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2929
s.source = source
3030
s.source_files = "*.{h,m}"
3131
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
3232
s.header_dir = "React"
3333

3434
s.dependency "React-Core", version
35+
36+
s.osx.exclude_files = "RCTLinkingManager.m"
37+
s.osx.source_files = "macos/RCTLinkingManager.m"
3538
end

Libraries/NativeAnimation/React-RCTAnimation.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
2424
s.homepage = "http://facebook.github.io/react-native/"
2525
s.license = package["license"]
2626
s.author = "Facebook, Inc. and its affiliates"
27-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
27+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2828
s.source = source
2929
s.source_files = "{Drivers/*,Nodes/*,*}.{h,m}"
3030
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/Network/React-RCTNetwork.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
2424
s.homepage = "http://facebook.github.io/react-native/"
2525
s.license = package["license"]
2626
s.author = "Facebook, Inc. and its affiliates"
27-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
27+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2828
s.source = source
2929
s.source_files = "*.{h,m,mm}"
3030
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/PushNotificationIOS/React-RCTPushNotification.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
s.documentation_url = "https://facebook.github.io/react-native/docs/pushnotificationios"
2626
s.license = package["license"]
2727
s.author = "Facebook, Inc. and its affiliates"
28-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2929
s.source = source
3030
s.source_files = "*.{h,m}"
3131
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/Settings/React-RCTSettings.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
s.documentation_url = "https://facebook.github.io/react-native/docs/settings"
2626
s.license = package["license"]
2727
s.author = "Facebook, Inc. and its affiliates"
28-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2929
s.source = source
3030
s.source_files = "*.{h,m}"
3131
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

Libraries/Text/React-RCTText.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ Pod::Spec.new do |s|
2525
s.documentation_url = "https://facebook.github.io/react-native/docs/text"
2626
s.license = package["license"]
2727
s.author = "Facebook, Inc. and its affiliates"
28-
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
2929
s.source = source
3030
s.source_files = "**/*.{h,m}"
3131
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
3232
s.header_dir = "React"
3333

3434
s.dependency "React-Core", version
35+
36+
s.osx.exclude_files = "TextInput/RCTInputAccessory{,Shadow}View*.{h,m}"
3537
end

0 commit comments

Comments
 (0)