Sep 13, 2018

iPhone X 2018 Models - Differences

Table below shows differences of 2018 iPhone models - iPhone XS, iPhone XS Max, iPhone XR.
For full list visit this Apple link.
iPhone XS iPhone XS Max iPhone XR
Colors Silver, Space Gray, Gold Silver, Space Gray, Gold Blue, White, Black, Yellow, Coral, Red
Display 5.8”
Super Retina HD display
OLED Multi‑Touch display
HDR display
3D Touch
Super Retina HD display
OLED Multi‑Touch display
HDR display
3D Touch
Liquid Retina HD display
LCD Multi‑Touch display with IPS technology
NO HDR display
NO 3D Touch
Camera - Rear Dual
wide-angle and
telephoto cameras
wide-angle and
telephoto cameras
Water resistant 2m
Water resistant to a depth of 2 meters for up to 30 minutes
Rated IP68
Water resistant to a depth of 2 meters for up to 30 minutes
Rated IP68
Water resistant to a depth of 1 meter for up to 30 minutes
Rated IP67
Capacity 64GB
Resolution 2436-by-1125-pixel resolution at 458 ppi 2688-by-1242-pixel resolution at 458 ppi 1792-by-828-pixel resolution at 326 ppi
Size and Weight Height
5.65 inches (143.6 mm)
2.79 inches (70.9 mm)
6.24 ounces (177 grams)
6.20 inches (157.5 mm)
3.05 inches (77.4 mm)
7.34 ounces (208 grams)
5.94 inches (150.9 mm)
2.98 inches (75.7 mm)
6.84 ounces (194 grams)
Battery Lasts up to 30 minutes longer than iPhone X Lasts up to 1.5 hours longer than iPhone X Lasts up to 1.5 hours longer than iPhone 8 Plus

Sep 10, 2018

PWA to App Shortcut in Chrome

If you are interested to open a web application like a desktop application in Chrome follow this.

  • A web application
  • Web server
  • HTTPS support
  • Service Worker on web app
  • Google Chrome (My version: Version 69.0.3497.81)

Web App

If you don't have a web app you can download a sample html application here

Web Server

You can use IIS, Apache or any kind of webserver.
Or just for local testing use python package SimpleHTTPServer.
python -m SimpleHTTPServer 5000


For IIS it is easy to add https in Bindings link. You will need an SSL certificate. Creating a local certificate not included in here.
SSL development certificate is available for local webserver via IIS Express.

Service Worker

To complete our aim we need to add service worker to your web app.

If you downloaded my sample you can look at following files.
  • manifest.json: Contains definition for our web application.
  • sw.js: Contains service worker functions
  • default.html: Contains user interface elements, interactive functions and service worker register functions.
Or you can follow sample in Google Developer blog to add service workers to your web app.

Google Chrome

You will need to enable PWA.

Go to chrome://flags/ url in Chrome.
Enable Desktop PWAs
Experimental windowing and install banner treatment for Progressive Web Apps on desktop platforms. Implies #enable-experimental-app-banners. – Mac, Windows, Linux, Chrome OS #enable-desktop-pwas

Check service workers

You will need Chrome developer tools.

In the sample application log lines added to show status in console.

Go to Application tab > Manifest to check manifest settings.

Go to Application tab > Service Workers to check service worker.

If you followed our sample app press "Add to Home" button to see a prompt.

After that you will see a new window appears with our web application.

Shortcut appears in Chrome Apps.

Now your application looks like desktop app with it is own window. It is useful for kiosk-like apps.

Appendix: Errors

If you see an error check your manifest and worker functions.

Some error samples:
default.html:39 Uncaught TypeError: Cannot read property 'prompt' of undefined at HTMLButtonElement.btnAdd.addEventListener 

Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest
Check start_url in manifest.
If start url starts with "/" it may help to remove "/".
"start_url": "/default.html?source=pwa" 
""start_url": "default.html?source=pwa","

If you want to try with other browsers remember that:
beforeinstallprompt Is Not a Web Standard