react-native-macos/React.podspec

57 строки
2.6 KiB
Plaintext
Исходник Обычный вид История

# Copyright (c) Meta Platforms, Inc. and 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 were presumably in.
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end
Pod::Spec.new do |s|
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: https://github.com/facebook/react-native/pull/23559 Differential Revision: D14179326 Pulled By: cpojer fbshipit-source-id: 397a9c30b6b5d24f86c790057c71f0d403f56c3d
2019-02-22 05:22:05 +03:00
s.name = "React"
s.version = version
s.summary = package["description"]
s.description = <<-DESC
React Native apps are built using the React JS
framework, and render directly to native UIKit
elements using a fully asynchronous architecture.
There is no browser and no HTML. We have picked what
we think is the best set of features from these and
other technologies to build what we hope to become
the best product development framework available,
with an emphasis on iteration speed, developer
delight, continuity of technology, and absolutely
beautiful and fast products with no compromises in
quality or capability.
DESC
s.homepage = "https://reactnative.dev/"
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: https://github.com/facebook/react-native/pull/23559 Differential Revision: D14179326 Pulled By: cpojer fbshipit-source-id: 397a9c30b6b5d24f86c790057c71f0d403f56c3d
2019-02-22 05:22:05 +03:00
s.license = package["license"]
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "11.0" }
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: https://github.com/facebook/react-native/pull/23559 Differential Revision: D14179326 Pulled By: cpojer fbshipit-source-id: 397a9c30b6b5d24f86c790057c71f0d403f56c3d
2019-02-22 05:22:05 +03:00
s.source = source
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.cocoapods_version = ">= 1.10.1"
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: https://github.com/facebook/react-native/pull/23559 Differential Revision: D14179326 Pulled By: cpojer fbshipit-source-id: 397a9c30b6b5d24f86c790057c71f0d403f56c3d
2019-02-22 05:22:05 +03:00
s.dependency "React-Core", version
Remove 's.static_framework = true' requirement for podspec (#25816) Summary: As part of the fix for https://github.com/facebook/react-native/issues/25349 I added `s.static_framework = true` to each podspec in repo (see https://github.com/facebook/react-native/pull/25619#discussion_r306993309 for more context). This was required to ensure the existing conditional compilation with `#if RCT_DEV` and `__has_include` still worked correctly when `use_frameworks!` is enabled. However, fkgozali pointed out that it would be ideal if we didn't have this requirement as it could make life difficult for third-party libraries. This removes the requirement by moving `React-DevSupport.podspec` and `React-RCTWebSocket.podspec` into `React-Core.podspec` as subspecs. This means the symbols are present when `React-Core.podspec` is built dynamically so `s.static_framework = true` isn't required. This means that any `Podfile` that refers to `React-DevSupport` or `React-RCTWebSocket` will need to be updated to avoid errors. ## Changelog I don't think this needs a changelog entry since its just a refinement of https://github.com/facebook/react-native/pull/25619. Pull Request resolved: https://github.com/facebook/react-native/pull/25816 Test Plan: Check `RNTesterPods` still works both with and without `use_frameworks!`: 1. Go to the `RNTester` directory and run `pod install`. 2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine. 3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again. 4. Run the tests again and see that it still works with frameworks enabled. Reviewed By: hramos Differential Revision: D16495030 Pulled By: fkgozali fbshipit-source-id: 2708ac9fd20cd04cb0aea61b2e8ab0d931dfb6d5
2019-07-25 21:42:49 +03:00
s.dependency "React-Core/DevSupport", version
s.dependency "React-Core/RCTWebSocket", version
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: https://github.com/facebook/react-native/pull/23559 Differential Revision: D14179326 Pulled By: cpojer fbshipit-source-id: 397a9c30b6b5d24f86c790057c71f0d403f56c3d
2019-02-22 05:22:05 +03:00
s.dependency "React-RCTActionSheet", version
s.dependency "React-RCTAnimation", version
s.dependency "React-RCTBlob", version
s.dependency "React-RCTImage", version
s.dependency "React-RCTLinking", version
s.dependency "React-RCTNetwork", version
s.dependency "React-RCTSettings", version
s.dependency "React-RCTText", version
s.dependency "React-RCTVibration", version
end