mongodb / stitch-ios-sdk

Apache License 2.0
42 stars 25 forks source link

STITCH-2653 Add instrumented network transport #155

Closed adamchel closed 5 years ago

adamchel commented 5 years ago

This adds the instrumented Foundation transport for Swift.

To enable this, I had to slightly refactor the original Foundation HTTP transport, and I also added an internal property to the raw SSE stream returned from the stream request, which contains the initial response to the stream request so that it and its headers are counted along with the stream content.

I also removed the StitchCoreTests.swift file in StitchCoreSDKTests and moved its contents to the StitchCoreTestUtils, so that it can be shared by all test packages. This involved creating some new files, and making Swifter a dependency of multiple pods in our Podfile.