NEW Game developers: check out PacketZoom Mobile Connect
Important announcement: PacketZoom is now part of Roblox   

iOS Native

If you want to use CocoaPods

Step 1: Add the following to your Podfile

pod 'PZSpeed', :git => 'https://gitlab.packetzoom.net/packetzoom/PZSpeedIOSSDK.git'

Step 2: Install or Update pods by running "pod install" or "pod update" command.

Continue with Step 6 (In Final steps below).

If you want to use downloaded PZSpeed framework, follow the following steps

Step 1: Download the iOS SDK.

Step 2: Add PZSpeed.framework to the Frameworks folder in your Xcode Project. Make sure when prompted, you copy the items if needed.

Please Contact us for a BitCode enabled version of framework

Step 3: Make sure that the following frameworks and libraries are part of your project:

CoreLocation.framework
SystemConfiguration.framework
CoreTelephony.framework
Foundation.framework
libz.tbd
libc++.tbd

Step 4: in Build Settings>Other Linker Flags, make sure that the flag -ObjC is present

Step 5: in Build Settings>Build Options, set Enable BitCode to NO

Final Steps:

Choose Language:   

Step 6: Add #import <PZSpeed/PZSpeed.h> to your AppDelegate.m

Step 7: Add [PZSpeedController controllerWithAppID: @"<APP_ID>" apiKey: @"<API_KEY>"]; to your didFinishLaunchingWithOptions method

Step 6: Create a bridging header file if your project does not have it already. Add #import <PZSpeed/PZSpeed.h> to it.

Step 7: Initialize using following code
var pzsc: PZSpeedController = PZSpeedController(appID: "<APP_ID>", apiKey: "<API_KEY>")

Please Contact us if you are using an XCode version prior to 7.0

 

Advanced Options:

iOS Unity Development

Step 1: Download the Unity SDK.

Step 2: Import the PZSpeed Unity package into your Unity project:

1. Open your project in Unity
2. Assets -> Import Package -> Custom Package...
3. Select the provided .unitypackage, then click Open
4. Make sure all the files are checked, then click on Import
Once the Unity package is imported, a PacketZoom menu item is added.
Step 3: Click on the PacketZoom menu item, then choose Setup..
Step 4: In the inspector tab, enter your:
App ID
API Key
and click Setup
That's it! A new GameObject named 'PacketZoom' is added to your scene.
You can tweak various settings in the Inspector for this GameObject.

React Native (iOS)

Step 1: First, download the library from npm:

npm install react-native-packetzoom@latest --save

Step 2: Then install the native dependencies: You can use rnpm (now part of react-native core) to add native dependencies automatically then continue the directions below depending on your target OS.

$ react-native link

React Native versions from 0.30 and above should work out of the box, we cannot guarantee that earlier than 0.30 will have smooth integration experience, it may require additional manual steps like rnpm for example.

Javascript

import Packetzoom from 'react-native-packetzoom'
                                    
Packetzoom.init("<APP_ID>", "<API_KEY>")

The XMLHttpRequest API is built in to React Native. This means that you can use third party libraries such as Frisbee, Fetch or Axios that depend on it. Ultimately XMLHttpRequest API is implemented using native NSURLSession API on iOS side and OkHttp3 on Android where PacketZoom native sdk would eventually intercept them.

From now on all your Fetch API, Axios or Apisauce requests will be accelerated by PacketZoom. You can access all NewRelic'sque kind of network analytics data on web dashboard when you login under your account.

iOS

Drag PZSpeed.Framework from RNPacketZoom.xcodeproj to your app frameworks folder like shown bellow:

Make sure you linking against it in Build Phases -> Link Binary with Libraries section

Also make sure that the following frameworks and libraries are part of your project:

CoreLocation.framework
SystemConfiguration.framework
CoreTelephony.framework
Foundation.framework
libz.tbd
libc++.tbd