junaio Plugin iOS

Integrate the junaio Plugin into your application

If you base your application on Junaio template application, you only have to adjust the channel ID and application identifier.

In case you wish to integrate the Junaio plugin into your own application, please follow these steps:

  1. Drag the junaio plugin folder into your Xcode project and select “Copy items into destination group’s folder” (if needed)
    Screen_Shot_2011-10-31_at_3.17.00_PM.png
  2. The junaio plugin is a static Obj-C++ library. Therefore any files including JunaioPlugin headers must be compiled as Obj-C++. To achieve this, either rename the file extension to *.mm or set the appropriate defines in Xcode to compile the file as Obj-C++.
  3. Add the code to launch the ARViewController, e.g.:
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    // Override point for customization after application launch.
    self.viewController = [[[ARViewController alloc] initWithNibName:@"ARViewController" bundle:nil] autorelease];

    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
    }

    Note: if you initialize your ARViewController using initWithNibName, you need to set the pluginDelegate in viewDidLoad:

    -(void) viewDidLoad
    {
    self.pluginDelegate = self;
    [super viewDidLoad];
    }
  4. Adjust the implementation of the JunaioPluginDelegate protocol in ARViewController with your channel ID.
  5. Add “-ObjC” to Other Linker Flags.
    Screen_shot_2011-05-16_at_4.17.50_PM.png
  6. Add the following frameworks / libs to the XCode project if not already present:
    • libXML2.dylib, libz.dylib
    • AVFoundation, CoreVideo, CoreFoundation, CoreGraphics, CoreLocation, CoreMotion, CoreMedia, MediaPlayer, CFNetwork, Security, AudioToolbox, SystemConfiguration, MobileCoreServices, OpenGLES, QuartzCore, MapKit, MessageUI

Upgrading from Junaio Plugin 1.0 to 3.1/3.5/3.6

The upgrade from Junaio Plugin 1.0 to 3.1/3.5 requires a few little changes that are described here.

Integration Troubleshooting

error: expected '=', ',', ';', 'asm' or '__attribute__' before 'metaio'

Please make sure that the file you are compiling is compiled as Obj-C++. For this you can either change the file extension of your file to *.mm or define 'Compile as Obj-C++' in your XCode project settings

The plugin does not cache the downloaded files

The delegate method getCacheTimeOfLifeInSeconds defines how long the cache keeps downloaded information. If you return 0, no caching will be used. In general it's advisable to set several days as cache time of life. (Note, the number has to be in seconds)

junaio Plugin Error Messages

Once you start the plugin in your application, certain error messages might be displayed:

  • This application ([YOUR APPLICATION IDENTIFIER]) has not been registered yet. Please contact info@metaio.com
    • This message will be shown, if the Application Identifier used with your junaio Plugin is unknown. Please contact us in order to register your junaio Plugin or submit a channel (see Create And Submit Your Channel). You can always trial your channel using the junaio Augmented Reality Browser
  • The trial period for this application ([YOUR APPLICATION IDENTIFIER]) ended. Please contact info@metaio.com
    • If you have been granted a trial period before purchasing the plugin, this trial period might end (usually after 2 weeks). After the trial period has ended, this message will be shown.
  • This application ([YOUR APPLICATION IDENTIFIER]) accessed an unauthorized channel. Please contact info@metaio.com

-- SupportMetaio - 2011-10-18

Topic revision: r6 - 2012-04-26 - 15:56:18 - SupportMetaio
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback