'run ios-device' fails -- copy-www-build-step.js deletes provisioning file

I’ve been back and forth with Apple on this for a while and have discovered a problem. When I run ‘meteor run ios-device’, the script copy-www-build-step.js runs these lines:

// Code signing files must be removed or else there are
// resource signing errors.
shell.rm('-rf', dstWwwDir);
shell.rm('-rf', path.join(dstDir, '_CodeSignature'));
shell.rm('-rf', path.join(dstDir, 'PkgInfo'));
shell.rm('-rf', path.join(dstDir, 'embedded.mobileprovision'));

This is causing Xcode to fail because there’s no provisioning file. I can see in real time in the Mac build that _CodeSignature, PkgInfo, and embedded.mobileprovision are there for a second, then deleted by the script. _CodeSignature and PkgInfo show back up in the build a moment later, but embedded.mobileprovision doesn’t. So the install of the app to my iPhone fails, and the details say it’s because there’s no provisioning file. I have fixed this by going into ‎⁨/⁨.meteor/⁨local/⁨cordova-build/platforms⁩/⁨ios⁩/⁨cordova/⁨lib⁩/copy-www-build-step.js and commenting out this line:

//shell.rm('-rf', path.join(dstDir, 'embedded.mobileprovision'));

but clearly, this isn’t how it should work and I shouldn’t need to do this. I haven’t needed to do this for years, it only started recently. Does anyone else have this problem? Is there something in the Meteor Cordova build that needs to be changed to fix this?


1 Like

Hi, what is the error on XCode? Could you open an issue on https://github.com/meteor/meteor/issues then we can discuss if we really need this line deleting the mobileprovision or not?

You bet. Opened the issue: https://github.com/meteor/meteor/issues/10863
It has excerpts from the Apple support thread about Xcode, etc.