Bug 26249 - User is not able to install .pkg file from Unified API projects on Lion.
Summary: User is not able to install .pkg file from Unified API projects on Lion.
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: Master
Hardware: PC Mac OS
: Normal normal
Target Milestone: 2.0.x
Assignee: Chris Hamons
: 27173 ()
Depends on:
Reported: 2015-01-21 13:54 UTC by Rajneesh Kumar
Modified: 2015-07-06 11:35 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rajneesh Kumar 2015-01-21 13:54:44 UTC
Steps to Reproduce:

1. Generate a .pkg file of Unified API sample application on Yosemite.
2. Try to install .pkg file on "Lion(Version : 10.7.4)".

Actual Result: User is not able to install .pkg file on Lion. On installing Getting popup alert "'applicationName' can't be installed" on this computer. However user is able to install generated .pkg file of Classic API sample application on "Lion(Version : 10.7.4)".

Expected Result: User should be able to install .pkg file on Lion, and application should be run successfully.

Additional Information: User is able to install generated .pkg file of Unified API/Classic API sample application on Yosemite, Mavericks, Mountain Lion successfully.

Screencast: http://www.screencast.com/t/bROfxA98

Please let me know if I can provide some more useful information from my side.

Regression Status: Getting same behavior with stable Xamarin.Mac Version:

Environment Info:[Lion]

=== Operating System ===
Mac OS X 10.7.4
Darwin nischals-Mac-mini.local 11.4.0 Darwin Kernel Version 11.4.0
Mon Apr  9 19:32:15 PDT 2012
root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

Environment Info:[Yosemite]

=== Xamarin Studio ===

Version 5.7.1 (build 14)
Installation UUID: ff0c16c6-3c75-46d8-ac56-56c3b56e2c76
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.2 (6758)
Build 6C107a

=== Xamarin.iOS ===

Version: (Trial Edition)
Hash: dd1b996
Build date: 2015-01-15 15:06:20-0500

=== Xamarin.Mac ===

Version: (Trial Edition)

=== Xamarin.Android ===

