WallUp | iOS Social Wallpapers Application

Introduction

Please carefully read this guide in order to fully configure this template, and remember to test it on a Real Device – the iOS Simulator may fail.

An internet connection is required.


Quick Start

BEFORE running this app on your own device via Xcode and test it, you have to create a FREE account on back4app.com, and a Parse App.
, and replace the following strings with your Parse App’s App ID and Client Key in the Configurations.swift file:

    let PARSE_APP_ID =     "pwkmVrsiHTp2wN3q3UXUBiOwiE5C31atCq2CihPy"
    let PARSE_CLIENT_KEY = "ugVWfJTY4azulDWoXmHVnkHkidlDzw6koSzrEVha"

Great, Your app is now connected to your own database!

Now you can run the app via Xcode and you’ll get an alert in the Home screen. That’s because there’s a line of code in the Home.swift file that calls a function that creates the Wallpapers classes in your database, as well as a demo row.
Therefore, after getting that alert in your app at startup, stop the app and enter Home.swift. Remove (or comment) this line of code into the viewDidLoad() function:

createDemoClassAndData()

Then you can enter your own Parse Dashboard, refresh it and check the brand new Wallpapers class with its demo data.


General

Xcode

This template has native Apple Swift code, so you can edit it only with Xcode running on a Mac computer. If you don’t have it, download it for free on the Mac App Store.

PLEASE NOTE that you’ll need the latest official version of XcodeNO BETAS, because Betas are always buggy and never work properly.

App Name and Bundle ID

You must change the Display Name and Bundle Identifier into the new ones in the General tab in Xcode: 

Archive App for App Store Publishing

Once your app is ready to be submitted to the App Store for review, you need to Archive your Xcode project.
Click on Product and select Archive. Xcode will archive your project and automatically open the Organizer window, where you’ll find a button to submit your binary to your App Store Connect account.

Info.plist – Privacy Alert text

You should check the Info.plist file – you can find it in the files list on the left-side panel – and set the text you wish in the Value column of the Privacy rows.
Those values are the explanations that will be displayed in the Permission Alerts that show up to access the Camera, Photo Library or Location Service, so you may edit them as you wish based on your language or what you exactly want users to see in those Alerts.

Apple reviewers check those texts out all the times, and if the message is not so clear to them, they may reject your app while in Review, so please type a short but exhaustive text in each row in order to make clear what Permission the users should allow.

Reskin the UI design of the app

This project has a Storyboard file called Main.storyboard and you can find it in the list of file that is shown in left-side panel of the Xcode window.
You can edit all the UI elements of this app from the Storyboard, Colors, Fonts, Buttons, Views positions, etc.

The strings of the Alert Controllers are located in the code, so they can be edited only in the .swift files.

The images are stores into the Assets.xcassets folder.

Terms of Use and Privacy Policy

Select the tou.html file form the left-side panel’s list in Xcode – it’s located into the Intro_Login_SignUp folder – and edit it accordingly to your own Terms of Service and Privacy Policy. Also, replace the APP_NAME words with the new name you assigned to your App.

Please also pay attention to this line:

"mailto:support@yourdomain.com">support@yourdomain.com

There are a few identical lines like that in the tou.html file, so you must replace support@yourdomain.com with a valid email address where people can contact you for any question, feedback or in case they want to delete their account.

Google Form setup – for wallpaper submissions

Users can submit wallpaper images through Google Form, when they tap the SUBMIT button in the Setting screen, the app opens a link in Safari. You have to first create a Google form under your own Google account – if you don’t have a Google account, please create it now, it’s free.

Go to Google Forms and click on the + Blank form.
Set a title for your form, and a description, here’s an example:

Wallpaper Submission Form
We’re always looking for new content to add in our app, and we would love to see and review your work! Please answer the few questions below, it’ll take the time of a snap 🙂

Click the Settings icon and complete the GENERAL tab as it’s shown below:

Click the PRESENTATION tab and set it as shown below, then click SAVE:

Add a Short answer field by clicking the + button and edit it as shown below:

Add a File upload field by clicking the + button again, and edit is as shown below:

Add a Checkbox field by clicking the + button again, and edit is as shown below:

If you click on the Preview button – the one with the eye icon – you should get something like this:

You’re done, now you have to click on SEND and in the Send form tab check the Shorten URL checkmark and copy the provided link:

Now enter the Configuration.swift file and replace the string of the GOOGLE_FORM_LINK variable with your own Google Form’s link:

let  GOOGLE_FORM_LINK = "https://goo.gl/forms/d1RelRwhVqEtOjA93"

Check submitted Wallpapers

