In order to create a test .ipa, you need a development certificate and a development .mobileprovision. This should include the device ID's (UDID) of the test devices.
Make sure you don't use the UDID as provided by the phone itself (usually starts with 'FF'), because that's a fake ID. Instead, connect your device to Xcode or iTunes (for Windows) and read the UDID as presented in that software.
For distribution through iTunesConnect, you need a distribution cert and AppStore .mobileprovision (rebuild with these key files), which doesn't include any device ID's.