This is a sample about how to use Mixare on your own project.
You can download Mixare for iOS here. It is necessary in order to import the classes and see the methods that we need to develop our own Mixare project
This sample was created by Javier González Pérez inside the company SolidGear SL.
-
Create a new project on Xcode Single View Application. I recommend without Storyboards and with ARC
-
Import all the necessary classes and images from the Mixare project:
-AugmentedGeoViewController (View)
-AugmentedViewController (View)
-CameraController (View)
-MarketView (View)
-Radar (radarView)
-RadarViewPortView (radarView)
-PopUpWebView (guiControllers)
-PressHud (guiControllers)
-PullRefreshTableViewController (guiControllers)
-WebViewController (guiControllers)
-MapViewAnnotation (reality)
-PoiItem (reality)
-DataSource (data)
-Position (data)
-Images
-
Open the Mixare project on Xcode. We need copy the method "initControls" from MixareAppDelegate.m to our AppDelegate.m
-
Search the method "openARView" on MixareAppDelegate.m and copy the content on our init method on our AppDelegate.m.
-
Import on our AppDelegate
-AugmentedGeoViewController.h
-PoiItem.h
-Position.h
-
Remove from our AppDelegate the import of ViewController (we will not use that class)
-
Add the frameworks:
-AvFundation
-MapKit
-QuartzCore
-CoreMotion
-CoreMedia
-CoreVideo
-CoreLocation
-
In our AppDelegate.h we change all about the class ViewController with AugmentedGeoViewControllers (the import and the object). We import "CoreLocation/CoreLocation.h" and create a new object: @property (strong, nonatomic) CLLocationManager *locationManager;
-
In our AppDelegate.m we remove the calls to the DataSource and we put the right names to the vars (for example _augViewController).
-
Launch the App in the simulator or in a real device in order to search all the compilation problems:
-Remove the imports of Resources.h
-Change the call of Resources to Main bundle: [[Resources getInstance] bundle] to [NSBundle mainBundle]
-Change the imports MixareAppDelegate.h to AppDelegate.h
-
In our init method we have to init the locationManager: _locationManager = [[CLLocationManager alloc] init];
-
We make public the method addCoordinate of the class AugmentedViewController adding them to the AugmentedViewController.h
-
We create a new method addPoisToARView on the AppDelegate.m to add the lois to the view.
-
We call the method addPoisToARView in the init of our app after instance _augViewController.
-
In the method addPoisToARView we create the POIs to send them to the _augViewController using the method addCoordinate.