Getting Started

Follow the steps below to setup your app :

  • PlayTube Script, you can get it from Here
  • Download Xcode 2022 Here. Please remember, always use the latest code, latest visual studio, and other latest product versions of products

Here are steps to install the full Xcode application.

  • Open the App Store on your Mac and search for Xcode.
  • Download Xcode from the App Store.
  • After your download is complete, launch Xcode.
  • Enter your administrator account credentials.
  • Unzip the PlayTube-IOS archive, extract it to a new folder, and then open the folder.
  • In the main folder, you will find the solution (Name: PlayTube.xcworkspace Type: Xcode work Space) double click on it and wait till everything is loaded.
  • Install all Project PODS for your Project, Open terminal at folder.
run the command “pod install”
It will take some time, Wait until it is completed.

Verify Application

  • You can get a purchase code from Envato.
  • Get Your API Server_Key which is located here copy it.
  • Create your Cert key for your application from Doughouzlight-License
    PlayTube Provides Triple DES algorithm encryption system + AES 256-Bit Encryption in your mobile application to safe your own information and your own server side keys from hackers and crackers, once you are a real buyer you will not fear any cracking or unpacking APK  actions by eligible black hat people, which may lead to leaking your sensitive server side data to the public. 

Once you have the key you will be able to add the key to your AppSetting.swift class

Theme Setting

Application Name

From your main solution right click on the QuickDate > General > Display Name Change the names as you like and the versions also depend on your AppStoreConnect the last version if you have one.

Colors and theme

To customize and change the main color of the application follow the steps below.

Go to App Constants class and change the colors below to your own colors.

Bundle identifier

Change the package name by edit “Bundle identifier” for App “TARGETS”

Logo Icons and splash Screen

Change logo of app by changing the icons in the file named AppIcon in assets folder.

For the accuracy of the icon and logo, please use this website

General Setups

OneSignal Notification

What is OneSignal?

OneSignal is a high-volume and reliable push notification service for websites and mobile applications. They support all major native and mobile platforms by providing dedicated SDKs for each platform, a Restful server API, and an online dashboard for marketers to design and send push notifications.

  • Sign in to the Onesignal Console at
  • Click on New App/Website
  • Choose your app name and platform then click next.
  • Fill out the form with your website information, then click save.
  • On the next page, ignore the page and click on Finish.
  • On the top navbar, click on Keys & IDs
  • Grab your OneSignal App ID & Rest API Key then go to Admin Panel -> API Settings -> Push Notifications Settings
  • Edit the following options for IOS:
    1. OneSignal APP ID – Enter the OneSignal App ID you created in the previous chapter
    2. REST API Key – Enter the Rest API Key you created in the previous chapter
  • Finally, go to the file ControlSettings Struct in the project and add the app id.

Google Map/Places

Google Maps API is required for GEO and viewing Google Maps.
  • Go to the Google API Manager console and login using your Google credentials.
  • After this click on Create Project link to create a new project.
  • Enter Project Name and click on Create button.
  • Select the project from the dropdown menu beside Google Cloud Platform.
  • Click on APIs & Services then click on +ENABLE APIS AND SERVICES.
  • Search for Maps Embed API and enable it.
  • Search for Maps Static API and enable it.
  • Once enabled, click on Credentials, on the top nav-bar, click on +Create credentials then click on the API key
  • Grab the key and Click Close.
  • Finally, go to the file info.plist in the project and add the key.

Firebase Account

Firebase is an app development platform that helps you build and grow apps and games users love. Backed by Google and trusted by millions of businesses around the world.

  • After creating a firebase account from the link you will need to create a new project as well.
  • then go to project settings.
  • Go to the Integrations tab and select the item below as the screenshot:

To connect with AdMob 

Add your Package android app name and pre

Socail Login

FaceBook Login

  • Log in to your Facebook account.
  • Go to Facebook for Developers, click on My Apps and press Create App.
  • Select Consumer. and click Next.
  • Set the Display Name of your application.
  • Enter the Contact Email.
  • Click on Create App.
  • Navigate to Facebook Login and press the Set up button.
  • Select IOS from the displayed platforms.
  • Add your package name that uniquely identifies your IOS app
  • Put that key in Info.plist file

To show and hide facebook login button, You can go to struct ControlSettings. In that struct you can change the setting accordingly

Payment Integration


  • Go to Stripe & create a new account.
  • Login to your dashboard & turn your account on by flipping the switch from “Test” to “Live”.
  • Click Activate Account in the popup window to fill out the standard business details Stripe needs to send you payments.
  • Once you’ve completed the entire form, click Activate Account.
  • Now that your account is live, go to Your Account and click on Account Settings.
  • Click the API Keys tab & copy the Live Secret Key & Publishable Key.
  • Go to Admin Panel -> Payments & Ads -> Payment Configuration, find Stripe and edit the following options:
    1. Enable Stripe Payment Method by clicking on the toggle.
    2. Stripe API Secret Key – Your Stripe secret key that starts with sk_
    3. Stripe Publishable Key – Your Stripe publishable key that starts with pk_

You can activate and deactivate your app by setting the variable ShowCreditCard.


With Braintree, you can seamlessly accept both PayPal and credit cards with a single integration. Your customers will never even need to leave your website’s checkout page to make purchases using PayPal! Instead, they will click a PayPal button – designed exclusively for Braintree merchants – and enter their PayPal credentials in a new window or lightbox.

