roblav96 / nativescript-onesignal

A Nativescript plugin that wraps the iOS and Android OneSignal Push Notifications SDK.
https://documentation.onesignal.com/docs/getting-started
Other
24 stars 42 forks source link

build problem #17

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi! I use nativescript angular latest version. I use this plugin and work correct but if I build width webpack this error crash build app. In tsconfig.js "noEmitOnError": false tns build and run jump this error but webpack not build app with this error. Please help me.

Cannot find name 'UIResponder'. ERROR in app/main.ts (12,53): Cannot find name 'UIApplicationDelegate'. ERROR in app/main.ts (13,40): Cannot find name 'UIApplicationDelegate'. ERROR in app/main.ts (14,63): Cannot find name 'UIApplication'. ERROR in app/main.ts (14,93): Cannot find name 'NSDictionary'.

Thank you for your help. Bumbella

roblav96 commented 7 years ago

@bumbella I have not tried using webpack with anything nativescript so I honestly have no idea about this :/

roblav96 commented 7 years ago

@bumbella I have not tried using webpack with anything nativescript so I honestly have no idea about this :/

ghost commented 7 years ago

Can U help me what is the problem and how can I resolve this errors? Why can't find this name? This is not webpack problem. Thank you

ERROR in app/main.ts (12,53): Cannot find name 'UIApplicationDelegate'. ERROR in app/main.ts (13,40): Cannot find name 'UIApplicationDelegate'. ERROR in app/main.ts (14,63): Cannot find name 'UIApplication'. ERROR in app/main.ts (14,93): Cannot find name 'NSDictionary'.

xlmnxp commented 6 years ago

on first line in file main.ts write this:

declare var UIResponder:any,UIApplicationDelegate:any,UIApplication:any,NSDictionary:any;