Skip to content

Commit

Permalink
HOTFIX iOS overlay text null error (#83)
Browse files Browse the repository at this point in the history
* HOTFIX: Fix overlayText null error in iOS

* REV version number
  • Loading branch information
mattrayner authored Jul 4, 2016
1 parent 523e149 commit 35b9eaa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cordova-plugin-vuforia",
"description": "Cordova Vuforia Plugin",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://github.com/mattrayner/cordova-plugin-vuforia",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-vuforia"
version="3.0.0">
version="3.0.1">
<name>Vuforia</name>
<description>Cordova Vuforia Plugin</description>
<license>MIT</license>
Expand All @@ -15,7 +15,7 @@
<author>Matthew Rayner</author>

<info>
Cordova Vuforia Plugin version 3.0.0, Copyright (C) 2016 Matthew Rayner
Cordova Vuforia Plugin version 3.0.1, Copyright (C) 2016 Matthew Rayner
Cordova Vuforia Plugin comes with ABSOLUTELY NO WARRANTY; see the
LICENSE file for more information.
This is free software, and you are welcome to redistribute it
Expand Down
4 changes: 3 additions & 1 deletion src/ios/VuforiaPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ - (void) cordovaStartVuforia:(CDVInvokedUrlCommand *)command {
NSLog(@"Arguments: %@", command.arguments);
NSLog(@"KEY: %@", [command.arguments objectAtIndex:3]);

NSDictionary *overlayOptions = [[NSDictionary alloc] initWithObjectsAndKeys: [command.arguments objectAtIndex:2], @"overlayText", [NSNumber numberWithBool:[[command.arguments objectAtIndex:5] integerValue]], @"showDevicesIcon", nil];
NSString *overlayText = ([command.arguments objectAtIndex:2] == (id)[NSNull null]) ? @"" : [command.arguments objectAtIndex:2];

NSDictionary *overlayOptions = [[NSDictionary alloc] initWithObjectsAndKeys: overlayText, @"overlayText", [NSNumber numberWithBool:[[command.arguments objectAtIndex:5] integerValue]], @"showDevicesIcon", nil];

self.autostopOnImageFound = [[command.arguments objectAtIndex:6] integerValue];

Expand Down

0 comments on commit 35b9eaa

Please sign in to comment.