CocoaPods Support

Document created by DPM Admin Employee on Jul 18, 2017Last modified by Dave Murphy on Aug 30, 2017
Version 4Show Document
  • View in full screen mode

 

As of 56.17, TouchTest supports CocoaPods, allowing you to statically instrument TouchTestDriver into an Xcode project using CocoaPods.

 

Note:  CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects so it is only compatible with iOS.

 

Manual Actions Before Instrumenting an iOS Project

 

Before instrumenting an iOS project, you must complete the following actions as CocoaPods will not do these for you.

 

  1. Create a launch URL.
  • Go to Xcode project > Info tab > URL Types > URL Schemes. In URL Schemes, enter the launch URL you want to use.

 

  1. Add ATS.

Note:  By default, iOS 9 will not allow your app to read unsecured http traffic.

 

  • Go to Xcode project > Info tab > Custom iOS Target Properties. Under Key, add App Transport Security Settings and set YES to Allow Arbitrary Loads.

 

  1. Create mobile app object.
  • Log into TouchTest, go to Mobile Apps and click the create new button. Use the Launch URL you put into Xcode project.

 

Instrument An iOS Project Using CocoaPods

 

An instrumentation method that uses CocoaPods is covered below.

 

  1. Install CocoaPods using:

$ gem install cocoapods

 

  1. Navigate to your Xcode project directory and create a Podfile with smart defaults using the following CocoaPods:

pod init

 

  1. Add platform specification when creating a Podfile. The platform target should be 6.0 or above for TouchTest integration to work. Example below:

platform :ios, '<ios_platform_version>'

 

  1. Add the following line inside of your target in your Podfile:

pod 'Touchtest'

 

TIP: If you need an older version of TouchTest, specify the version number with the following: pod 'TouchTest', '~> 2.6'

 

  1. Run pod install in your Xcode project directory, and then open the Xcode workspace (*.xcworkspace). From this point forward, only open *.xcworkspace when you open this project in Xcode.

$ pod install

 

Next Step

 

Now that you've instrumented your project using CocoaPods, you need to download TouchTest Agent and register your iOS device. Please find detailed instructions here.

 

 

Go to: TouchTest Onboarding

Attachments

    Outcomes