PortSIP VoIP SDK Manual for iOS  16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
Welcome to PortSIP VoIP SDK

Create your SIP-based application for multiple platforms (iOS, Android, Windows, Mac OS and Linux) with our SDK.

The rewarding PortSIP VoIP SDK is a powerful and versatile set of tools that dramatically accelerate SIP application development. It includes a suite of stacks, SDKs, and some Sample projects, with each of them enables developers to combine all the necessary components to create an ideal development environment for every application's specific needs.

The PortSIP VoIP SDK complies with IETF and 3GPP standards, and is IMS-compliant (3GPP/3GPP2, TISPAN and PacketCable 2.0). These high performance SDKs provide unified API layers for full user control and flexibility.

Getting Started

You can download PortSIP VoIP SDK Sample projects at our Website. Samples include demos for VC++, C#, VB.NET, Delphi XE, XCode (for iOS and Mac OS), Eclipse (Java for Android) with the sample project source code provided (with SDK source code exclusive). The sample projects demonstrate how to create a powerful SIP application with our SDK easily and quickly.

Contents

The sample package for downloading contains almost all of materials for PortSIP SDK: documentation, Dynamic/Static libraries, sources, headers, datasheet, and everything else a SDK user might need!

SDK User Manual

To be started with, it is recommended to read the documentation of PortSIP VoIP SDK, SDK User Manual page, which gives a brief description of each API function.

Website

Some general interest or often changing PortSIP SDK information will be posted on the PortSIP website in real time. The release contains links to the site, so while browsing you may see occasional broken links if you are not connected to the Internet. To be sure everything needed for using the PortSIP VoIP SDK has been contained within the release.

Support

Please send email to our Support team if you need any help.

Installation Prerequisites

Development using the PortSIP VoIP/IMS SDK for iOS requires an Intel-based Macintosh running Snow Leopard (OS X 10.8 or higher)

Apple's iOS SDK

If you are not yet a registered Apple developer, to be able to develop applications for the iOS, you do need to become a registered Apple developer. After registered, Apple grants you free access to a select set of technical resources, tools, and information for developing with iOS, Mac OS X, and Safari. You can open registration page and enroll.
Once registered, you can then go to the iOS Dev Center, login and download the iOS SDK. The SDK contains documentation, frameworks, tools, and a simulator to help develop iOS applications. XCode (the developer toolset for iOS application development) is included in the download as well so you do not need to purchase any developer tools to build iOS applications - that is included in the enrollment fee. You will need to use a minimum of iOS SDK 10 for developing iPhone and iPod Touch applications. At the time of writing this document, iOS SDK 10 was the most recent version available and supported.

Note:

Beta and GM seed versions of the iOS SDK are generally not supported unless noted otherwise. Regardless of the iOS SDK you're using for development, you can still target your application for devices running on an older iOS version by configuring your Xcode project's iOS Deployment Target build settings. Be sure to add runtime checks where appropriate to ensure that you use only those iOS features available on the target platform/device. If your application attempts to use iOS features that are not available on the device, your application may crash.

Device Requirements

Applications built with PortSIP VoIP/IMS SDK for iOS can be run on iPhone 4S or higher, iPod touch 4 or higher, and iPad 2 or higher devices. These devices must be running iOS8 or higher. We strongly recommend that you test your applications on actual devices to ensure that they work as expected and perform well. Testing on the simulator alone does not provide a good measure of how the application will perform on the physical device.

Frequently Asked Questions

1. Where can I download the PortSIP VoIP SDK for test?

 All sample projects of the PortSIP VoIP SDK can be found and downloaded at: 
https://www.portsip.com/download-portsip-voip-sdk/
http://www.PortSIP.com/portsip-voip-sdk.

2. How can I compile the sample project?

  1. Download the sample project from PortSIP website. 
2. Extract the .zip file.
3. Open the project with your Xcode:
4. Compile the sample project directly. The trial version SDK allows you a 2-3 minutes conversation.

3. How can I create a new project with PortSIP VoIP SDK?

  1. Download the Sample project and evaluation SDK and extract it to a directory. 
2. Run the Xcode and create a new iOS Project.
3. Drag and drop PortSIPVoIPSDK.framework from Finder to XCode->Frameworks.
4. Add depend Frameworks:
Build Phases->Link Binary With Libraries, add libc++.tbd, libresolv.tbd, VideoToolbox.framework, GLKit.framework, MetalKit.framework.
5. Add "-ObjC" to "Build Settings"-> "Other Linker Flags"
6. Add the code in .h file to import the SDK, example:
#import <PortSIPVoIPSDK/PortSIPVoIPSDK.h>

7. Inherit the interface PortSIPEventDelegate to process the callback events. For example:
@interface AppDelegate : UIResponder <UIApplicationDelegate,PortSIPEventDelegate>{
PortSIPSDK* mPortSIPSDK;
}
@end

8. Initialize sdk. For example:
mPortSIPSDK = [[PortSIPSDK alloc] init];
mPortSIPSDK.delegate = self;

9. For more details, please read the Sample project source code.
  

4. How to upgrade existing iOS Project from v15 to V16?

  1. Remove PortSIPLib.framework from XCode->Frameworks. 
2. Drag and drop PortSIPVoIPSDK.framework from Finder to XCode->Frameworks.
3. Remove libstdc++.6.tbd from Build Phases->Link Binary with Libraries.
4. Add GLKit.framework, MetalKit.framework to Build Phases->Link Binary with Libraries.
5. Add "-ObjC" to "Build Settings"-> "Other Linker Flags".
6. Replace #import <PortSIPLib/PortSIPSDK.h> with #import <PortSIPVoIPSDK/PortSIPVoIPSDK.h>.
7. Remove APIs setVideoOrientation, enableVideoDecoderCallback.
8. Remove events onVideoDecoderCallback and updateRemoteVideoWindowsSize.
9. Remove applicationWillEnterForeground and applicationDidBecomeActive process code.
10. Display video refer VideoViewController.
  

5. How can I test the P2P call (without SIP server)?

1. Download and extract the SDK sample project ZIP file in local. Compile and run the "P2PSample" project.

2. Run the P2Psample on two devices. For example, run it on device A and device B, and IP address for A is 192.168.1.10, IP address for B is 192.168.1.11.

3. Click the "Initialize" button on A and B. If the default port 5060 is already in use, the P2PSample will prompt "Initialize failure". In case of this, please click the "Uninitialize" button and change the local port, and click the "Initialize" button again.

4. The log box will appear "Initialized" if the SDK is successfully initialized.

5. To make call from A to B, enter "sip:222@192.168.1.11" and click "Dial" button; while to make call from B to A, enter "sip:111@192.168.1.10".
Note: If the local sip port is changed to other port, for example, A is using local port
5080, and B is using local port 6021, to make call from A to B, please enter
"sip:222@192.168.1.11:6021" and dial; while to make call from B to A, enter
"sip:111@192.168.1.10:5080".

6. Is the SDK thread safe?

Yes, the SDK is thread safe. You can call any of the API functions without the need to consider the multiple threads.
Note: the SDK allows to call API functions in callback events directly - except for the "onAudioRawCallback", "onVideoRawCallback", "onReceivedRtpPacket", "onSendingRtpPacket" callbacks.

7. Does the SDK support native 64-bit?

Yes, both 32-bit and 64-bit are supported for SDK.

7. Does the SDK support VoIP PUSH?

Yes, please refer to https://www.portsip.com/knowledge-base/ for more details.