The Configurations.swift
file
Open this file in Xcode and keep reading this guide, you'll have to perform some edits in this file in order to get your template ready to run:
App Name
Replace this string with the new name you want to give to this app:
let APP_NAME = "QRcode Scanner"
AdMob Ads
Replace the string of the variable below with your own
Interstitial Unit ID - you have to create such Unit ID on
apps.admob.com, just follow the instructions on the AdMob's website in case you don't know how to generate a Unit ID:
let ADMOB_INTERSTITIAL_UNIT_ID = "ca-app-pub-3940256099942544/1033173712"
You also have to replace the string into
Info.plist
with your own App ID:
You can get both
App ID and
Unit ID strings from your AdMob Unit page, after creating it:
Sometimes Apple reviewers reject apps because of Ads, the reason why is not clear yet, but a new submission on the App Store will fix the problem and get your app approved - just in case you'll get a rejection because of IDFA issue.
Anyway, after clicking the Submit For Review button on the App Store Connect page of your application, you’ll get something that looks like the picture below. Mark the options shown below and everything should go smoothly on the next review you'll get of your app:
Custom Colors
You can edit the
HEX
values of the following variables as you wish, change the numbers before
#
symbol. The main color of the app and some UI will be affected by your change:
let MAIN_COLOR = hexValue(hex: #ffcc33")
let LIGHT_GRAY = hexValue(hex: "#e1e1e1")
PLEASE NOTE that NOT all Views in the app will change accordingly to the new RGB values you've set in the above variable, you will still need to adjust some colors in some Controllers in the Storyboard.
Custom fonts
This App uses
Poppins font, which is already stored into the Xcode Fonts library.
In case you want to add a new font, you have to first drag your
.ttf
or
.otf
font file into the left-side panel in Xcode and click the Finish button in the popup that will show up:
Then select the Label, Button, TextFiled or textView you want to change font to, click the
[T]
icon on the right-side
Attributes inspector panel and select the font you want in the dropdown list:
Support email address
Replace the string of the variable below with the one you want to be contacted by users who download your app:
let SUPPORT_EMAIL_ADDRESS = [email protected]"
Utility Functions
Unless you are familiar with iOS programming, you should leave the code of this section as it is since it includes useful functions to show alerts and perform other things in the app.