Version: (Trial Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Build Information ===

Release ID: 507010014
Git revision: a4dd61ad7f8b3695be4b17bcb5c3ae6b81438cf7
Build date: 2015-01-19 15:21:09-05
Xamarin addins: 081208fe3bbf40e24a562867c6c7fba20a9b94b6

=== Operating System ===

Mac OS X 10.10.1
Darwin Apples-iMac.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 1 Rajneesh Kumar 2015-02-18 10:24:17 UTC
*** Bug 27173 has been marked as a duplicate of this bug. ***
Comment 2 Chris Hamons 2015-02-23 11:35:19 UTC
@Rajneesh - Can you attach/point to the project in question.

In the plist for this project, what is the minimum OS version listed? If that is > lion, that would explain the issue.
Comment 3 Rajneesh Kumar 2015-02-23 12:44:11 UTC

I have checked this issue and found that In the plist, the minimum OS version listed for Unified API is '10.8' and for Classic API is '10.6'. 

After setting minimum OS version to '10.6' manually and then create the installer (.pkg) file, and still not able to install it on Lion.

Screencast: http://www.screencast.com/t/ZlBkS9XbICpt
Comment 4 David Lilley 2015-04-08 09:01:04 UTC
Hi @Chris

Our 10.7 customers are asking us if we are ever going to support 10.7 again ? How realistic is this bug going to be fixed soon ?
Comment 5 Chris Hamons 2015-04-08 15:57:08 UTC
@David - We are spending a significant chunk of dev time in 2.0 and 2.2 on reducing our bug backlog. I can't promice that it will make 2.2, but it is very likely.

I just noticed, you have a business license. If this is blocking (as it sounds like it might be), you should go through support.xamarin.com and we can see if we can get you a work around until then.
Comment 6 Chris Hamons 2015-04-09 14:01:34 UTC
Alright, I have some news on this.

This will work if the following is true:

- You have a classic project. Unified requires Xcode >= 5 and thus will be 10.8 and above forever.
- You have Xcode 4.x installed somewhere. I used 4.4.

Here's how I got it to work locally.

- In your XS preferences, Project -> SDK Locations -> Apple I pointed it to my Xcode 4.4 location.
- In my Info.plist I verified that the deploymen target was <= 10.7.
- In my project settings, Mac Build tab, I set the SDK version to 10.7.

Once I did all of that, I got a pkg I could install on a 10.7 machine.
Comment 7 Chris Hamons 2015-04-09 14:02:17 UTC
But as I noted, this can never ever work on Unified, since unified uses features that require Xcode 5. :(
Comment 8 Chris Hamons 2015-04-09 14:12:42 UTC
Alright, one of my co-workers pointed out a mistake I made that might change this. Let me get back to you.
Comment 9 Chris Hamons 2015-04-10 12:50:17 UTC
Alright, I think I have it working.

With a unified project, when I set the following settings in Mac Build:

SDK Version: 10.9
Supported architectures: i386

I have a hello world working when I install.  Try that out and get back to me.
Comment 10 David Lilley 2015-04-13 11:03:10 UTC
Hi Chris,

I have tested, what you suggested and it does work, we can run a Unified Project on 10.7, Hurrah!

What is the steps forward as Ideally we do not want to go back to non 64 bit mode in App Store.

PS what does the SDK Version: 10.9 do as I noticed our NSVisualEffectView still works in Yosemite ?

Many Thanks
Comment 11 Chris Hamons 2015-04-13 11:24:39 UTC

Awesome. I haven't tested the full matrix of combinations (so 64-bit might work), as I had to use a remote 10.7 machine which was _very_ slow. This should match whatever Xcode supports on 10.7 (let me know if this is not true).

So the SDK version determines what header files you are linking against. Since XM is doing binding for you, some of the new APIs may work (not something we currently test), but it also might let you "use" an API and have it fail at runtime if it not supported on this is OS X version. This is something we know is painful (https://bugzilla.xamarin.com/show_bug.cgi?id=26728).

Sometimes, Apple does checks against which SDK you were linked against, so you might not get new behavior. Sorry I can't be more clear, a lot of these are things that Apple does on a case by case basis.

I'm going to answer this bug. If you find a case where there is a SDK / bitness works on Xcode but not on XM please reopen.
Comment 12 David Lilley 2015-04-16 10:12:00 UTC
Hi Chris,

I tried to get the 64bit version work with following settings

SDK Version: 10.9
Supported architectures: X86_64 

I was unable to install on the 10.7 Machine.
Comment 13 Chris Hamons 2015-04-16 10:15:14 UTC

Good to know. I think you may need to make an i386 build for 10.7. Should be as simple as changing the drop down and recompiling (plus any native libraries). Depending on which machine is running it, I don't believe having a 64-bit processor was mandatory for 10.7.
Comment 14 David Lilley 2015-04-16 10:24:07 UTC
Hi Chris

Since we are using Itunes App Store we can only have 1 build. This would mean we would only have a non 64 bit version. This is unfortunately is not what the business wants.

Is it on the road map to really get 10.7 working again ?

Thanks for trying
Comment 15 Chris Hamons 2015-04-16 16:52:17 UTC
@David - So technically I'm not sure this is "working again", unless there was a release of Unified, 64-bit where you were able to run on 10.7?

Beyond that. I'm seeing some strange things. If I turn off code signing, I can get an app bundle that is 64-bit that runs on my 10.7 VM if do:

x86_64 Arch
10.9 SDK
And set the deployment target to 10.7 in my info.plist.

And the application will run just fine. However, if I build that into a bundle (using Apple's tool):

/usr/bin/productbuild --component Unified64Test.app/ Unified.pkg

the installer will refuse to install, but the bundle works just fine.
Comment 16 Chris Hamons 2015-04-16 17:23:40 UTC
Alright, this appears to be an apple issue, possibly?


These steps are convoluted, so apologies in advance.

Build from XS.

cd to the release dir on a terminal, and run these comments (replacing app names with your app bundle).

/usr/bin/productbuild --synthesize --component Unified64Test.app/ Unified.xml

   This spits out an xml file describing the install.

/usr/bin/pkgbuild --component Unified64Test.app/ --install-location /Applications/ com.your-company.Unified64Test.pkg

   This takes your app and make it a pkg that will install in /Applications . The name should match the name in the xml created above.

 /usr/bin/productbuild --distribution Unified.xml total.pkg

   Take the first two steps and combine them.

Now if you do this with no changes to the xml, you'll see the "can not be installed" mess. But if you open the XML, and remove this part:


the installer works.
Comment 19 David Lilley 2015-04-17 09:16:28 UTC
I have tested out what you suggest and I am getting 

Installation Failed

The installer cannot locate the data it needs to install the software...

/usr/bin/productbuild --synthesize --component "./Banking 4X.app/" Unified.xml
/usr/bin/pkgbuild --component "Banking 4X.app/" --install-location
/Applications/ com.Subsembly.Banking 4X.pkg

also tried

/usr/bin/pkgbuild --component "Banking 4X.app/" --install-location
/Applications/ com.Subsembly.Banking4X.pkg

I suspect it is due to the space in the package name.

I feeling we are heading towards difficult to maintain and think it would be
wiser to have a stable but not 10.7 than unstable with 10.7. So perhaps it is
wiser to leave it until Xamarin officiall supports 10.7 again. I want to say
thank you for your huge effort in trying to get it this far.
Comment 20 David Lilley 2015-05-28 08:43:53 UTC
Hi Chris,

Just seen the status of this "Resolved, Answered"

I know you answered me on a workaround but will this mean it will get fixed ?

Comment 21 David Lilley 2015-07-03 09:51:38 UTC
Hi Chris,

Relooking at this, I have managed to make a 10.7 package that I could submit to the Appstore.

See Attached Script. :)

It feels like I am only one with with this problem, Is there another way to submit to the App Store other than using pkg or am I the only one xamarin mac to want to support 10.7 users ?

Comment 23 David Lilley 2015-07-03 09:54:33 UTC
PS Is it likely to fixed so I won't need this script ?
Comment 24 Chris Hamons 2015-07-06 11:35:42 UTC
@David - I've only seen two instances of people wanting to support 10.7 and running into corner cases like this.

Unless Apple fixes their issue with 10.7 and 64-bit, as I noted above, some amount of hacking around productbuild's bug. Right now, I'd say building in this work around is not our XM's roadmap.