Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[4.7.2] Failed to find a valid matching mobile provision

Using the 4.7.2 hotfix, I still get an error at the end of my iOS Shipping packaging step. My distribution mobile provisioning profile is valid and it is used successfully the first time during the packaging process just right after

 Staging files before copying to Mac ...

But at the end of the packaging process, I get the following:

 IPP WARNING: Failed to find a valid matching mobile provision, will attempt to use the embedded mobile provision instead if present
 IPP ERROR: Could not find myIOSProject.mobileprovision in D:\UE4\myIOSProject\Build\IOS (error: 'Could not find file 'D:\UE4\myIOSProject\Saved\StagedBuilds\IOS\embedded.mobileprovision'.').  Please follow the setup instructions to get a mobile provision from the Apple Developer site.
 IPP ERROR: Application exception: System.IO.FileNotFoundException: Could not find file 'D:\UE4\myIOSProject\Saved\StagedBuilds\IOS\embedded.mobileprovision'.
 File name: 'D:\UE4\myIOSProject\Saved\StagedBuilds\IOS\embedded.mobileprovision'
    at iPhonePackager.CodeSignatureBuilder.GetMobileProvision(String CFBundleIdentifier) in d:\UE4\Engine\Source\Programs\IOS\iPhonePackager\CodeSigning.cs:line 191
    at iPhonePackager.CodeSignatureBuilder.LoadMobileProvision(String CFBundleIdentifier) in d:\UE4\Engine\Source\Programs\IOS\iPhonePackager\CodeSigning.cs:line 196
    at iPhonePackager.CodeSignatureBuilder.PrepareForSigning() in d:\UE4\Engine\Source\Programs\IOS\iPhonePackager\CodeSigning.cs:line 613
    at iPhonePackager.CookTime.RepackageIPAFromStub() in d:\UE4\Engine\Source\Programs\IOS\iPhonePackager\CookTime.cs:line 287
    at iPhonePackager.Program.Main(String[] args) in d:\UE4\Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.cs:line 753

However, after copying my distribution profile to D:\UE4\myIOSProject\Saved\StagedBuilds\IOS, renaming it to embedded.mobileprovisioning and running the IPhonePackager command in a Windows cmd, the ipa is successfully packaged. I ran the following command in the cmd:

 IPhonePackager.exe RepackageFromStage "D:\UE4\myIOSProject\myIOSProject.uproject" -config Shipping -compress=best -sign -distribution -stagedir "D:\UE4\myIOSProject\Saved\StagedBuilds\IOS" -project "D:\UE4\myIOSProject\myIOSProject.uproject

I guess this is a bug, where the profile is not copied to the specific directory?

Product Version: Not Selected
more ▼

asked Mar 05 '15 at 12:24 AM in Bug Reports

avatar image

541 29 33 181

avatar image Ravlek STAFF Mar 05 '15 at 12:43 AM

Did you import the distribution provision using the Import Provision button in the IOS Project Settings?

We use the development provision for the initial sign and then distribution provision during the final package sign. The log you show implies it tried find the distribution provision but after not finding it we tried to copy it from a fallback location for backwards compatibility and didn't find it there either.

Anyway try importing from the project settings and see if it works then.


avatar image trutty Mar 05 '15 at 07:53 AM

Hi Pete,

yes I used the IOS Project Settings to import my distribution provision. However, I only imported my distribution and not my development provision and the initial signing is then made with the distribution provision, too (I checked the UnrealBuildTool.2.txt).

avatar image Ravlek STAFF Mar 05 '15 at 02:18 PM

Ok, could you post the full log from the editor of this error? I need to see what's happening further upstream from the final package.


avatar image trutty Mar 06 '15 at 08:56 AM

Sure, should have done this when I asked the question.. Here are the UnrealBuildTool.2.txt and the IPhonePackager.txt. I replaced some things in the logs like the actual app id and sigining id and stuff.

The IPhonePackager cannot find a correct provisioning profile, however, when I copy an embedded.mobileprovision (my 'MyProject distribution profile') in the staging dir just right before the packing process is searching for it, the process finishes without an error. Even using the IPhonePackager.exe to re-sign the ipa works. But no matter what I do, when uploading it to iTunes Connect, I get an invalid binary error. In the mail from ITunes Connect it says Invalid Signature - Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate.

I really need to get the app uploaded to the app store, hopefully you can tell where I am mistaken.

avatar image Ravlek STAFF Mar 06 '15 at 02:50 PM

Ok, I think I know what the problem is. When you made your distribution provision, did you select Ad Hoc instead of App Store? I believe this is the case because the IPP log is telling me your distribution provision has two devices specified in it. This is indicative of an Ad Hoc distribution provision which is not the right kind of provision for attempting to upload to the App Store. You will need to generate an App Store provision from developer.apple.com, import that via the Project Settings, and then it should work and you should be able to upload to the store as well.


avatar image trutty Mar 06 '15 at 03:09 PM

