Galcon Games
Phil Hassey - game dev blog
Phil Hassey as Wolverine
"What kind of
arrogant jerk
has a website like this?"

Archive for February, 2011

Porting Galcon Fusion to the Mac App Store

Friday, February 11th, 2011

So, I’m whipping through the Mac App Store port of Galcon Fusion today. Most of the documentation on the Apple site is pretty clear, but I’ll document the few stumbles I had in case it helps anyone else. Thankfully a few web searches found the answers to most of my questions pretty quickly.

1. The Certificate file selected is invalid

While using the App Store Developer Certificate Utility I got this error message “The Certificate file selected is invalid” .. The problem was I was using Chrome. By switching back to Safari to finish the web-wizard, I got past this error in a few moments. Original article.

2. Unable to copy dSYM file into archive

While attempting to Build and Archive my app I got the error “Unable to copy dSYM file into archive.” with the suggestion that I “Please make sure that your application has set the “Debug Information Format” build setting to “DWARF with dSYM File”.” I also confirmed that “Generate Debug Symbols” was checked.

I had already made this change, and I double checked it via Project > Edit Project Settings > Build > .. However, this didn’t seem to fix it, so I did a search and found this article. I found it to be somewhat cryptic, but I went and tried Project > Edit Active Target > instead. I found the “Generate Debug Symbols” was unchecked from this view. If anyone knows the difference I’d appreciate understanding what I was doing right / wrong here. Anyway it now “Build and Archive” without any trouble.

3. The use of non-public APIs is not permissible, as documented in section 2.5 of the App Store Review Guidelines.

“Using private APIs can lead to a poor user experience should these APIs change in the future. The non-public API (CPSEnableForegroundOperation, CPSGetCurrentProcess, CPSSetFrontProcess) that is included in your application comes from the following private Apple frameworks – ApplicationServices.framework.”

Okay, this hasn’t actually happened to me, it happened to Mike Kasprzak. He found that SDL had an #ifdef in its SDLMain.m which enabled some undocumented APIs being used. By commenting out “#define SDL_USE_CPS” he was able to resubmit and avoid the rejection notice. Mike also mentioned that SDL 1.3 doesn’t have this issue, but it’s still in beta and somewhat incomplete.

4. After trying to manually install my app, it didn’t appear in /Applications

After using the Organizer to Share > Save As .. > my app, I used the command line “install” command to try and install it. My app didn’t appear in /Applications. It didn’t seem to go anywhere sensible. I found that to force it to go to /Applications you just have to manually delete all the other places it tries to install it, and eventually when it can’t find your app anywhere to overwrite it, it’ll install into /Applications properly.

5. Adding support for CMD-Q and CMD-F

One thing I had to do was add support for standard Apple command keys. I guess it’s about time! Mike tipped me off that Apple checks for those and I’d best have them properly supported in my app.

6. Adding receipt validation

I implemented some receipt validation, but upon trying running my application I got this error:

“This is not a Test User account. / Please create a new account in the Sandbox environment. [Environment: Sandbox]”

I found this tip on a website: “(You can) create a test user in iTune connect by logging on iTune Connect –> Select Manage Users –> Test User –> Add New User –> Fill in the required data for your test user. We will be using this test users to see if our receipt validation code is working properly.”

Apple strongly encourages obfuscating your code for the receipt validation. I’m no expert on this, but I heard that using blocks helps. This article showed me the blocks syntax, which I found pretty easy to pick up. (Blocks are a sort of lambda for C code.)

7. Submitting the app

When submitting I got a variety of incoherent error messages. Bottom line is you can’t have spaces in your package name. Basically in Organizer you have to save to disk with a name with _’s instead of spaces then upload using the application loader. Here’s the thread that explains it.

Galcon newsletter and SF meetup info

Friday, February 4th, 2011

Hey,

Thanks for all the responses to my survey a few weeks ago! That is going to be a huge help in figuring out what I’m going to be doing this year.

The Galcon update I put out a few weeks ago with retina and multitasking support could use some reviews on the App Store :) It’d be swell if you could write something up:

Galcon | Galcon Labs | Galcon Fusion

Also, I’m going to GDC in San Francisco from Feb 28-March 4. If anyone is interested, it would be fun to get together for a Galcon meetup. I’ve put together a little survey to get a feel for who wants in on the fun!

The Galcon in SF Meetup survey

Thanks!
-Phil


Galcon   Watermelons   Dynamite   The Hairy Chestival
All content of imitation pickles (c) 1999-2008 - Phil Hassey  "we care"