-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split React.podspec into separate podspecs for each Xcode project (#2…
…3559) Summary: This PR implements the first part of [RFC0004: CocoaPods Support Improvements](https://github.com/react-native-community/discussions-and-proposals/blob/353d44f64957113409eb16f836e23dba396a6b46/proposals/0004-cocoapods-support-improvements.md), splitting the `React.podspec` into separate podspecs to more closely match the structure of Xcode projects. The new structure aims to have one to one mapping between Xcode projects and podspecs. The only places where we differ from this mapping are: * `React/React-DevSupport.podspec`: `DevSupport` is a part of `React.xcodeproj`, which corresponds to the `React-Core` pod. However, we can't include it in the `React-Core` pod because `DevSupport` depends on `React-RCTWebSocket`, which depends on `React-Core`. Pods may not have circular dependencies. * The new pods under `ReactCommon/` don't have a corresponding `xcodeproj` because there are no `xcodproj` files in `ReactCommon/`. Those C++ modules are included in `React.xcodeproj`. *Next steps (not in scope of this PR):* - Start submitting the Podspecs to CocoaPods on a deploy (or turn the React Native repo into a spec repo): this is important in order to make the experience nicer for library consumers, so that it's not necessary to specify the local path of each Podspec in `Podfile`, you can just add `pod 'React', <version>`. - Add `Podfile` to the default project template (I have a PR ready for this, but because of bugs related to subspecs, it's blocked on this PR) [iOS] [Changed] - Split React.podspec into separate podspecs for each Xcode project Pull Request resolved: #23559 Differential Revision: D14179326 Pulled By: cpojer fbshipit-source-id: 397a9c30b6b5d24f86c790057c71f0d403f56c3d
- Loading branch information
1 parent
b471916
commit 2321b3f
Showing
29 changed files
with
1,033 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-ART" | ||
s.version = version | ||
s.summary = "A library for drawing vector graphics." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "**/*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTActionSheet" | ||
s.version = version | ||
s.summary = "An API for displaying iOS action sheets and share sheets." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.documentation_url = "https://facebook.github.io/react-native/docs/actionsheetios" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTBlob" | ||
s.version = version | ||
s.summary = "An API for displaying iOS action sheets and share sheets." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m,mm}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
s.dependency "React-RCTNetwork", version | ||
s.dependency "React-RCTWebSocket", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTCameraRoll" | ||
s.version = version | ||
s.summary = "An API that provides access to the local camera roll or photo library." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.documentation_url = "https://facebook.github.io/react-native/docs/cameraroll" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
s.dependency "React-RCTImage", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTGeolocation" | ||
s.version = version | ||
s.summary = "A geolocation API for React Native." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.documentation_url = "https://facebook.github.io/react-native/docs/geolocation" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTImage" | ||
s.version = version | ||
s.summary = "A React component for displaying different types of images." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.documentation_url = "https://facebook.github.io/react-native/docs/image" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
s.dependency "React-RCTNetwork", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTLinking" | ||
s.version = version | ||
s.summary = "A general interface to interact with both incoming and outgoing app links." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.documentation_url = "https://facebook.github.io/react-native/docs/linking" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTAnimation" | ||
s.version = version | ||
s.summary = "A native driver for the Animated API." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "{Drivers/*,Nodes/*,*}.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTNetwork" | ||
s.version = version | ||
s.summary = "The networking library of React Native." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m,mm}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
35 changes: 35 additions & 0 deletions
35
Libraries/PushNotificationIOS/React-RCTPushNotification.podspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTPushNotification" | ||
s.version = version | ||
s.summary = "A library for handling push notifications for your app, including permission handling and icon badge number." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.documentation_url = "https://facebook.github.io/react-native/docs/pushnotificationios" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) | ||
version = package['version'] | ||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' } | ||
if version == '1000.0.0' | ||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. | ||
source[:commit] = `git rev-parse HEAD`.strip | ||
else | ||
source[:tag] = "v#{version}" | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "React-RCTTest" | ||
s.version = version | ||
s.summary = "Tools for integration and snapshot testing." | ||
s.homepage = "http://facebook.github.io/react-native/" | ||
s.license = package["license"] | ||
s.author = "Facebook, Inc. and its affiliates" | ||
s.platforms = { :ios => "9.0", :tvos => "9.2" } | ||
s.source = source | ||
s.source_files = "**/*.{h,m}" | ||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" | ||
s.framework = "XCTest" | ||
s.header_dir = "React" | ||
|
||
s.dependency "React-Core", version | ||
end |
Oops, something went wrong.