iOS Development Environment Configuration

Development Environment Configuration

Preparing IDE

For iOS development, Mac hardware, OSX operating system, Apple account and Xcode IDE created by Apple are basically required.

For Apple account creation and Xcode installation, refer to Apple’s official document below.

Preparing PlayRTC iOS SDK

Create Xcode Project

  • Select File> New> Project> iOS> Application> Other> Empty and create an empty project.
  • Select product name. In this example, it is assumed that the name is designated as MyApp.

Copy PlayRTC SDK

Download file from the link below.

When you decompress the downloaded folder, you will find one a extension file, one dat extension file and a number of header files with h extension. Arrange them as of the following for the project you wish to work on.

  • [PROJECT-ROOT]/PlayRTC/libs/icudtl.dat
  • [PROJECT-ROOT]/PlayRTC/libs/libsktplayrtc.x.x.x.a
  • [PROJECT-ROOT]/PlayRTC/public/PlayRTC.h and other h extension files

Now, include SDK file copied according to the preparation procedures in the Xcode bulid environment below.

Prepare Xcode Build Environment

Copy SDK to project folder as of the above and configure build environment.

Import PlayRTC SDK

Import SDK copied to the project in the previous stage as of the following and include it in the build process.

  • Files > Add Files to “MyAPP”
  • Select [PROJECT-ROOT]/PlayRTC folder
    • Select Added Folders > Create Groups
    • Select Add to Targets> MyApp
  • Click Add

Linked Frameworks and Libraries

Set the linked library as of the following in MyApp> Targets> MyApp> General> Linked Frameworks and Libraries.

  • UIKit.framework
  • Foundation.framework
  • OpenGLES.framework
  • Securuty.framework
  • AudioToolbox.framework
  • CoreFoundation.framework
  • AVFoundation.framework
  • CoreVideo.framework
  • GLKit.framework
  • CoreAudio.framework
  • CoreMedia.framework
  • Core.Telephony.framework
  • MobileCoreService.framework
  • SystemConfiguration.framework
  • CFNetwork.framework
  • CoreGraphics.framework
  • QuartzCore.framework
  • libm.dylib
  • libc++.dylib
  • libicucore.dylib
  • libsqlite3.dylib

Build Settings

Set the following in MyApp> Targets> MyApp> Build Settings.

If SDK version to apply is 32Bit, set 32Bit in Architecture below. If 64Bit, set 64Bit. According to Apple’s iOS App Store policy, 64Bit architecture must be supported for app registration. Therefore, it is recommended to set and apply 64Bit SDK and architecture.

  • Architecture – 32Bit
    • Architecture : $(ARCHS_STANDARD), $(ARCHS_STANDARD_INCLUDING_64_BIT)
    • Build Active Architecture Only : NO
    • Valid Architecture : armv7
  • Architecture – 64Bit
    • Architecture : $(ARCHS_STANDARD_INCLUDING_64_BIT)
    • Build Active Architecture Only : NO
    • Valid Architecture : arm64
  • Linking
    • Other Linker FLags : -ObjC
  • Apple LLVM 6.1 – Language
    • C Language Dialect : C99[-std=c99]
  • Apple LLVM 6.1 – Language – C++
    • C++ Language Dialect : C++11[-std=c++11]

Build Phases

Set the following in MyApp> Targets> MyApp> Build Phases.

  • Copy Bundle Resource
    • icudtl.dat …in PlayRTC/libs

Prepare for Development with Objective-C

PlayRTC SDK is currently configured with Objective-C language. If preparation has been completed according to the procedures above, the environment for development with Objective-C has is completed.

Prepare for Development with Swift

To develop PlayRTC using Swift language, you need to draw up  MyAppProjectName-Bridging-Header.h file as of the following  and import header file of PlayRTC iOS SDK. Locate this file in the directory below.

  • [PROJECT-ROOT]/MyApp/MyAppProjectName-Bridging-Header.h

The contents to be included in the file are as follows.

#ifndef MyAppProjectName_Bridging_Header_h
#define MyAppProjectName_Bridging_Header_h

#import "PlayRTC.h"
#import "PlayRTCData.h"
#import "PlayRTCDataHeader.h"
#import "playRTCDataObserver.h"
#import "PlayRTCDataSendObserver.h"
#import "PlayRTCDefine.h"
#import "PlayRTCFactory.h"
#import "PlayRTCMedia.h"
#import "PlayRTCObserver.h"
#import "PlayRTCSettings.h"
#import "PlayRTCVideoView.h"

#endif

After importing header file to project, designate header file build process as of the following.

  • MyApp > Targets > MyApp > Build Settings > Swift Compiler – Code Generation > Objective-C Bridging Header
  • Designate Header File

For more details, refer to the link below.

Downloading Example App

Let’s download an example app and prepare the environment.

You can download an example app in a compressed file format from the link below.

Or, you can have i t cloned through git , which is a source code management mode, in PlayRTC GitHubrepository.

$ git clone https://github.com/playrtc/PlayRTC-iOS-Code-Samples

Now, the environment for tutorial development has been completed. In the next chapter, we will start creating a video/ audio web app.

 

 

Play RTC

서비스 체험

Play RTC build PlaygrOund

나만의 플레이그라운드를 만들어 친구를 초대해보세요 !

www.playrtc.com/

번거로운 가입이나 설치 없이ID만 만들어서 영상통화나 파일 공유, 채팅 서비스를 무료로 즐겨보세요.

 

Play RTC

서비스 체험

개설한 Playground 주소를 복하해서 친구에게 보내조세요. 친구가 Playground에 접속하면 이곳에 친구의 영상과 음성이 나타납니다. Waiting..

Photo

X
이미지 미리보기
이미지
 

서비스 체험

 

서비스 체험

서비스 체험은 크롬과 파이어폭스 브라우저에 최적화되어 있습니다.
크롬 또는 파이어폭스 브라우저를 설치 후 다시 이용해주세요.