Commits

Jonathan Blocksom committed c22fa13

Initial commit

Comments (0)

Files changed (17)

+### pARk ###
+
+===========================================================================
+DESCRIPTION:
+
+pARk is an application project that demonstrates a how to use Core Motion's true north-referenced attitude API. It contains a UIView subclass, ARView, that displays a live camera feed with places-of-interest overlaid at the appropriate coordinates. The places-of-interest used are some famous parks around the world.
+
+The project has the following classes and protocol, which (except where noted) have corresponding .h and .m file:
+
+ARView —A UIView subclass that provides an augmented reality view of the specified places-of-interest. It uses AVFoundation to provide a live camera feed. It also uses Core Location to determine the user's location and Core Motion to determine where the user is facing (i.e. the user's attitude). When provided with an NSArray containing objects of type PlaceOfInterest, it computes the location of each place-of-interest relative to the user, and on every frame, it projects this onto the user's screen using the attitude provided by Core Motion. It then renders the UIView contained in each PlaceOfInterest at the projected location.
+
+PlaceOfInterest —A class containing the data necessary to locate and render each place-of-interest (i.e. a UIView and a location).
+
+pARkViewController —A view controller that feeds hard-coded places-of-interest to its ARView in viewDidLoad, starts the ARView in viewWillAppear, and stops the ARView in viewWillDisappear.
+
+pARkAppDelegate —A standard implementation of the UIApplicationDelegate protocol. 
+
+See "Motion Events" in Event Handling Guide for iPhone OS explains how to use the Core Motion API. The document also includes links to related Core Motion reference documentation.
+
+If you run the compiled application on a device that does not have a gyroscope, you cannot use device motion data. You cannot effectively run the application on the simulator.
+
+===========================================================================
+BUILD REQUIREMENTS:
+
+Xcode 4.2 or later; iPhone iOS SDK 5.0 or later.
+
+===========================================================================
+RUNTIME REQUIREMENTS:
+
+iOS 5.0 or later. This app will not produce camera output on the iOS simulator.
+
+===========================================================================
+CHANGES FROM PREVIOUS VERSIONS:
+
+Version 1.0 First version.
+
+===========================================================================
+Copyright (C) 2011 Apple Inc. All rights reserved.

pARk.xcodeproj/project.pbxproj

