Updating an AR application with the latest ARToolKit for iOS example code

From ARToolworks support library

Revision as of 14:33, 6 September 2010 by Philip lamb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Main Page > ARToolKit Professional > ARToolKit for iOS > Updating an AR application with the latest ARToolKit for iOS example code

One task developers of AR applications for iOS face is keeping track of changes with each release of ARToolKit for iOS release. For example, a change in the recommended way of calling an ARToolKit function may change from release of the software to another, due to changes in the underlying OS or ARToolKit itself, or to correct programming errors.

In each case, you would need to locate the change in the example code included with ARToolKit, and then make the same change in your own code in your own application.

If you have based your application's classes on the classes included with the example code in ARToolKit, you can use Apple's FileMerge tool to quickly locate the differences in a new ARToolKit release, and apply these to your own code. Here's how:

First, open FileMerge. It's included with Xcode Tools at path /Developer/Applications/Utilities/FileMerge.

Next, open a new "Compare files" window, and enlarge the window to show the extra fields labelled "Ancestor" and "Merge".

  • The "Left" box should be filled in with the version of the example code from the latest ARToolKit for iOS release.
  • The "Right" box should be filled in with the corresponding file from your own application.
  • The "Ancestor" box should be filled in with the same file from the previous ARToolKit for iOS release.
  • For an in-place merge, copy the path from the "Right" box to this box. To merge to a new file, enter a path.

Here is an example for a comparison of the ARViewController.m class between ARToolKit for iOS release 1.0, ARToolKit for iOS beta 2.1, and the ARViewController.m file in a fictional project called MyARProject.

Compare files with ancestor example.png

The resulting compare files window allows you to see what changes were made in this file in the latest release, and to merge them into your own code. For example, here is the first change found. This shows that between beta 2.1 and release 1.0 of ARToolKit, the line "usingCoreVideo = FALSE;" was removed from the "-viewDidLoad" method of the ARViewController class. You would want to make the same change in your own version of this file.

Compare files with ancestor example - result 1.png

Views
Personal tools