Trouble on last step of exporting to iOS

I am on the last step of exporting my game to iOS. I'm on the 4-3-1 Archive and Signing part in the manual. Unfortunately this bit of code doesn't work.

$ xcodebuild -exportArchive -archivePath ~/Library/Developer/Xcode/Archives/2015-07-29/Sample\ 2015-07-29\ 18.32.xcarchive/ -exportProvisioningProfile "sample" -exportPath ~/Desktop/sample.ipa

I get this error "xcodebuild: error: invalid option '-exportProvisioningProfile'"

Not sure what to do, it's taken weeks to get to this point. Any ideas?

I tried distributing it via Xcode, I have an .ipa file but when I install it on my iPad and click on it, it says "Apache Cordova Device is ready." That's it.
@Kasier13 Sorry to hear you're having trouble getting it on there; I know it must be frustrating.

I've never done this kind of Mobile Deployment before myself, but it doesn't necessarily look like an issue with RPG Maker MV (or what it produced). Do you feel confident that's the issue? Because if it's a problem with the App Store or with iOS itself, you may have more luck asking around at an iOS developer site.

One other thing that looks a little suspicious to me is that your file directory uses different "slash" orientations. I forget whether that's allowed, but it jumped out to me as a possible reason for the trouble.
$ xcodebuild -exportArchive -archivePath ~/Library/Developer/Xcode/Archives/2015-07-29/Sample\ 2015-07-29\ 18.32.xcarchive/ -exportProvisioningProfile "sample" -exportPath ~/Desktop/sample.ipa
The problem is with the line -exportProvisioningProfile, Xcode doesn't recognize this command.
After many hours I finally figured it out. The section 4-3-1 of the manual is outdated.
You want to go to "Product" in the main menu, select "Clean Build Folder" Then "Build". When that is successful, in the same menu choose Archive. Once that completes, go to Window/Organizer. In the Organizer, chose Distribute App, Choose Ad Hoc deployment and Automatic Signing. When it's done it will ask you to save. The folder that you save contains your app. To transfer, connect your iPad and select it I the finder window. Drag the .ipa file onto the general iPad info window and the app will be installed.

Original thread: https://forums.rpgmakerweb.com/threads/trouble-on-last-step-of-exporting-to-ios.124378/