for iOS 13.0 and above.
Note: All Test Applications run right out of the box with the framework pre installed and configured.
Add the following code in the didFinishLaunchingWithOptions
method of the App Delegate:
AnushkTestSDKManager.shared.login(
applicationID: "com.example.AppName",
allowScreenshots: true/false,
logAllTouches: true/false,
showButton: true/false,
enableConsoleLogging: true/false,
saveScreenshotsLocally: true/false)
-
applicationID
: Required by the server to unqiuely identify your app sessions -
allowScreenshots
: Enables capturing screenshots for every triggered action -
logAllTouches
: Allows logging multiple minute touches as received byUIControl
instead of just one inferred gesture based touch. -
showButton
: Enables AnushkTestSDK float button to be displayed on the top of your app with extra functionality -
enableConsoleLogging
: Enables logging all captured events to your console -
saveScreenshotsLocally
: Allows to save the manually captured screenshot (through the float button) to your device locally. This requires you to addNSPhotoLibraryAddUsageDescription
privacy key to your app target'sInfo.plist
.
Refer to this link for more details. Navigate to your project directory and pod init
on terminal. Clone this SDK to the same parent directory as your project's.
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# Replace Calculator with your app's target name
target 'Calculator' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Calculator
pod 'AnushkTestSDK', :path => '../AnushkTestSDK'
end
Add the following to your Cartfile:
github "anushkmittal/AnushkTestSDK" ~> 1.1
Run pod install
in the same directory you initialize the podfile. Close your project and open the newly created workspace file on Xcode.
Try adding any Objective-C file to your project. Name it whatever you want and click yes when prompted to create a bridging header. Add #import <AnushkTestSDK/AnushkTestSDK.h>
to the file.
Add #import <AnushkTestSDK/AnushkTestSDK.h>
to your project's AppDelegate
Optionally build the pods framework target before building your app target.
Voila! You've set up a AnushkTestSDK dependency to your target project.
-
Make sure to configure Cocoapods installation like this
pod 'AnushkTestSDK', :path => '../../AnushkTestSDK', :configurations => ['Debug']
-
At the places in your code where you integrate AnushkTestSDK, do a
#if DEBUG
check to ensure the tool is only accessible in your Debug builds and to avoid errors in your Release builds. -
You might need to specify the
DEBUG
flag in build settings like this: https://i.stack.imgur.com/GKizw.png