extras/.../ios: rework the build script