Group Group Group Group Group Group Group Group Group
raywenderlich.com Forums

Augmented Reality iOS Tutorial: Location Based

Learn how to make a location based augmented reality app that displays points of interest over video in this augmented reality iOS tutorial!


This is a companion discussion topic for the original entry at http://www.raywenderlich.com/42266/augmented-reality-ios-tutorial-location-based

Hi,
i was trying to run the source code of “augmented reality ios tutorial: location based”
it shows me three errors.Can you please fix it out for me…

Here is the snapshot of the errors

Hi @purvac,

sorry for the late reply but for some reason i didn’t receive a notification about your post. If you had a look in the old forums you may have found an answer. If not try to replace the code with this:

int index = [_locations indexOfObjectPassingTest:^(Place *obj, NSUInteger index, BOOL *stop) {
      return [[obj location] isEqual:location];
 }]

Pierre

Dear @pierredrks

Thank you for sharing this great tutorial. I know this might be a lot to ask, but would it be possible to provide an updated code in Swift. As I’ve started learning iOS development from when Swift language began to take over, and I’m not familiar with Objective C.

Finally is it possible for me to use the code of this tutorial to make 3D graphics and animation appear on the iphone camera, using geolocation AR principles, or does the existing code and AR toolkit not quite support such features? If not, could you recommend the best AR geolocation POI for 3D graphics that works on iOS platform, and would be a bonus if it works on other platforms as well.

Many thanks in advance,

Hi @hazzaldo

i don’t think that there is an update planned in the near future. You can find an ARToolkit for Swift here. It seems to be similar to the one that is used in this tutorial and maybe the demo project can help you. 3D is not supported but you can try to modify the code and add for example a Scene Kit view.

This is another free AR SDK that supports other platforms and 3D, but no location based AR.

1 Like

Thanks @pierredrks. Which AR SDK would you say has the best capabilities for achieving features of Geo-spatial AR for 3D objects - features that have been implemented in apps such as Ingress and Pokemon Go.

@hazzaldo This depends on how you want the navigation to a POI. If you don’t need to show markers, like it is done in this tutorial artoolkit will work. In this case you could use Maps to show your POIs. If you want markers a mixture of both toolkits could work or you extend the first one with 3D capabilities.

@pierredrks How would you calculate the distance between 2 phones? I have tried bluetooth, map pin pointing, but all of that does not work well since it is not precise when it comes to <30meter range. Thank you.

Hi thanks for the tutorial . I followed the above tutorial to make a sample app which will show markers depending upon the location coordinates for the objects(like a building) .I’m able to show my custom markers on the given location .But ,Currently my markers are floating around the location.How can fix my marker to show on the top of the building .?

Any suggestion or advice…

Thanks in advance!!!

Is ARToolkit Library that you have shared written in Swift available for android as well? I have completed a project using the library that you have provided (written in swift). Now i need the same project in Android as well. But i cant seem to find any reference that provides location based AR for android. (ARtoolkit for android also provides only marker based samples). It would be great if you can provide any help… … thank you

Hi, sorry but i don’t know any location based AR Library for Android.

Sample app that you have provided is not working fine. I am in India and i want to see “Schloss Braunfels” in this app but i am not able to see. Please help !!!

The sample app loads points based on your current location, if you want to see “Schloss Braunfels”, “Time Square” or any other point you have to options.

  1. Move to the location that point is.
  2. Fake your current position and use this for “Schloss Braunfels” latitude: 50.5186, longitude: 8.3904

Suppose we have our own custom area in about 100 meters having 7 cubicles with some cubicle number. Their distance should be calculated from our position and their name and image we will provide along with the cubicle number. How to do that ??

Thanks pierredrks, This tutorial is perfect.

I have tried the tutorial before and it works. Recently, I tried on iOS9 and Xcode7, it does not work. The main reason is that the accelerometer is deprecated. There are some small things too. I have fixed it according to your original code.

I would like to share the code with others as you have done for all of us. Can you guide me how to do that? Thanks.

1 Like

hello…help me :slight_smile: I want to make location based augmented reality with 3D object using android. What android SDK use it and the tutorial

Hi Jesse. I would be very interested in seeing your modified code. Would it be possible to setup a github repository and/or contacting me at dnetsteve at aim dot com. Thank you so much.

Yes, if you can, please share what you have changed! Thank you.

Nice tutorial, but we need it in swift, is it possible to recreate it using swift? or is there any other tutorial like this using swift? Please help.

Thank you

Where did you set the POIs? where they are loaded from? need your reply and more clarification if possible.
thank you for great tutorial.