Skip to content

Commit

Permalink
Merge pull request #542 from snowplow/release/1.5.0
Browse files Browse the repository at this point in the history
Release/1.5.0
  • Loading branch information
AlexBenny authored Sep 1, 2020
2 parents e822e68 + d79ce96 commit 7114049
Show file tree
Hide file tree
Showing 83 changed files with 3,751 additions and 1,647 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

Version 1.5.0 (2020-09-01)
--------------------------
Crash connected with method writeSessionToFile in SPSession (#515)
Emitter refactoring (#540)
Report logs to the app (#534)
Add diagnostic feature (#533)

Version 1.4.1 (2020-07-22)
--------------------------
TrueTimestamp has to be set in seconds. (#532)
Expand Down
4 changes: 3 additions & 1 deletion Examples/CommonSwiftCode/AdditionalViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ class AdditionalViewController: UIViewController, UITextFieldDelegate, PageObser
}

@IBAction func crashTheApp () {
NSException(name:NSExceptionName(rawValue: "name"), reason:"reason", userInfo:nil).raise()
let array = NSArray()
let _ = array[99]
//$ NSException(name:NSExceptionName(rawValue: "name"), reason:"reason", userInfo:nil).raise()
}
/*
// MARK: - Navigation
Expand Down
2 changes: 1 addition & 1 deletion Examples/CommonSwiftCode/DemoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class DemoViewController: UIViewController, UITextFieldDelegate, PageObserver {
self.tracker?.emitter.setProtocol(self.parentPageViewController.getProtocolType())

// Iterate the made counter
self.parentPageViewController.madeCounter += 28;
self.parentPageViewController.madeCounter += 14;

// Track all types of events
DemoUtils.trackAll(self.parentPageViewController.tracker)
Expand Down
32 changes: 28 additions & 4 deletions Examples/CommonSwiftCode/PageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ class PageViewController: UIPageViewController, UIPageViewControllerDelegate, U
// Tracker setup and init

func getTracker(_ url: String, method: SPRequestOptions) -> SPTracker {
let eventStore = SPSQLiteEventStore();
let network = SPDefaultNetworkConnection.build { (builder) in
builder.setUrlEndpoint(url)
builder.setHttpMethod(method)
builder.setEmitThreadPoolSize(20)
builder.setByteLimitPost(52000)
}
let emitter = SPEmitter.build({ (builder : SPEmitterBuilder?) -> Void in
builder!.setUrlEndpoint(url)
builder!.setHttpMethod(method)
builder!.setCallback(self)
builder!.setEmitRange(500)
builder!.setEmitThreadPoolSize(20)
builder!.setByteLimitPost(52000)
builder!.setEventStore(eventStore)
builder!.setNetworkConnection(network)
})
let subject = SPSubject(platformContext: true, andGeoContext: false)
let newTracker = SPTracker.build({ (builder : SPTrackerBuilder?) -> Void in
Expand All @@ -62,11 +67,16 @@ class PageViewController: UIPageViewController, UIPageViewControllerDelegate, U
builder!.setApplicationContext(true)
builder!.setExceptionEvents(true)
builder!.setInstallEvent(true)
// set global context generators
builder!.setGlobalContextGenerators([
"ruleSetExampleTag": self.ruleSetGlobalContextExample(),
"staticExampleTag": self.staticGlobalContextExample(),
])
builder!.setGdprContextWith(SPGdprProcessingBasis.consent, documentId: "id", documentVersion: "1.0", documentDescription: "description")
// set diagnostic and logger delegate
builder?.setTrackerDiagnostic(true)
builder?.setLogLevel(.verbose)
builder?.setLoggerDelegate(self)
})
return newTracker!
}
Expand Down Expand Up @@ -198,3 +208,17 @@ class PageViewController: UIPageViewController, UIPageViewControllerDelegate, U
*/

}

extension PageViewController: SPLoggerDelegate {
func error(_ tag: String!, message: String!) {
print("[Error] \(tag!): \(message!)")
}

func debug(_ tag: String!, message: String!) {
print("[Debug] \(tag!): \(message!)")
}

func verbose(_ tag: String!, message: String!) {
print("[Verbose] \(tag!): \(message!)")
}
}
4 changes: 2 additions & 2 deletions Examples/SnowplowDemo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- SnowplowTracker (1.3.1):
- SnowplowTracker (1.4.1):
- FMDB (~> 2.6)

DEPENDENCIES:
Expand All @@ -18,7 +18,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
SnowplowTracker: 71b47ab2ea802f8d4d9c798113e96a8e6e56427a
SnowplowTracker: 1f6d4f732cd2d5ff36094cac71a3bf362138716a

PODFILE CHECKSUM: 375b0f24567595e0cac8c9289ed3aea84854fdd6

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Examples/SnowplowDemo/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7114049

Please sign in to comment.