OneSignal Push notification is not working in iOS and the app is not loading at all using capacitor + NuxtJs

Hi Team,

I followed this document to setup push notification service in the app for iOS Ionic & Capacitor SDK Setup

After all setup, when I run build in stimulator, the app is loading at all. I can see an error in the output console saying

------ STARTUP JS ERROR ------

:zap: TypeError: OneSignal.push is not a function. (In ‘OneSignal.push([“init”,{appId:“c1cf2fd1-82c1-4b16-9e06-bd3fde891bbd”,allowLocalhostAsSecureOrigin:!0,welcomeNotification:{disable:!0}}])’, ‘OneSignal.push’ is undefined)
:zap: URL: capacitor://localhost/nuxt/47019a6.js
:zap: 47019a6.js:2:1554215

:zap: See above for help with debugging blank-screen issues
:zap: [log] - OneSignal: Using fallback ES5 Stub for backwards compatibility.

But I can confirm that I never used OneSignal.push function in the whole repo, not sure from where it’s throwing this error.

And you can see all capabilities enabled in xcode Screenshot by Lightshot

Also when I push the code to repo, I get an email saying build failed please check the attached screen. Screenshot by Lightshot

Please advise me of any suggestions that can get rid of this issue.