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.
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.