1

I have a OSX binary sent to Apple for the App store review. It was rejected because of a bug. Unfortunately I am not able to reproduce the problem on my local machine. Now I assume that the encrypted release-version of my binary behaves different than my developer version which is running on my local machine.

Is it possible to run the produced binary for the app store reviewer locally on my machine? Executing the produced binary as usual is not working because the app is terminated immediately. The reviewer can test my binary, so I assume that there must be any certificate or helper tool which can launch this very binary on my machine, too. The fact that I am the developer and all certificates are installed on my machine lead me to the question why I can't run the binary.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
JackPearse
  • 2,922
  • 23
  • 31
  • Why can't you just produce (archive) the release version of your binary and run it on your machine? I don't see the difficulty here. – trojanfoe Nov 09 '12 at 09:38
  • I actually did this. But it will not start. The app is terminated immediately. It is encrypted with all the certificates and keys and is using entitlements. Maybe I need to use an installer or something similar. It is running if I turn off all encryption. But I would like to test exactly that binary which the reviewer is testing. – JackPearse Nov 09 '12 at 09:44
  • So during development did you ever test the release version of your binary? – trojanfoe Nov 09 '12 at 09:59
  • This is exactly what I try to do. If I compile a release version it's not running on my machine. I tried apples approach by exporting the installer package. The package is fine, its is installing perfectly. But after launching the App it always gets ("Killed: 9" output on the console. (SIGKILL 9, Kill signal)). – JackPearse Nov 09 '12 at 10:12
  • For reference: https://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/OSXWorkflowGuide/DistributingApplications/DistributingApplications.html – JackPearse Nov 09 '12 at 10:12
  • I still don't see why the method you used to submit the app to Apple is important. If your release binary doesn't work prior to submission then it's bound to be rejected. I also don't understand why you didn't test it prior to submission. Every developer knows that the release and debug build behave differently. – trojanfoe Nov 09 '12 at 10:35
  • The problem is that the app WORKS at the reviewer site. But not at my computers site. There is still a bug. I tried for a long time to run the release binary. But because I cannot run it on my machine, I sent it for review. The first upload to apple was accepted, so I was thinking that this is no problem. Back to the question: What could be the cause of the release version is not starting. This behaviour (app is starting and killed immediately) means IMHO that there is sth. wrong with certificates. It is not a crash, that is for sure. – JackPearse Nov 09 '12 at 11:04
  • I would forget about Apple and concentrate on getting the release binary working. Even if it was accepted by Apple, if it doesn't run on your machine then it won't run on a customer's machine and you'll have to solve the issue then. Better to do this before a customer sees it and becomes disenchanted with your work. – trojanfoe Nov 09 '12 at 11:08
  • Yeah, that's right. But this is exactly my question. HOW do I get my binary running on my system. Without codesigning everything works fine. But how to I test a code signed App? What is the workflow, which certificates are involved, do I need additional tools (i.e. productsign --sign "Developer ID Installer: NAME" PATH_TO_UNSIGNED_PKG PATH_TO_SIGNED_PKG) etc. I am stuck here. Without code signing debug and release versions work fine. Whatever I do, the installer works, the app is installed properly. And it starts, and immediately terminates with exit code 9. – JackPearse Nov 09 '12 at 11:22
  • Hmmm, I am developing a sandboxed app at the moment and I don't have issues when running either the debug or release app, both of which are signed. I simply used the Xcode recommended settings and signed using by 'Mac Developer' certificate. I haven't even looked at how I submit my app, so there might be a change I need to make before submitting. – trojanfoe Nov 09 '12 at 11:28
  • Actually I have more information. I Installed my signed binary from my signed package (using 'productsign'). It works perfect! And after starting the App my console says: "killed com.vendor.appname because its use of the com.apple.developer.ubiquity-container-identifier entitlement is not allowed". So it seems that using the iCloud is a problem here. – JackPearse Nov 09 '12 at 11:38
  • 'taskgated' is causing the problem. (I am running Mountain Lion) So, Gatekeeper is dropping me out. – JackPearse Nov 09 '12 at 11:43
  • Look at Console.app. What is `com.apple.developer.ubiquity-container-identifier`? – trojanfoe Nov 09 '12 at 11:44
  • It is set to my applications sandbox id (com.mycompany.product). In the debug mode it is working without problems. – JackPearse Nov 09 '12 at 11:52
  • I have obviously a heisenbug in my code. This article shows the same problem. (http://stackoverflow.com/questions/9337511/bug-that-only-appears-in-archived-mac-os-x-product?rq=1) – JackPearse Nov 09 '12 at 11:56
  • 1
    This SO question seems to have an answer that fits your problem: http://stackoverflow.com/questions/8548103/icloud-and-correct-provisioning-profile-usage – trojanfoe Nov 09 '12 at 12:01
  • That's exactly it! Binary bundles using iCloud with production certificates will not work. I copiled using my developer certificate. Then created an archive using xcode. Exporting and stuff didn't work for me. But I opened the archive in finder, opened the package. Inside the subfolder "Applications" there is my App bundle. This bundle first did not start, because I was logged in with my private appstore account. Log out from the app store. Start the app. And login with a test user you have created in iTunesConnect. Then the app is starting. YEY! – JackPearse Nov 09 '12 at 12:20

1 Answers1

2

The article How to reproduce bugs reported against Mac App Store submissions should walk you through this.

Vincent Gable
  • 3,455
  • 23
  • 26