How to sign blitzmax .apps for mac appstore :]

Archives Forums/MacOS X Discussion/How to sign blitzmax .apps for mac appstore :]

Robert Cummings(Posted 2010) [#1]
http://www.gorbster.net/blog/archives/273


Check it out and let us know if it works guys!


jhans0n(Posted 2010) [#2]
Nope, same error as doing it manually.


MikeHart(Posted 2010) [#3]
The weblink says that you can't use that tool to sign an app for distribution.

Last edited 2010


jhocking(Posted 2010) [#4]
Why would you need to do this? That link doesn't really explain and I'm curious.


GaryV(Posted 2010) [#5]
jhocking: It is a requirement of the new TOS for the new App Store for Macs that Mac programs must be signed or they will not be accepted into the new App Store. Nobody has figured out how to sign BlitzMax made OS X programs, yet...


jhans0n(Posted 2010) [#6]
Last I heard, nobody has figured out how to sign any code yet, not just BlitzMax.


jhocking(Posted 2010) [#7]
@gary: ah I see. I was confused because that link is talking about iOS apps, I didn't know about the new App Store for Macs.


jhans0n(Posted 2010) [#8]
A little bird told me that there may have been a break-through on the signing problems. If I have time tonight, I'll try doing what they suggested with a BlitzMax app and see if it works. If it does, I'll post instructions here.


jhans0n(Posted 2010) [#9]
Code signing appears to work now, including for BlitzMax apps! You just have to delete your dev certs, regenerate them, and issue the code signing command.


siread(Posted 2010) [#10]
Woo! Any chance of a quick how-to? :)


MikeHart(Posted 2010) [#11]
Its working with that tool from the link above?


jhans0n(Posted 2010) [#12]
Here's what I did after regenerating the certs. There's some data you have to modify in the info.plist file to get it accepted at the store, but that's all in the Apple docs and doesn't impact signing directly.

codesign -f -s "name of your dev cert" appname.app


Keep in mind that you have to recompile your app with the newest version of Xcode installed, so you can't just sign a game you made years ago. You have to compile it fresh and then sign that.

I haven't tried the tool above because the command line is good enough for me, but since I think that app is just running that same command it should work fine.


TMK(Posted 2010) [#13]
Awesome! Looks like the only thing left is the code for validating app store receipts, so that only purchased copies (and not pirated ones) of the games will run. More explained here (requires Apple account):

https://developer.apple.com/devcenter/mac/documents/validating.html

Trying to figure it out, but not that experienced with Objective-C :)


jhans0n(Posted 2010) [#14]
That's only if you want copy protection, right? It's not required for acceptance as far as I've heard.

I'd rather not implement it unless it is required.


TMK(Posted 2010) [#15]
Yep, although if you are going to sell products, then one should probably implement it as there's no way of knowing if the user has actually purchased it without it I think, from what I've seen...

Last edited 2010


Robert Cummings(Posted 2010) [#16]
I think a bigger worry is actually getting it on the store. You're not EA or Microsoft.


TMK(Posted 2010) [#17]
Well, it seems they are going to go for the iPhone route, allow apps from everyone, so doesn't matter who you are :)

Last edited 2010


jhans0n(Posted 2010) [#18]
I'm not a fan of copy protection which is why I don't want to implement it unless required for getting into the store. People who want to pirate it will find a way. The only people who are ever inconvenienced by it are paying customers.


TMK(Posted 2010) [#19]
Yep, I'm not a fan of DRM either. Apple says on their site that it's optional, even on purchased apps, but the main reason I'm interested in it is to allow in-app purchases, which will require this kind of receipt validation code.


Robert Cummings(Posted 2010) [#20]
I'm not sure in-app purchase is any more than a fad at the moment. The biggest success stories on iPhone are all demo/paid split.


Me.32(Posted 2010) [#21]
whhhhaaaaa mac app store is shit !


jhans0n(Posted 2010) [#22]
How do you know? It hasn't even opened yet.


CASO(Posted 2010) [#23]
Has there been any word from BRL concerning this matter? Or will BMX2 solve all of the world's problems?


jhans0n(Posted 2010) [#24]
I don't think there's any action required on BRL's part. You can sign your Blitzmax-compiled app just like any other.


CASO(Posted 2010) [#25]
@jhans0n: So I see that you have "signed" the code. Have you verified that that Apple will accept it?

Also, this is a little vague...
...regenerating the certs. There's some data you have to modify in the info.plist file...



jhans0n(Posted 2010) [#26]
No, I haven't submitted it yet. The approval process will likely be lengthy since everyone's trying to get in early. But as long as you follow all of their rules, I can't think of any reason it shouldn't be accepted.

As for the second part, what you have to modify in the plist file is spelled out in the Apple documentation. I'm not going to repeat it here for two reasons:

1. If it changes or I misinterpret it, I don't want to be the reason no Blitz apps get accepted.
2. There is an NDA involved with many developer programs, including this one, and I don't want to violate it in any way. I don't know if it applies to this, so I'd rather err on the side of caution.


CASO(Posted 2010) [#27]
I respect that. Report back if you do get accepted though.


simonh(Posted 2010) [#28]
I would advise against submitting an app to be part of the Mac App Store launch. Doing so will mean your game will likely be lost in the 'New' section amongst hundreds/thousands of apps. Wait until things have settled down, then when when your app is published and featured in the New section, it will only be one of a dozen titles.

I made that mistake with the iPad, thinking the launch would be a mini-goldrush.


jhans0n(Posted 2010) [#29]
Agreed. I'm tossing a quick, free one out there first to see if it gets accepted.


jhans0n(Posted 2010) [#30]
Submitted one last night. Fingers crossed. It took me a couple of tries to get it right, but it uploaded.


Robert Cummings(Posted 2010) [#31]
Good luck!


jhans0n(Posted 2010) [#32]
Not looking good so far. My app is sitting at "Upload Received", which means there's probably a problem with it.


MikeHart(Posted 2010) [#33]
I don't think so. It rather means that they didn't have time to start the review process.


jhans0n(Posted 2010) [#34]
@MikeHart - No, that's not what it means. If they haven't had time to start the review process, the app goes to "Waiting for Review". In their docs it says that if your app is stuck at "Upload Received", there's a problem and to contact support, which I did.


jhans0n(Posted 2010) [#35]
It's in the right queue now, after support intervened. No idea if it will get accepted, or when, but at least I know now that it is indeed possible to build a BlitzMax-created app, sign it, package it, and submit it using their tools, just like a regular Xcode-made app.

The general steps I took were:

1. Install their developer seed of Xcode
2. Compile an app in BlitzMax
3. Manually edit the info.plist file to include all of the required fields listed in their docs *
4. Add in an icon file that contains all sizes from 512x512 down to 16x16
5. Sign the .app using the codesign command line above
6. Package the app using the manual packaging steps from their docs
7. Submit the app using the manual submission steps from their docs

* - I built a blank Xcode app and copied the info.plist file from there to give me a better starting point than the Blitz-generated one, and to make sure it looked like any other Xcode app.


MikeHart(Posted 2010) [#36]
Thanks Jeff,

that doesn't sound to complicated.

Best wishes
Michael


jhans0n(Posted 2010) [#37]
My app, made in BlitzMax, has been accepted.


CASO(Posted 2010) [#38]
AWESOME. Is there any tips/tricks to skip the "support intervened" step?


jhans0n(Posted 2010) [#39]
The only tip is not to submit your game a week ago when they were having problems with their submission system. :)

In all seriousness, it is not an issue anymore since they fixed whatever caused that.


CASO(Posted 2010) [#40]
Curiosity once again...
1. What is the purpose of the app you submitted?
2. Do you know what classifies as a "private API"? (Does this even apply)


jhans0n(Posted 2010) [#41]
1. It's a game. It's one I wrote a couple of years ago. It was already 99% compatible with their acceptance criteria, so it made for an easy proof-of-concept.
2. No idea. Maybe they're talking about undocumented APIs.


Cobra Blade(Posted 2011) [#42]
What's the game called, I'll take a look at it. It'll give me a chance to play around with the App Store some more.


Grey Alien(Posted 2011) [#43]
This is awesome info thanks. I'm going to put a couple of my games on there DRM free (if that's not required) as a test.


Grey Alien(Posted 2011) [#44]
btw, what program are you using to get 512 icons? I had one that went up to 256. Thx.


jhans0n(Posted 2011) [#45]
I used Icon Composer. It's in Developer > Applications > Utilities.

Also, DRM is not required.


Grey Alien(Posted 2011) [#46]
Ah yes, got it thanks!


siread(Posted 2011) [#47]
Yeah, thanks for all the info jhans0n. It helped me immensely to submit one of my games. Just waiting for review now. :)


jkrankie(Posted 2011) [#48]
Another thanks! Irukandji is now waiting for review :)

Those certificates were a bit of a git, but i got there in the end!

Cheers
Charlie


Grey Alien(Posted 2011) [#49]
Hey I read you need an End User License Agreement. Did anyone use one and if so would they mind sharing theirs? Thx.


therevills(Posted 2011) [#50]
This is the license I normally use:

LICENSE 
-------------- 
The Revills Games hereby grants you a non-exclusive license to use the software Haunted House Quest version 1.0 (the Software).
 
You may:  
- use the Software on any of your computers
 
You may not:  
- modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction),  
- create derivative works based on the Software;  
- copy the Software (except as specified above);  
- rent, lease, transfer or otherwise transfer rights to the Software;  
- remove any proprietary notices or labels on the Software.  
 
TERMINATION.  
The license will terminate automatically if you fail to comply with the limitations described above. On termination, you must destroy all copies of the Software.  
 
 
 
DISCLAIMER OF WARRANTY  
--------------------------------------------- 
The Software is provided on an AS IS basis, without warranty of any kind, including without limitation the warranties of merchantability, fitness for a particular purpose and non-infringement.  
The entire risk as to the quality and performance of the Software is borne by you.  
Should the Software prove defective, you and not The Revills Games assume the entire cost of any service and repair.  
 
THE REVILLS GAMES ARE NOT RESPONSIBLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES.  
 
Title, ownership rights and intellectual property rights in and to the Software shall remain with The Revills Games. The Software is protected by international copyright


Last edited 2011


Grey Alien(Posted 2011) [#51]
Hey great, may I modify this for my own use? I have one for my download titles and may compare them both.


therevills(Posted 2011) [#52]
may I modify this for my own use?


Go for it!


Grey Alien(Posted 2011) [#53]
Thx!


Cartman(Posted 2011) [#54]
This problem hit me today when I uploaded my game for submission:
ERROR ITMS-4000: "Line 6 column 66: bad character content for element at XPath /package/software_assets/asset/data_file/file_name"

If you see this, it means that your package name has a space in it. Just remove the space and resubmit. Apparently a space is a bad character on the Mac. :)


Grey Alien(Posted 2011) [#55]
Hey what did everyone use to upload please? Xcode or Application Loader? I can't find Application loader in my applications/utilities folder.

Thx


Grey Alien(Posted 2011) [#56]
oops nevermind, just found out it gives you a download link :-)


Cartman(Posted 2011) [#57]
Yeah. I was confused by that as well. I searched for an hour in the Utilities folder for that tool.


ima747(Posted 2011) [#58]
I've punched up a tutorial for this, hopefully it will help those not familiar with how/where apple hide/names developer tools etc. to get off the ground.

http://www.blitzbasic.com/Community/posts.php?topic=93636


JoshK(Posted 2011) [#59]
There's a lot of good info here on this process:
https://developer.apple.com/devcenter/mac/checklist/

Last edited 2011


SLotman(Posted 2011) [#60]
I also got accepted!

Only issue I had was my game called "Puzzle Trip Rio" had it's file as "rio.app" - rebuilt and renamed it to "Puzzle Trip Rio.app" and that was it :)