You should get an email when a wallpaper has been submitted via your Google Form, anyway, I suggest you to still daily check your Google Form -> RESPONSES tab to see if someone has submitted some wallpaper for review and upload them in your own Parse Dashboard.

In order to insert new Wallpapers into your own Parse Dashboard (the database), please read the Database section of this guide.

Delete a User’s account upon request

Accordingly to GDPR Terms, you have 24 hours to delete an account after receiving a deletion request. In order for you to delete an account, you first need to identify the user’s row in the User class of your Parse Dashboard, keep a note of its objectId value, select that row and click Edit -> Delete this row.
Then, just search for that objectId‘s value you’ve previously noted in all the other Classes of your database, check out all the rows until you’ll find that objectId and delete it – this is in case it appears into some Array type columns.

PLEASE NOTE that if you delete a User’s row in the database, you must also enter the other Classes and remove all those rows that contain the objectId of the User in the cells.


Configurations

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 = "WallUp"

Parse Server keys

As explained in the QuickStart paragraph, you must replace the strings of the 2 variables below with your own App Id and Client Key that you will get from the back4app website after creating your own Parse App:

let PARSE_APP_ID =     "K7SCPO9S6zywk3DMoEskABkJCOOWNkwx6Lfew2hy"
let PARSE_CLIENT_KEY = "kC36ZLG7UWs31cPpLUN3M8RkS6K6BK544MFYm3hD"

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 RGB values of the following variables as you wish, change the numbers before /255. The main color of the app and some UI will be affected by your change:

let MAIN_COLOR = UIColor(red: 93/255, green: 194/255, blue: 230/255, alpha: 1.0)
let LIGHT_GRAY = UIColor(red: 243/255, green: 243/255, blue: 243/255, alpha: 1.0)

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 some custom font, which is already stored into Xcode in a dedicated folder.
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:

App Store link

You must replace the following string with the App Store link of your app:

let APP_STORE_LINK = "https://itunes.apple.com/us/app/id333903271"

You can copy the App Store link of your app in the App Store Connect page: after creating an iOS app, switch to the App Information tab and scroll down to the Additional Information section.
Right-click over the View on App Store link and click the Copy Link Address option:

List of Categories

The following array contains a list of categories for wallpapers:

var categoriesArray = [
      /* c_0 */ "Starter Pack__This pack is a great starting point to find cool wallpapers for your device.__unsplash.com",
      /* c_1 */ "Abstract__Awesome collection of abstract patterns and pictures, liquid sensations for your device.__unsplash.com",
      /* c_2 */ "Mextures Collective__This pack showcases high-def wallpapers provided by the Mextures Collective community.__mexturescollective.com",
      /* c_3 */ "Infinite Space__A fresh collection of pictures from outer space. Make your device stellar.__unsplash.com",
      /* c_4 */ "Sky Collection__A collection of sky photos.__papers.co",
      /* c_5 */ "Blurred Art__Nice variety of colored and blurred wallpapers.__papers.co",
      
      // ADD CATEGORIES HERE (OR EDIT THE ONES ABOVE)
  ]

You may notice that there’s a comment on the left side of each item. That indicates the name of the image relative to the category.
You ahould also notice the syntax of each array’s item, its has a double underscore separator __. That’s needed for the app show data.
So, in case you want to add a Category, follow this sample steps:

As an example, let’s pretend you want to add a new category called Awesome Art.
You need to add a new string below the last one of the categoriesArray which must contain the name, description and website link where you’ve picked the image from.
Here’s an example:

  "Awesome Art__A brief description of this category.__unsplash.com", 

The website link must not have any www or http:// or https:// prefix, it must be only the domain name!

As a reminder, you may also add the /* c_6 */ comment before the string, so it’ll look like this:

/* c_6 */ "Awesome Art__A brief description of this category.__unsplash.com", 

That /* c_6 */ comment is the name of the new image you must create into the Assets.xcassets folder. Check the existing ones in the CATEGORIES to see how they look.
So create a new Image Set into the CATEGORIES folder and name it c_6:

Now Create 2 .jpg images, one must be 960x640px and the other one 640x427px, they are the category image that will show up in the Home screen of the app.
You can use Photoshop or any other image editor software to create your images.

Drag the bigger image into the 3x box of your new Image Set, and the smaller image into the 2x box.
Then, you’re done 😉

Now, if you run the app again, it’ll show your brand new Category in the Home screen.

Support email address

You must replace the following string with a valid email address where you want people to contact you in case of questions, support or even account deletion requests – accordingly to EU GDPR:

 let SUPPORT_EMAIL_ADDRESS = "support@mydomain.com"

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.

Parse Dashboard Classes and column names

