I am using Barcode plugin in an application, the android version of application works fine but in IOS the app crashes as soon as I click on scan button. I implemented same code in a different application and it worked in different application on both IOS and Andriod device. I checked in service center so it showed me the following error:

A fatal error has occurred. Please contact OutSystems support: *** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]

I debugged the application but the debugger stops at ScanBarcode action of the plugin and application crashes without any message, so I cannot see why it crashed.

how can I make it work in the same application?

Are both versions of the iOS app (the one that works, and the one that crashes) on the same version of the OutSystems platform, and compiled using the same version of MABS?

Are there any other differences between the two that might be relevant?

Assuming the platform and MABS versions are the same, the next step I would recommend is creating a fresh app that is stripped down to just the essentials to test the barcode plugin, and see if you can get that working. If so, you'll need to ensure that the barcode plugin in the crashing app is configured the same and using the same parameters, etc. 

G. Andrew Duthie wrote:

Are both versions of the iOS app (the one that works, and the one that crashes) on the same version of the OutSystems platform, and compiled using the same version of MABS?

Are there any other differences between the two that might be relevant?

Assuming the platform and MABS versions are the same, the next step I would recommend is creating a fresh app that is stripped down to just the essentials to test the barcode plugin, and see if you can get that working. If so, you'll need to ensure that the barcode plugin in the crashing app is configured the same and using the same parameters, etc. 


Both versions of app are on same platform and have same version of MABS and there is no difference in the logic even the variable names are same. There is no difference in both apps just they both are different apps on same environment with same dependencies and same logic with same build type and same MABS version.