11
Views
8
Comments
Solved
[in app browser] getting Can't find variable: cordova
Question

After I added in app browser plugin I am getting Can't find variable: cordova error while generating native application.

Rank: #1159
Solution

Hi,

You don't need SwiftSupportPlugin because MABS is able to compile swift sources in IOS (https://success.outsystems.com/Support/Release_Notes/Mobile_Apps_Build_Service_Versions).

In File Chooser plugin you can remove the dependency to SwiftSupportPlugin. I have tried to compile InAppBrowser and File Chooser plugins together and it works. Only I have tested to compile successfully.

Kind regards, David.


Rank: #11796

wow.removing the dependency it started to  build correctly.I didn't know this before.Thank you for the help.Really appreciate it.

Rank: #54

Hi SUSHREE,


After adding a new plugin, you need to generate a new version of the app and install it again on your phone.


Take a look here for the scenarios where the new build of the app must be installed, among which a new plugin.


Kind Regards,

João

Rank: #11796

Hi Joao,

I am getting this error when I am generating the new build itself after adding the plugin.

Rank: #1159

Hi,

Please take a look and share the generation log available at Service Center (Applications -> Your Application -> Distribute -> Native Platforms -> download generation log icon).

The generation report with the error could help to identify the issue. What MABS version are you using?

Kind regards, David.

Rank: #11796

Hi David,

Please find the logs.The log file was big so compressing and attaching.Thanks

iOSBuildLog2.txt

Rank: #1159

Hi,

The problem is the incompatibility between the different plugins when you generates the native application. The InAppBrowser plugin compiles successfully in an isolated way when you use MABS 7.0 (must be the latest version (2.4.0 or later) to be supported correctly in MABS 7.0). This plugin needs Swift support but MABS 7.0 gives it this support. If you test only with this plugin you shouldn't have any problem in order to compile an IOS version.

On the other hand, I can see in your logs that you added the SwiftSupportPlugin. I have tested InAppBrowser and SwiftSupportPlugin together and not compile. I don't know if you'll need this plugin for other plugins but I'd suggest you to remove it (MABS supports Swift 5.3) and try to compile.

If it doesn't work you will have to remove plugins until it compiles. It is also important to check the versions of the plugins.

Kind regards, David.

Rank: #11796

Thank you David for digging into this huge log file and figuring this out.

Yes thats correct if I use Inappbrowser plugin alone it works.but thats not feasible because my application has bunch of other features which requires to access the files on the phone.

 SwiftSupportPlugin is needed for File Chooser plugin.Now I am wondering how to resolve this issue?

Also do you know by any chance why  SwiftSupportPlugin is not compatible with Inappbrowser ?


Rank: #1159
Solution

Hi,

You don't need SwiftSupportPlugin because MABS is able to compile swift sources in IOS (https://success.outsystems.com/Support/Release_Notes/Mobile_Apps_Build_Service_Versions).

In File Chooser plugin you can remove the dependency to SwiftSupportPlugin. I have tried to compile InAppBrowser and File Chooser plugins together and it works. Only I have tested to compile successfully.

Kind regards, David.


Rank: #11796

wow.removing the dependency it started to  build correctly.I didn't know this before.Thank you for the help.Really appreciate it.