Commit Graph

75 Commits

Author SHA1 Message Date
Marc Horowitz 816d417189 Delete RCTBatchedBridge
Summary:
I've talked to several major community users, and they're all ok with deleting this
code.  There's several doc fixes which will make it easier for third
party developers which should land about the same time this will.

Also buried along with it is RCTJSCExecutor.

Reviewed By: javache

Differential Revision: D6880781

fbshipit-source-id: b4cb1143def6fd23a96290e478fa728adbedacd3
2018-02-05 12:02:35 -08:00
Satyajit Sahoo be56a3efee Implement Blob support for XMLHttpRequest
Summary:
This PR is a followup to https://github.com/facebook/react-native/pull/11417 and should be merged after that one is merged.

  1. Add support for creating blobs from strings, not just other blobs
  1. Add the `File` constructor which is a superset of `Blob`
  1. Add the `FileReader` API which can be used to read blobs as strings or data url (base64)
  1. Add support for uploading and downloading blobs via `XMLHttpRequest` and `fetch`
  1. Add ability to download local files on Android so you can do `fetch(uri).then(res => res.blob())` to get a blob for a local file (iOS already supported this)

  1. Clone the repo https://github.com/expo/react-native-blob-test
  1. Change the `package.json` and update `react-native` dependency to point to this branch, then run `npm install`
  1. Run the `server.js` file with `node server.js`
  1. Open the `index.common.js` file and replace `localhost` with your computer's IP address
  1. Start the packager with `yarn start` and run the app on your device

If everything went well, all tests should pass, and you should see a screen like this:

