4

I created a .pkg file of my Mac app using XCode 4. I installed it using the terminal successfully, however when I double click on the .pkg file, I get a message that says, "... can't be installed on this computer".

Any suggestions?

Thanks.

EDIT: This is the error message that I get. I created package by going to Product->Archive. Then in the Organizer I clicked Share->Mac OSX App Store Package(.pkg) and then save the package to the desktop.

enter image description here

This is what's inside the package. enter image description here

Furthermore, I've inspected the build settings between XCode 3 and 4 is the following

XCode 3

Path to Link Map File 
Debug           build/Alarm Pro.build/Debug/Alarm Pro.build/Alarm Pro-LinkMap--x86_64.txt
Release        build/Alarm Pro.build/Release/Alarm Pro.build/Alarm Pro-LinkMap--i386.txt

XCode 4

Path to Link Map File 
Debug           build/Alarm Pro.build/Debug/Alarm Pro.build/Alarm Pro-LinkMap--x86_64.txt
Release        build/Alarm Pro.build/Release/Alarm Pro.build/Alarm Pro-LinkMap--x86_64.txt
David
  • 14,205
  • 20
  • 97
  • 144
  • 1
    Can you provide any further details, how the package is created, and the structure inside. – Arpit Apr 09 '11 at 12:35

3 Answers3

2

try changing the file extension from .pkg to dmg cause as far as i know all installation files are .dmg and not .pkg

still not working...

well only one thing to change right click the file and select get info

in the open with open....select DiskImageMounter.app and ur good to go... hope this helps...

Izac Mac
  • 491
  • 3
  • 20
  • i edited the answer ... kindly check and mark it as answer if it helps – Izac Mac Apr 05 '11 at 05:43
  • I tried searching for DiskImageMounter in the spotlight but nothing was found. I also googled it and apparently its in library/core services folder. That folder does not exist. Any other ideas? – David Apr 05 '11 at 06:47
  • well thats your problem...its the application that actually makes the dmg run.... and by default it is in mac osx... which os version are u using!! – Izac Mac Apr 05 '11 at 07:23
  • it is in /System/Library/CoreServices/ – Izac Mac Apr 05 '11 at 07:28
  • Ok so I found DiskImageMounter and tried to open the package with that and it did not work. I got a message that says the file is not recognized. – David Apr 05 '11 at 08:09
  • if that does not work...try installer.app...that SHOULD work cause its the one that we i use for my pkg files and so far have never had an issue...reply – Izac Mac Apr 05 '11 at 10:47
  • Installer is the default. It does not work and is the one that I am having trouble with. I've used the same method to create .pkg files in XCode 3 but ever since I've switched to XCode 4 I can't open .pkg files. – David Apr 05 '11 at 18:46
  • then what u need to do is compare your old project .app file properties with the new one and see what is different... i tried xcode 4 and frankly had issues with it as well... because default values for both versions are VERY different – Izac Mac Apr 06 '11 at 10:14
  • I've checked the internal structure of the .app file and the only difference in structure is what is contained in the Resources file since I've added new resources since I switched to XCode 4. – David Apr 09 '11 at 15:06
  • -1. A pkg file is a pkg file. If it was a DMG file, it would have said "This file is corrupted" or wouldn't mount. – alexyorke Apr 09 '11 at 16:07
  • there is 1 significant difference too... in the build in xcode 3 Release build/Alarm Pro.build/Release/Alarm Pro.build/Alarm Pro-LinkMap--i386.txt in xcode 4 at the end its not i386 instead it is x86-64 which Bounds your system requirements. right click your app and select Get info.. go in the Build panel and change your 1.Architectures 2.Base SDK 3.Build Active Architectures only options to the ones that are on your xcode 3 project and ur good to go... – Izac Mac Apr 12 '11 at 05:49
  • Ok so I fixed it. By changing "Build Active Architecture Only" for Release from Yes to No. Thanks. – David Apr 24 '11 at 22:11
0

You can't install 32bit packages on 64bit systems, and vice versa. Go into the Xcode inspector and change the base SDK to the target system or your system.

Upgrade your SDK's and Xcode to the latest version. This has resolved problems for me in the past.

Clean your project, then build/archive it when you change the settings.

alexyorke
  • 4,224
  • 3
  • 34
  • 55
  • 1
    I have built apps using Snow Leopard in the past. This only occurred when I upgraded XCode. I used "sudo installer -verbose -dumplog -store -pkg "/Users/David/Desktop/MyApp.pkg" -target /" – David Apr 09 '11 at 04:11
  • Hmm... Can you show either an image of the error, or post exactly what the error was and I'll be able to help you. – alexyorke Apr 09 '11 at 12:37
  • It is a bit system issue. Your project is either 32bit or 64bit, and your system is the opposite. You have to change the target SDK in the Xcode inspector. – alexyorke Apr 09 '11 at 15:24
  • 1
    I have a 64bit machine and the app is compiled as a 64bit app. I have the latest version of Xcode and target SDK. If it is a bit issue, when why can I install it perfectly using the terminal? It is also on the app store and I've downloaded and it works. Its just that when I build and share the package and double click on it that it does not work. – David Apr 15 '11 at 15:00
  • I think that the flags you are using in the Terminal are different than the ones Installer.app uses. – alexyorke Apr 15 '11 at 18:55
0

It is probably a nasty bug in Xcode4 ... the interface between xcode and packagemaker is not working correctly ... having said that, if u use Packagemaker stand-alone, u will be able to create a working package ... voila! :-)))

squixz
  • 1
  • 2