Error running ionic v1 app on iOS 9.3

#1

I have an app that runs fine on iOS 11 and 12, yet when it runs on iOS 9.3 it stalls on the splashscreen.

After putting the following in the HEAD of my index.html, I see that Javascript is throwing an error


 <script type="text/javascript">
     window.onerror = function (errorMsg, url, lineNumber) {
	 alert('Error: ' + errorMsg + ' Script: ' + url + ' Line: ' + lineNumber);
     }
    </script>

The error is

Error: Syntax Error: Unexpected token ‘)’, thrown by the following line:

 <script>
     if ('serviceWorker' in navigator) {
	 navigator.serviceWorker.register('service-worker.js')
		  .then(() => console.log('service worker installed'))
		  .catch(err => console.log('Error', err));
     }
    </script>

Which are legit I think.

Any idea what could be causing this? The app runs fine in current iOS versions but errors in 9.3.

Ionic Info output:

ionic info
[WARN] Bad integration name: gulp
:heavy_check_mark: Gathering environment info - done!

Ionic:

ionic (Ionic CLI) : 4.1.1 (/Users/markwatkins/.nvm/versions/node/v8.9.4/lib/node_modules/ionic)
Ionic Framework : ionic1 1.3.3
@ionic/v1-toolkit : 1.0.8

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, browser 5.0.4, ios 4.5.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 19 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/markwatkins/Library/Android/sdk)
ios-deploy : 1.9.2
NodeJS : v8.9.4 (/Users/markwatkins/.nvm/versions/node/v8.9.4/bin/node)
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61

Marks-MacBook-Air-2:bookship markwatkins$