It is very simple to get .ipa file from Xcode:
- Select correct provisioning profile in Project and Targets -> Build Settings -> Code Signing -> Code Signing Identity
- In Targets change the Bundle Identifier by Targets -> Info -> Bundle Identifier
- Clean your project
- Archive your project by Product -> Archive
- Organizer automatically open with separate window there you can see you project with Archive date/time and project name
- Click Share button from the Organizer window
- It will ask to you choose the correct Provisioning profile do this correctly
- It will ask you for the location to store, select Desktop or anywhere else
- In your selected location the project .ipa file will be stored.