Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid IPA error on Testflight: The APS environment in your embedded.mobileprovision and your binary don't match

I am sorry for posting so many questions, but getting this to work has been incredibly painful, even tho Testflight makes it much easier

Invalid IPA error: The APS environment in your embedded.mobileprovision and your binary don't match

I figure this has got to do with my Apple Push Notifications. I am using my distribution profile across all my settings. My app has been configured to both development and production.

What could the causes of this error be?

As a side note, I have been working on this for the entire day, and I get stuck at one thing after the other, esp involving static libraries and xcode4. Am I really bad at this, or does Apple really make it so hard?

like image 319
meow Avatar asked Jun 29 '11 15:06

meow


People also ask

What is APS Environment IOS?

APS Environment (macOS) Entitlement. The environment for push notifications in macOS apps. Key: com.apple.developer.aps-environment. com.apple.developer.usernotifications.filtering. Enable receiving notifications without displaying the notification to the user.

What is APS development?

USAID's Locally Led Development Annual Program Statement (APS) is a mechanism for USAID Missions and other Operating Units to facilitate assistance awards to local and non-traditional partners for innovative, adaptive, and locally led development approaches.


1 Answers

I think it was an xcode bug. Here's how i solved it, and maybe it can be useful for some users in the future. Including my problem solving steps for reference:

  1. i changed the entitlement file to aps-environment = production. No go, still different between the 2 files.
  2. i changed ALL my settings (debug/not) to the distribution profile, just to be sure
  3. I built it again, and checked out the embedded.mob and binary as you suggested
  4. No go again.
  5. I went nuclear - deleted all my profiles, downloaded only the distribution build i needed
  6. here is when it became interesting - i could not build it on debug (expected), but i was having the same problem of "profile not found" even when i was in ad hoc archiving mode. Surely that means that there remains a reference to the developer mode even when i was trying to archive it (given that i have already changed ALL my settings and deleted all my other profiles)
  7. So i digged up project.pbxproj, and found the offending line that was still trying to access my development profile in ad hoc build. I changed it manually, and bingo, things worked as per expected

End of the day, i am surprised why this would happen. It seems like an xcode 4 bug. Normally it is my fault when these things happen, but this seems arcane enough (plus i had so much trouble with xcode 4 for a few other things).

Solved with help from the amazing Testflight team!

http://support.testflightapp.com/discussions/tools/17-invalid-ipa-the-aps-environment-in-your-embeddedmobileprovision-and-your-binary-dont-match

like image 91
meow Avatar answered Oct 12 '22 02:10

meow