Hi Pete, thanks for your reply. Wow this really would be a stupid error by me. I re-generated a distribution profile for the AppStore now and will package the whole thing. In 2h I will know the result.

avatar image Ravlek STAFF Mar 06 '15 at 03:30 PM

When you import the new provision, import it as a different filename (for example, Distro_MyProject.mobileprovision), that way your original Ad Hoc provision will still be there for use in the future.


avatar image trutty Mar 06 '15 at 05:40 PM

Signing now works correct, thanks for that! Unfortunately I get the same invalid signature error from iTunes Connect. I am 100% sure I have an AppStore distribution profile. Here is the IPhonePackager.txt just in case..


I attacked a screenshot from the project settings and one from developer.apple.com. app store distribution provision, ios project settings

avatar image Ravlek STAFF Mar 06 '15 at 05:53 PM

Ya, that looks correct. The Invalid Signature error was seen in the past, but a fix was added which should be in 4.7.2. Just to be sure, did you upload the GameFolder\Binaries\IOS\Distro_Game-IOS-Shipping.ipa?


avatar image trutty Mar 06 '15 at 06:16 PM

I uploaded the file from another directory which I whoose with the "Browse For Folder" dialog of File > Package Project > IOS

I now uploaded the the file D:\UE4\MyProject\Binaries\IOS\Distro_MyProject-IOS-Shipping.ipa and got the same itunes connect error (I had to increase the CFBundleVersion in the plist and re-sign with the IPhonePackager.exe using the app store distribution provision in order to upload a new build with the application loader)


I am using 4.7.2

avatar image Ravlek STAFF Mar 06 '15 at 06:22 PM

hmm... I guess there is another possible way of getting that bug then. In the meantime, do you have access to a Mac and the editor? You can run your project through File | Package there and it will use Xcode to do the final code sign and should get you past this issue for the time being while I see if I can figure out the problem with PC code signing.

Also, can you private message me your MyProject.stub? It should be in your Game/Binaries/IOS directory. If you can, I can try to re-sign it here in a debugger and see if I can figure out what is going on. I won't be able to run it as it won't have content, so your IP should be safe and I don't plan on running it anyway, just want to get the bug fixed and I suspect it is another Mach-O header issue which I should be able to figure out from the debugger :)


avatar image trutty Mar 06 '15 at 06:39 PM

Unfortunately no, for now I am kinda stuck on my Windows machine. I am sending you a private message through the UE Forum in a minute.Thanks for investigating this issue.

avatar image Ravlek STAFF Mar 06 '15 at 06:55 PM

Nevermind, I see where you sent it :)


avatar image Ravlek STAFF Mar 06 '15 at 07:05 PM

Hi trutty,

Could you try making an IPA with just armv7 and arm64? That may be the issue as I don't believe we have ever tested all three architectures. I'm still going to figure out what is going on, but that might solve your issue for now.


avatar image trutty Mar 06 '15 at 07:40 PM

I am doing that right now. I ticked the armv7s checkbox because I want to support the iPad 4 (and iPad 3 retina apparently; reference iOS device architectures and iOS device matrix). I am coming back when packaging is complete

avatar image Ravlek STAFF Mar 06 '15 at 07:41 PM

Ok, I ran through the code signing and everything looks ok. Putting the universal binary on my mac, the tools there show it to be a valid binary for the three architectures. When I do the same thing with the 4.6 version of IPP, then it shows me the 64-bit architecture is not found correctly which is what was happening when the bug occurred. Could you crack open the Distro_XXXX.ipa and get the executable and send that to me over message? I will compare it to what my signing did and see if there is a difference.


avatar image trutty Mar 06 '15 at 07:52 PM

alright, sent you the message

avatar image Ravlek STAFF Mar 06 '15 at 08:04 PM

So your signed binary is different from mine, probably because we used different provisions and certificates. However, the mac tools "lipo" and "file" both show your binary as being a valid universal binary with three architectures in it, so I think the signing is fine at this point. I'm not sure why it is failing to upload. How are you uploading it to the App Store? As far as I know, you need to upload it via the Application Loader on a Mac. Maybe that is the issue?


avatar image trutty Mar 06 '15 at 08:21 PM

Sounds very strange. I use the Application Loader 3.0 (downloaded from iTunes Connect here) on a MacBook. I just follow the normal process of selecting the ipa and clicking through each step. At the end I get a warning stating The resulting API analysis file is too large. We were unable to validate your API usage prior to delivery. This is just an informational message., after that I hit send and a few minutes later I get the said mail saying Invalid Signature

The armv7, arm64 package is nearly finished...


Just to rule that out: I am sure that I am uploading the correct ipa file, because the CFBundleVersion string in the plist and on in iTunes Connect are the same.

