Swiftpack.co - forem/ForemWebView-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by forem.
forem/ForemWebView-ios v0.3.0
Forem core interface SDK
⭐️ 20
🕓 3 years ago
iOS macOS
.package(url: "https://github.com/forem/ForemWebView-ios.git", from: "v0.3.0")

ForemWebView - iOS

This is the WKWebView customization that powers the Forem (coming soon) and DEV mobile apps.

Requirements

The Project supports iOS 13.x but features like Picture in Picture are only available for iPhones on iOS 14.x

Installation

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding ForemWebView as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/forem/ForemWebView-ios.git", .upToNextMajor(from: "1.0.0"))
]

Carthage & CocoaPods

We've moved to supporting SPM and not Carthage or CocoaPods. If interested in contributing, PRs to support these are welcome!

Usage

After importing the framework into your project you can initialize the ForemWebView like you would any other WKWebView (Storyboard, programmatically, etc). This custom WKWebView implementation will handle it's own WKNavigationDelegate, so instead of implementing this logic yourself please rely on the provided ForemWebViewDelegate for callbacks.

We have two deep dive documents:

  • ForemWebView deep dive is a walkthrough of the capabilities available when you're using the Framework in your project
  • Native Bridge deep dive documents the native interface used to communicate between the Web (DOM + JS) and Swift contexts

Important notes:

Contributing

Bug reports and feature requests are welcome in the issue tracker.

For Pull Requests:

  1. Fork and clone the project.
  2. Create a branch, naming it either a feature or bug: git checkout -b feature/that-new-feature or bug/fixing-that-bug
  3. Code and commit your changes. Bonus points if you write a good commit message: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/that-new-feature
  5. Create a pull request for your branch 🎉

Project Tests

The tests are run using the Example app bundled in the project. You can use XCode to run the test suite or from a Terminal with the following command:

# Make sure the `destination` param is using an iOS/Simulator available in your local environment
set -o pipefail && xcodebuild -scheme ForemWebView -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=14.2,name=iPhone 12 Pro Max' test | xcpretty

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Please see the LICENSE file in our repository for the full text.

Like many open source projects, we require that contributors provide us with a Contributor License Agreement (CLA). By submitting code to the Forem project, you are granting us a right to use that code under the terms of the CLA.

Our version of the CLA was adapted from the Microsoft Contributor License Agreement, which they generously made available to the public domain under Creative Commons CC0 1.0 Universal.

Any questions, please refer to our license FAQ doc or email [email protected]


sloan
Happy Coding ❤️

GitHub

link
Stars: 20
Last commit: 23 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.6.0
2 years ago

What's Changed

Full Changelog: https://github.com/forem/ForemWebView-ios/compare/0.5.2...0.6.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics