You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've setup the app and devices successfully to receive push notifications, and tested it.
However I run into an issue while trying to use OneSignal.postNotification method. Also using your example from the API docs seems to have a mis-type issue:
generates an error: '(dictonaryLiteral: (NSObject, AnyObject), (NSObject, AnyObject))' is not convertible to '(dictionaryLiteral: (NSString, NSObject)...), tuples have a different number of elements
by the way shouldnt it be OneSignal, not oneSignal like on your API doc example?
I also tried postNotificationWithJsonString and used NSString or String as arguments just to check, and I was getting error: Cannot convert value of type 'string' to expected argument type 'OneSignal'
I suspect that I am getting something wrong with ObjC <-> Swift type, but I am not experienced enough to figure this out.
Looks like I was forgetting to declare let oneSignal = OneSignal() in the class. But just to be sure - is that how it should be declared each time (I still didn't get the push to work)? Or should we refer to the one declared in AppDelegate and declare it globally somehow?
Activity
wosheesh commentedon Feb 22, 2016
Looks like I was forgetting to declare
let oneSignal = OneSignal()in the class. But just to be sure - is that how it should be declared each time (I still didn't get the push to work)? Or should we refer to the one declared in AppDelegate and declare it globally somehow?wosheesh commentedon Feb 23, 2016
Never mind. This is what I did in the class handling the push:
and in the AppDelegate I added
var oneSignal: OneSignal?after class declaration.Interface changes to IAMs from previous work done already (#13)
Merge 021100 into master (#528)