37 Commits

Author SHA1 Message Date
Pieter De Baets
9b1f6c9e30 Make RCTTestRunner wait for JS context to deallocate 2015-09-04 03:24:16 -08:00
Felix Oghina
53fc5624e4 [reactnative] send platform arg with all packager requests 2015-08-29 06:36:18 -08:00
Nick Lockwood
88e0bbc469 Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
Nick Lockwood
26c4be62c8 Fixed test flakiness due to a race condition with RCTRedBox
Summary:
The test runner relied on checking the current error message in the RCTRedbox, which is a singleton (yay, shared mutable state!). This lead to some tests that worked individually but failed when run together due to error messages in RCTRedBox left over from previous tests.

I've replaced the call to -[RCTRedBox currentErrorMessage] by injecting a custom logging function to intercept the errors at source, which is a much more reliable solution.
2015-08-19 03:41:31 -07:00
Nick Lockwood
8d1e02b8bd Convert alloc/init to new to please linter 2015-08-17 08:46:00 -07:00
Pieter De Baets
261f9434e5 Avoid dispatch_async in RCTRootView when bridge has already started
Summary:
There's no good reason for initialProperties to be mutable after the RCTRootView has been created. Passing it in through the constructor means we can skip one dispatch_async.
2015-08-17 05:34:25 -07:00
Nick Lockwood
ef5cec4f08 Text highlighting on iOS
Summary:
This diff implements highlighting of tapped text subranges for the iOS `<Text>` component, styled to match how iOS webkit views highlight links (translucent grey overlay with rounded corners).

Highlighting is enabled by default for any `<Text>` component which has an onPress handler. To disable the highlight, add `suppressHighlighting={true}` to the component props.
2015-07-24 08:41:58 -08:00
Nick Lockwood
1b7699f671 Migrate unit tests from FBReactKitModules to FBReactKit 2015-07-07 16:39:35 -08:00
Alex Akers
aba148061f [React Native] Re-alphabetize file names in Xcode projects
Summary:
Fixes my OCD problems.
2015-07-06 01:57:06 -08:00
James Ide
e3225f3403 [Bridge] Support nullability annotations in bridged methods
Summary:
Fixes a crash due to the selector regex not knowing about the nullability annotations. Adds support for both the core annotations `__nullable` and `__nonnull` plus their shorthand counterparts `nullable` and `nonnull`.

Objective-C allows the shorthand versions only at the front of a parameter type declaration like `(nullable NSString *)` but the regex will pick up `(NSString * nullable)` too. This shouldn't cause any adverse effects and I left the code this way to keep the regex readable.

Fixes #1795

Closes https://github.com/facebook/react-native/pull/1796
Github Author: James Ide <ide@jameside.com>

Test Plan:
 Wrote a bridge method that uses a nullability annotation and verified that it didn't cause the app to crash:
```
RCT_EXPORT_METHOD(method:(nullable NSNumber *)reactTag)
{
}
```

Also added a nullable annotation to RCTTest.
2015-06-30 04:17:20 -08:00
Alex Kotliarskyi
64d7933e66 [ReactNative] Ignore _UILayoutGuide in tests 2015-06-25 08:09:13 -08:00
Nick Lockwood
6573d256ba Improve test architecture so failures don't crash the simulator 2015-06-17 07:09:23 -08:00
Nick Lockwood
650fc9de4c Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues
Summary:
@public

I've increased the warning levels in the OSS frameworks, which caught a bunch of minor issues. I also fixed some new errors in Xcode 7 relating to designated initializers and TLS security.

Test Plan:
* Test the sample apps and make sure they still work.
* Run tests.
2015-06-15 07:52:50 -08:00
Tadeu Zagallo
6358e163a5 [ReactNative] Revert async exports changes to MessageQueue + test
Summary:
@public

`[Bridge] Add support for JS async functions to RCT_EXPORT_METHOD` was imported but broke some internal code, reverting the `MessageQueue` that caused the issues and add a test, since the method is not used yet.

Test Plan: Run the test o/
2015-06-09 14:25:32 -08:00
Tadeu Zagallo
1a564eed77 [ReactNative] Run UIExplorer tests on sandcastle 2015-06-05 05:36:06 -08:00
Andy Street
435125f4a0 Revert "[ReactNative] Run UIExplorer tests on sandcastle" 2015-06-03 10:57:19 -08:00
Tadeu Zagallo
e1454c29c5 [ReactNative] Run UIExplorer tests on sandcastle 2015-06-03 06:24:12 -08:00
Spencer Ahrens
32666f0aa2 [ReactNative] Add AppEventsTest 2015-05-20 00:31:50 -08:00
Alex Kotliarskyi
735f67337a [ReactNative] Fail faster in OSS tests 2015-05-06 09:33:20 -07:00
Tadeu Zagallo
132a9170f1 [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
Nick Lockwood
eb0476074f Improved debug and fixed macros 2015-04-30 09:59:16 -08:00
Tadeu Zagallo
d293bed5ab [ReactNative] Fix analyze errors on oss 2015-04-24 08:28:35 -08:00
Nick Lockwood
b1a15004de Fixed release builds on UIExplorer 2015-04-21 18:22:34 -08:00
Nick Lockwood
ead0f2e020 Implemented thread control for exported methods 2015-04-18 11:13:39 -08:00
guru inamdar
7a68691686 MapView to support MKPointAnnotation using new attribute annotate in Map...
Summary:
### MapView to support Pin annotation

    var pinLocation = {
			latitude: property.latitude,
			longitude: property.longitude,
			title: property.title
    };
    this.state = {propertyPoint: pinLocation};
    <MapView style={styles.map} region={this.state.region} annotate={this.state.propertyPoint}>
    </MapView>
![mapview-pinannotation](https://cloud.githubusercontent.com/assets/845379/7100280/6c1ffc08-dfe5-11e4-9d1b-8da6a65da1bc.png)

Closes https://github.com/facebook/react-native/pull/810
Github Author: guru inamdar <guru.inamdar@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-14 18:03:37 -08:00
Nick Lockwood
26fd24dc50 Cleanup 2015-04-11 14:19:49 -08:00
Alex Akers
8a57c4e980 [React Native] RCT_EXPORT lvl.2 2015-04-08 08:34:10 -08:00
Nick Lockwood
bf4868edda Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Tadeu Zagallo
f370f9cbc4 [ReactNative] Unfork RKRootView 2015-04-02 07:12:42 -08:00
laiso
e35521300a (Xcode) Set indent=2 in all xcodeproj files.
Summary:
These are default settings now.
I saw my Xcode be configured indent=4.

![2015-03-30 12 16 11 pm](https://cloud.githubusercontent.com/assets/39830/6889697/98f8b930-d6d6-11e4-81c8-d2146855d127.png)

Closes https://github.com/facebook/react-native/pull/472
Github Author: laiso <laiso@lai.so>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-01 17:14:45 -08:00
Tadeu Zagallo
20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
Tadeu Zagallo
8679c0bc96 [ReactNative] Add deep linking api 2015-03-25 19:01:08 -08:00
Spencer Ahrens
15f6783f34 [ReactNative] Add snapshot tests for examples 2015-03-24 21:48:49 -08:00
Spencer Ahrens
3f137da232 [ReactNative] OSS snapshot tests 2015-03-24 10:16:15 -08:00
Christopher Chedeau
1aeb02ada3 [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
Christopher Chedeau
f8f3f67bed [ReactNative] Increase timeout for obj-c tests 2015-03-17 08:33:42 -08:00
Spencer Ahrens
3cc81c6561 [ReactNative] Add integration test stuff 2015-03-13 18:03:34 -08:00