Update: With the armv7, arm64 package, I get the following errors:

  Minimum OS Version Mismatch - The minimum OS version (LC_VERSION_MIN_IPHONEOS) in the binary ('6.1') for architecture ('armv7') differs from the MinimumOSVersion ('8.0') in the Info.plist.
 Minimum OS Version Mismatch - The minimum OS version (LC_VERSION_MIN_IPHONEOS) in the binary ('7.0') for architecture ('arm64') differs from the MinimumOSVersion ('8.0') in the Info.plist. 

I don't want to support iOS versions < 8.0

avatar image Ravlek STAFF Mar 06 '15 at 09:27 PM

well, I guess that is progress of sorts. We always build against iOS 6.1 as that is our minimum spec (plus we will get build errors if we build against straight up iOS 8), but I thought setting the plist to a different min version worked correctly. Do you get that error on upload to the store?

avatar image trutty Mar 06 '15 at 09:34 PM

Yes, the errors I just posted under "Update" are from iTunes Connect.

avatar image Ravlek STAFF Mar 06 '15 at 09:36 PM

This may just be a misunderstanding on our part on how the MinimumIOSVersion key works in the Info.plist. I'm still trying to reconcile various threads on the subject, but this may be a blocker for you as the executable won't build for just iOS 8.

avatar image Ravlek STAFF Mar 06 '15 at 09:45 PM

Ya, it looks this not going to work in 4.7.2. We assumed the MinimumIOSVersion key would work no matter what the build version was and that seems to not be the case. I don't know how quickly we can fix this as I am pretty sure we won't currently compile if we set the minimum version to iOS 7 or iOS 8. I'm doing some compile tests now and I'll get back to you.


avatar image trutty Mar 06 '15 at 09:55 PM

Alright. So at present I could only set the MinimumiOSVersion to 6.1 and architecture support for armv7 and arm64? So if this would work, I would still miss armv7s support (iPad 4 and iPad 3 retina) because enabling this architecture somehow results in an `Invalid Signature' error? I am a bit confused about my possibilites at the moment ;)

avatar image Ravlek STAFF Mar 06 '15 at 10:00 PM

Well, armv7 architecture will work on the iPad 3 and iPad 4, so that's not necessarily an issue. I just did a build test with iOS 8 as the minimum for the build and while we got a bunch of deprecation warnings, it did build. So, since you are building from a PC, I can only assume you are a GitHub user :)

To build with iOS 8 as the minimum version, open up iOSToolChain.cs in Engine/Source/Programs/UnrealBuildTool/IOS. Near the top, you will see a variable called BuildIOSVersion. Change that from 6.1 to 8.0 and then do another File | Package. UBT will automatically build itself and then the game will be rebuilt and packaged with iOS 8 as the minimum version.

That should solve your problem and I will make sure we get better testing on the Min OS Version in the future.


avatar image trutty Mar 06 '15 at 10:06 PM

Yes I am :) Great, I will test this right now. One quick question, I only change BuildIOSVersion, the variable RunTimeIOSVersion should not be changed?

avatar image Ravlek STAFF Mar 06 '15 at 10:09 PM

That's the variable that is set from the Project Settings. So it will be set to iOS 8.0 already. That's where this whole problem is coming from :)

avatar image trutty Mar 06 '15 at 11:46 PM

It worked :) Finally I do not get any errors with iTunes Connect and I have a iOS 8.0 app uploaded. Thanks you so much, Pete!

avatar image jedisongoku May 07 '15 at 09:59 AM

I'm trying to change the OS version of an app that is already on the appstore. The minimum was set to 6.1 but I'd like to change it to 8.0. Using 4.6 github version and I set the BuildIOSVersion to 8.0 but I get the error

Minimum OS Version Mismatch - The minimum OS version (LC_VERSION_MIN_IPHONEOS) in the binary ('6.1') for architecture ('armv7') differs from the MinimumOSVersion ('8.0') in the Info.plist.

Minimum OS Version Mismatch - The minimum OS version (LC_VERSION_MIN_IPHONEOS) in the binary ('7.0') for architecture ('arm64') differs from the MinimumOSVersion ('8.0') in the Info.plist.

anyway to fix this?

avatar image Ravlek STAFF May 20 '15 at 03:15 PM

Ya, there is. You need to go in to the IOSToolChain.cs file and change the BuildIOSVersion from 6.1 to 8.0. This will make it build against 8.0 only. You will get some warnings about deprecated APIs, but it will still build. All of this has been fixed in 4.8 so that when you specify a minimum IOS version, it will change all of this for you.


avatar image Ravlek STAFF May 20 '15 at 03:17 PM

That tool chain file can be found in Engine/Source/Programs/UnrealBuildtool/IOS and UBT will automatically build itself on the next File | Package that you do.


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Howdy trutty,

Glad to hear that psauer was able to help you get this issue resolved. If you run across this issue in a future release, please feel free to reopen this issue so that we may be able to further investigate.

Thanks and have a great day!

more ▼

answered Mar 07 '15 at 06:07 PM

avatar image

[Epic] Gribbs ♦♦ STAFF
11.8k 292 14 77

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question