Hu ‘Submission’
Add the following line to your Podspec and run
pod install
pod 'SourceKit' or
pod 'SourceKitLight'
Initialisation
Swift ‘Swift Compiler’.
Under the ‘Swift Compiler – Code Generation’ section, add the path to your bridging header
to the ‘Objective-C Bridging Header’ field. Check the location of the header to ensure you get the path right. If it is in
the root directory, the path will simply be ‘ProjectName-Bridging-Header.h’. If
it is in the project subdirectory, the path will be
‘Project
In your
AppDelegate.m file, import the SourceKit library by adding the
following line:
#import <SourceKit/SourceKit.h> or
#import <SourceKitLight/SourceKitLight.h>
And then in your
AppDelegate‘s

Huq Industries’ SourceKit SDK, among other things, makes use of location
services to generate Physical Insights. For versions prior to iOS 8, calling
[[HISourceKit sharedKit] recordWithAPIKey:@“<API_Key>”];
will automatically request the necessary location permissions. If you would
prefer that this request is made later in the applicaiton flow, then simply
call this method at that point.
Since iOS 8 this has become a little more nuanced, so steps to configure location services in iOS 8+ as follows:
Using location services in iOS 8+
To make use of location services, you need to first configure your project’s
Info.plist.
- right-click on the plist inspector, and select add row
- in the key field, add the key for the mode you require
- say why your app makes use of location services
Foreground only apps
For apps that access location services in the foreground only, add the key
NSLocationWhenInUseUsageDescription to your
Info.plist. Then in your class,
import CoreLocation as normal, configure
CLLocationManager as you wish and
remember to call
requestWhenInUseAuthorization you’re ready to go.
Foreground and background apps
For apps that access location services in the background too, add the key
NSLocationAlwaysUsageDescription to your
Info.plist. Then in your class, import CoreLocation as normal, configure
CLLocationManager as you wish and remember to call
requestAlwaysAuthorization when you’re ready to go.
Testing
SourceKit from Huq makes use of APIs that are not available in the simulator. Test on your device while connected to WiFi.
Advanced usage
You can overlay Huq Industries’ Physical Insight events with your own by adding
Custom Events, arbitrary tags to describe what your user is doing in your
app. For example, you might interest you to know that ‘most users
[carry out a certain action in-app] when they’re
[at home, or at work, or wheverver]‘. The following example shows how you layer Huq’s Insight events
with your own Custom Event tags to indicate what a user was doing in your app
at that time. Event tags that you log are recorded together with the next Huq
event that is submitted.
Swift
//.
Swift
HISourceKit.sharedKit().stopRecording()
Objective
When submitting your App to the App Store, if you used the SourceKit version of the SDK, you should select ‘Yes’ for ‘Does this app use the Advertising Identifier (IDFA)?’, and also select the ‘Attribute this app installation to a previously served advertisement’ option.
Additional.
Latest podspec
{ "name": "SourceKitAds", "version": "1.1.6", "summary": "The SourceKit Library is the iOS SDK for use with the Huq physical analytics products.", "description": "SourceKit by Huq is the fastest way to find insights and be inspired by what your users get up to in the physical world, using Huq's Physical Analytics platform for mobile app publishers.nn-Learn when and how your users shop, work and relaxn-Build and manage insights using Huq's analytics toolsn-Use Huq to power campaigns and personalise content", "homepage": "", "license": "All rights reserved", "authors": { "Huq Industries": "[email protected]" }, "source": { "git": "", "tag": "1.1.6" }, "frameworks": [ "CoreLocation", "SystemConfiguration", "CoreTelephony", "AdSupport" ], "platforms": { "ios": "7.0" }, "requires_arc": true, "ios": { "vendored_frameworks": "SourceKit/Frameworks/SourceKit.framework" }, "deprecated": true }
Wed, 26 Jul 2017 00:20:08 +0000