##Generate and Install IPA's file in device through Command Line
###Thanks to Mattt and phonegap's scripts
Take a note: all this steps can be automatized in a single script, if you know how to write it. (Bash or Ruby will be fine)
1.- Install your Provisioning Profile and Developer Certificate
2.- Install Shenzhen and ios-deploy: the firstone will generate the IPA file and the secondone will install it onto your device
###Generate the IPA File
3.1 Go to your project's path in terminal CL
3.2 Use the command ipa build
ipa build
Note 1:: If you have problems with the scheme you can install xcodeproj gem
[sudo] gem install xcodeproj
Later create a script .rb to Share schemes Thanks to mgrebenets for the information:
require 'xcodeproj'
xcproj = Xcodeproj::Project.open("MyProject.xcodeproj")
xcproj.recreate_user_schemes
xcproj.save
You can just paste the code above in a new .rb file and run it before the ipa build. When the script finish, you can check the Scheme and Targets list and run again ipa build:
xcodebuild -list
Note 2: BUT!!! if still not working, probably is because is not getting signed. ughhh So, it's not working if you don't sign first your app with xcode. Why the heck is so difficult? Dunno, but for reasons, I wrote a simple script in ruby to run before everything else (all the commands above and later follow all the steps listed). You can download it from my github account:
https://github.com/phynet/SSCodesigningXcode **(This is not tested in Xcode >= 8) **
3.3 If you have more than one target, select the target yo want to use. Have patience, it takes some time to create the IPA file.
3.4 You can see the information of your IPA file using:
ipa info
###Install IPA file in your device
4 We'll use ios-deploy gem for that. And of course, connect your device.
ios-deploy --debug --bundle MyProject.ipa