Question

Im quite new to the whole mac development- and deployment world. Im trying to create an OSX app and upload it to the appstore using Itunes Connect and the Application Loader. Im using Mac OSX Version 10.6.8

I have codesigned my App using:

codesign -s "3rd Party Mac Developer Application: <company name>" <my app name>.app

Then I've built a Installer Package using:

productbuild --component <my app name>.app /Applications --sign "3rd Party Mac Developer Installer: <company name>" <my app name>.pkg

During codesign and productbuild i get no errors and the Application runs without problems.

Unfortunately I am unable to install the package. If I run the pkg in the commandline using:

sudo installer -store -pkg <my app name>.pkg -target /

I get following output:

installer: <my app name>.pkg has valid signature for submission
installer: Installation Check: Passed
installer: Volume Check: Passed
installer: Bundle <my bundle name> will be relocated to <path to my app>/<my app name>.app
installer: Starting install
installer: Install 0.0% complete
installer: Install 5.0% complete
[...]
installer: Install 95.0% complete
installer: Install failed: Beim Extrahieren von Dateien aus dem Paket <my app name>.pkg“ ist ein Fehler aufgetreten.

The error means "Error during the extraction of files of the package ..."

The entry in the installer.log regarding the faild install:

Install Failed: PKG: extracting "<my bundle name>"
Error Domain=PKInstallErrorDomain Code=110 UserInfo=0x1004687b0 "Beim Extrahieren von Dateien aus dem Paket „<my app name>.pkg“ ist ein Fehler aufgetreten." Underlying Error=(Error Domain=BOMCopierFatalError Code=0 UserInfo=0x10c9af710 "Der Vorgang konnte nicht abgeschlossen werden. cpio read error: Unknown error: 0") {
    NSFilePath = "/var/folders/zz/zzzivhrRnAmviuee+++++++++++/Cleanup At Startup/PKInstallSandbox-tmp/Root/Applications";
    NSLocalizedDescription = "Beim Extrahieren von Dateien aus dem Paket \U201e<my App name>.pkg\U201c ist ein Fehler aufgetreten.";
    NSURL = "#<my bundle name>.pkg -- file://localhost/<path to my app>/<my app name>.pkg#Distribution";
    NSUnderlyingError = "Error Domain=BOMCopierFatalError Code=0 UserInfo=0x10c9af710 \"Der Vorgang konnte nicht abgeschlossen werden. cpio read error: Unknown error: 0\"";    

I guess it has something to do with the cpio read error, but Im lost here ...

Was it helpful?

Solution 2

Okay, rebuilding the app and packaging it in a different folder did the trick. Im still not sure what the problem was, but at least I can continue now.

OTHER TIPS

The problem is that installd finds your .app somewhere else on the disk and concludes it's already installed, but relocated. It finds it in your build dir, right? At least this was my case.

A solution to this would be to:

  1. Build the installer;
  2. Zip all resources used in the production of this build, that you might want to archive for this specific build (for crash report symbolication you need to have the app outside of the package), including the .app bundle, except the actual installer.

This way, the exact same binary that's being installed (when you start your installer), will not be found anywhere on the disk during installation (it's archived). And installd will not care for the debug build of the app that can be found in ~/Library/Developer/Xcode/DerivedData/ or anywhere else on the disk.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top