Mobile.provisions file error when building for ios

When XCode is not needed then how will we get the mobile provisions file. Why is it needed? Can we not build our iOS app (debug version) and test the build on a device.

The mobileprovision file is generated on Apple’s site. You need a developer account with them to do this. VoltSigner can help you create the certificate and mobileprovision files.

Your app needs both a development certificate and a mobileprovision file to run a debug version on a test device.

is the mobileprovision file mandatory? can we not get even the “debug” version for the iOS app without this file?

Yes, it’s mandatory. Among other things, it lists which devices are allowed to run the app.