To use Trikot.http
swift extensions, you must export http
module in your exported framework. See Trikot.patron build.gradle file for a sample use case.
ENV['TRIKOT_FRAMEWORK_NAME']='ReplaceMeByTheFrameworkNameImportedByCocoaPods'
pod 'Trikot/http', :git => '[email protected]:mirego/trikot.git', :tag => properties['trikot_version']
Then, run pod install
.
Trikot.http provides its own implementation based on URLSession
.
import Trikot
...
HttpConfiguration().httpRequestFactory = TrikotHttpRequestFactory()
import Trikot
...
HttpConfiguration().connectivityPublisher = TrikotConnectivityService.shared.publisher
...
TrikotConnectivityService.shared.start() // When app is running
...
TrikotConnectivityService.shared.stop() // When app is in background