iOS-PWA-Wrapper | iOS Wrapper application to create a native iOS App | iOS library
kandi X-RAY | iOS-PWA-Wrapper Summary
kandi X-RAY | iOS-PWA-Wrapper Summary
An iOS Wrapper application to create a native iOS App from an offline-capable Progressive Web App.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of iOS-PWA-Wrapper
iOS-PWA-Wrapper Key Features
iOS-PWA-Wrapper Examples and Code Snippets
Community Discussions
Trending Discussions on iOS-PWA-Wrapper
QUESTION
I'm trying to implement part of app with PWA
approach, that works fine on Android
, but not for iOS
. We need to have
- offline content availability
- option to update content dynamically (like special offers or so). With service worker we show prompt to update web content.
As were mentioned here service workers are not supported within WKWebView
(or UIWebView
). So is there analog or alternative solution like smart cache control?
Seems like it is possible to store some web content from app and be able to update it if something changes. May there is already a framework/library/approach
for that purpose?
EDIT Service Workers unavailable in WKWebView in iOS 11.3 - this question explains the status of ServiceWorkers in WKWebView, but no alternative is given. I would like to discuss any alternative solutions.
One thing I discovered is https://github.com/xtools-at/iOS-PWA-Wrapper. It looks like working based on AppCache, but https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache#Browser_compatibility says it is deprecated and adviced to use SW instead (which is not an option for PWA).
...ANSWER
Answered 2019-Apr-02 at 12:32So before WKWebView get service-workers to work, you can use AppCache (not yet fully deprecated).
You can use this and take a look at source page at https://leasingrechnen.at
What they do? In case if there is no service worker in browser, they load iframe that points to a page with manifest.appcache
file implemented, so the page is cached.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install iOS-PWA-Wrapper
Head over to Constants.swift and add your app's name and the main URL to fetch set the host you want to restrict your app to add your custom Javascript string to open your Web App's menu. this is injected into the site when the "Menu" button is pressed. This wrapper assumes you're hiding your Web App's header in favor of the native App navigation and show/hide your menu via Javascript. customize the colors tweak the other options as you prefer
Put your own App icons in place in Assets.xcassets Remember, 1pt equals 1px on 1x-size. E.g., if you have to provide a 20pt icon of 3x-size, it has to be 60x60px. iOS doesn't like transparency, use background colors on your icons. I like using App Icon Maker, but any other similar service will do it as well. Don't forget the launcher icon!
In the Project Overview change Bundle Identifier and Display Name add your Certificates and tweak the rest as you wish a Deployment Target of iOS 10.0 is set by default, as the offline cache isn't preserved after closing the app in earlier versions. Therefore, the wrapper is only tested on iOS 10+ and there's no official support for earlier versions for now.
Build App in Xcode
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page