App Reskinning Tutorial: Game Settings

How to add the game settings

Now, you will want to change all the settings from the adverising networks, from the leaderboards to your personal settings and make sure that the money comes to you. Now before getting set up, you will need to go to your different accounts on Revmob, AdMob and Chartboost and verify that you have all your IDs there.If you have followed the game course tutorial until now, you should have those IDs handy since you copied them somewhere on a text file and ready for use.

Xcode source code location

Now open the project in Xcode in order to update all the advertising networks IDs. We explained in a previous course how to open the project in Xcode (look for the unzipped source code file), locate the file named "game_flappy.xcodeproj" then double-click it. Once opened, you will need to be looking at the file called "SKGameMetadada.h".

locate game metadata file

You can locate that file using the left side panel menu and type what you're looking for in the search box. If you're not seeing the side panel, on the top right hand side, there is a little icon that says "Hide or show the navigator" to toggle it.

panl show hide navigator

Within that "SKGameMetadada.h" file you will notice a lot of different defined settings, but you won't be needing them all. To start with, you will need to update your leaderboard ID.

Xcode project advertising networks

Go wherever you kept your leaderboard ID, copy it and go back to Xcode to paste it next to where it says "DEFAULT_LEADERBOARD_STORE_ID". Paste it right between the double />
default leaderboard store ID

Repeat the same step procedure for Chartboost and look for the variable called "CB_APP_ID" and copy/paste you Chartboost ID within the double quotes as well. Do it again for the App Signature, look for "CB_APP_SIGNATURE". Then repeat it for the Revmob App ID, copy/paste it next to "REVMOB_APP_ID".
Now locate your Admob Ad unit ID, copy it and paste it next to "ADMOB_MEDIATION_ID". Finally, you will need to get ahold of your Apple ID, copy it, then next to the variable "APP_STORE_URL", you will see a string which look like this: "". Right in between the word "id" and the "?", erase that string number and paste your Apple ID from iTunes Connect there.

More settings will need to be updated afterwards to make sure the game has your game name, that you're also using you App ID and provisioning profiles. Go back to your Xcode project, click on "game_flappy" on the left side panel.

game settings bundle ID

Click on the "General" tab and put in your bundle ID you created earlier in the Apple Developer website (you App ID) and the one you created in iTunes Connect. Put in the version number you assigned in Itunes Connect and fill in the "Build" field. Usually we keep it the same as the version number for the sake of simplicity. The "Team" field will have your team ID that you created in the Apple Developer site. Right below, you will notice the "Deployment Info" section. The "Deployment Target" field where you can set the minimum target (like iOS 5 and up for example). You could leave the default for Device as "Universal" unless you have a device preference. The rest of the game settings can be left alone for now. Next, go to the "Info" tab. Click "Bundle Name" and set it to your game name. Also, click on "Bundle Display name" and update it with your game title or a similar version of it. The "Bundle Display name" will be the App name that will be displayed on the App Store and also the name below the icon on your Iphone.

code signing settings

Click on the "Build Settings" tab, then scroll down to the "Code Signing" section. You will need to change the game settings under "Code Signing Identity" and "Release". From "iPhone Developer", select your "iPhone Distribution" from the select menu. Repeat the same step for "Any iOS SDK". Also, under "Provisioning Profile", for the Release, select your own release and do the same for "Any iOS SDK". Once done, run a "Product Clean" procedure like the ones you did before to see your game updated changes.

How to create iTunes test user for testing Leaderboards

flappy fairy leaderboards

In order to see the leaderboards, you need a test account. Go to iTunes Connect, log in and go to "Manage Users". Once there, create a Test User by clicking on "Add New User" and fill in the form. You will need a valid email address.

add test user leaderboards

How to troubleshoot your Game Center Leaderboards

This section applies only if you ran into some trouble setting up your leaderboards. If everything was fine on your end then you may skip this section. Make sure you review your "LEADERBOARD_ID" inside Xcode in the "AppDelegate.m" file (Locate/search it), make sure the uppercase/lowercase string letters match the ones you have set on iTunes Connect "Manage Your Apps, and under "App Information", click "View Details".

view details app information

Now scroll down to the "Game Center" section, make sure it is "Enabled" and also your leaderboard needs to be selected. you should be seeing some value in the "Reference Name" field, "Leaderboard ID", or click "Edit" to add one.

reset iOS simulator

Also, as you test things out, you will need to reset the iOS Simulator because at some point "Game Center" might not pop anymore and disables automatically. Once done, rerun the application in Xcode. On another note, click the "Info" tab and verify that the Bundle Identifier is correct, the one from your game in iTunes Connect associated with your app in the "App Information" section.