+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		2B6EEA6D13F47D0E00D239C2 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 2B6EEA6C13F47D0E00D239C2 /* ReadMe.txt */; };
+		8357D9EB138836520060FADB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8357D9EA138836520060FADB /* UIKit.framework */; };
+		8357D9ED138836520060FADB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8357D9EC138836520060FADB /* Foundation.framework */; };
+		8357D9EF138836520060FADB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8357D9EE138836520060FADB /* CoreGraphics.framework */; };
+		8357D9F5138836520060FADB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8357D9F3138836520060FADB /* InfoPlist.strings */; };
+		8357D9F7138836520060FADB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357D9F6138836520060FADB /* main.m */; };
+		8357D9FB138836520060FADB /* pARkAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357D9FA138836520060FADB /* pARkAppDelegate.m */; };
+		8357D9FD138836520060FADB /* pARkViewController.h in Resources */ = {isa = PBXBuildFile; fileRef = 8357D9FC138836520060FADB /* pARkViewController.h */; };
+		8357D9FF138836520060FADB /* pARkViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357D9FE138836520060FADB /* pARkViewController.m */; };
+		8357DA02138836520060FADB /* pARkViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8357DA00138836520060FADB /* pARkViewController_iPhone.xib */; };
+		8357DA05138836520060FADB /* pARkViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8357DA03138836520060FADB /* pARkViewController_iPad.xib */; };
+		836EC94A138838A200F196BC /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 836EC948138838A200F196BC /* AVFoundation.framework */; };
+		836EC94B138838A200F196BC /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 836EC949138838A200F196BC /* CoreMotion.framework */; };
+		836EC94D138838BD00F196BC /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 836EC94C138838BD00F196BC /* AssetsLibrary.framework */; };
+		836EC95013897C7A00F196BC /* ARView.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EC94F13897C7A00F196BC /* ARView.m */; };
+		836EC9611389805700F196BC /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 836EC9601389805700F196BC /* OpenGLES.framework */; };
+		836EC9631389807000F196BC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 836EC9621389807000F196BC /* QuartzCore.framework */; };
+		836EC9651389842500F196BC /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 836EC9641389842500F196BC /* CoreLocation.framework */; };
+		836EC99C1389C08400F196BC /* PlaceOfInterest.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EC99B1389C08300F196BC /* PlaceOfInterest.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		2B6EEA6C13F47D0E00D239C2 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
+		8357D9E6138836520060FADB /* pARk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = pARk.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		8357D9EA138836520060FADB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		8357D9EC138836520060FADB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		8357D9EE138836520060FADB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		8357D9F2138836520060FADB /* pARk-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "pARk-Info.plist"; sourceTree = "<group>"; };
+		8357D9F4138836520060FADB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		8357D9F6138836520060FADB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		8357D9F8138836520060FADB /* pARk-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "pARk-Prefix.pch"; sourceTree = "<group>"; };
+		8357D9F9138836520060FADB /* pARkAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pARkAppDelegate.h; sourceTree = "<group>"; };
+		8357D9FA138836520060FADB /* pARkAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = pARkAppDelegate.m; sourceTree = "<group>"; };
+		8357D9FC138836520060FADB /* pARkViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pARkViewController.h; sourceTree = "<group>"; };
+		8357D9FE138836520060FADB /* pARkViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = pARkViewController.m; sourceTree = "<group>"; };
+		8357DA01138836520060FADB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/pARkViewController_iPhone.xib; sourceTree = "<group>"; };
+		8357DA04138836520060FADB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/pARkViewController_iPad.xib; sourceTree = "<group>"; };
+		836EC948138838A200F196BC /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
+		836EC949138838A200F196BC /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; };
+		836EC94C138838BD00F196BC /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk/System/Library/Frameworks/AssetsLibrary.framework; sourceTree = DEVELOPER_DIR; };
+		836EC94E13897C7A00F196BC /* ARView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARView.h; sourceTree = "<group>"; };
+		836EC94F13897C7A00F196BC /* ARView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARView.m; sourceTree = "<group>"; };
+		836EC9601389805700F196BC /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; };
+		836EC9621389807000F196BC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
+		836EC9641389842500F196BC /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.Internal.sdk/System/Library/Frameworks/CoreLocation.framework; sourceTree = DEVELOPER_DIR; };
+		836EC99A1389C08300F196BC /* PlaceOfInterest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaceOfInterest.h; sourceTree = "<group>"; };
+		836EC99B1389C08300F196BC /* PlaceOfInterest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaceOfInterest.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		8357D9E3138836520060FADB /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				836EC9651389842500F196BC /* CoreLocation.framework in Frameworks */,
+				836EC9631389807000F196BC /* QuartzCore.framework in Frameworks */,
+				836EC9611389805700F196BC /* OpenGLES.framework in Frameworks */,
+				836EC94D138838BD00F196BC /* AssetsLibrary.framework in Frameworks */,
+				836EC94A138838A200F196BC /* AVFoundation.framework in Frameworks */,
+				836EC94B138838A200F196BC /* CoreMotion.framework in Frameworks */,
+				8357D9EB138836520060FADB /* UIKit.framework in Frameworks */,
+				8357D9ED138836520060FADB /* Foundation.framework in Frameworks */,
+				8357D9EF138836520060FADB /* CoreGraphics.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		8357D9DB138836520060FADB = {
+			isa = PBXGroup;
+			children = (
+				2B6EEA6C13F47D0E00D239C2 /* ReadMe.txt */,
+				8357D9F0138836520060FADB /* pARk */,
+				8357D9E9138836520060FADB /* Frameworks */,
+				8357D9E7138836520060FADB /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		8357D9E7138836520060FADB /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				8357D9E6138836520060FADB /* pARk.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		8357D9E9138836520060FADB /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				836EC9641389842500F196BC /* CoreLocation.framework */,
+				836EC9621389807000F196BC /* QuartzCore.framework */,
+				836EC9601389805700F196BC /* OpenGLES.framework */,
+				836EC94C138838BD00F196BC /* AssetsLibrary.framework */,
+				836EC948138838A200F196BC /* AVFoundation.framework */,
+				836EC949138838A200F196BC /* CoreMotion.framework */,
+				8357D9EA138836520060FADB /* UIKit.framework */,
+				8357D9EC138836520060FADB /* Foundation.framework */,
+				8357D9EE138836520060FADB /* CoreGraphics.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		8357D9F0138836520060FADB /* pARk */ = {
+			isa = PBXGroup;
+			children = (
+				836EC94E13897C7A00F196BC /* ARView.h */,
+				836EC94F13897C7A00F196BC /* ARView.m */,
+				836EC99A1389C08300F196BC /* PlaceOfInterest.h */,
+				836EC99B1389C08300F196BC /* PlaceOfInterest.m */,
+				8357D9FC138836520060FADB /* pARkViewController.h */,
+				8357D9FE138836520060FADB /* pARkViewController.m */,
+				8357D9F9138836520060FADB /* pARkAppDelegate.h */,
+				8357D9FA138836520060FADB /* pARkAppDelegate.m */,
+				8357DA00138836520060FADB /* pARkViewController_iPhone.xib */,
+				8357DA03138836520060FADB /* pARkViewController_iPad.xib */,
+				8357D9F1138836520060FADB /* Supporting Files */,
+			);
+			path = pARk;
+			sourceTree = "<group>";
+		};
+		8357D9F1138836520060FADB /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				8357D9F2138836520060FADB /* pARk-Info.plist */,
+				8357D9F3138836520060FADB /* InfoPlist.strings */,
+				8357D9F6138836520060FADB /* main.m */,
+				8357D9F8138836520060FADB /* pARk-Prefix.pch */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		8357D9E5138836520060FADB /* pARk */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 8357DA08138836520060FADB /* Build configuration list for PBXNativeTarget "pARk" */;
+			buildPhases = (
+				8357D9E2138836520060FADB /* Sources */,
+				8357D9E3138836520060FADB /* Frameworks */,
+				8357D9E4138836520060FADB /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = pARk;
+			productName = pARk;
+			productReference = 8357D9E6138836520060FADB /* pARk.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		8357D9DD138836520060FADB /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = 8357D9E0138836520060FADB /* Build configuration list for PBXProject "pARk" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = 8357D9DB138836520060FADB;
+			productRefGroup = 8357D9E7138836520060FADB /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				8357D9E5138836520060FADB /* pARk */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		8357D9E4138836520060FADB /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8357D9F5138836520060FADB /* InfoPlist.strings in Resources */,
+				8357D9FD138836520060FADB /* pARkViewController.h in Resources */,
+				8357DA02138836520060FADB /* pARkViewController_iPhone.xib in Resources */,
+				8357DA05138836520060FADB /* pARkViewController_iPad.xib in Resources */,
+				2B6EEA6D13F47D0E00D239C2 /* ReadMe.txt in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		8357D9E2138836520060FADB /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8357D9F7138836520060FADB /* main.m in Sources */,
+				8357D9FB138836520060FADB /* pARkAppDelegate.m in Sources */,
+				8357D9FF138836520060FADB /* pARkViewController.m in Sources */,
+				836EC95013897C7A00F196BC /* ARView.m in Sources */,
+				836EC99C1389C08400F196BC /* PlaceOfInterest.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		8357D9F3138836520060FADB /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				8357D9F4138836520060FADB /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		8357DA00138836520060FADB /* pARkViewController_iPhone.xib */ = {
+			isa = PBXVariantGroup;
+			children = (
+				8357DA01138836520060FADB /* en */,
+			);
+			name = pARkViewController_iPhone.xib;
+			sourceTree = "<group>";
+		};
+		8357DA03138836520060FADB /* pARkViewController_iPad.xib */ = {
+			isa = PBXVariantGroup;
+			children = (
+				8357DA04138836520060FADB /* en */,
+			);
+			name = pARkViewController_iPad.xib;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		8357DA06138836520060FADB /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				OTHER_CFLAGS = "-fobjc-arr";
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		8357DA07138836520060FADB /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		8357DA09138836520060FADB /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_WARN_OBJCPP_ARC_ABI = NO;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "pARk/pARk-Prefix.pch";
+				INFOPLIST_FILE = "pARk/pARk-Info.plist";
+				OTHER_CFLAGS = "";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE = "";
+				"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
+				SDKROOT = iphoneos;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		8357DA0A138836520060FADB /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_WARN_OBJCPP_ARC_ABI = NO;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "pARk/pARk-Prefix.pch";
+				INFOPLIST_FILE = "pARk/pARk-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE = "";
+				"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
+				SDKROOT = iphoneos;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		8357D9E0138836520060FADB /* Build configuration list for PBXProject "pARk" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				8357DA06138836520060FADB /* Debug */,
+				8357DA07138836520060FADB /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		8357DA08138836520060FADB /* Build configuration list for PBXNativeTarget "pARk" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				8357DA09138836520060FADB /* Debug */,
+				8357DA0A138836520060FADB /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 8357D9DD138836520060FADB /* Project object */;
+}

pARk.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:pARk.xcodeproj">
+   </FileRef>
+</Workspace>
+/*
+     File: ARView.h
+ Abstract: Augmented reality view. Displays a live camera feed with specified places-of-interest overlayed in the correct position based on the direction the user is looking. Uses Core Location to determine the user's location relative the places-of-interest and Core Motion to determine the direction the user is looking.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import <UIKit/UIKit.h>
+#import <CoreLocation/CoreLocation.h>
+#import <CoreMotion/CoreMotion.h>
+
+
+@interface ARView : UIView  <CLLocationManagerDelegate> {
+}
+
+@property (nonatomic, retain) NSArray *placesOfInterest;
+
+- (void)start;
+- (void)stop;
+
+@end
+/*
+     File: ARView.m
+ Abstract: Augmented reality view. Displays a live camera feed with specified places-of-interest overlayed in the correct position based on the direction the user is looking. Uses Core Location to determine the user's location relative the places-of-interest and Core Motion to determine the direction the user is looking.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import "ARView.h"
+#import "PlaceOfInterest.h"
+
+#import <AVFoundation/AVFoundation.h>
+
+#pragma mark -
+#pragma mark Math utilities declaration
+
+#define DEGREES_TO_RADIANS (M_PI/180.0)
+
+typedef float mat4f_t[16];	// 4x4 matrix in column major order
+typedef float vec4f_t[4];	// 4D vector
+
+// Creates a projection matrix using the given y-axis field-of-view, aspect ratio, and near and far clipping planes
+void createProjectionMatrix(mat4f_t mout, float fovy, float aspect, float zNear, float zFar);
+
+// Matrix-vector and matrix-matricx multiplication routines
+void multiplyMatrixAndVector(vec4f_t vout, const mat4f_t m, const vec4f_t v);
+void multiplyMatrixAndMatrix(mat4f_t c, const mat4f_t a, const mat4f_t b);
+
+// Initialize mout to be an affine transform corresponding to the same rotation specified by m
+void transformFromCMRotationMatrix(vec4f_t mout, const CMRotationMatrix *m);
+
+#pragma mark -
+#pragma mark Geodetic utilities declaration
+
+#define WGS84_A	(6378137.0)				// WGS 84 semi-major axis constant in meters
+#define WGS84_E (8.1819190842622e-2)	// WGS 84 eccentricity
+
+// Converts latitude, longitude to ECEF coordinate system
+void latLonToEcef(double lat, double lon, double alt, double *x, double *y, double *z);
+
+// Coverts ECEF to ENU coordinates centered at given lat, lon
+void ecefToEnu(double lat, double lon, double x, double y, double z, double xr, double yr, double zr, double *e, double *n, double *u);
+
+#pragma mark -
+#pragma mark ARView extension
+
+@interface ARView () {
+	UIView *captureView;
+	AVCaptureSession *captureSession;
+	AVCaptureVideoPreviewLayer *captureLayer;
+	
+	CADisplayLink *displayLink;
+	CMMotionManager *motionManager;
+	CLLocationManager *locationManager;
+	CLLocation *location;
+	NSArray *placesOfInterest;
+	mat4f_t projectionTransform;
+	mat4f_t cameraTransform;	
+	vec4f_t *placesOfInterestCoordinates;
+}
+
+- (void)initialize;
+
+- (void)startCameraPreview;
+- (void)stopCameraPreview;
+
+- (void)startLocation;
+- (void)stopLocation;
+
+- (void)startDeviceMotion;
+- (void)stopDeviceMotion;
+
+- (void)startDisplayLink;
+- (void)stopDisplayLink;
+
+- (void)updatePlacesOfInterestCoordinates;
+
+- (void)onDisplayLink:(id)sender;
+- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation;
+
+@end
+
+
+#pragma mark -
+#pragma mark ARView implementation
+
+@implementation ARView
+
+@dynamic placesOfInterest;
+
+- (void)dealloc
+{
+	[self stop];
+	[placesOfInterest release];
+	[location release];
+	[captureView removeFromSuperview];
+	[captureView release];
+	if (placesOfInterestCoordinates != NULL) {
+		free(placesOfInterestCoordinates);
+	}
+	[super dealloc];
+}
+
+- (void)start
+{
+	[self startCameraPreview];
+	[self startLocation];
+	[self startDeviceMotion];
+	[self startDisplayLink];
+}
+
+- (void)stop
+{
+	[self stopCameraPreview];
+	[self stopLocation];
+	[self stopDeviceMotion];
+	[self stopDisplayLink];
+}
+
+- (void)setPlacesOfInterest:(NSArray *)pois
+{
+	for (PlaceOfInterest *poi in [placesOfInterest objectEnumerator]) {
+		[poi.view removeFromSuperview];
+	}	
+	[placesOfInterest release];
+	
+	placesOfInterest = [pois retain];	
+	if (location != nil) {
+		[self updatePlacesOfInterestCoordinates];
+	}
+}
+
+- (NSArray *)placesOfInterest
+{
+	return placesOfInterest;
+}
+
+- (void)initialize
+{
+	captureView = [[UIView alloc] initWithFrame:self.bounds];
+	captureView.bounds = self.bounds;
+	[self addSubview:captureView];
+	[self sendSubviewToBack:captureView];
+	
+	// Initialize projection matrix	
+	createProjectionMatrix(projectionTransform, 60.0f*DEGREES_TO_RADIANS, self.bounds.size.width*1.0f / self.bounds.size.height, 0.25f, 1000.0f);
+}
+
+- (void)startCameraPreview
+{	
+	AVCaptureDevice* camera = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
+	if (camera == nil) {
+		return;
+	}
+	
+	captureSession = [[AVCaptureSession alloc] init];
+	AVCaptureDeviceInput *newVideoInput = [[[AVCaptureDeviceInput alloc] initWithDevice:camera error:nil] autorelease];
+	[captureSession addInput:newVideoInput];
+	
+	captureLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:captureSession];
+	captureLayer.frame = captureView.bounds;
+	[captureLayer setOrientation:AVCaptureVideoOrientationPortrait];
+	[captureLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
+	[captureView.layer addSublayer:captureLayer];
+	
+	// Start the session. This is done asychronously since -startRunning doesn't return until the session is running.
+	dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+		[captureSession startRunning];
+	});
+}
+
+- (void)stopCameraPreview
+{	
+	[captureSession stopRunning];
+	[captureLayer removeFromSuperlayer];
+	[captureSession release];
+	[captureLayer release];
+	captureSession = nil;
+	captureLayer = nil;
+}
+
+- (void)startLocation
+{
+	[locationManager release];
+	locationManager = [[CLLocationManager alloc] init];
+	locationManager.delegate = self;
+	locationManager.distanceFilter = 100.0;
+	[locationManager startUpdatingLocation];
+}
+
+- (void)stopLocation
+{
+	[locationManager stopUpdatingLocation];
+	[locationManager release];
+	locationManager = nil;
+}
+
+- (void)startDeviceMotion
+{	
+	motionManager = [[CMMotionManager alloc] init];
+	
+	// Tell CoreMotion to show the compass calibration HUD when required to provide true north-referenced attitude
+	motionManager.showsDeviceMovementDisplay = YES;
+
+	
+	motionManager.deviceMotionUpdateInterval = 1.0 / 60.0;
+	
+	// New in iOS 5.0: Attitude that is referenced to true north
+	[motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXTrueNorthZVertical];
+}
+
+- (void)stopDeviceMotion
+{
+	[motionManager stopDeviceMotionUpdates];
+	[motionManager release];
+	motionManager = nil;
+}
+
+- (void)startDisplayLink
+{
+	displayLink = [[CADisplayLink displayLinkWithTarget:self selector:@selector(onDisplayLink:)] retain];
+	[displayLink setFrameInterval:1];
+	[displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+}
+
+- (void)stopDisplayLink
+{
+	[displayLink invalidate];
+	[displayLink release];
+	displayLink = nil;		
+}
+
+- (void)updatePlacesOfInterestCoordinates
+{
+	
+	if (placesOfInterestCoordinates != NULL) {
+		free(placesOfInterestCoordinates);
+	}
+	placesOfInterestCoordinates = (vec4f_t *)malloc(sizeof(vec4f_t)*placesOfInterest.count);
+			
+	int i = 0;
+	
+	double myX, myY, myZ;
+	latLonToEcef(location.coordinate.latitude, location.coordinate.longitude, 0.0, &myX, &myY, &myZ);
+
+	// Array of NSData instances, each of which contains a struct with the distance to a POI and the
+	// POI's index into placesOfInterest
+	// Will be used to ensure proper Z-ordering of UIViews
+	typedef struct {
+		float distance;
+		int index;
+	} DistanceAndIndex;
+	NSMutableArray *orderedDistances = [NSMutableArray arrayWithCapacity:placesOfInterest.count];
+
+	// Compute the world coordinates of each place-of-interest
+	for (PlaceOfInterest *poi in [[self placesOfInterest] objectEnumerator]) {
+		double poiX, poiY, poiZ, e, n, u;
+		
+		latLonToEcef(poi.location.coordinate.latitude, poi.location.coordinate.longitude, 0.0, &poiX, &poiY, &poiZ);
+		ecefToEnu(location.coordinate.latitude, location.coordinate.longitude, myX, myY, myZ, poiX, poiY, poiZ, &e, &n, &u);
+		
+		placesOfInterestCoordinates[i][0] = (float)n;
+		placesOfInterestCoordinates[i][1]= -(float)e;
+		placesOfInterestCoordinates[i][2] = 0.0f;
+		placesOfInterestCoordinates[i][3] = 1.0f;
+		
+		// Add struct containing distance and index to orderedDistances
+		DistanceAndIndex distanceAndIndex;
+		distanceAndIndex.distance = sqrtf(n*n + e*e);
+		distanceAndIndex.index = i;
+		[orderedDistances insertObject:[NSData dataWithBytes:&distanceAndIndex length:sizeof(distanceAndIndex)] atIndex:i++];
+	}
+	
+	// Sort orderedDistances in ascending order based on distance from the user
+	[orderedDistances sortUsingComparator:(NSComparator)^(NSData *a, NSData *b) {
+		const DistanceAndIndex *aData = (const DistanceAndIndex *)a.bytes;
+		const DistanceAndIndex *bData = (const DistanceAndIndex *)b.bytes;
+		if (aData->distance < bData->distance) {
+			return NSOrderedAscending;
+		} else if (aData->distance > bData->distance) {
+			return NSOrderedDescending;
+		} else {
+			return NSOrderedSame;
+		}
+	}];
+	
+	// Add subviews in descending Z-order so they overlap properly
+	for (NSData *d in [orderedDistances reverseObjectEnumerator]) {
+		const DistanceAndIndex *distanceAndIndex = (const DistanceAndIndex *)d.bytes;
+		PlaceOfInterest *poi = (PlaceOfInterest *)[placesOfInterest objectAtIndex:distanceAndIndex->index];		
+		[self addSubview:poi.view];
+	}	
+}
+
+- (void)onDisplayLink:(id)sender
+{
+	CMDeviceMotion *d = motionManager.deviceMotion;
+	if (d != nil) {
+		CMRotationMatrix r = d.attitude.rotationMatrix;
+		transformFromCMRotationMatrix(cameraTransform, &r);
+		[self setNeedsDisplay];
+	}
+}
+
+- (void)drawRect:(CGRect)rect
+{
+	if (placesOfInterestCoordinates == nil) {
+		return;
+	}
+	
+	mat4f_t projectionCameraTransform;
+	multiplyMatrixAndMatrix(projectionCameraTransform, projectionTransform, cameraTransform);
+	
+	int i = 0;
+	for (PlaceOfInterest *poi in [placesOfInterest objectEnumerator]) {
+		vec4f_t v;
+		multiplyMatrixAndVector(v, projectionCameraTransform, placesOfInterestCoordinates[i]);
+		
+		float x = (v[0] / v[3] + 1.0f) * 0.5f;
+		float y = (v[1] / v[3] + 1.0f) * 0.5f;
+		if (v[2] < 0.0f) {
+			poi.view.center = CGPointMake(x*self.bounds.size.width, self.bounds.size.height-y*self.bounds.size.height);
+			poi.view.hidden = NO;
+		} else {
+			poi.view.hidden = YES;
+		}
+		i++;
+	}
+}
+
+- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
+{
+	[location release];
+	location = [newLocation retain];
+	if (placesOfInterest != nil) {
+		[self updatePlacesOfInterestCoordinates];
+	}	
+}
+
+- (id)initWithFrame:(CGRect)frame
+{
+	self = [super initWithFrame:frame];
+	if (self) {
+		[self initialize];
+	}
+	return self;
+}
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+	self = [super initWithCoder:aDecoder];
+	if (self) {
+		[self initialize];
+	}
+	return self;
+}
+
+@end
+
+#pragma mark -
+#pragma mark Math utilities definition
+
+// Creates a projection matrix using the given y-axis field-of-view, aspect ratio, and near and far clipping planes
+void createProjectionMatrix(mat4f_t mout, float fovy, float aspect, float zNear, float zFar)
+{
+	float f = 1.0f / tanf(fovy/2.0f);
+	
+	mout[0] = f / aspect;
+	mout[1] = 0.0f;
+	mout[2] = 0.0f;
+	mout[3] = 0.0f;
+	
+	mout[4] = 0.0f;
+	mout[5] = f;
+	mout[6] = 0.0f;
+	mout[7] = 0.0f;
+	
+	mout[8] = 0.0f;
+	mout[9] = 0.0f;
+	mout[10] = (zFar+zNear) / (zNear-zFar);
+	mout[11] = -1.0f;
+	
+	mout[12] = 0.0f;
+	mout[13] = 0.0f;
+	mout[14] = 2 * zFar * zNear /  (zNear-zFar);
+	mout[15] = 0.0f;
+}
+
+// Matrix-vector and matrix-matricx multiplication routines
+void multiplyMatrixAndVector(vec4f_t vout, const mat4f_t m, const vec4f_t v)
+{
+	vout[0] = m[0]*v[0] + m[4]*v[1] + m[8]*v[2] + m[12]*v[3];
+	vout[1] = m[1]*v[0] + m[5]*v[1] + m[9]*v[2] + m[13]*v[3];
+	vout[2] = m[2]*v[0] + m[6]*v[1] + m[10]*v[2] + m[14]*v[3];
+	vout[3] = m[3]*v[0] + m[7]*v[1] + m[11]*v[2] + m[15]*v[3];
+}
+
+void multiplyMatrixAndMatrix(mat4f_t c, const mat4f_t a, const mat4f_t b)
+{
+	uint8_t col, row, i;
+	memset(c, 0, 16*sizeof(float));
+	
+	for (col = 0; col < 4; col++) {
+		for (row = 0; row < 4; row++) {
+			for (i = 0; i < 4; i++) {
+				c[col*4+row] += a[i*4+row]*b[col*4+i];
+			}
+		}
+	}
+}
+
+// Initialize mout to be an affine transform corresponding to the same rotation specified by m
+void transformFromCMRotationMatrix(vec4f_t mout, const CMRotationMatrix *m)
+{
+	mout[0] = (float)m->m11;
+	mout[1] = (float)m->m21;
+	mout[2] = (float)m->m31;
+	mout[3] = 0.0f;
+	
+	mout[4] = (float)m->m12;
+	mout[5] = (float)m->m22;
+	mout[6] = (float)m->m32;
+	mout[7] = 0.0f;
+	
+	mout[8] = (float)m->m13;
+	mout[9] = (float)m->m23;
+	mout[10] = (float)m->m33;
+	mout[11] = 0.0f;
+	
+	mout[12] = 0.0f;
+	mout[13] = 0.0f;
+	mout[14] = 0.0f;
+	mout[15] = 1.0f;
+}
+
+#pragma mark -
+#pragma mark Geodetic utilities definition
+
+// References to ECEF and ECEF to ENU conversion may be found on the web.
+
+// Converts latitude, longitude to ECEF coordinate system
+void latLonToEcef(double lat, double lon, double alt, double *x, double *y, double *z)
+{   
+	double clat = cos(lat * DEGREES_TO_RADIANS);
+	double slat = sin(lat * DEGREES_TO_RADIANS);
+	double clon = cos(lon * DEGREES_TO_RADIANS);
+	double slon = sin(lon * DEGREES_TO_RADIANS);
+	
+	double N = WGS84_A / sqrt(1.0 - WGS84_E * WGS84_E * slat * slat);
+	
+	*x = (N + alt) * clat * clon;
+	*y = (N + alt) * clat * slon;
+	*z = (N * (1.0 - WGS84_E * WGS84_E) + alt) * slat;
+}
+
+// Coverts ECEF to ENU coordinates centered at given lat, lon
+void ecefToEnu(double lat, double lon, double x, double y, double z, double xr, double yr, double zr, double *e, double *n, double *u)
+{
+	double clat = cos(lat * DEGREES_TO_RADIANS);
+	double slat = sin(lat * DEGREES_TO_RADIANS);
+	double clon = cos(lon * DEGREES_TO_RADIANS);
+	double slon = sin(lon * DEGREES_TO_RADIANS);
+	double dx = x - xr;
+	double dy = y - yr;
+	double dz = z - zr;
+	
+	*e = -slon*dx  + clon*dy;
+	*n = -slat*clon*dx - slat*slon*dy + clat*dz;
+	*u = clat*clon*dx + clat*slon*dy + slat*dz;
+}

pARk/PlaceOfInterest.h

+/*
+     File: PlaceOfInterest.h
+ Abstract: Class that represents a place-of-interest: a position (latitude and longitude) and associated UIView.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import <Foundation/Foundation.h>
+
+#import <CoreLocation/CoreLocation.h>
+
+@interface PlaceOfInterest : NSObject
+
+@property (nonatomic, retain) UIView *view;
+@property (nonatomic, retain) CLLocation *location;
+
++ (PlaceOfInterest *)placeOfInterestWithView:(UIView *)view at:(CLLocation *)location;
+
+@end

pARk/PlaceOfInterest.m

+/*
+     File: PlaceOfInterest.m
+ Abstract: Class that represents a place-of-interest: a position (latitude and longitude) and associated UIView.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import "PlaceOfInterest.h"
+
+@implementation PlaceOfInterest
+
+@synthesize view;
+@synthesize location;
+
+- (id)init
+{
+    self = [super init];
+    if (self) {
+			view = nil;
+			location = nil;
+    }    
+    return self;
+}
+
+- (void)dealloc
+{
+	[view release];
+	[location release];
+	[super dealloc];
+}
+
++ (PlaceOfInterest *)placeOfInterestWithView:(UIView *)view at:(CLLocation *)location
+{
+	PlaceOfInterest *poi = [[[PlaceOfInterest alloc] init] autorelease];
+	poi.view = view;
+	poi.location = location;
+	return poi;
+}
+
+@end

pARk/en.lproj/InfoPlist.strings

+/* Localized versions of Info.plist keys */
+

pARk/en.lproj/pARkViewController_iPad.xib

+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">800</int>
+		<string key="IBDocument.SystemVersion">10J869</string>
+		<string key="IBDocument.InterfaceBuilderVersion">904</string>
+		<string key="IBDocument.AppKitVersion">1038.35</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">141</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+			<integer value="1" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="841351856">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBProxyObject" id="606714003">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBUIView" id="766721923">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">274</int>
+				<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MQA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+					<int key="IBUIStatusBarStyle">2</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="841351856"/>
+						<reference key="destination" ref="766721923"/>
+					</object>
+					<int key="connectionID">3</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<object class="NSArray" key="object" id="0">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="841351856"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="606714003"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">2</int>
+						<reference key="object" ref="766721923"/>
+						<reference key="parent" ref="0"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-1.IBPluginDependency</string>
+					<string>-2.CustomClassName</string>
+					<string>-2.IBPluginDependency</string>
+					<string>2.CustomClassName</string>
+					<string>2.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>pARkViewController</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>UIResponder</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>ARView</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">3</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">ARView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">pARkViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/pARkViewController.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+			<integer value="800" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">141</string>
+	</data>
+</archive>

pARk/en.lproj/pARkViewController_iPhone.xib

+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">1056</int>
+		<string key="IBDocument.SystemVersion">10J869</string>
+		<string key="IBDocument.InterfaceBuilderVersion">904</string>
+		<string key="IBDocument.AppKitVersion">1038.35</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">141</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+			<integer value="1" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="372490531">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="843779117">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIView" id="774585933">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">274</int>
+				<string key="NSFrame">{{0, 20}, {320, 460}}</string>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MC43NQA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="774585933"/>
+					</object>
+					<int key="connectionID">7</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<object class="NSArray" key="object" id="0">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="372490531"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="843779117"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">6</int>
+						<reference key="object" ref="774585933"/>
+						<reference key="parent" ref="0"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-1.IBPluginDependency</string>
+					<string>-2.CustomClassName</string>
+					<string>-2.IBPluginDependency</string>
+					<string>6.CustomClassName</string>
+					<string>6.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>pARkViewController</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>UIResponder</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>ARView</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">7</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">ARView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">pARkViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/pARkViewController.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">141</string>
+	</data>
+</archive>
+/*
+     File: main.m
+ Abstract: main() for pARk example.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import <UIKit/UIKit.h>
+
+#import "pARkAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+	int retVal = 0;
+	@autoreleasepool {
+	    retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([pARkAppDelegate class]));
+	}
+	return retVal;
+}

pARk/pARk-Info.plist

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>com.apple.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+	</array>
+</dict>
+</plist>

pARk/pARk-Prefix.pch

+//
+// Prefix header for all source files of the 'pARk' target in the 'pARk' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iPhone SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+	#import <UIKit/UIKit.h>
+	#import <Foundation/Foundation.h>
+#endif

pARk/pARkAppDelegate.h

+/*
+     File: pARkAppDelegate.h
+ Abstract: Standard app delegate for the pARk example.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import <UIKit/UIKit.h>
+
+@class pARkViewController;
+
+@interface pARkAppDelegate : NSObject <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) pARkViewController *viewController;
+
+@end

pARk/pARkAppDelegate.m

+/*
+     File: pARkAppDelegate.m
+ Abstract: Standard app delegate for the pARk example.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import "pARkAppDelegate.h"
+
+#import "pARkViewController.h"
+
+@implementation pARkAppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+    // Override point for customization after application launch.
+	_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+	if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+	    _viewController = [[pARkViewController alloc] initWithNibName:@"pARkViewController_iPhone" bundle:nil]; 
+	} else {
+	    _viewController = [[pARkViewController alloc] initWithNibName:@"pARkViewController_iPad" bundle:nil]; 
+	}
+	self.window.rootViewController = self.viewController;
+    [self.window makeKeyAndVisible];
+    return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+	/*
+	 Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+	 Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+	 */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+	/*
+	 Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
+	 If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+	 */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+	/*
+	 Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+	 */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+	/*
+	 Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+	 */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+	/*
+	 Called when the application is about to terminate.
+	 Save data if appropriate.
+	 See also applicationDidEnterBackground:.
+	 */
+}
+
+@end

