We are jemast software, a small indie software development studio. We have released an iCloud plugin on the Unity Asset Store (see link in signature below). As part of this plugin, which allows syncing documents data (files player prefs) across iOS and Mac devices, we have built a small and really simple tool to enable proper codesigning for iCloud to work on Mac OS X apps.
Unity Entitlements Tool is a free open-source OS X app that will add the necessary files to your Unity project so that each time you build your application for OS X, it gets codesigned and you can test it right away with adequate privileges and features. Unity Entitlements Tool is independent from our future iCloud plugin and can be used to enable, test and deploy sandboxing on your OS X apps, as this is mandatory since June 2012.
Note that you’ll find on this page instructions on how to use this software and why it may be useful to codesign your app (even if you are not using iCloud). We have also compiled a list of must-read documentations from Apple regarding topics like codesigning, provisioning profiles, entitlements and sandboxing.
Again this is a really simple tool, UI is not great but not too shabby and you do not need this tool to actually codesign your apps, it’s just designed to make things simple and automated (unless you are a die-hard command-line fan).
Feel free to drop us a line here or via email to give us some feedback.
Thanks,
jemast software.
Addendum: Shameless self-promotion for our paid-for, integrated into Unity version of this tool available on Unity Asset Store: Mac App Store Toolset
thanks for taking the time to build this tool, when I run this and set the build pipeline, then in unity build my app, it doesnt seem to do anything, and when I try to run it nothing happens… btw this is using Unity 3.5 F5 release
Hey, we’ve updated the tool with a bunch of new features to facilitate Mac App Store distribution. First, we’ve fixed issues when reopening projects which already contained entitlements information from this tool.
Then, we’ve implemented new features to automate proper bundle setup for distribution as well as packaging so that you get a package ready for submitting to Mac App Store. Please bear with the fact that we’re not yet 100% confident packages generated with this tool are fully ready for Mac App Store validation as Apple requires a lot of setup when you enable entitlements (plist setup, profile embedding, code signing with entitlements and packaging). Though we’re finishing a small app to test the waters on the Mac App Store submission/validation process with iCloud entitlements so we should be able to get back to you soon with fixed results.
@gateway69, the fact that it “seems” to do nothing is actually ok. What this plugin does is adding a “post-process” script to your Unity build process. That is, when Unity is done building your app, it executes some commands (as listed above plist, embed, code sign, package). Nothing you cannot do or undo yourself using terminal commands. In fact, if you look at the PostprocessBuildPlayer file, you’ll have see the list of commands performed.
Edit: with the forum sections reorganization, I’m not sure this thread still belongs here. So if any admin wants to bounce this thread around the forum, feel free to do it.
Sorry im a bit new to this hole OSX building and it seems like a huge pain with out some scripts or tools.
I’m trying to test in app purchase with osx I have all the data set up in the client, but when I go to build it and enable Mac App Store Validation, then use your tool to code sign, enable sandbox etc, do a build then double click on my package it seems to launch but then is nowhere to be found.
Am I doing this wrong I would assume it would come up with the unity client as this point then I could test my buy button to test the purchase?
@gateway69 when you enable Mac App Store validation, it is normal that your app will exit right away as validation will only succeed for apps bought from the Mac App Store. You should be able to test in-app purchase without Mac App Store validation. As a matter of fact, you should enable Mac App Store validation only once you are ready to publish your app.
@jemast, you actually cant test in app purchase without a proper receipt from Apple. All purchased items have their receipts appended to the one from the Mac App Store. A build signed with a distribution certificate can be launched from Finder and it will retrieve a receipt from Apple if you sign in using a test account setup in iTunes Connect.
@prime31 thank you for sharing your knowledge on the subject. I’m not exactly familiar with in-app purchase, but can you confirm signing the app with a distribution profile is mandatory? I’m under the impression (from what I read from Apple’s documentation) that you can do this with development profiles. The thing is, production profiles are only required when you use entitlements for things such as enabling sandboxing, push notifications and iCloud. And because it uses the same mechanism as iOS, when you codesign with a production profile, your app won’t run anymore because you cannot install production profiles on devices (as documented here).
@jemast, testing IAP requires there to be a receipt file in the app bundle. All IAP purchased products dump their own receipts into the original Mac App Store receipt. Unless I’m missing something there is no way to get a receipt with a development certificate that I am aware of though I could certainly be missing something. If you know of a way to get a receipt without signing with a distribution cert please do share!
You have way more experience than me on the topic so I’m sure you’re right. I just find it odd that you need a production profile considering sandboxing will be mandatory starting June 2012 (and it should have been starting March 2012), and knowing that codesigning apps with production profile sandboxing entitlements will prevent apps from running on your machine (as per linked technical note from my above post). Therefore to test IAP, you’ll have to disable sandboxing in production and reenable it later for publishing… that doesn’t seem right. Either there is a way to run codesigned apps with production entitlements that I am not aware of, either there may be some way to test IAP with development profiles (but again, your experience speaks for itself and at the moment I don’t have time to look into this), or Apple may need to sort this out.
Have you tried IAP on iOS, do you test with development or production profiles? Unless I’m missing something (which may well be the case), in theory apps with production profiles shouldn’t run for the same reason that you cannot install them on devices and entitlements require them (again techincal note linked in my previous post specifically mentions this and it’s quite recent).
@jemast, I have never been able to get a receipt from Apple when signing with a dev cert. Their docs sound pretty simple with regard to getting a receipt but it just never works for me unless I use a distribution cert. From their docs:
Sounds simple, right? I have no clue why it doesnt actually retrieve a receipt when signed with a dev cert. The devforums have some others that are experiencing the same issue as well. Bear in mind that none of this applies to apps signed with entitlements. I have no clue how to get a proper receipt when in development when signing with entitlements. That should be a fun one to figure out
IAP on iOS is a bit different than on OS X. The receipt data is returned with the actual transaction so dev certs work straight away. On Mac, the receipt data is actually just merged into the standard Mac App Store receipt in the app bundle by Apple directly. If you don’t have a Mac App Store receipt then all IAP tests fail. Quite an odd setup Apple has provided us with all this stuff…
Sometimes it feels the transition from iOS to Mac OS has been a bit rushed for IAP Push Notifications…
Documentation isn’t very clear and often mention iOS even in Mac Dev Center (some of the docs even land you straight into iOS Dev Center). I try to RTFM as much as I can and Apple docs are generally good if you actually take the time to read them thoroughly but I have to admit the whole thing is confusing me on those specific topics.
Though, I’ll get back to this thread if I find a proper way to deal with both IAP sandboxing at the same time. At the moment, it seems the “right” thing to do for people trying to test IAP in an app with entitlements is to disable them during the test phase with production signing and re-enable them right before packaging for publishing.
Again, thank you prime31 for your input on the subject. You have hands-on experience and that’s truly helpful on those complex topics. The (non?) interaction between entitlements and receipt validation on Mac OS is just confusing me, hence my questions.
Just a friendly bump to notify that we have updated this tool to version 1.2. As of now, it should set up properly your application for Mac App Store distribution without the need to do any additional command line stuff (previous version did not fix permissions and failed to set up a mandatory setting in the Info.plist file, therefore it required to redo manually a whole bunch of commands).
This app still has a lot of rough edges but it should get the job done. I’ll gladly take feedback, so let me know how it goes for you.
I wish I had more time to devote to this and make things really nice and simple, unfortunately I’m fully booked so updates to this app take some time. Thanks for your patience.
I’m trying to integrate Game Center in my unity app but receiving “This game is not recognized by Game Center”; Bundle Id and other properties are correct, I enabled Network input/output too using this tool but problem still occurs; Anyone have any ideas? thanks in advance
P.S. i’m using Unity 3.5.5 Pro on OSX 10.8.1 Mountain Lion; I created test project in xCode with
same bundle id and game center works without any problems;
I don’t have any direct experience with Mac OS Game Center, but can you make sure that your AppID is indeed configured for Game Center in the Mac Dev Portal (Developer Certificate Utility)?
I’m quite sure that for Game Center on iOS, you need fully qualified AppIDs (com.company.appname for example) and enable them for Game Center in the iOS Provisioning Portal. I wouldn’t be surprised if this is a requirement for Mac OS apps as well.
EDIT: Misread the part where you said it DOES work in Xcode. I’ll look into it and see if there’s new stuff in entitlements required for Game Center to work. Should get around it before the end of the week-end.
@zuba I’m not seeing any requirement for Game Center other than matching bundle IDs. Could you tell me a bit on how you’re actually polling the Game Center service? Are you using Unity’s built-in implementation? If that’s the case, did you make sure it is actually compatible with Mac OS Game Center? The docs make it look like it’s iOS only at the moment. Details on implementation could help me replicate the case and track down what’s wrong.
@Wolfos I guess we went a little too cheap for our hosting provider. It may have short downtimes every once in a while but it’s now up. We’ll look into having some more reliable hosting provider as those downtimes are not acceptable for us.