Latest 1.0.0
Homepage https://github.com/cedexis/radarkit
License MIT The MIT License (MIT)

Copyright 2018 Citrix Systems, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Platforms ios 8.0, osx 10.10
Frameworks Foundation, WebKit
Authors

Citrix ITM Radar Runner for Apple iOS and MacOS

Quick Start

  • Add the CocoaPod. "RadarKit" or "RadarKit/ObjC"
  • Create an instance of the RadarKit class.
  • Call the start method with your zoneId and customerId.
  • Call didReceiveMemoryWarning from your delegate of the same name.

Swift

Step by step guide for Xcode 8 and Swift. We’ll create the simplest possible
application with the Radar client embedded.

  • Create a new iOS project as a "Single View App". Give it a name and
    make sure the language option is set to "Swift".

  • Add the CocoaPod to your Podfile and pod install.

    use_frameworks!
    pod ‘RadarKit’

  • Edit the ViewController class. Add the four lines containing "radarkit" so
    it looks like the code below. You will need to use your real zone ID and
    customer ID for this to actually send data, but it’s ok to test with 00000.

    import UIKit
    import RadarKit

    class ViewController: UIViewController {

       let radarkit = RadarKit()
    
       override func viewDidLoad() {
           super.viewDidLoad()
           radarkit.start(forZoneId: 1, customerId: 00000)
       }
    
       override func didReceiveMemoryWarning() {
           super.didReceiveMemoryWarning()
           radarkit.didReceiveMemoryWarning()
       }

    }

  • Run the program. You are done.

Objective-C

Step by step guide for Xcode 8 and Objective-C. We’ll create the simplest
possible application with the Radar client embedded.

  • Create a new iOS project as a "Single View App". Give it a name and
    make sure the language option is set to "Objective-C".
  • Add the CocoaPod to your Podfile and pod install.

    pod ‘RadarKit/ObjC’

    • Edit "ViewController.m". Add the five lines containing "radarkit" so
      it looks like the code below. You will need to use your real zone ID and
      customer ID for this to actually send data, but it’s ok to test with 00000.

      import "ViewController.h"

      import "RadarKit.h"

      @interface ViewController ()
      { @private RadarKit *radarkit; }
      @end

      @implementation ViewController

      • (void)viewDidLoad {
        [super viewDidLoad];
        radarkit = [RadarKit new];
        [radarkit startForZoneId:1 customerId:00000];
        }

      • (void)didReceiveMemoryWarning {
        [super didReceiveMemoryWarning];
        [radarkit didReceiveMemoryWarning];
        }

      @end

    • Run the program. You are done.

Using the API

radarkit.start may be called repeatedly. Every time you call this a new probing
session will run. Be aware that there is a waiting period between sessions
(currently 1 minute, subject to change).

radarkit.didReceiveMemoryWarning will free up all but a few bytes of memory. Note
that after calling this there is startup cost the next time start is called.

Notes

All this does is load our radar tag in a WebView with a little bit of throttling
to handle the case where someone isn’t connected to the internet.

Because WebView is a UI element you must call the API on the main UI thread.
https://developer.apple.com/documentation/code_diagnostics/main_thread_checker

You can confirm it’s working in the Develop tab of Safari on your Mac.
For example, there will be a menu entry for Simulator which should have
a submenu that contains radar.cedexis.com - radar.html. If you see the
radar.html part then WebKit is successfully running the radar client.

Latest podspec

{
    "name": "RadarKit",
    "version": "1.0.0",
    "summary": "Citrix ITM Radar Runner for Apple iOS and MacOS.",
    "homepage": "https://github.com/cedexis/radarkit",
    "authors": {
        "David Turnbull": "[email protected]"
    },
    "source": {
        "git": "https://github.com/cedexis/RadarKit.git",
        "tag": "1.0.0"
    },
    "frameworks": [
        "Foundation",
        "WebKit"
    ],
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "swift_version": "3.2",
    "default_subspecs": "Swift",
    "license": {
        "type": "MIT",
        "text": "The MIT License (MIT)nn        Copyright 2018 Citrix Systems, Inc.nn        Permission is hereby granted, free of charge, to any person obtaining a copyn        of this software and associated documentation files (the "Software"), to dealn        in the Software without restriction, including without limitation the rightsn        to use, copy, modify, merge, publish, distribute, sublicense, and/or selln        copies of the Software, and to permit persons to whom the Software isn        furnished to do so, subject to the following conditions:nn        The above copyright notice and this permission notice shall be included in alln        copies or substantial portions of the Software.nn        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORn        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEn        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERn        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THEn        SOFTWARE."
    },
    "subspecs": [
        {
            "name": "Swift",
            "source_files": "RadarKit.swift"
        },
        {
            "name": "ObjC",
            "source_files": "RadarKit.{h,m}"
        }
    ]
}

Pin It on Pinterest

Share This