Steps to integrate Patch framework SDK to iOS app

  1. Create a new app in Quixxi Portal using "Add New" button.

  2. In "Create Your app" dialog enter the name of the application and click Continue.

  3. Click the newly created app and choose "Control" in header tab and choose "Package" in left side menu.

  4. Click "Add Platform" button and choose IOS and check “Patch” in Select module options.

  5. Give proper package name for the application and click "Start Packaging" button.

  6. Choose "Patcher" in  Subscription options.

  7. Now Quixxi will pack both Analytics and Patch framework and notify once it gets completed.

  8. Click "Download Library" to get the library. A zip file will be downloaded containing the Quixxi Patch Framework, QuixxiAnalytics framework, and QuixxiActivation Framework, Quixxikeys.txt,, Readme.txt .

Let’s see how to setup patch with the developed application in following steps.

  1. Add QuixxiAnalytics.framework,QuixxiActivation.framework,QuixxiKeys.txt, files into your project. 

  2. Please ensure QuixxiKeys.txt and are added to Targets->BuildPhases->Copy Bundle Resources. 

  3. Add QuixxiAnalytics.framework, QuixxiActivation.framework, QuixxiPatch.framework files in to the Tagets->General->Embedded Binaries.

  4. Click + icon on top of the "Build Phases",  Choose "New Run Script Phase".

  5. Add the following Line into Run Phase. (APPGUID is available in Readme.txt)

  6. A Setup AppDelegate page will be opened to initialize the Quixxi Patch

  7. Quixxi Patch can be initialized by including following lines in the applications AppDelegate.m file.

  8. Import Quixxi Patch Header by using the following statement #import <QuixxiPatch/QuixxiPatcher.h>

  9. Initialize Quixxi patch framework engine using the following statement
     [[QuixxiPatcher sharedInstance]StartPatcher]; in (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions: (NSDictionary *)launchOption

  10. Add the following statement before initializing Quixxi patch framework engine to enable SandboxMode
    [[QuixxiPatcher sharedInstance] EnableSandboxMode];

  11. In the Xcode project, choose the menu Products->Scheme->Edit Scheme from the menu bar and change the settings from “Debug” to “Release”.

  12. Build and Run the Application.

  13. All the methods in the application will be pushed to the Quixxi Portal where a patch can be applied to the methods and injected into the code.

Injecting the code into the Application

  1. Click on the "App" in the Quixxi Portal and choose "Control" in header tab and choose "Patch" on the left side menu.

  2. Click on the "Add Patch" button. It shows the list of methods which are pushed from the Application.

  3. Select the Platform, App version, Class, Method to which a patch has to be applied.

  4. Select Mode "Sandbox" for testing purpose and Select "Production" for release purpose.

  5. From the "Type" dropdown box, choose the patch that needs to be inserted into the method and injected into the application

  6. Use "Show Alert View" type to show alert view in the method.

  7. Use "Add Try Catch" type to handle exceptions.

  8. Use "Execute Original Method" to call the original implementation of the method. 

  9. Edit the method according to the needs and click "SUBMIT" button.