![screen shot 2017-06-08 at 7 53 08 pm](https://user-images.githubusercontent.com/1174278/26936407-435bbce2-4c8c-11e7-9ae3-eb104e46961e.png)!

Pull to rerun all tests or tap on specific test to re-run it

  [GENERAL] [FEATURE] [Blob] - Implement blob support for XMLHttpRequest
Closes https://github.com/facebook/react-native/pull/11573

Reviewed By: shergin

Differential Revision: D6082054

Pulled By: hramos

fbshipit-source-id: cc9c174fdefdfaf6e5d9fd7b300120a01a50e8c1
2018-01-26 09:17:11 -08:00
Hovhannes Safaryan 7e7d00aebe Update React.podspec for RCTText
Summary:
Some of the classes of RCTText are now in the subfolders, this will fix pod integration for texts

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I have integrated React Native into my project with [this guide](https://facebook.github.io/react-native/docs/integration-with-existing-apps.html) and got the error `No component found for view with name RCTText`. Searching in the web did not give any useful information so I started to dig into the code and found out that there is now subfolders and pod taking only root classes. After making this change project started to compile again.

Create empty project with pods integrated add `RCTText` subspec and in `.js` file add  some `<Text>` element

Fixed `RCTText` subspec integration.
Closes https://github.com/facebook/react-native/pull/17655

Differential Revision: D6751039

Pulled By: hramos

fbshipit-source-id: f4538d1125af2b45f36e2fa535382e032dbc8f4e
2018-01-18 13:31:50 -08:00
Kevin Cassidy Jr d40db3a715 Use boost-for-react-native CocoaPod
Summary:
Use the same header-only distribution of Boost that Android and the automatic ios-install-third-party.sh script uses. Greatly speeds up `pod install`, even when the distribution was already cached.

The dependency tree looks like this:

* React
  * cxxreact subspec
    * **Boost** (versioned, 1.63.0)
    * Folly
      * **Boost** (any version, will resolve to 1.63.0 from above)

Alternative implementation of PR https://github.com/facebook/react-native/pull/16756. Fixes issue #16381.

(same as https://github.com/facebook/react-native/pull/16756)
* Install react-native via Cocoapods (or move a helloWorld react-native application over to use Cocoapods for dependency management)
* Add CxxBridge instead of BatchedBridge to your Podfile
* run pod install
* run react-native run-ios

[Add boost.podspec speed up download time & reduce size of the package](https://github.com/facebook/react-native/pull/16756)

[IOS] [BUGFIX] [third-party-podspecs] - optimize CocoaPods installation (Boost distribution)
Closes https://github.com/facebook/react-native/pull/17476

Differential Revision: D6746095

Pulled By: hramos

fbshipit-source-id: 55b2b5a698691f7fca0bf4c31c4376c2b9eb5379
2018-01-17 19:16:55 -08:00
Gene ba1d7e92e4 【iOS】fix tvOS file 'React/Base/RCTTVRemoteHandler*' included in iOS
Summary:
fix bugs

please look at the code,u will know me.

fix tvOS file 'React/Base/RCTTVRemoteHandler*' included in subspec 'React/Core' iOS

[CATEGORY] [TYPE] [LOCATION] - MESSAGE
 [IOS] [BUGFIX] [React.podspec] - fix tvOS file 'React/Base/RCTTVRemoteHandler*' included in subspec 'React/Core' iOS
Closes https://github.com/facebook/react-native/pull/16571

Differential Revision: D6418919

Pulled By: shergin

fbshipit-source-id: d05a1182314c9718447351c8d1a180ff61f21192
2017-11-27 15:48:07 -08:00
Ben Nham 70c359000a move inspector out of jschelpers
Differential Revision: D6385924

fbshipit-source-id: 1913d903077494cc0d86d5a8c8839620f1ecab0c
2017-11-27 07:23:37 -08:00
Pritesh Nandgaonkar d7ab9496bc Change c files to cpp
Reviewed By: gkassabli

Differential Revision: D6271299

fbshipit-source-id: 66c0e54ccf019d72d1fd0b4d117826e4e84fdc89
2017-11-21 10:18:29 -08:00
James Ide 38b96cd7bb Define `pod_target_xcconfig` for PrivateDatabase
Summary:
We don't strictly need this since all the other subspecs that use this set up the header search path for ReactCommon anyway but do it just for correctness.
Closes https://github.com/facebook/react-native/pull/16665

Differential Revision: D6241796

Pulled By: hramos

fbshipit-source-id: 19e6363e570d38f06ea970395d68b9cea7fd02ae
2017-11-04 12:56:13 -07:00
Joshua May 2a24b7b967 Adds PrivateDatabase podspec
Summary:
Resolves #16663.

Walked through the reproduction steps in #16663, but with successful build.

We can also now see the files are included in the `Pods` project:

<img width="236" alt="screen shot 2017-11-03 at 7 43 21 pm" src="https://user-images.githubusercontent.com/33126/32390596-4a06c05c-c0cf-11e7-8616-3ae547f8cca2.png">

(I noticed a subspec called `_ignore_me_subspec_for_linting_` so do we have tests for the podspec?)

[IOS] [BUGFIX] [React.podspec] - Resolves build error about missing symbols for PrivateDatabase.{cpp,h}
Closes https://github.com/facebook/react-native/pull/16664

Differential Revision: D6238178

Pulled By: hramos

fbshipit-source-id: b57007ab8c7c8bd0faf1f2f11269a7a2c28183e5
2017-11-03 16:31:31 -07:00
Pieter De Baets 1e3a8e2ed4 Remove AdSupport from React.podspec
Summary: Closes https://github.com/facebook/react-native/pull/16168

Differential Revision: D5988522

Pulled By: javache

fbshipit-source-id: ac9c393915c249038eb34c4bd4f34ece58fe7975
2017-10-05 12:32:04 -07:00
James Ide 26f6f6019b Set fishhook's header_dir to "fishhook"
Summary:
This lets us import fishhook like `<fishhook/fishhook.h>`.
Closes https://github.com/facebook/react-native/pull/16192

Differential Revision: D5971639

Pulled By: shergin

fbshipit-source-id: c46503953a08a74bdd10ed35cbd30029f1666c7d
2017-10-03 18:20:30 -07:00
Adam Comella b050b6906d BREAKING: iOS: Fix case sensitivity build warning in Xcode 8.3
Summary:
**Breaking Change Notes**

To adapt to the breaking change, app developers that are consuming React Native through CocoaPods must update their Podfile to refer to yoga with a lowercase "y". In other words:

    pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

Must be changed to (note the lowercase "y"):

    pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

**Symptom**

If you consume React Native as a CocoaPod and consume a third-party React Native module not as a CocoaPod, you will receive a `nonportable-include-path` warning in Xcode >= 8.3.

**Details**

Xcode 8.3 introduced -Wnonportable-include-path which triggers if you import a header using different casing than the path to the header on disk. This triggers when consuming React Native as a CocoaPod from a library that isn't a CocoaPod. React Native imports Yoga using paths like this:

    #import <yoga/Yoga.h>

Which means Yoga's headers are expected to be located in a directory called "yoga" with a lowercase "y". However, when React Native is a CocoaPod the Yoga headers for non-CocoaPods end up in the directory "$(BUILT_PRODUCTS_DIR)/Yoga".

To fix this such that Yoga's headers end up in "$(BUILT_PRODUCTS_DIR)/yoga" (note the lowercase "y"), I've changed Yoga's podspec name to have a lowercase "y".

**Test Plan**

Created a test app where React Native is consumed as a CocoaPod. Added the react-native-maps library to the project and configured it to not be consumed through CocoaPods. Verified that the app compiles properly without the `nonportable-include-path` warnings.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/15527

Differential Revision: D5706338

Pulled By: javache

fbshipit-source-id: 090daa2c3ebb1c66bd467e78a1e91791dbb06651
2017-08-25 04:45:06 -07:00
Emil Sjolander 878b7e42fa fishhook nwlog_legacy_v to avoid log spam on websocket reconnect
Reviewed By: mmmulani, javache

Differential Revision: D5570896

fbshipit-source-id: be98f500434bd2a0113b9abca20c9f21102c09d1
2017-08-08 08:20:08 -07:00
Pieter De Baets d188375e36 Fix missing file from cocoapods build
Summary: Closes https://github.com/facebook/react-native/pull/15213

Differential Revision: D5498556

Pulled By: javache

fbshipit-source-id: f5922617f620f76351202cc4e601d7f384fb7cfb
2017-07-26 11:21:59 -07:00
Philipp von Weitershausen ed903099b4 Add blob implementation with WebSocket integration
Summary:
This is the first PR from a series of PRs grabbou and me will make to add blob support to React Native. The next PR will include blob support for XMLHttpRequest.

I'd like to get this merged with minimal changes to preserve the attribution. My next PR can contain bigger changes.

Blobs are used to transfer binary data between server and client. Currently React Native lacks a way to deal with binary data. The only thing that comes close is uploading files through a URI.

Current workarounds to transfer binary data includes encoding and decoding them to base64 and and transferring them as string, which is not ideal, since it increases the payload size and the whole payload needs to be sent via the bridge every time changes are made.

The PR adds a way to deal with blobs via a new native module. The blob is constructed on the native side and the data never needs to pass through the bridge. Currently the only way to create a blob is to receive a blob from the server via websocket.

The PR is largely a direct port of https://github.com/silklabs/silk/tree/master/react-native-blobs by philikon into RN (with changes to integrate with RN), and attributed as such.

> **Note:** This is a breaking change for all people running iOS without CocoaPods. You will have to manually add `RCTBlob.xcodeproj` to your `Libraries` and then, add it to Build Phases. Just follow the process of manual linking. We'll also need to document this process in the release notes.

Related discussion - https://github.com/facebook/react-native/issues/11103

- `Image` can't show image when `URL.createObjectURL` is used with large images on Android

The websocket integration can be tested via a simple server,

```js
const fs = require('fs');
const http = require('http');

const WebSocketServer = require('ws').Server;

const wss = new WebSocketServer({
  server: http.createServer().listen(7232),
});

wss.on('connection', (ws) => {
  ws.on('message', (d) => {
    console.log(d);
  });

  ws.send(fs.readFileSync('./some-file'));
});
```

Then on the client,

```js
var ws = new WebSocket('ws://localhost:7232');

ws.binaryType = 'blob';

ws.onerror = (error) => {
  console.error(error);
};

ws.onmessage = (e) => {
  console.log(e.data);
  ws.send(e.data);
};
```

cc brentvatne ide
Closes https://github.com/facebook/react-native/pull/11417

Reviewed By: sahrens

Differential Revision: D5188484

Pulled By: javache

fbshipit-source-id: 6afcbc4d19aa7a27b0dc9d52701ba400e7d7e98f
2017-07-26 08:23:20 -07:00
dlowder-salesforce f082e6cffd Apple TV Cocoapods support
Summary:
**Motivation**

Support Apple TV for people adding React Native to their projects using Cocoapods.

**Test plan**

Working test project at https://github.com/dlowder-salesforce/react-native-tvos-cocoapods-test
Closes https://github.com/facebook/react-native/pull/15065

Differential Revision: D5443791

Pulled By: javache

fbshipit-source-id: dc46a72df0d73a0049f1c3f9368658e5f3d1ecb8
2017-07-18 15:15:59 -07:00
Steffen Matthischke e43c061e95 Podspec: add required "DevSupport" dependency "InspectorInterfaces.{cpp,h}
Summary:
This PR fixes #14975.
* Podspec: add InspectorInterfaces.h/cpp to the "jschelpers_legacy" subspec.

1. lint the Podspecs: `./scripts/process-podspecs.sh`
2. check that an iOS project can integrate "DevSupport" via Cocoapods again. I'll already checked it on this branch of the demo project: https://github.com/HeEAaD/Demo-ReactNative-0.47.0-rc2-Podspec-issue/tree/fix
Closes https://github.com/facebook/react-native/pull/14988

Differential Revision: D5411733

Pulled By: javache

fbshipit-source-id: bb46cf3461e0857c7508264dafa204067af182c6
2017-07-12 16:27:28 -07:00
Pieter De Baets 6c2beaffdc Fix Travis podspec CI for Cxx bridge
Summary:
Fixed the test script to properly setup our third-party deps and tweaked the third-party specs a bit so they work correctly.

This currently works for projects using static libraries, but fails when using dynamic libraries (`--use-libraries`)

cc mhorowitz alloy
Closes https://github.com/facebook/react-native/pull/14100

Differential Revision: D5380728

Pulled By: javache

fbshipit-source-id: e78b6bd4466ebf2bf30b7e361eff10ec14b36a55
2017-07-07 02:32:07 -07:00
Marc Horowitz f3f44eee59 Work around the broken way CocoaPods/Xcode deals with header maps
Summary:
See https://github.com/facebook/react-native/issues/14326 for the bug
this fixes.  This is a pretty ugly hack to work around what I think is
a CP bug.  Since the C++ dependencies are only needed to build RN
itself, and not applications, don't the conflicting headers as source
files.  Instead, use preserve_paths to get them unpacked into the
source tree under Pods/<Pod>, and arrange for them to get used with
HEADER_SEARCH_PATHS.  This keeps them out of the project, so they
don't get included in the header map, and other (badly structured)
projects don't get confused.

Reviewed By: javache

Differential Revision: D5254716

fbshipit-source-id: cf33dcbcc71b5247843650c33ccf4fb08378e584
2017-06-15 13:05:04 -07:00
Pieter De Baets 33e22486e9 Fix some issues with the React podspec for the Cxx bridge
Summary:
Trying to fix the RN Travis CI tests

Splitting off from https://github.com/facebook/react-native/pull/14100
Closes https://github.com/facebook/react-native/pull/14132

Reviewed By: ericvicenti

Differential Revision: D5112077

Pulled By: javache

fbshipit-source-id: cf030b927b0f28f2b494471498f1ddb2c0a5c1df
2017-05-30 11:15:19 -07:00
Vjeran Crnjak 7b7d6bb158 React.podspec fix for RCTAnimation header issue
Summary:
Fixes issue described #13198

Simpler, compared to #13217

Build no longer fails on not being able to find `RCTAnimation/RCTValueAnimatedNode.h`.
Closes https://github.com/facebook/react-native/pull/13785

Differential Revision: D5017734

Pulled By: javache

fbshipit-source-id: e398f74e0fbb1a8f5a43d0a80a4cd3a3587c81b3
2017-05-09 11:17:41 -07:00
Marc Horowitz 5aca739cc2 BREAKING - Update podspecs to support and default to the C++ bridge
Summary:
This will require people who use CocoaPods to update their Podfiles.  You can see an example of a Podfile set up to use the Cxx bridge here: https://github.com/mhorowitz/native-navigation-boilerplate/blob/master/ios/Podfile
If this doesn't work, you can continue to use the old bridge by adding a dependency of 'BatchedBridge' to the React subspecs in your Podfile, but this will stop working once the old bridge is removed.

Reviewed By: javache

Differential Revision: D4981920

fbshipit-source-id: 7c4f3bf1c3f9af3f934f03ec003a05d0cd3cb259
2017-05-03 14:52:56 -07:00
Pieter De Baets db8efd9c4b Split off websocket related items to RCTPackagerConnection
Reviewed By: cwdick

Differential Revision: D4588557

fbshipit-source-id: 3f4176b9bab2b06cacbb06f1ff514a5f99a76d73
2017-04-20 08:32:10 -07:00
Eloy Durán 09b8ef41e1 Fix issue with whitespace in path to source and stabilise CI.
Summary:
* Fixes issue where headers could not be found due to whitespace in an unquoted header search path. https://github.com/facebook/react-native/issues/11781#issuecomment-287176373
* Stabilises CI but not needing to download the source for Yoga, but use the existing cloned repo instead.

/cc mkonicek
Closes https://github.com/facebook/react-native/pull/13007

Differential Revision: D4735347

fbshipit-source-id: 933aefcb0e65537d2e759d25f4e3b81cdf4b8cb5
2017-03-18 12:31:37 -07:00
Martin Konicek a8bd4621af Try to fix tvOS and podspec builds
Summary: Closes https://github.com/facebook/react-native/pull/12866

Differential Revision: D4691348

Pulled By: ericvicenti

fbshipit-source-id: df7d611aa4ed3fed6158d2210a0403c90875b7c3
2017-03-10 13:17:18 -08:00
Eloy Durán 19caaba1d5 Fixes current CI failures and allows tree shaking of native dev support code.
Summary:
* The dev support code moved into a `DevSupport` subspec, meaning that only if the subspec is specified in the user’s Podfile will the packager client, dev menu, etc be included. This is mainly done through checks for header availability.

  It also improves the weird situation where you had to specify the `RCTWebSocket` subspec if you wanted to be able to use the packager client during development.

* I removed hardcoding the release version in the podspec on release, because the podspec still relies on `package.json` when evaluating, so there’s no real point in not also getting the version number from there. This should remove any requirement to perform maintenance of the OSS release script regarding the podspec.
Closes https://github.com/facebook/react-native/pull/12602

Differential Revision: D4621021

Pulled By: ericvicenti

fbshipit-source-id: 6c208371fc40ea607809a6ab05dd3714ed9980cf
2017-02-27 14:04:58 -08:00
Eloy Durán 031cb2045d Make podspec great again.
Summary:
Fixes #11272
Fixes #11572
Fixes #11781

The main changes here are:

* This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a proper release is expected soon. /cc dantoml
* Adds required header search paths for the jschelpers and cxxreact subspecs.
* Makes the jschelpers and cxxreact headers private to building React Native, not visible to the user’s project.
* It uses the canonical upstream Yoga v1.0.0 podspec: https://github.com/facebook/yoga/blob/master/Yoga.podspec
* Consistent styling.

I have been able to get our app to build again using this https://github.com/artsy/emission/pull/437. The spec has some warnings, but otherwise fully passes lint.

rh389 sjmueller Could you please test with your projects?
Closes https://github.com/facebook/react-native/pull/12089

Differential Revision: D4518605

fbshipit-source-id: ecf86232d8b1af52d139eadd1acc10f5c1d42c29
2017-02-06 16:30:00 -08:00
James Ide 0d78bba7fe Stop copying unused JS files into the Pods folder
Summary:
Currently the podspec copies JS files along with the associated Obj-C files (ex: PushNotifications.m and PushNotifications.js are copied together). However the packager looks at `node_modules`, not `Pods`, for the JS source files so these copied JS source files (plus JS unit tests) were always ignored and are cruft.

This is documented as a breaking change but I suspect it won't affect most (if any) configurations. For this to have been useful, you would have had to have had been running the packager under `Pods/..some path to RN../cli.js` instead of with `npm start` or `node_modules/react-native/cli.js`.
Closes https://github.com/facebook/react-native/pull/11761

Differential Revision: D4404934

fbshipit-source-id: a9f372a74f7acb962581f929647e82eae185c5ba
2017-01-11 12:43:34 -08:00
Tomas Roos 6e9fe3707a Fixes podspec for master #11640
Summary:
Currently the master Podspec is broken because tvOS files are being included, to avoid this compile error the file is being excluded.

c92ad5f6ae

Thats the commit which introduced the breakage anything later that that will fail. Aka RN 0.41 will fail because of this.

**Test plan (required)**

Tested on new project against master

// cc ide
Closes https://github.com/facebook/react-native/pull/11667

Differential Revision: D4375453

Pulled By: ericvicenti

fbshipit-source-id: 035cdb8ef36054b40d1aaf59551cdc2e16f0cb19
2017-01-06 17:13:31 -08:00
James Ide 01af9ee8a7 Make Core subspec use a Ruby string array for exclude_files
Summary:
For consistency (and maybe correctness?) use an array instead of a string with spaces in it for the `exclude_paths` value in the Podspec.
Closes https://github.com/facebook/react-native/pull/11664

Differential Revision: D4374863

fbshipit-source-id: b81773f418bd46d846bb935e038d240c98c0b71a
2016-12-29 19:13:23 -08:00
Emil Sjolander 7f8c2985a8 Rename directories
Reviewed By: gkassabli

Differential Revision: D4284681

fbshipit-source-id: f0c6855c2c6e4389b7867f48f72cbb697830fc5a
2016-12-07 05:14:12 -08:00
Pieter De Baets f2a46b17d4 Replace RCTJSCWrapper with JSCWrapper from ReactCommon
Reviewed By: mhorowitz

Differential Revision: D4204516

fbshipit-source-id: 6bcb122daf2848035dfae404ee7a2e9aca0f8087
2016-11-23 11:43:48 -08:00
Pieter De Baets 7c91f894ba Fix CSSLayout import hack, update podspec
Summary: Correct header import paths, update podspec so we point at the copy in ReactCommon (and can eventually remove the copy under React)

Reviewed By: astreet

Differential Revision: D4204501

fbshipit-source-id: e979a010092f025b2cdc289e1e5f22fc7b65a8d1
2016-11-21 09:13:36 -08:00
James Ide fc11a5fde8 Add support for native animated events on iOS
Summary:
This adds native support for `Animated.event` on iOS.

**Test plan**
Tested in the native animated UIExplorer example that it works properly like on Android.
Closes https://github.com/facebook/react-native/pull/9598

Differential Revision: D4110331

fbshipit-source-id: 15748d23d0f475f2bcd1040ca3dca33e2620f058
2016-11-01 03:58:53 -07:00
Andrew Nicolaou 25e048ba3a Add .mm to RCTNetwork subspec
Summary:
Without this, `Libraries/Network/RCTNetworking.mm` is not matched,
causing a "Native module cannot be null" error when integrating into
an existing Swift iOS project.

I've tested this fix with an iOS Swift project following the
"Integration With Existing Apps" [1] tutorial and the error does
not appear.

[1] https://facebook.github.io/react-native/docs/integration-with-existing-apps.html
Closes https://github.com/facebook/react-native/pull/9904

Differential Revision: D3873011

fbshipit-source-id: d69395190d3865aa1fc87966a37981b53beea115
2016-09-15 14:58:51 -07:00
rh389 6e216d2034 Include CSSLayout.h consistently with other project includes
Summary:
Include CSSLayout headers in the same way as other project headers, ie `#import <CSSLayout/CSSLayout.h>` becomes `#import "CSSLayout.h"`. CSSLayout is not a framework or system dependency, so shouldn't (AFAIK) be included with angle brackets. Doing so breaks framework builds, such as when RN is used as a pod in a swift project.

In combination with https://github.com/facebook/css-layout/pull/217 this fixes https://github.com/facebook/react-native/issues/9014 (specifically swift cocoapods projects). There is then no need for a separate CSSLayout pod subspec.

Tests run on the RN project in isolation (with changes inside `CSSLayout` itself also applied) and against a dummy swift project with RN included as a pod.

NB: This effectively reverts https://github.com/facebook/react-native/pull/9015 and may break non-swift cocoapods projects unless https://github.com/facebook/css-layout/pull/217 is merged and synced first.

Update: As discussed with alloy and emilsjolander, wrap these imports in a preprocess
Closes https://github.com/facebook/react-native/pull/9544

Differential Revision: D3821791

Pulled By: javache

fbshipit-source-id: d27ac8be9ce560d03479b43d3db740cd196c24da
2016-09-06 09:13:39 -07:00
James Ide ee89ffcb17 Create a CSSLayout subspec that preserves the header directories
Summary:
RN imports CSSLayout files like so: `#import <CSSLayout/CSSLayout.h>`, so we need to tell CocoaPods to preserve the directory structure for CSSLayout files. This is done with the header_mappings_dir, but we want it to apply just to CSSLayout's files, hence the subspec.
Closes https://github.com/facebook/react-native/pull/9015

Differential Revision: D3621727

fbshipit-source-id: fb3603a0820ca3d6502813204ff215cf160b1955
2016-07-26 11:58:52 -07:00
Jan Monschke f51fc36ebc remove unneeded preserve_paths declaration
Summary:
The subspec for `RTCAnimation` defines a `preserve_paths` attribute of `Libraries/NativeAnimation/*.js` (https://github.com/facebook/react-native/blob/master/React.podspec#L60) but there is no JavaScript file in that repository. Linting the podspec therefore fails. The fix was to simply remove `preserve_paths` for this subspec.
Closes https://github.com/facebook/react-native/pull/8626

Differential Revision: D3529959

fbshipit-source-id: b187f6ce3898493d9f6a03960caf5ec25c9e4ac2
2016-07-07 13:14:00 -07:00
Joel Arvidsson 4a15dc814e Add RCTAnimation to Podspec
Summary:
**Motivation**

This PR adds a subspec for the `NativeAnimation` iOS library which so one can use it with CocoaPods.

**Test plan (required)**

Tested with the code in `NativeAnimationsExample.js` and this:
```
pod 'React', :subspecs => ['Core', 'RCTAnimation'], :path => 'node_modules/react-native'
```
Closes https://github.com/facebook/react-native/pull/8487

Differential Revision: D3502970

fbshipit-source-id: 0958acdbe088da8b50a1e5e3661f27b64db329c1
2016-06-30 01:43:22 -07:00
Eloy Durán 3ba232f8fb Add C++ and standard v14 settings.
Summary:
This PR adds the C++ stdlib to the linker flags and sets the C++ standard that’s used to v14.

I have tested this with my app, without it any CP build would fail unless users add those flags to the generated projects themselves.

/cc grabbou
Closes https://github.com/facebook/react-native/pull/7800

Differential Revision: D3360421

fbshipit-source-id: 0a80030dd255f073a201acc6e1c846be114c2c2a
2016-05-27 13:58:31 -07:00
Alexey Lang 5b090dd52c Add .mm to React.podspec
Reviewed By: javache

Differential Revision: D3212710

fb-gh-sync-id: 1ab4a3d5943e154b1662b638d8c7c4b9c6ad2476
fbshipit-source-id: 1ab4a3d5943e154b1662b638d8c7c4b9c6ad2476
2016-04-22 10:16:46 -07:00
Jesse Luo ef044e2c0d Fix failure of `pod lib lint`, which will close #6448. Tested on 0.23.0.
Summary:The subspec should declare enough dependencies. Or the lint of podspec file will fail because CoaoaPods will not import necessary source on the building step.
Closes https://github.com/facebook/react-native/pull/6955

Differential Revision: D3174681

fb-gh-sync-id: 59315efaeeb949951d7ee8e55dc7c979fcea4fbf
fbshipit-source-id: 59315efaeeb949951d7ee8e55dc7c979fcea4fbf
2016-04-13 12:26:29 -07:00
Ian MacLeod 97d15f7f0a Have CocoaPods read some values from package.json
Summary:Allows you to keep versions, descriptions in sync
Closes https://github.com/facebook/react-native/pull/6576

Differential Revision: D3110926

fb-gh-sync-id: 7f1a2071feff5918e09f6c252ff9770f2f53130f
fbshipit-source-id: 7f1a2071feff5918e09f6c252ff9770f2f53130f
2016-03-29 13:24:18 -07:00
Gabriel Reis 4c49db4489 Set podspec version to be greater than zero
Summary:Cocoapods requires that the version should be greater than zero. So if you have your react-native dependency pointing to the master repo it will fail when you pod install.
Closes https://github.com/facebook/react-native/pull/6381

Differential Revision: D3032151

fb-gh-sync-id: 0ba820b8e746e7f03e963f292ec8ccf55263dcc7
shipit-source-id: 0ba820b8e746e7f03e963f292ec8ccf55263dcc7
2016-03-09 15:18:02 -08:00
James Ide 66cd8f71eb Set the versions in package.json and React.podspec to 0.0.0-master
Summary:
The current versions in these files is 0.12.0, which is out of date. Better to claim no version than the wrong version, so this diff changes the versions to 0.0.0-master.

Release branches will still have the correct versions.
Closes https://github.com/facebook/react-native/pull/5241

Reviewed By: svcscm

Differential Revision: D2819277

Pulled By: javache

fb-gh-sync-id: 99d4682e5d1f571e241f306caf309b2944483909
2016-01-13 06:15:01 -08:00
panjianjun 54470021ca remove prepare_command in podspec file
Summary: since 0.13.2 , prepare_command in podspec would download the dependencies of react-native again when you install react-native via cocoapods with local path.
Closes https://github.com/facebook/react-native/pull/4291

Reviewed By: svcscm

Differential Revision: D2685452

Pulled By: nicklockwood

fb-gh-sync-id: b1c1a0f45897d3eb45be99db3633c899c35feb8e
2015-11-23 01:20:29 -08:00
Andreas Amsenius 0e4bd91db7 Add RCTCameraRoll cocoapod subspec
Summary: Struggled for some time to figure out why CameraRoll could not (anymore, upgraded from RN 0.11 iirc) be used in a cocoapods setup. This was the cleanest way to make it work, is it a bad idea for some reason?
Closes https://github.com/facebook/react-native/pull/4230

Reviewed By: svcscm

Differential Revision: D2674063

Pulled By: nicklockwood

fb-gh-sync-id: 3d9e6a8ac1834d05ad807ff1fea1b89a724b9cc8
2015-11-19 01:28:25 -08:00
James Ide b73bf16349 Add .S files to the Pod
Summary: These need to be included while building with CocoaPods.
Closes https://github.com/facebook/react-native/pull/3753

Reviewed By: svcscm

Differential Revision: D2595296

Pulled By: tadeuzagallo

fb-gh-sync-id: f2e2ba729c92c52808ed1b7d23c31f6fa7b9d891
2015-10-29 02:11:29 -07:00
Param Aggarwal 8e03dfc99e Expose RCTTest for consumers via CocoaPods
Summary: Enables using `RCTTestRunner` in app code.
Closes https://github.com/facebook/react-native/pull/3382

Reviewed By: @​svcscm

Differential Revision: D2536089

Pulled By: @nicklockwood

fb-gh-sync-id: 35d3e57e43ac94ad3e6abf6852bf963c9dd2e1c9
2015-10-13 07:39:24 -07:00
Mikhail Chinyakov aa8ead7cd6 Fix build process for react-native-fbsdk libraries.
Summary: I found the problem with building react-native-fbsdk (https://github.com/facebook/react-native-fbsdk) libraries when I used cocoapods.
When we use the option 'header_mappings_dir = "."' , header files of React will be copied with subfolders structures, not into one folder "${PODS_ROOT}/Headers/Public/React". And we should add recursive search and write "${PODS_ROOT}/Headers/Public/React/**". However writing code in auto-generated files is not good idea.
Closes https://github.com/facebook/react-native/pull/3248

Reviewed By: @​svcscm

Differential Revision: D2528021

Pulled By: @vjeux

fb-gh-sync-id: 4ea76eac4035f0bd7c5894f604f84f903714a4e3
2015-10-09 14:40:43 -07:00