This section is a list of strings that the app calls to perform queries to the Parse Server database – aka Parse Dashboard – and it contains a few useful custom global variables and functions.

DO NOT EDIT those variables and instances unless you’re an experienced developer, otherwise, the app will not work properly.


Database

You should perform the following configurations BEFORE running the app!

The backend of this template is Parse Server hosted on back4app.com.
After performing the configurations mentioned below, you will run the app and see no content, the Intro screen will show up and you’ll be able to Sign Up in order to create a test account and start testing the app.

Due to the high-performace code of this template and the FREE back4app plan’s limits, you will be able to test this template for a while, but it may happen that you’ll receive an email from back4app telling you that you have reached the monthly plan’s limits and you should upgrade your plan.
I suggest you to do that and just subscribe for a Starter Plan – it’ only $4.99/month – so you will get more Database Storage and API requests/second/month than the FREE Plan. This paid subscription will also increase the loading speed of the app and can be enough for a good amount of users using your app. Check out the pricing table here

So, follow these steps to set up your own database:

Unless you already have an account on back4app.com, create one – it’s FREE!

Enter My Apps and click on Build new app:

Type your App name and click CREATE:

Wait for the website to create your app – it’ll take just a few seconds – then you’ll be redirected to the Dashboard (the database interface, which looks like an Excel file):

You’ll see it empty, but don’t worry, it’ll get data while you’ll start using your template.

Click on Server Settings from the left side menu:

Click on SETTINGS in the Core Settings box: 

In the following page, you’ll have to copy the App Id and Client Key, and replace the strings into Configurations.swift – as mentioned already in the QuickStart paragraph:

let PARSE_APP_ID = "pwkmVrsiHTp2wN3q3UXUBiOwiE5C31atCq2CihPy"
let PARSE_CLIENT_KEY = "ugVWfJTY4azulDWoXmHVnkHkidlDzw6koSzrEVha"

Good job, your app is now connected to your own database.

As explained in the QuickStart section of this Documentation, you should shortly get an alert after running the app for the first time that warns you that the Wallpapers class and its demo data have been created.
Stop the app and launch the awesome Parse Dashboard to check your database out.

PLEASE NOTE: If you already bought the Android version of this template, you don’t need to create a new Parse App, nor upload the main.js file in the Cloud Code section.
Just add the App ID and Client Key strings into Configurations.swift and you’ll be fine.

The power of Parse Server is that you do not have to manually create tables and columns in the database – like you would have to do in MySQL – because the SDK will automatically create Classes and columns in your Parse Dashboard while using the template!

ADD WALLPAPERS IN YOUR DATABASE

Follow these easy steps to add wallpapers rows in your Parse Dashboard and make them visible in the app:

Click the Add row button:

Double-click on the cell of the category column and type a category name and hit Enter – it must perfectly match one of the names in your categoriesArray in the Configurations.java file:

Double-click on the cell of the phone column, click the Upload file button and select the jpg image of your wallpaper. The suggested size of the image is no more than 1242x2208px, High-quality settings (in Photoshop):

Double-click on the cell of the likes column and type 0:

Double-click on the cell of the likedBy column and type []:

Double-click on the cell of the comments column and type 0:

Double-click on the cell of the isOfTheDay column and select either False if you don’t want to set this wallpaper as Wallpaper of the day, or True if you want it to be shown as Wallpaper of the day in the Home screen:

PLEASE NOTE that you can set ONLY ONE WALLPAPER as Wallpaper of the day!
So, each day, you should enter your Parse Dashboard and select a wallpaper’s row, switch its isOfTheDay cell into True and switch the old wallpaper’s row into False, in order to offer a different wallpaper each day.

Due to the structure of the database, it’s not possible to make any bulk upload, you must manually add Categories and Products data.


Apple Sign In

Follow these steps to configure Apple Sign In on your Apple Developer Portal and on back4app:

Log in to your Apple Developer Account on the Apple Developer Portal and click on Certificates, Identifiers & Profiles.

Go to Identifiers and click the (+) button to add a new App ID

Select the App IDs option.

Mark the Sign In with Apple option and click the Edit button on the right

Make sure Enable as a primary App ID is selected

Fill up the Description field and use a reverse domain to set the Bundle ID, something like com.yourname.appname. This Bundle ID must match the one you’ve set in the General tab in Xcode.
Click the Continue button when done.

Check if all the information is right and click the Register button

Now go back to your Apple Developer Portal’s account and enter the Keys section, then click the (+) button to add a new Key.

Fill up the Key Name, check the Sign In with Apple option and click the Configure button.

Make sure that the Primary App ID is correct and click the Save button.

