Following are the requirments to run the IOS application.
- Xcode 8
- Pod Setup in your Mac(installing Pods)
- XMPP server setup (HostName)
- AppleDeveloper a/c (For BundleIdentifier,In-App-Purchase->Identifier from iitunesconnect)
- Database and Webservice setup on cloud server(Webservice’s link)
- ADMOB key from “https://apps.admob.com”(BannerAd,Interstitial)
- GoogleAPI key for Google Places API for iOS
- Facebook App key
Initial Setup(Pod Install)
Make sure you have set up Pods If not than use guild lines in "https://cocoapods.org"
After Cocoa Pod set up follow this video for pod installation "https://youtu.be/cHJxLx04P5o"
A) Push Notification
Step 1: Register your app to receive notification:
To make you app support Push Notifications, your app must use an Explicit App ID.
- Navigate to the Apple Developer Member Center website, and click on Certificates, Identifiers & Profiles.
- Select Identifiers on the iOS Apps section.
- You will see a list of your App IDs. Click on the + button.
- Enter a name for your new App ID under App ID Description, choose an App Id Prefix, and under App ID Suffix, select Explicit App ID, enter your iOS app’s Bundle ID, it should match the Bundle Identifier in your Xcode project configuration and in the Info.plist file.
- Enable Push Notifications under App Services. Enable other services that your app will need.
- Click on “Continue”, confirm that all values were entered correctly. Click on “Submit”.
Now that you’ve created the App ID, you need to configure the App ID for Push Notifications.
- Select your new App ID and click on “Edit”.
- Scroll down to the Push Notifications section. Click on “Create Certificate” under “Development SSL Certificate”.
- Follow the instructions in the next screen to create a Certificate Signing Request (CSR) using the Keychain Access utility on your Mac. This is needed to authenticate the creation of the SSL certificate.
- Upload the CSR to Apple’s servers, then click on “Generate”.
- Add the certificate to your login keychain.
- Open the Keychain Access utility, and locate the certificate under “My Certificates”. It should be called “Apple Development Push Services:”. Right-click on it, select “Export”, and save it as a .p12 file. Do not enter an export password when prompted!
You will need to repeat the process to make the Production SSL Certificate.
Now we need to configure the Xcode project.
- Go to your project’s Capabilities page, then turn On Push Notifications. If there are any issues that require your attention, Xcode will let you know.
- Go to the General page. Modify the Bundle Identifier to match your App ID’s Bundle Identifier.
B) XMPP Server Setup
To learn more about XMPP Server Click here
Install XMPP Server : Ubuntu, Windows
Learn how to setup XMPP Server using ejabberd: Ubuntu, Windows
C) phpMyAdmin - top
To learn how to import database in phpMyAdmin Click here
D) iOS App Import
Now we will setup our iOS to Make it communicate with our XMPP Server
- 1. Open downloaded folder from Codecanyon
- 2. Click on CupidLove.xcworkspace and open it
Wait for Xcode to load setup all files and dependecies.
NOTE: Now we have to refresh pods in order to avoid error
1. Open your "Terminal" and Install cocoapods using this command $ sudo gem install cocoapods It can take several minutes so be patient
2. In "Terminal" Navigate to your project home directory and type $ pod install It can take several minutes so be patient
Once finished your App is now ready to compile in real device or iOS Simulator.
E) Application Setup
Now we are going to open our SSXmppConstant.h file to setup our server.
- Setup your XMPP server Host name, Host port, User postfix, Group postfix etc.
F) App Customization
You can change app detail fromPrefixHeader.pch file.
- See the image to how change app detail like Appurl, image url, Google_API_Key etc.
To customizaze name and bundle identifier
Now we are going to setup our second money source by advertising. We have setup the project with Google Admob ads source
- 1. Google Admob
Go to Admob website follow instructions
- Paste Your pub id in Appdelegate.m
H) In App Purchase
Now we are going to setup our next money source by in app purchase. To setup In app purchase go to https://itunesconnect.apple.com/ and do as follows
- Sign In / Sign Up to your account and add new app
- Then add In app purchase to your app.
- Select any one In app purchase that you want for your app.
- Enter price value, start date and end date for youp app.
- Then save and generate product id, apple id etc.
- Copy that product id and paste it in PrefixHeader.pch file at kRemoveAddInAppPurchase.
I) Facebook Login
- Go to https://developers.facebook.com/ and follow instructions to create a new app withim facebook developers account to get Facebook APP ID
- In the corner click in your picture and drop-down to create new app or register to developers acoount then create new app
- After creating new app, Now go to Dashboard to get a Facebook APP ID
- Copy and paste your Facebook App ID in info.plist file and also copy in URL Schemes item 0 with prefix 'fb'.
- To make application available for public go to App Review change Make CupidLove public from No to Yes and also submit list of items that we need to get permission from user.
J) API key Generation
Login to google developers console and follow these steps to create API key.
- Select project or create new project.
- Go to credentials and create credential for API key.
- Restrict key to iOS app.
- Go to Dashboard and Click on enable API.
- Select Google Places API for iOS.
K) ADMOB key Generation
Login to https://apps.admob.com/ and these steps to create Ad unit Ids.
- Go to MONATIZE tab and click on MONATIZE NEW APP.
- Add your app and select platform iOS.
- Select ad format banner and name ad unit.
- Select ad format Interstitial and name ad unit.