AR Persistence Model using Swift 4.2 / 5 (Part 2).

Updated 25 January 2020

Save

AR Persistence Model Using Swift 4.2

In the Previous Blog, we have discussed how to draw the AR Map in the real-world & save this model for later use.

Previous Blogs Link: https://mobikul.com/ar-persistence-model-using-swift-4-2-part-1/

Now we have to load save the map on real-world for this we have to save the file by giving some unique name, in the previous blog we have taken the var mapID: String = “”

by using this we can differentiate AR Model.

For this Follow this Steps:

1: Create A ViewController Class as  “SuggestionARPathController”

2: Add SuggestionARPathController controller in StoryBoard.

 

3: Now Write the Code in this Controller.

let mapID is “1” and you have to load this map on the real world.

a: Create an Outlet.

b: Write the function for access URL of saving AR model.

c: Write the function for reset tracking Function

d: Write the function to load the AR in the real world.

4: Set Up the Image/GIF that you have to draw over Real-world.

Note: Please add this extension in your Helper Swift file.

5: Now Write  func viewDidLoad()  & func viewDidAppear(_ animated: Bool) .

6: Full Code :

Now your model will be load with corresponding Map Id.

If You Find Any Issue Or Problem To Implement This Part Feel Free To Ask.

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home