ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core

Syntactical error with method in CDVBMSClient.swift

Closed this issue · 3 comments

Aerex commented

The method tryInitializeWithBackendRoute does not exist in IMFCore. The proper method is initializeWithBackendRoute, however it does not return anything. I don't know if it returns an exception to handle the callback.

//use category to handle objective-c exception
            let exceptionString = client.tryInitializeWithBackendRoute(route, backendGUID: guid)

            if exceptionString  == "" {
                let pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAsString: "")
                // call success callback
                self.commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)
            } else {
                let pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR, messageAsString: exceptionString)
                // call failure callback
                self.commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)
            }

Hi,
The method 'tryInitializeWithBackendRoute' exist in "IMFClient+initializeException.h" file, and in "IMFClient+initializeException.m" file we call the 'initializeWithBackendRoute' that are in IMFCore.

Does 'tryInitializeWithBackendRoute' not recognized in your xcode project?
(I just tried to set new project - and it working ok with xcode 7.3.1)

Aerex commented

I see that but can you verify if this header is under the umbrella header for IMFCore.

screen shot 2016-09-15 at 10 37 33 am

"IMFClient+initializeException.h" file is not under the umbrella header for IMFCore, its part of the 'ibm-mfp-core' plugin files.
I see you tried to run the 'helloauthentication' sample, I just tried it to and I don't get this issue in Xcode, can you elaborate how you configure the Xcode project.