pARk/pARkViewController.h

+/*
+     File: pARkViewController.h
+ Abstract: Simple view controller for the pARk example. Provides a hard-coded list of places-of-interest to its associated ARView when loaded, starts the ARView when it appears, and stops it when it disappears.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import <UIKit/UIKit.h>
+
+
+@interface pARkViewController : UIViewController {	
+}
+
+@end

pARk/pARkViewController.m

+/*
+     File: pARkViewController.m
+ Abstract: Simple view controller for the pARk example. Provides a hard-coded list of places-of-interest to its associated ARView when loaded, starts the ARView when it appears, and stops it when it disappears.
+  Version: 1.0
+ 
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ 
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ 
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ 
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ 
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ 
+ */
+
+#import "pARkViewController.h"
+#import "PlaceOfInterest.h"
+#import "ARView.h"
+
+#import <CoreLocation/CoreLocation.h>
+
+@implementation pARkViewController
+
+- (void)didReceiveMemoryWarning
+{
+    [super didReceiveMemoryWarning];
+    // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+	[super viewDidLoad];
+	ARView *arView = (ARView *)self.view;
+	
+	// Create array of hard-coded places-of-interest, in this case some famous parks
+    const char *poiNames[] = {"Central Park NY",
+                              "Golden Gate Park SF",
+                              "Balboa Park SD",
+                              "Hyde Park UK",
+                              "Mont Royal QC",
+                              "Retiro Park ES"};
+	
+    CLLocationCoordinate2D poiCoords[] = {{40.7711329, -73.9741874},
+                                          {37.7690400, -122.4835193},
+                                          {32.7343822, -117.1441227},
+                                          {51.5068670, -0.1708030},
+                                          {45.5126399, -73.6802448},
+                                          {40.4152519, -3.6887466}};
+                                          
+    int numPois = sizeof(poiCoords) / sizeof(CLLocationCoordinate2D);	
+		
+	NSMutableArray *placesOfInterest = [NSMutableArray arrayWithCapacity:numPois];
+	for (int i = 0; i < numPois; i++) {
+		UILabel *label = [[[UILabel alloc] init] autorelease];
+		label.adjustsFontSizeToFitWidth = NO;
+		label.opaque = NO;
+		label.backgroundColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:0.5f];
+		label.center = CGPointMake(200.0f, 200.0f);
+		label.textAlignment = UITextAlignmentCenter;
+		label.textColor = [UIColor whiteColor];
+		label.text = [NSString stringWithCString:poiNames[i] encoding:NSASCIIStringEncoding];		
+		CGSize size = [label.text sizeWithFont:label.font];
+		label.bounds = CGRectMake(0.0f, 0.0f, size.width, size.height);
+				
+		PlaceOfInterest *poi = [PlaceOfInterest placeOfInterestWithView:label at:[[[CLLocation alloc] initWithLatitude:poiCoords[i].latitude longitude:poiCoords[i].longitude] autorelease]];
+		[placesOfInterest insertObject:poi atIndex:i];
+	}	
+	[arView setPlacesOfInterest:placesOfInterest];	
+}
+
+- (void)viewDidUnload
+{
+    [super viewDidUnload];
+    // Release any retained subviews of the main view.
+    // e.g. self.myOutlet = nil;
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+	[super viewWillAppear:animated];
+	ARView *arView = (ARView *)self.view;
+	[arView start];
+}
+
+- (void)viewDidAppear:(BOOL)animated
+{
+	[super viewDidAppear:animated];
+}
+
+- (void)viewWillDisappear:(BOOL)animated
+{
+	[super viewWillDisappear:animated];
+}
+
+- (void)viewDidDisappear:(BOOL)animated
+{
+	[super viewDidDisappear:animated];
+	ARView *arView = (ARView *)self.view;
+	[arView stop];
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+	return interfaceOrientation == UIInterfaceOrientationPortrait;
+}
+
+@end