"Create installer package" -> .pkg but that .pkg does not do anything useful

ArthurDentArthurDent USMember ✭✭
edited August 2013 in Xamarin.iOS

I discovered an exciting-looking option in Xamarin studio that is labelled "Create installer package".
And sure enough with it ticked I get a .pkg file as well as an .app file in the output directory.

However when I run that .pkg file, although it goes through the steps of installing the .app file (including "writing files" and "The installation was successful" - with a big white on green tick), it doesn't actually put the .app file anywhere. (I do a search on the whole machine and its not there.)

Any suggestions how I could fix this, or what I could be doing wrong?

I notice a small info triangle mentioning Mac store. Does this kind of .pkg only work if it is used through the mac store?

Posts

  • Same here...

  • Same here. What's up with that?

  • NikolayIvanetsNikolayIvanets USMember ✭✭

    Can someone attach pkg file here (if it is not too big)?

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    If I were to hazard a guess, the .pkg is probably installing over top of /path/to/project/bin/Release/AppName.app

  • NikolayIvanetsNikolayIvanets USMember ✭✭

    To make sure, execute this command:

    pkgutil --expand installer.pkg tmpdir

    Open Distribution file in tmpdir directory and find default location:

    Also right click on com.myapp.pkg in tmpdir directory and select Show Package Contents. Open PackageInfo file and find something similar:

    <pkg-info identifier="com.myapp" install-location="/Applications">

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @jstedfast,

    I think you're right. After running the install package and not seeing anything in /Applications, I changed a project option and went to do another build. The build failed with permissions errors on the .app. Deleting the stuff through Finder required giving permission.

    @NikolayIvanets,

    When I looked at the package contents everything seemed to indicate a target directory of /Applications. (can't re-confirm now as I'm at work)

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    @DaveHunt,

    From what our QA team discovered, the package installs fine on any machine EXCEPT the one that built the pkg file. Can you confirm?

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    That sounds vaguely familiar. I'll try it tonight when I get home.

  • jeffsimonjeffsimon USMember

    Out of curiosity, was a workaround identified for this? I'm seeing the behavior that jstedfast mentioned (package doesn't install on machine I built on but does on a VM). Unfortunately Opengl doesn't appear to work in parallels (running 10.9 VM on 10.9 machine - repro by building/copying/running the opengllayer sample from xamarin site) which means that I can't use a VM to verify that my game is functioning correctly after installation; I just get an empty window. I don't have access to another mac at this time so was hoping for some workaround to make the installer work on the machine it was built on.

    Thanks!
    Jeff

    (*) I could install Xamarin et al into the VM and build from there and then run the installer on my main machine, but I was hoping for more of a clean room testing setup...

  • PreranaPrerana INMember ✭✭

    Hey @ArthurDent,

    Can you please tell me where is "Create installer package" option? I am unable to find it, i saw only "Create package" option.


    Thanks a ton in advance..

  • PreranaPrerana INMember ✭✭

    Found it!!

    Project-> Project Options->Mac OS X Packaging

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    @jeffsimon,

    I'm glad at least you have a work-around. There might be a command-line option that we need to pass to productbuild that we currently aren't passing that will make it installable on the same machine that created it, but it seems totally weird to me that it installs fine on every other machine but the one that created it.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    @jeffsimon,

    I'm glad at least you have a work-around. There might be a command-line option that we need to pass to productbuild that we currently aren't passing that will make it installable on the same machine that created it, but it seems totally weird to me that it installs fine on every other machine but the one that created it.

  • I had the same issue (built XamMac project, got .app and .pkg files; Installer would run normally but my app won't appear in Applications on build/development machine) and found solution here.

    Suggested steps are:

    1. execute: sudo pkgutil --forget < package_id >
    2. delete all < app_name >.app bundles on the machine

    I performed both steps after which .pkg installed my app in Applications.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    It installs on the machine that created it, but it installs into the build folder that the .pkg was built to, rather than the /Applications folder.

  • mhutchmhutch USMember, Xamarin Team Xamurai
    edited June 2014

    AFAIK this is expected behaviour for packages created with Apple's productbuild tool - if it can find an existing copy of the app, it updates that.

  • samnagasamnaga USMember

    Is it possible to add any files such as scripts, resources etc to a package installer file after it has been created through Xamarin Studio?

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    I'm unsure if you can add after the fact (you'd need to resign if you signed), but you shouldn't need it. Via the Production Definition / additional arguments fields in the mac build tab of project options, you should be able to pass in what you need.

    We're just calling productbuild for you, so you can read that documentation from Apple to see how to bend it to your will.

Sign In or Register to comment.