HTTPCookieSync is an iOS framework that allows to synchronize cookies between HTTPCookieStorage and WebKit's WKHTTPCookieStore.
To integrate using Swift Package Manager perform the following steps:
File
> Swift Packages
> Add Package Dependency
https://github.com/braintree/popup-bridge-ios
as the repository URL.HTTPCookieSync
.Package is automatically linked as a framework to the project's target.
See General
> Frameworks, Libraries, and Embedded Content
.
To integrate using CocoaPods perform the following steps:
podfile
pod 'HTTPCookieSync'
HTTPCookieSyncer
instance, default
or custom.sync()
method, when it needed.let httpCookieSyncer = HTTPCookieSyncer.default
...
httpCookieSyncer.syncStorages {
// cookies were synced
}
NOTE: Syncer instance must be stored (for application session) due to synchronization algorithm.
Storages, used for default instances:
let httpCookieSyncer = HTTPCookieSyncer(
storages: [
// Custom cookie storages
]
)
You can look at the provided demo application. Check the Demo directory.
Dmytrii Golovanov, Vladyslav Otsevyk, Serhii Reznichenko
Library is available under the MIT license. See the LICENSE file for more info.
link |
Stars: 0 |
Last commit: 1 week ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics