-
Notifications
You must be signed in to change notification settings - Fork 1
How to use Mixare as library
It's now possible to use Mixare as a library by adding Mixare to your project as sub-project. The pros of using as library:
- You don't have to merge all Mixare source to your project, just read it (by adding as sub-project)
- You can still update Mixare by git to your project, because of two separated repositories (Mixare and your own project)
- You can write your own plugins in your project to communicate with Mixare library.
First create an Empty Application
. And save your project next to Mixare.
[Directories]
- Workspace
- Mixare
- Your new project
Drag Mixare project file to your project. I used 'Arena' as my new project.
Go to your new project settings -> Your build target -> Build Phases -> Target Dependencies. Press the +
button and add Resources
and Library
.
At the same Build Phases, you can add Mixare library to link it. The same method as adding a framework.
To make use of images and xibs from Mixare library you should add the resources bundle. Expand subproject Mixare and the folder Products
. Then drag Resources.bundle
to Copy bundle resources
.
If you want language support for Dutch, German and Italian, then you can drag Localizable.strings
from the folder Resources
from subproject Mixare to Copy bundle resources
. It will ask you for something, then press next or yes.
Next to the Mixare library, you also have to add the required (non-default) Frameworks for Mixare. These are: MapKit.framework
, CoreLocation.framework
, QuartzCore.framework
and AVFoundation.framework
.
To use the Mixare library in your code, you have to make a working link to the library. Go to the Build Settings
and search for Header Search Paths
. Then add these two paths: "$(TARGET_BUILD_DIR)/lib/include"
and "$(OBJROOT)/UninstalledProducts/include"
.
Then you have to let it know that you are using Objective-C and load all stuff. Also in the Build Settings
, search for Other Linker Flags
and add these two: -ObjC
and -all_load
.
First of all, build your app once to initialize the library and bundle. The .a
file and .bundle
file shouldn't be red anymore after building. At your main delegate class, you can now import Mixare by #import <Mixare/Mixare.h>
. Then you can create the MixareAppDelegate
object and call the method -(void)runApplication
. Before you run the application you can also initialize your own plugins and pre-initalize your data sources. Please read the other guides/tutorials for more explanation.
- If you have issue by starting the app with Mixare, you could turn
Build Active Architecture Only
toYes
atBuild Settings
. - Issue with iPhone 5 could be with
Valid Architectures
armv7s
. Just removearmv7s
and turnBuild Active Architecture Only
toNo
.