Create an iOS App with our App Template Create an iOS App with our App Template

Create an iOS App with our App Template

Taylor Kirchwehm Taylor Kirchwehm

Prerequisites

  1. Mac laptop or computer 
  2. Install Xcode
  3. Install Cocoapods
  4. Create an iOS App Profile in Zype

Downloading and Opening the Bundle

In order to generate an iOS bundle using this SDK, you must first pull the latest source code from Zype's github repository. This can be found at https://github.com/zype/zype-ios.

Click the green Clone or download button on the right, and select Download ZIP.

image4.png

Next, pick a location on your computer to save the .zip file. Once the .zip file download is complete, unzip the file to reveal its contents.

Open the Terminal app on your Mac and type “cd” into the folder that the unzipped zype-ios-master folder is saved in.

If you don’t change the name of the folder that you downloaded from GitHub, and you downloaded and saved the folder on your Desktop, you will type the following commands into Terminal.

Type, cd Desktop and hit enter.

Type ls ("l" is a lowercase L) and hit enter.

Type cd and the name of your application folder. In this example, you would type zype-ios-master and hit enter.

You’ve successfully navigated to the correct application folder! If you have not installed Cocoapods (see prerequisites above), you will not be able to complete this next command.

NOTE: Prior to the next step, check the following setting in Xcode. In the most recent version of Xcode, you may need to enable Command Line Tools. To do so, navigate to Xcode Prefrences>Locations>Command Line Tools. If that dropdown box is empty, select the Xcode version available. It should look like this when saving:

commandlinetool.png

With Cocoapods installed, the final command you will type into Terminal is pod install and hit enter.

 

image7.png

This command will generate a workspace file (.xcworkspace) that you can open in Xcode and make the necessary customizations to your iOS app.

Make sure that you open the application workspace in Xcode ([Your_app_name].xcworkspace - NOT [Your_app_name].xcodeproj).

App Customizations (Required)

Images

Navigate to Zype > Zype > images.xcassets. 

This is the folder that holds all of the placeholder images. You're not required to replace all of the images but have the option if you're interested in customizing the app even further. We've outlined required and recommended images to replace below:

  • App Icon (required) - The App Icon is what attracts attention in the App Store and stands out on the Home screen. You'll need to replace all images sizes in AppIcon (see image below).

app_icon.png

Tip: Take advantage of this icon resizer for the App Icon images.

  • Splash Image (required) - The splashImage appears instantly when your app starts up and is quickly replaced with the first screen. Update this image from the Images folder within Images.xcassets (see image below). 

splashImage.png

  • Image Playlist Placeholder (optional) - The ImagePlaylistPlaceholder will fill in for any missing playlist thumbnails and in some cases load first in front of your playlist thumbnail. Update this image from the Images folder within Images.xcassets.
  • Image Placeholder (optional) - The ImagePlaceholder loads will fill in for any missing video thumbnails and in some cases load first in front of your thumbnail. Update this image from the Images folder within Images.xcassets.
  • Logo (optional) - The logo appears at the top of the 'Sign In' and is important to replace if you are monetizing your content. Update this image from the Images folder within Images.xcassets.

Tip: If you're unsure of an image size, you can right click on the image, select Show in Finder and Get Info from the Finder. 

App Display Name 

By default your app will be named Zype Template.

Update the Bundle Display Name and Bundle Name from Supporting Files > Info.plist.

 

Root Playlist, App and OAuth Keys

Navigate to Zype > Zype > Utilities > ZypeCommon.h.

You'll need to replace the following Client Settings - ClientID, ClientSecret, AppKey and RootPlaylisId in order to pull in your content, playlists and metadata information stored in Zype.

These keys can be found in your Zype account by managing your iOS app profile under the Video Apps section. 

The rootPlaylistId is the ID of the primary playlist which houses all your content. Here you can find more background on how to set this up.

From the same ZypeCommon.h file, you can make the following optional app customizations listed below. 

App Customizations (Optional): 

Social Media

image3.png

Replace <your_branch> to link your social media channels from within your iOS app (see image below).  

Theme

Select a Dark or Light theme for your app:

Light theme: #define kAppColorLight YES

Dark theme: #define kAppColorLight NO

image2.png

Brand Color

By default, the brand color will be a bright red color. Replace the existing HEX # with your brand color:

#define kClientColor    [UIUtil colorWithHex:0xF75532];

Gallery View

The Gallery View in iOS displays your playlists and videos in rows of thumbnails with slider images at the top. If you need info on setting up image sliders, see here.

Enable Gallery View: #define kAppAppleTVLayout YES

Disable Gallery View: #define kAppAppleTVLayout NO

Monetization

Disable Subscribe to Watch Ad Free: #define kSubscribeToWatchAdFree NO

Enable Subscribe to Watch Ad Free: #define kSubscribeToWatchAdFree YES

Enable Native Subscription: #define kNativeSubscriptionEnabled YES

Disable Native Subscription: #define kNativeSubscriptionEnabled NO

Download

Select if you want to Enable or Disable downloading on your app. The video must have downloadable renditions for the feature to work (i.e. mp4, mp3, m4a, etc.):

Enable downloading: #define kDownloadsEnabled YES

Disable downloading: #define kDownloadsEnabled NO