Releases: ibm-bluemix-mobile-services/bms-clientsdk-swift-analytics
Releases · ibm-bluemix-mobile-services/bms-clientsdk-swift-analytics
User location
Added
- Collecting the user's current location automatically (when the
Analytics.userIdentity
changes or the app enters foreground) and manually with the newAnalytics.logLocation()
method. To opt in to automatic location collecting, there is a new parameter,collectLocation
, inAnalytics.initialize(appName:apiKey:hasUserContext:collectLocation:deviceEvents:)
.
Fixed
- In Swift 3 for iOS,
DeviceEvent.lifecycle
events were not being recorded because there was no observer watching for app foreground events.
Better documentation
Added
- Proper API documentation. These API docs are automatically updated and re-published by the Travis-CI build when merging a pull request to the master branch.
Improved
- Improved the organization and expanded the content of the README, including a clearer summary, a link to new API documentation, and more complete usage examples.
Automated version release process
Improved
- Automated the process for releasing new versions of BMSAnalytics using Travis-CI. Directly pushing to the master branch has been disabled, so new version releases must be done via a pull request to master and approved by an administrator. Once the pull request is merged, the Travis build will automatically release the new version if
BMSAnalytics.podspec
has been updated with a new version number.
Recording network request metadata
Added
DeviceEvents.network
- By passing this value to the
deviceEvents
parameter of theAnalytics.initialize(appName:apiKey:hasUserContext:deviceEvents:)
method, metadata for all network requests made by Bluemix Mobile Services SDKs will be automatically recorded. This includes custom network requests made usingBMSURLSession
.
- By passing this value to the
Uncaught exception stack traces
Added
- Logging the stack trace that results from an uncaught NSException, which will appear in the Crash section of the Analytics dashboard.
Xcode 8 and Swift 3
Added
- Support for the official Xcode 8 release (8A218a), including Swift 2.3 and 3.0. BMSAnalytics continues to support Xcode 7.3 and Swift 2.2 as well.
BMSAnalyticsError.noLogsToSend
-- New error that indicates that there are no logs or analytics data to send, given in the completionHandler ofLogger.send(completionHandler:)
orAnalytics.send(completionHandler:)
Fixed
Analytics.send()
andLogger.send()
would make network requests to the Mobile Analytics Service even when there were no analytics or logs to send, resulting in an error returned by the service. Now, when there are no logs, these methods do not make any network requests, and instead return the errorBMSAnalyticsError.noLogsToSend
.
Updated
Analytics API
DeviceEvent.LIFECYCLE
-->DeviceEvent.lifecycle
enabled
-->isEnabled
initializeWithAppName(_:apiKey:hasUserContext:deviceEvents:)
-->initialize(appName:apiKey:hasUserContext:deviceEvents:)
log(_:)
-->log(metadata:)
Logger API
sdkDebugLoggingEnabled
-->isInternalDebugLoggingEnabled
logStoreEnabled
-->isLogStorageEnabled
logger(forName:)
-->logger(name:)
debug(_:)
-->debug(message:)
info(_:)
-->info(message:)
warn(_:)
-->warn(message:)
error(_:)
-->error(message:)
fatal(_:)
-->fatal(message:)
LogLevel API
None
-->none
Analytics
-->analytics
Fatal
-->fatal
Error
-->error
Warn
-->warn
Info
-->info
Debug
-->debug
Fix version 1.2.1
Fixed
- Stack traces from uncaught exceptions were not being logged correctly in BMSAnalytics 1.2.1. Stack traces have been temporarily removed.
[Broken] Bug fixes
WARNING: This version is broken. Please upgrade to 1.2.2.
Fixed
- Recording the stack trace when capturing uncaught exceptions.
- Sending improper JSON when calling
Analytics.send()
orLogger.send()
with no analytics/logs recorded. This was causing the server to return an error that should not have occurred.
User Identity Fix
Fixed
- Double counting users when setting the
Analytics.userIdentity
property. - Issue #5.
Added
- New default parameter
hasUserContext
in Analytics initializer. This parameter determines whether user identities are recorded by the developer or automatically recorded by BMSAnalytics.
Updated Dependency on BMSCore
Fixed
- Changed dependency on BMSCore from 1.1.x to 1.x. This way, BMSAnalytics will not need a new release for every minor version update of BMSCore.