{"id":13432926,"url":"https://github.com/xtools-at/iOS-PWA-Wrapper","last_synced_at":"2025-03-17T10:32:54.672Z","repository":{"id":148297539,"uuid":"108310958","full_name":"xtools-at/iOS-PWA-Wrapper","owner":"xtools-at","description":"An iOS Wrapper application to create a native iOS App from an offline-capable Progressive Web App.","archived":false,"fork":false,"pushed_at":"2019-07-03T09:26:26.000Z","size":867,"stargazers_count":336,"open_issues_count":7,"forks_count":95,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-27T13:03:18.334Z","etag":null,"topics":["appcache","ios","ios-app","ios-pwa-wrapper","ios-swift","ios-wrapper","offline","offline-app","offline-capable","offline-first","progressive-web-app","pwa","single-page-app","spa","wrapper"],"latest_commit_sha":null,"homepage":"https://www.leasingrechnen.at","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xtools-at.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-25T18:41:25.000Z","updated_at":"2024-10-25T15:21:41.000Z","dependencies_parsed_at":"2023-05-19T16:30:50.020Z","dependency_job_id":null,"html_url":"https://github.com/xtools-at/iOS-PWA-Wrapper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtools-at%2FiOS-PWA-Wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtools-at%2FiOS-PWA-Wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtools-at%2FiOS-PWA-Wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtools-at%2FiOS-PWA-Wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtools-at","download_url":"https://codeload.github.com/xtools-at/iOS-PWA-Wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244016883,"owners_count":20384228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appcache","ios","ios-app","ios-pwa-wrapper","ios-swift","ios-wrapper","offline","offline-app","offline-capable","offline-first","progressive-web-app","pwa","single-page-app","spa","wrapper"],"created_at":"2024-07-31T02:01:18.634Z","updated_at":"2025-03-17T10:32:54.260Z","avatar_url":"https://github.com/xtools-at.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# iOS-PWA-Wrapper\n\nAn iOS Wrapper application to create a native iOS App from an offline-capable Progressive Web App.\n\nDrafted for the [iOS App](https://itunes.apple.com/at/app/leasing-rechner-%C3%B6sterreich/id1304432852?l=de\u0026mt=8) of my [Leasing Calculator](https://www.leasingrechnen.at) Web App using [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux), [Materialize.css](https://github.com/Dogfalo/materialize) and a lot of Offline-First love over at [leasingrechnen.at](https://www.leasingrechnen.at).\n\n## Looking for Android or Desktop?\nCheck out my other projects:\n- [Android-PWA-Wrapper](https://github.com/xtools-at/Android-PWA-Wrapper) for Android\n- [Electron-PWA-Wrapper](https://github.com/xtools-at/Electron-PWA-Wrapper) for macOS, Windows and Linux\n\n## Prequisites\nFor bringing offline-capabilities to your Web App on Safari and iOS' embedded WebKit browser, you have to use [AppCache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache). [Service Worker API](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) is not yet supported in WebKit, so you might want to use something like [Appcache Webpack Plugin](https://github.com/lettertwo/appcache-webpack-plugin) to make your PWA offline-accessible on iOS in a somewhat easy way.\n\n## Why would I use a wrapper?\nI know, using a Wrapper-App to display a Website can feel a bit odd. But there are a few good reasons why you'd package your Web App like this.\n- If you've got a very sophisticated UI already, it might make sense not to rebuild it from scratch for multiple platforms, especally if it's a Single Page Application already, that doesn't \"feel\" like a Website.\n- There might be as well less competition for a given niche on App Stores, in comparison to Google directly. With [leasingrechnen.at](https://www.leasingrechnen.at), I've got easily into the Top 10 Apps on Google Play for my country, whereas Google Search put me on page 9 as the Site is relatively new.\n\n## What it does\n- Provides a native iOS navigation header.\n- Sets up a WKWebView instance just the way PWAs/SPAs like it.\n- Provided your Web App is Offline-capable, it only needs an Internet connection on the first startup. If this fails, it shows a native refresh widget.\n- Opens all external URLs in the device's Browser / 3rd party apps instead.\n- Automatically fetches updates of your Web App.\n\n## How to build your own\n- Clone/fork repository and open in Xcode\n- Head over to `Constants.swift` and\n    - add your app's name and the main URL to fetch\n    - set the host you want to restrict your app to\n    - add your custom Javascript string to open your Web App's menu.\n        - 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.\n    - customize the colors\n    - tweak the other options as you prefer\n- Put your own App icons in place in `Assets.xcassets`\n    - 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.\n    - iOS doesn't like transparency, use background colors on your icons.\n    - I like using [App Icon Maker](http://appiconmaker.co), but any other similar service will do it as well.\n    - Don't forget the `launcher` icon!\n- In the Project Overview\n    - change _Bundle Identifier_ and _Display Name_\n    - add your Certificates and tweak the rest as you wish\n    - 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](https://stackoverflow.com/questions/29892898/enable-application-cache-in-wkwebview/44333359#44333359). Therefore, the wrapper is only tested on iOS 10+ and there's no official support for earlier versions for now.\n- Build App in Xcode\n\n### I don't accept Feature Requests, only Pull Requests :)\n\n## License\n[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) - if you use it, we wanna see it!\nOther licensing options are available on inquiry.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtools-at%2FiOS-PWA-Wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtools-at%2FiOS-PWA-Wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtools-at%2FiOS-PWA-Wrapper/lists"}