Trouble with last steps deploying to iOS

I am on the last step of exporting my game to iOS. I'm on the 4-3-1 Archive and Signing in the manual. Unfortunately this bit of code doesn't work. (This is just the sample code from the manual, in my build I replaced the paths and files names with my info)

$ 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 saved 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.
This is a duplicate topic. If you have an answer please post it here.

Closing this thread.

Original thread: https://forums.rpgmakerweb.com/threads/trouble-with-last-steps-deploying-to-ios.124383/