Skip to content

Native Wrapping - Geolocation API Spike #43

@JoeStanton

Description

@JoeStanton
Contributor

I've been messing around in my fork to try and understand the JS->Obj-C bridge, and the process for wrapping native code. I've wrapped CoreLocation in the WC3 Geolocation API as a first attempt.

I figured it would be great to get a bit of feedback on it, and some others might find it useful. It would be great if I could help document the process. I've got absolutely no Obj-C experience, so not sure if this is terrible or not.

Pull Request: JoeStanton#1

Activity

nick

nick commented on Feb 4, 2015

@nick

Awesome - I'll give it a whirl on my Weather example. @vjeux mentioned that there is already a location API internally that they were planning on exposing soon - not sure what approach that will take.

vjeux

vjeux commented on Feb 5, 2015

@vjeux
Contributor

Our API looks like that right now FYI

class GeoLocation {
  static getCurrentPosition(geo_success, geo_error, geo_options)
  static watchPosition(callback)
  static clearWatch(watchID)
  static stopObserving()
}
JoeStanton

JoeStanton commented on Feb 5, 2015

@JoeStanton
ContributorAuthor

Thanks @vjeux. Good to know you're using a similar approach.

Is exposing Facebook's Geolocation API near-future or does it make sense to keep working on mine for now? I don't plan to get it merged as my Obj-C is probably awful. ;)

Also, would this belong in React Core?

vjeux

vjeux commented on Feb 5, 2015

@vjeux
Contributor

We're going to port back our version to github soon, so we're unlikely going to use yours sorry :( I hope this was a good learning experience though. There's a bunch of other apis that will need to be bridged in a similar fashion so your skills won't be lost

JoeStanton

JoeStanton commented on Feb 5, 2015

@JoeStanton
ContributorAuthor

Hah no worries! I knew it wouldn't. Was just for the learning experience. Maybe I can assist with writing some docs when you start, and yeah I'll look at other API's as and when I need them.

added a commit that references this issue on Aug 5, 2015
locked as resolved and limited conversation to collaborators on May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nick@vjeux@JoeStanton@react-native-bot

        Issue actions

          Native Wrapping - Geolocation API Spike · Issue #43 · facebook/react-native