Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

LogDNA for iOS

This micro-framework supports remote logging via LogDNA on iOS. The framework itself is written in ObjC for easy integration in Swift and ObjC apps.

Requires a deployment target of iOS 9 and above.

Sample

Objective-C

[ISHLogDNAService setupWithIngestionKey:ingestionKey
                               hostName:hostName
                                appName:appName];

// Send message including custom meta data (the dictionary must be encodable into JSON)
ISHLogDNAMessage *m;
m = [ISHLogDNAMessage messageWithLine:@"Sample app started"
                                level:ISHLogDNALevelInfo
                                 meta:@{@"anyKey" : @[@1, @42]}];
[ISHLogDNAService logMessages:@[m]];

Swift

ISHLogDNAService.setup(withIngestionKey: "", hostName: "", appName: "")

let message = ISHLogDNAMessage(line: "Sample app started", level: .info, meta: [ "myField" : 42 ])
ISHLogDNAService.logMessages([message]);

Usage

Simply include the following files in your project:

  • ISHLogDNAService.h
  • ISHLogDNAService.m

For Swift: ensure to include #import "ISHLogDNAService.h" in your bridging header.

ISHLogDNAService uses the AdSupport framework to use a sensible default for the enabled flag. By default logging is only enabled for users with isAdvertisingTrackingEnabled.

About

Remote logging for iOS via LogDNA with a simple Objective-C (Swift-compatible) wrapper

Resources

License

Packages

No packages published
You can’t perform that action at this time.