All Projects → gowithfloat → Flwebview

gowithfloat / Flwebview

Licence: mit
WKWebView with UIWebView fallback for iOS.

Projects that are alternatives of or similar to Flwebview

Cgoperators
Easily manipulate CGPoints, CGSizes and CGVectors using math operators
Stars: ✭ 131 (-9.66%)
Mutual labels:  xcode
Life Calendar
A look at the big picture.
Stars: ✭ 139 (-4.14%)
Mutual labels:  xcode
Unwrap
Learn Swift interactively on your iPhone.
Stars: ✭ 1,992 (+1273.79%)
Mutual labels:  xcode
Liftoff
Stars: ✭ 1,633 (+1026.21%)
Mutual labels:  xcode
Swiftui Shapes
🚀 Collection of SwiftUI shapes
Stars: ✭ 137 (-5.52%)
Mutual labels:  xcode
Donut
Donut is a library for arranging views circularly like a donut.
Stars: ✭ 141 (-2.76%)
Mutual labels:  xcode
Spperspective
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration.
Stars: ✭ 127 (-12.41%)
Mutual labels:  xcode
Swift Bigint
A lightweight, Multiple Precision Arithmetic Library for Swift!
Stars: ✭ 144 (-0.69%)
Mutual labels:  xcode
Swift Articles
Monthly Series - Top 10 Angular Articles
Stars: ✭ 139 (-4.14%)
Mutual labels:  xcode
Arkitexperiments
Quick and dirty experiments with ARKit
Stars: ✭ 142 (-2.07%)
Mutual labels:  xcode
Quicktype Xcode
Xcode extension to paste JSON as Swift, Objective-C, and more
Stars: ✭ 1,656 (+1042.07%)
Mutual labels:  xcode
Strap
👢 Bootstrap your macOS development system.
Stars: ✭ 1,813 (+1150.34%)
Mutual labels:  xcode
Swiftplate
Easily generate cross platform Swift framework projects from the command line
Stars: ✭ 1,746 (+1104.14%)
Mutual labels:  xcode
Natrium
A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
Stars: ✭ 131 (-9.66%)
Mutual labels:  xcode
Nef Plugin
🔌 an Xcode extension to use nef features easily
Stars: ✭ 144 (-0.69%)
Mutual labels:  xcode
Xcode Time Tracker
Stars: ✭ 131 (-9.66%)
Mutual labels:  xcode
Nativelogin
Authorization form in native iOS style
Stars: ✭ 140 (-3.45%)
Mutual labels:  xcode
Dckit
Set of iOS controls with useful IBInspectable properties. Written on Swift.
Stars: ✭ 144 (-0.69%)
Mutual labels:  xcode
Lcwebview
www.strictfrog.com
Stars: ✭ 144 (-0.69%)
Mutual labels:  wkwebview
Ionic Native Http Connection Backend
A solution to CORS issues with Ionic and iOS
Stars: ✭ 142 (-2.07%)
Mutual labels:  wkwebview

FLWebView Build Status

Note: This repository was written in Objective-C. A Swift version is available here.

This is an example Xcode project demonstrating how to use WKWebView in iOS 8 with a UIWebView fallback for earlier versions of iOS. A full discussion of this code is available here. Basically, we created a protocol that unifies the functionality we'd like to have in a WebView, and then created categories that ensure we have the proper methods in our UIWebView and WKWebView classes.

These are used in the ViewController viewDidLoad method to create a web view and add it to the active view. The code checks for WKWebKit and, if present, uses WKWebView. If it's not there, it defaults to UIWebView.

Usage

This is an example project but you should be able to build and test it with little setup. Obviously, as this is an iOS project the following steps apply to OS X. Assuming you have Ruby you can install homebrew if you don't have it already (just enter this in the terminal):

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then you can install xctool, Facebook's neat open source Xcode build tool:

brew install xctool

After that, you can run the test.sh script to build and test:

sh test.sh

There you go! Of course, you can this in Xcode, but this setup is great if you want to do some continuous integration, as Travis already has xctool installed by default.

Notes

If you're getting code signing errors with an Objective-C project in Travis, make sure that your build script specifies -sdk iphonesimulator and -test-sdk iphonesimulator. Also, if your .travis.yml file targets the script you're using locally (in our case, .travis.yml specifies script: sh test.sh) it makes the debug process a bit simpler.

Tests

As the goal of this project was not to create an example of good iOS testing, the tests for this repository are very minimal and largely serve largely to verify that we can build and deploy the application without issue. There are some tests to verify that we can instantiate a web view, but these are not particularly robust. You can find good information on unit testing in iOS from Apple's iOS Developer Library here.

Tools

  • travis-ci - Automated unit testing.
  • travis-lint - Local Travis settings validation.
  • xctool - Command-line iOS build scripts.
  • homebrew - OS X package management, used to install xctool.
  • ruby gem - Ruby package management, used to install travis-lint.

References

License

© 2014 Float. Shared under an MIT license. See license.md for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].