At the end download your new Key by clicking the Download button.

IMPORTANT: Save this key in a safe place as you will not be able to download it again. Anyway, you don’t have to upload or use this key anywhere, but Apple still wants you to download it, so just do it and save it in a safe place.

Go to your back4App dashboard and click on Server Settings again, then enter the Apple Login box by clicking the SETTINGS button.

Now, you just need to paste your app’s Bundle Identifier in the Bundle ID field and click the Save button. Then you’ll be done on configuring Apple Sign In on your app.

IMPORTANT: In case you’ll need to revioke Apple Sign In access in your app – for test purposes or just to switch Apple ID accounts – you have to enter your iPhone/iPad Settings and go to Apple Id -> Password & Security -> Apple ID logins -> {YOUR APP NAME} -> Stop using Apple ID

In case you face any trouble while integrating Apple Login, please contact the back4app team via chat, they’re friendly and very willing to help!


 Facebook login

Enter your Facebook Developer page at https://developers.facebook.com/apps/

Click + Add a New App button

Type the name of your app and your contact email address in the popup window that just showed up.

Click the Create App ID button and pass the Security check that Facebook will prompt out.
After that, the browser will show your Apps Dashboard.

Click on Settings -> Basic in the left-side menu.

In the Privacy Policy URL type your website’s URL.

If you don’t have any Privacy policy page loaded in your own server or website, don’t worry about it, you may either create one and upload it to a free hosting server like 000webhost.com or just place any URL, even “http://example.com/“, is ok, Facebook staff doesn’t make ay check for it yet. of course it would be good to create and upload a Privacy Policy HTML or PHP page someday in your own server and change that URL with the one of your page 🙂

Now select a Category, upload a 1024x1024px or 512x512px app icon image and click Save Changes on the bottom of the page.


Ignore the Business Use and Data Protection Officer Contact Information sections in case you’re not doing any business in Europe (this is intended for companies, not individual developers or people).

Scroll down and click + Add Platform, then select iOS:

Copy the Bundle Identifier you have set in the General tab in Xcode and paste it in the Bundle ID field of the iOS section.

Switch Single Sign On option to Yes and click the Save Changes button.

Click the OFF switch on the top-right corner of the page.
Click the Confirm button in the alert that shows up – you can ignore its message, the Facebook Login will still work in your template:

Now go back to your App Dashboard on back4app, scroll down and click SETTINGS in the Facebook Login box:

Paste your Facebook App ID in the text box and click the + button to add it to your Parse App.

Enter Xcode and select Info.plist from the files list on the left-side panel.
Expand the URL types row, the Item 0 row, the URL Schemes row and replace the App Id string in that row with the one of your Facebook App – the App ID you’ve copied before.
PLEASE NOTE that the new App ID you’ll paste must start with fb, check the existing demo one as an example.

Paste your Facebook App ID into the FacebookAppID row too, this time you don’t have to put the fb prefix.
Lastly, type the name of your app in the FacebookDisplayName row.

Great, you’re done with the Facebook Login settings!

PLEASE NOTE that if you already bought the Android version of this template, you don’t need to create a new Facebook app.
Just add the iOS platform to your existing Facebook App, perform the settings explained above and copy the same APP ID.


 Useful stuff


F.A.Q.

Parse Server hosted on back4app

Parse Server is a powerful JSON backend based on Node.js, and its hosted on back4app.com.
Click here to learn more about this backend

Can I host Parse Server on my own server?

You may do so, but please note that I do not provide support for it because it’s pretty complex to configure Push Notifications and Cloud Code jobs, that’s why my templates use back4app – it allows those setups to be made quickly and easily.
If you still want to try to host Parse Server on Heroku or your own server, you should refer to the official Parse Server Guide at parseplatform.org.

What kind of support is offered?

Free support is offered in case of bugs encountered in the original template, either in the code or the UI design.
In case you have edited the code – and so created bugs because of your editing – I may apply some fee to fix your bugs by a remote connection through AnyDesk, or by you sending me your source code for verification.

Should I use Xcode to edit this template?

Yes, you must always use the latest stable official version of Xcode to edit this application.
Download the latest version on the Mac App Store from your Mac.

I’ve performed all configurations mentioned in this Guide, but something is wrong. What should I do?

• Double-check all your configurations, probably you have missed something.
• Always check the Console log in Xcode if the app crashes.
The Console log helps to debug your app, it’s really important.

How do I remove AdMob ads?

It’s super easy, just open the Find tool on the left-side panel in XCode and search for this line:

showInterstitial

Xcode will show you a list of swift files where such code is located. Click on each row and just comment that line of code in each the swift file:


Support | Contact