Skip to content

Commit 2321b3f

Browse files
fsonfacebook-github-bot
authored andcommitted
Split React.podspec into separate podspecs for each Xcode project (#23559)
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
1 parent b471916 commit 2321b3f

29 files changed

+1033
-429
lines changed

Libraries/ART/React-ART.podspec

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-ART"
22+
s.version = version
23+
s.summary = "A library for drawing vector graphics."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.license = package["license"]
26+
s.author = "Facebook, Inc. and its affiliates"
27+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.source = source
29+
s.source_files = "**/*.{h,m}"
30+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
31+
s.header_dir = "React"
32+
33+
s.dependency "React-Core", version
34+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTActionSheet"
22+
s.version = version
23+
s.summary = "An API for displaying iOS action sheets and share sheets."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.documentation_url = "https://facebook.github.io/react-native/docs/actionsheetios"
26+
s.license = package["license"]
27+
s.author = "Facebook, Inc. and its affiliates"
28+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
29+
s.source = source
30+
s.source_files = "*.{h,m}"
31+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
32+
s.header_dir = "React"
33+
34+
s.dependency "React-Core", version
35+
end

Libraries/Blob/React-RCTBlob.podspec

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTBlob"
22+
s.version = version
23+
s.summary = "An API for displaying iOS action sheets and share sheets."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.license = package["license"]
26+
s.author = "Facebook, Inc. and its affiliates"
27+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.source = source
29+
s.source_files = "*.{h,m,mm}"
30+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
31+
s.header_dir = "React"
32+
33+
s.dependency "React-Core", version
34+
s.dependency "React-RCTNetwork", version
35+
s.dependency "React-RCTWebSocket", version
36+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTCameraRoll"
22+
s.version = version
23+
s.summary = "An API that provides access to the local camera roll or photo library."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.documentation_url = "https://facebook.github.io/react-native/docs/cameraroll"
26+
s.license = package["license"]
27+
s.author = "Facebook, Inc. and its affiliates"
28+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
29+
s.source = source
30+
s.source_files = "*.{h,m}"
31+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
32+
s.header_dir = "React"
33+
34+
s.dependency "React-Core", version
35+
s.dependency "React-RCTImage", version
36+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTGeolocation"
22+
s.version = version
23+
s.summary = "A geolocation API for React Native."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.documentation_url = "https://facebook.github.io/react-native/docs/geolocation"
26+
s.license = package["license"]
27+
s.author = "Facebook, Inc. and its affiliates"
28+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
29+
s.source = source
30+
s.source_files = "*.{h,m}"
31+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
32+
s.header_dir = "React"
33+
34+
s.dependency "React-Core", version
35+
end
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTImage"
22+
s.version = version
23+
s.summary = "A React component for displaying different types of images."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.documentation_url = "https://facebook.github.io/react-native/docs/image"
26+
s.license = package["license"]
27+
s.author = "Facebook, Inc. and its affiliates"
28+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
29+
s.source = source
30+
s.source_files = "*.{h,m}"
31+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
32+
s.header_dir = "React"
33+
34+
s.dependency "React-Core", version
35+
s.dependency "React-RCTNetwork", version
36+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTLinking"
22+
s.version = version
23+
s.summary = "A general interface to interact with both incoming and outgoing app links."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.documentation_url = "https://facebook.github.io/react-native/docs/linking"
26+
s.license = package["license"]
27+
s.author = "Facebook, Inc. and its affiliates"
28+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
29+
s.source = source
30+
s.source_files = "*.{h,m}"
31+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
32+
s.header_dir = "React"
33+
34+
s.dependency "React-Core", version
35+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTAnimation"
22+
s.version = version
23+
s.summary = "A native driver for the Animated API."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.license = package["license"]
26+
s.author = "Facebook, Inc. and its affiliates"
27+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.source = source
29+
s.source_files = "{Drivers/*,Nodes/*,*}.{h,m}"
30+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
31+
s.header_dir = "React"
32+
33+
s.dependency "React-Core", version
34+
end
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTNetwork"
22+
s.version = version
23+
s.summary = "The networking library of React Native."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.license = package["license"]
26+
s.author = "Facebook, Inc. and its affiliates"
27+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.source = source
29+
s.source_files = "*.{h,m,mm}"
30+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
31+
s.header_dir = "React"
32+
33+
s.dependency "React-Core", version
34+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTPushNotification"
22+
s.version = version
23+
s.summary = "A library for handling push notifications for your app, including permission handling and icon badge number."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.documentation_url = "https://facebook.github.io/react-native/docs/pushnotificationios"
26+
s.license = package["license"]
27+
s.author = "Facebook, Inc. and its affiliates"
28+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
29+
s.source = source
30+
s.source_files = "*.{h,m}"
31+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
32+
s.header_dir = "React"
33+
34+
s.dependency "React-Core", version
35+
end
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding: utf-8
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
require "json"
8+
9+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10+
version = package['version']
11+
12+
source = { :git => 'https://github.com/facebook/react-native.git' }
13+
if version == '1000.0.0'
14+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
15+
source[:commit] = `git rev-parse HEAD`.strip
16+
else
17+
source[:tag] = "v#{version}"
18+
end
19+
20+
Pod::Spec.new do |s|
21+
s.name = "React-RCTTest"
22+
s.version = version
23+
s.summary = "Tools for integration and snapshot testing."
24+
s.homepage = "http://facebook.github.io/react-native/"
25+
s.license = package["license"]
26+
s.author = "Facebook, Inc. and its affiliates"
27+
s.platforms = { :ios => "9.0", :tvos => "9.2" }
28+
s.source = source
29+
s.source_files = "**/*.{h,m}"
30+
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
31+
s.framework = "XCTest"
32+
s.header_dir = "React"
33+
34+
s.dependency "React-Core", version
35+
end

0 commit comments

Comments
 (0)