Swiftpack.co -  forem/ForemWebView-ios as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
forem/ForemWebView-ios
Forem core interface SDK
.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 yo@dev.to


sloan
Happy Coding ❤️

GitHub

link
Stars: 14
Last commit: 9 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Version 0.4.0
16 weeks ago

New features:

  • Push Notification registration functions
  • Native image picker interface

Other updates:

  • Now pinning YPImagePicker dependency to a commit to attempt using versioned releases again

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