PayPal Account:

  • Login to PayPal, then click here
  • Set your app name, and email address then click Create App.
  • On the top right side, you can see two tabs, SandBox and Live, Choose Live.
  • Go to Admin Panel -> Payments & Ads -> Payment Configuration, find PayPal and edit the following options:
    1. Enable PayPal Payment Method by clicking on the toggle.
    2. PayPal Mode – Choose Live (In case your app is in Live mode).
    3. PayPal Client ID – PayPal application ID you created in the previous chapter.
    4. PayPal Secret Key – PayPal application secret key you created in the previous chapter.

Braintree Gateway Account:

  • Login to Braintree gateway with PayPal.
  • Create API Keys from the drop-down menu.
  • then go to Processing Options to enable customers to pay with PayPal with:
    • PayPal Email
    • PayPal Client Id
    • PayPal Client Secret
  • then again go to API Keys from the drop-down menu, and Click the Keys tab & copy the paypalAuthorizationToken in your AppSettings.swift class file in your solution code as below:


  • Go to the Razorpay website and Sign Up.
  • Enter your work email address and a password for your Razorpay account and click Create Account.
  • Fill Pre-sign Up Form
  • Verify Email Address
  • Once your account is created, you have access to the Test mode on the Dashboard. Test mode is used for testing purposes and does not involve actual money transactions. However, you would need to activate your account in order to accept live payments.
  • To create an Application, follow this RazorPay Guide.
  • Once your application was created, take the required keys then go to
    Admin Panel -> Payments & Ads -> Payment Configuration
    find RazorPay and edit the following options:
    1. Enable the RazorPay Payment Method by clicking on the toggle.
    2. Application ID – RazorPay application ID you created in the previous chapter.
    3. Application Secret – RazorPay application secret key you created in the previous chapter.
  • You can specify the type of base currency in RazorPay by setting the variable
    and find openRazorpayCheckout() in WalletVC screen you can check what currency is accepted


  • Sign Up with Paystack
  • Verify your sign-up using a verification link sent to your email.
  • The next thing is to sign in to your new Paystack account
  • On your Dashboard, you will find your public and secret key
  • Grab the keys, then go to Admin Panel -> Payments & Ads -> Payment Configuration, find PayStack and edit the following options:
    1. Enable the PayStack Payment Method by clicking on the toggle.
    2. Secret Key – PayStack application secret key you created in the previous chapter.


  • Log into the Merchant Interface.
  • Click Account from the main toolbar.
  • Click Settings in the main left-side menu.
  • Click API Credentials & Keys.
  • Select New Transaction Key.
  • Click Submit to continue.
  • Request and enter the PIN for verification.
  • Your new Transaction Key is displayed.
  • If the Disable Old Transaction Key Immediately box is not checked, the old Transaction Key will automatically expire in 24 hours. When the box is checked, the Transaction Key expires immediately.
  • Go to Admin Panel -> Payments & Ads -> Payment Configuration, find and edit the following options:
    1. Enable Payment Method by clicking on the toggle.
    2. Mode – Choose Live (In case your app is in Live mode).
    3. Authorize.Net API LOGIN ID – Your API Login ID.
    4. Authorize.Net TRANSACTION KEY – TRANSACTION KEY you copied in the previous chapter.

Manage Features

Register System

  • You can set Disable/Enable Register system of the app by the variable below to True or False.

Video Live Streaming

  • Sign up here to create an Agora account. After sign-up, you can log in here.
  • Once you finish the sign-up process, you can create an Agora project in Agora Console, To create an Agora project, do the following:
    1. Enter the Project Management page.
    2. Click Create.
    3. Follow the on-screen instructions to enter a project name and use case, and check Secured mode: APP ID + Token (Recommended) as the authentication mechanism.
    4. Click Submit. You can now see the project on the Project Management page.
  • To copy the App ID, find your project on the Project Management page in Agora Console, and click the copy icon to the right of the App ID.
  • To get an App Certificate, do the following:
    1. On the Project Management page, click the edit icon for the project you want to use.
    2. Click the copy icon under Primary Certificate.
  • Generate a Customer ID and Customer Secret
    1. In Agora Console, click the account name in the top right corner, and click RESTful API from the drop-down list to enter the RESTful API page.
    2. Click Add a secret, and click OK. A set of Customer ID and Secret is generated.
    3. Click Download in the Customer Secret column. Read the pop-up window carefully, and save the downloaded key_and_secret.txt file in a secure location.
  • Go to Admin Panel -> Settings -> Posts Settings -> Setup Live Streaming -> Agora API Configuration
  • Edit the following options:
    1. App ID – Your APP ID we got one previous chapter
    2. App Certificate – Your App Certificate we got one previous chapter
    3. Customer ID – Enter the Customer ID you downloaded from key_and_secret.txt.
    4. Customer Secret – Enter the Customer ID you downloaded from key_and_secret.txt
  • Finally, go to the file LiveStreamController.swift and LiveStreamVC.swift in the project and add the app id.

General Application Settings

Search View:

You can add a list of some keywords when opening the search page by the variable below

Picture in Picture Mode

Picture-in-picture (PiP) shrinks a video into a small player so you can keep watching while using other apps on your mobile device. You can move the small player around your device’s home screen and position it over other apps.

To use picture-in-picture (PiP), exit the PlayTube app while a video is playing. If you have the PiP setting turned on, the video will shrink into a PiP window. The PiP window can be dragged to different parts of the screen, allowing playback to continue on top of other apps. You can pause or stop playing a video before you exit PlayTube to prevent PiP from turning on.

Turning picture-in-picture OFF/ON

  1. Go to Settings.
  2. Toggle Picture-in-Picture to off/on.