# Augmented Reality iOS Tutorial: Location Based

**URL:** <https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907>\
**Category:** 🎓 Courses & Articles\
**Created:** [February 28, 2016, 8:09pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907 "2016-02-28T20:09:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierredrks](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pierredrks/32/104353_2.png) [@pierredrks](https://forums.kodeco.com/u/pierredrks)\
**Post date:** [February 28, 2016, 8:09pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/1 "2016-02-28T20:09:50Z")

</div>

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](http://www.raywenderlich.com/42266/augmented-reality-ios-tutorial-location-based)

---

<div class="post-metadata">

**Author:** ![purvac](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/purvac/32/3310_2.png) [@purvac](https://forums.kodeco.com/u/purvac)\
**Post date:** [March 1, 2016, 8:29pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/2 "2016-03-01T20:29:03Z")

</div>

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

 ![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/2X/0/01e96b6168007837f9af7245573fff2ba9410e92.png)

---

<div class="post-metadata">

**Author:** ![pierredrks](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pierredrks/32/104353_2.png) [@pierredrks](https://forums.kodeco.com/u/pierredrks)\
**Post date:** [March 16, 2016, 12:44pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/3 "2016-03-16T12:44:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hazzaldo](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@hazzaldo](https://forums.kodeco.com/u/hazzaldo)\
**Post date:** [July 19, 2016, 2:34pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/4 "2016-07-19T14:34:06Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![pierredrks](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pierredrks/32/104353_2.png) [@pierredrks](https://forums.kodeco.com/u/pierredrks)\
**Post date:** [July 20, 2016, 6:36am UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/5 "2016-07-20T06:36:55Z")

</div>

Hi @hazzaldo

i don’t think that there is an update planned in the near future. You can find an ARToolkit for Swift [here](https://github.com/DanijelHuis/HDAugmentedReality). 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](https://artoolkit.org) is another free AR SDK that supports other platforms and 3D, but no location based AR.

---

<div class="post-metadata">

**Author:** ![hazzaldo](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@hazzaldo](https://forums.kodeco.com/u/hazzaldo)\
**Post date:** [July 26, 2016, 2:47pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/6 "2016-07-26T14:47:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pierredrks](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pierredrks/32/104353_2.png) [@pierredrks](https://forums.kodeco.com/u/pierredrks)\
**Post date:** [July 26, 2016, 3:18pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/7 "2016-07-26T15:18:12Z")

</div>

@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](https://artoolkit.org/) 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.

---

<div class="post-metadata">

**Author:** ![emilianoq](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/emilianoq/32/37877_2.png) [@emilianoq](https://forums.kodeco.com/u/emilianoq)\
**Post date:** [July 28, 2016, 6:24pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/8 "2016-07-28T18:24:29Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![sugan](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sugan/32/38069_2.png) [@sugan](https://forums.kodeco.com/u/sugan)\
**Post date:** [August 1, 2016, 9:39am UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/9 "2016-08-01T09:39:30Z")

</div>

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!!!

---

<div class="post-metadata">

**Author:** ![nabin23](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nabin23/32/42012_2.png) [@nabin23](https://forums.kodeco.com/u/nabin23)\
**Post date:** [September 21, 2016, 5:08am UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/10 "2016-09-21T05:08:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pierredrks](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pierredrks/32/104353_2.png) [@pierredrks](https://forums.kodeco.com/u/pierredrks)\
**Post date:** [September 21, 2016, 12:13pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/11 "2016-09-21T12:13:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shubham321](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shubham321/32/36702_2.png) [@shubham321](https://forums.kodeco.com/u/shubham321)\
**Post date:** [September 26, 2016, 9:08am UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/12 "2016-09-26T09:08:44Z")

</div>

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 !!!

---

<div class="post-metadata">

**Author:** ![pierredrks](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pierredrks/32/104353_2.png) [@pierredrks](https://forums.kodeco.com/u/pierredrks)\
**Post date:** [September 26, 2016, 9:28am UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/13 "2016-09-26T09:28:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shubham321](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shubham321/32/36702_2.png) [@shubham321](https://forums.kodeco.com/u/shubham321)\
**Post date:** [September 26, 2016, 1:34pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/14 "2016-09-26T13:34:53Z")

</div>

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 ??

---

<div class="post-metadata">

**Author:** ![jesselue](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jesselue/32/43818_2.png) [@jesselue](https://forums.kodeco.com/u/jesselue)\
**Post date:** [October 9, 2016, 10:48pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/15 "2016-10-09T22:48:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ari](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ari/32/44420_2.png) [@ari](https://forums.kodeco.com/u/ari)\
**Post date:** [October 16, 2016, 7:50am UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/16 "2016-10-16T07:50:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sjs](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sjs/32/44561_2.png) [@sjs](https://forums.kodeco.com/u/sjs)\
**Post date:** [October 17, 2016, 9:56pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/17 "2016-10-17T21:56:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jherz](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jherz/32/45295_2.png) [@jherz](https://forums.kodeco.com/u/jherz)\
**Post date:** [October 25, 2016, 7:03pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/18 "2016-10-25T19:03:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sepehr](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sepehr/32/102075_2.png) [@sepehr](https://forums.kodeco.com/u/sepehr)\
**Post date:** [November 16, 2016, 4:50pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/19 "2016-11-16T16:50:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sepehr](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sepehr/32/102075_2.png) [@sepehr](https://forums.kodeco.com/u/sepehr)\
**Post date:** [November 19, 2016, 6:37pm UTC](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907/20 "2016-11-19T18:37:32Z")

</div>

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

[Next page](https://forums.kodeco.com/t/augmented-reality-ios-tutorial-location-based/907.md?page=2)
