Giter Club home page Giter Club logo

pwafire's Introduction

Progressive Web Apps API of APIs (Sponsor us)

Build Scalable Progressive Web Apps. Start via docs.pwafire.org site.

An open-source library and framework for building fast, reliable, and engaging Progressive Web Apps (PWAs).

CI

Introducing pwafire cdn and npm

Progressive Web Apps API of APIs. All New Web Capabilities as one Package.

Install pwafire via NPM

 npm i pwafire --save

Get pwafire over CDN as an E6 Module

Note that you can still use a specific version over the pwafire cdn

Latest version

import { pwa } from "https://unpkg.com/pwafire/esm/index.js";

Specific version

import { pwa } from "https://unpkg.com/[email protected]/esm/index.js";

Example : using pwafire

Import pwafire in your react app

import { pwa } from "pwafire";

Call the share method on pwa

pwa.Share(data);

Preview Documentation : Get Started

API Feature Detection

  • Goal is to allow room for custom handlers if need be
  • This approach is going to be experimental and will be updated
  • This addition is going to be built for available stable apis

Example and use case

  • Web Share is both on Edge desktop and mobile, but not with chrome. I'd like to show a copy link button for chrome
  • Install latest pwafire version, already up for testing in v4 alpha-3*
 npm i --save pwafire
  • Try it out
// Get the check instance from pwafire.
import { check } from "pwafire";
//...
// The response is a boolean, true or false.
const supported = await check.Share();
// You can get a list of all apis and their support status as well.
const all = await check.All();

PWAs : New Web Capabilities(Project Fugu)

Feature Stabilty
Install(Custom) ok
Background Sync ok
Badging ok
Contact Picker ok
Screen Wake Lock ok
Content Indexing ok
Copy Text ok
Read Text(Clipboard) ok
Copy Images ok
Read Files(Clipboard) ok
Push Notifications ok
Web Share ok
Web payments ok
View All, 10 + Here 14

Chat : Join the conversation

Follow our Developer Account on Twitter. Get Live Help on our Slack Workspace.

Communication Channel Talk to us
Twitter Chat Tweet us

Contribute

Propose your Feature by Creating an Issue

License

License Link
MIT License View License

pwafire's People

Contributors

aarongustafson avatar attaradev avatar bolajiayodeji avatar dependabot[bot] avatar ezfrica avatar geezercodes avatar mayeedwin avatar monkeywithacupcake avatar vrijraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pwafire's Issues

Allow API Support Detection or Check

API Feature Detection

  • Goal is to allow room for custom handlers if need be
  • This approach is going to be experimental and will be updated
  • This addition is going to be built for available stable apis

Example and use case

  • Web Share is both on Edge desktop and mobile, but not with chrome. I'd like to show a copy link button for chrome
  • Install latest pwafire version, already up for testing in v4 alpha-3*
 npm i --save pwafire@latest
  • Try it out
  // Get the check instance from pwafire...
  import { check } from "pwafire";
  //...
  // The response is a boolean, true or false...
   const supported = await check.Share()

Add Background Sync

Adding background sync support
Service workers solve the page loading part by letting you serve content from a cache. But what about when the page needs to send something to the server ๐Ÿ˜ฒ ?

What could I use background sync for?
Use it to schedule any data sending that you care about beyond the life of the page. Chat messages, emails, document updates, settings changes, photo uploads. Anything that you want to reach the server even if user navigates away or closes the tab.

The page could store these in an "outbox" store in indexedDB, and the service worker would retrieve them, and send them on connection to the internet. Although, you could also use it to fetch small bits of data as well ๐Ÿ˜‰ ๐Ÿ˜Š ๐Ÿ˜‹

We shall be adding the codelab below
PWA Fire Bundle Background sync is activated once your page is loaded by default. Though you could re-configure this to anything. Maybe listen to events like on click with javascript.

Upgrade bundle to workbox 3.5.0

Upgrade bundle to workbox 3.5.0

With more customization options for generating a service worker, support for the HTTP PATCH method in routes, exposing the registerQuotaErrorCallback utility function publicly, and more!

Read more about the latest workbox release here

Spelling Typos

Referring to URL => https://pwafire.org/developer/codelabs/pwafire/

Web Manifest // app.webmanifest config section:
Typo => ( call it aything you want)

Firebase Hosting section:
Incorrect term => Para 6. are in the PWA Fire Profile directory then

Result did not occur => 10. Visit your web app on your phone now. You should see an "install to homescreen" banner There was no 'install to homescreen' message or icon

Add Native App "Install" Banner to your Progressive Web App

Native App "Install" Progressive Web App Support
After publishing your native app, say Android, the next thing that rings in your mind as a dev is how to get it out there to people for them to install. That matters.

The most ideal place to fall for is the Web. The question is, why the Web? It's the incredible reach that the Web has on all devices that your target users are using. So, most of you would build a single page site to get your native app out there with some fancy install button.

With the reach and capabilities that progressive web app have, you could rather build a progressive web app that automatically in a more engaging way prompts the user to install your native app.

Native app install banners give you the ability to let users quickly and seamlessly install your native app on their device from the app store, without leaving the browser, and without showing an annoying interstitial.

How do you get that done?
Well, with pwafire app, you will start your progressive web app project and add a few lines of code to the manifest.json to add that Native App Install capabilities on the web . Check the code snippet below.

"prefer_related_applications": true,
"related_applications": [
  {
    "platform": "play",
    "id": "your_native_app_id"
  }
]

prefer_related_applications
Tells the browser to prompt the user with your native app instead of the web app. Leaving this value unset, or false, the browser will prompt the user to install the web app instead.

related_applications
Is an array with a list of objects that tell the browser about your preferred native application. Each object must include a platform property and an id property. Where the platform is play and the id is your Play Store app ID.

Read more about this add on PWA Fire Bundle on this doc published.

Cheers and have fun!

pwa.setBadge is not working in mobile device

Describe the bug
I am working on react JS (PWA) application. In my application, I need to display notifications and badging.
Below is my code for displaying badging.
const unreadCount = 24;
pwa.setBadge(unreadCount);

It is working on desktop (PWA) but not on mobile device (PWA).

Please help me. I am trying this issue since yesterday.

Mac OSX Menu of app has "<start/>" instead of AppName

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] MACOS SIerra 10.12.6
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.
Screen Shot 2019-08-29 at 19 45 16

Files not Working Offline | PHP Build

Describe the bug
I was working on a PHP project with file path /index.php and includes /includes/header.php
Installed service worker in index.php before closing body.
PWA works fine and Installs on Mobile and Desktop.
But I ran Light House audits check and discovered that the app does not work Offline.
Seem my return cache.addAll([ is not catching php files?
What could be wrong?

Expected behavior
PWA should work Offline

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari] [ x ]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Fix starter codelab and project

Describe the bug
We have a documentation typo fix and codelab flow and starter project dir mix

Additional context
Working on the fix : )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.