This is a migrated thread and some comments may be shown as answers.

Cannot build with the Cordova iBeacon plugin

1 Answer 93 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martijn
Top achievements
Rank 1
Martijn asked on 30 Oct 2014, 10:00 AM
I´m trying to use the latest version (3.1.2) of the Cordova iBeacon plugin (https://github.com/petermetz/cordova-plugin-ibeacon) with Telerik Appbuilder, but somehow the application won't build (for iOS) when I've included the plugin. I've tried both the Windows application and the Web application. The error it gives back after failing to build tells me to check the log, but there's no entry in the log.

After some testing, the problem seems to be in the src/ios/CDVLocationManager.m file. Any idea what could cause these problems?

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 04 Nov 2014, 11:33 AM
Hello Martijn,

Thank you for contacting our support services.

I checked the above mentioned plugin and it seems that, its latest version uses the iOS 8 SDK, even when targeting iOS 7 and below devices. This is a problem for our Platform, as we are still migrating to the iOS 8 SDK and XCode 6. To use the plugin, you will need to download its 2.0 version from git hub, or fire an issue to its creators about the above matter. The faulty code (at least on first sight) in the CDVLocationManager.m file, is this:
if (!IsAtLeastiOSVersion(@"8.0")) {
   CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
   [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
} else {
   [self _handleCallSafely:^CDVPluginResult *(CDVInvokedUrlCommand* command) {
      [self.locationManager requestAlwaysAuthorization];
      return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
   } :command];
}

For example, you can check how a similar functionality is written here. This is the proper way to do it.

I hope this helps. Please, let us know if we can be of a further assistance.

Regards,
Kaloyan
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
AppBuilder Windows client
Asked by
Martijn
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or