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

Porting Galcon Fusion to the Mac App Store

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.

2 Responses to “Porting Galcon Fusion to the Mac App Store”

  1. Tweets that mention Phil Hassey » Blog Archive » Porting Galcon Fusion to the Mac App Store -- Says:

    […] This post was mentioned on Twitter by Phil Hassey, Android. Android said: [android] Porting Galcon Fusion to the Mac App Store […]

  2. Jake Brownson Says:

    Thanks for tip #6, had the same problem