Commit Graph

13 Commits

Author SHA1 Message Date
henter 2a76ca635e [GeoLocation] invalidate timer after success or error callback
Summary:
Just trying to [getCurrentPosition](https://github.com/facebook/react-native/blob/master/Libraries/Geolocation/Geolocation.js#L45) , and found the `errorBlock` of location request in timeout handler would cause red error like this:

```
2015-05-10 17:50:39.607 [warn][tid:com.facebook.React.JavaScript] "Warning: Cannot find callback with CBID 5. Native module may have invoked both the success callback and the error callback."
2015-05-10 17:50:39.610 [error][tid:com.facebook.React.JavaScript] "Error: null is not an object (evaluating 'cb.apply')
 stack:
  _invokeCallback  index.ios.bundle:7593
  <unknown>        index.ios.bundle:7656
  <unknown>        index.ios.bundle:7648
  perform          index.ios.bundle:6157
  batchedUpdates   index.ios.bundle:13786
  batchedUpdates   index.ios.bundle:4689
  <unknown>        index.ios.bundle:7647
  applyWithGuard   index.ios.bundle:882
  guardReturn      index.ios.bundle:7421
  processBatch     index.ios.bundle:7646
 URL: http://192.168.100.182:8081/index
Closes https://github.com/facebook/react-native/pull/1226
Github Author: henter <henter@henter.me>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-26 14:59:14 -08:00
Tadeu Zagallo 09460cf21b [ReactNative] Use explicit doubles on RCTLocationOptions to avoid NSInvocation bug 2015-05-02 14:19:56 -08:00
Tadeu Zagallo 136431cc2f [ReactNative] Fix struct args on exported methods 2015-04-27 04:01:37 -08:00
Nick Lockwood fc6e209223 Fixed broken struct arguments 2015-04-22 13:25:53 -08:00
Nick Lockwood 5ce9fa4dda Changed default method queue to a background queue. 2015-04-20 12:02:04 -08:00
Nick Lockwood ead0f2e020 Implemented thread control for exported methods 2015-04-18 11:13:39 -08:00
Brent Vatne 17ab4f2fb3 Ensure that NSLocationWhenInUseUsageDescription is set, throw error if not
Summary:
As per #750, throw error when trying to use the geolocation module and this key is not set. cc @frantic
Closes https://github.com/facebook/react-native/pull/762
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-08 21:28:16 -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
Alex Akers 293b9b9a7f [React Native] Fix incorrect if-statement in RCTGeolocation 2015-03-26 05:18:49 -08:00
Christopher Chedeau 1aeb02ada3 [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
Jiajie Zhu b2bf4b88bf [catalyst|madman] fix location observer 2015-03-13 10:02:34 -08:00
Tadeu Zagallo 403fbd66c3 [ReactNative][tmp] Rename GeoLocation2 files back to Geolocation 2015-03-10 09:01:11 -08:00