Releases: ibm-bluemix-mobile-services/bms-clientsdk-swift-core
Releases · ibm-bluemix-mobile-services/bms-clientsdk-swift-core
Support for Xcode 8.3.1
Fixed
- Build warnings present in Xcode 8.3.1
Internal bug fix
Fixed
- Improper JSON type (
[String: String]
instead of[String: Any]
) in the BaseIdentity classes
Improved
- API documentation for
BMSURLSession
,BaseRequest
, andRequest
Network monitoring and request auto-retries
Added
- The ability to monitor the state of the iOS device's connection to the internet via the new
NetworkMonitor
API. - The option to automatically resend network requests that failed due to network issues. To opt in to automatic retries, specify the number of retries you want in the
autoRetries
parameter in theBaseRequest
orBMSURLSession
initializer (depending on which API you are sending requests with).
For more information on how to use these new features, see the README.
Refactored network requests
Improved
- Refactored the internal implementation of network requests, replacing uses of
URLSession
withBMSURLSession
.
Fixed
- Recording network request metadata with BMSAnalytics. Now, network metadata gets recorded properly for all network requests made with
Request
orBMSURLSession
, whether the request is to an MCA-protected backend or any other resource. - App crashes caused by using
BMSURLSession
with aURLSessionDelegate
that did not have certain methods implemented.
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.
Fixed
- Incorrect JSON type for Swift 3 in the
BaseIdentity
classes. This change is needed to fix BMSSecurity Issue #8.
Automated version release process
Improved
- Automated the process for releasing new versions of BMSCore 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
BMSCore.podspec
has been updated with a new version number.
Recording network request metadata
Added
DeviceEvents.network
- Note: This only applies to projects that also have
BMSAnalytics
installed. - By passing this value to the
Analytics
initializer in theBMSAnalytics
SDK, metadata for all network requests made by Bluemix Mobile Services SDKs will be automatically recorded. This includes custom network requests made usingBMSURLSession
.
- Note: This only applies to projects that also have
Fixed BaseAppIdentity bundle ID
Fixed
- The security class
BaseAppIdentity
was not correctly retrieving the app's bundle identifier. This issue was discovered in the BMSSecurity SDK.
Fixed log sending defect
Fixed
Logger.send()
andAnalytics.send()
were failing to send logs to the Mobile Analytics Service.
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.
Updated
BmsCompletionHandler
-->BMSCompletionHandler
BMSClient API
defaultRequestTimeout
-->requestTimeout
REGION_US_SOUTH
-->Region.usSouth
REGION_UK
-->Region.United_Kingdom
REGION_SYDNEY
-->Region.Sydney
BaseRequest API
CONTENT_TYPE
-->contentType
init(url:headers:queryParameters:method:timeout:cachePolicy:)
-->init(url:method:headers:queryParameters:timeout:cachePolicy:)
sendString(requestBody:)
,sendData(requestBody:)
, andsend()
-->send(requestBody:)
BMSURLSession API
- BMSURLSession has different method signatures between Swift 2 and Swift 3. It is modeled after the native Swift types, NSURLSession (Swift 2) and URLSession (Swift 3). Refer to the documentation for those classes to get the initializer and methods. BMSURLSession only supports data tasks and upload tasks.
BMSURLSessionDelegate API
- BMSURLSessionDelegate has different method signatures between Swift 2 and Swift 3. It is modeled after the native Swift types, NSURLSessionDelegate (Swift 2) and URLSessionDelegate (Swift 3). Refer to the documentation for those classes to get the initializer and methods. BMSURLSessionDelegate implements
URLSessionDelegate
,URLSessionTaskDelegate
, andURLSessionDataDelegate
.