I have searched a lot on internet but non of the solutions work for me. I create an ipa with Xcode Maven Plugin It successfully builds my application and creates an ipa but when I want to upload it on testflightapp it gives me this error:
Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc?
I have added provisioning profile in build settings like the following pic
If I create ipa manually with Xcode>Product>Archive I can successfully upload ipa on testflightapp. So my guess is that Xcode Maven Plugin cannot read my provisioning profile. I tried to force using provisioning profile by specifying it in pom file like bellow:
<configuration>
<configurations>
<configuration>Debug</configuration>
<configuration>Release</configuration>
</configurations>
<provisioningProfile>42CB38B0-62BB-4242-BD03-72EDB7570842</provisioningProfile>
</configuration>
Any help would be appreciated.
I figured out the problem. I was using wrong ipa file from maven target. I was using ipa from this path:
/target/checkout/src/xcode/build/Debug-iphonesimulator
I had to use this path
/target/checkout/src/xcode/build/Release-iphoneos
It was stupid mistake.