Onesignal-ios-sdk: No known class method for selector initWithLaunchOptions:appid

Created on 6 Sep 2016  路  8Comments  路  Source: OneSignal/OneSignal-iOS-SDK

onesignal library added to xcode by cocoapods.

screen shot 2016-09-06 at 3 37 17 pm

All 8 comments

Did you make sure to open the workspace instead of the project?

I got the same problem!

Which version of the SDK are you using? You may be using the 1.* version of the SDK and calling this method which is part of the 2.* version of the SDK. Make sure to run a pod update on the root of your project directory to get the latest version of OneSignal's iOS SDK.

I had the same problem and I had to create an instance for this class

[[OneSignal alloc] initWithLaunchOptions:launchOptions appId:@"..."];

@fernando-sendMail This is only valid for our 1.X SDK. All selectors are static on the 2.X SDK versions.

@jkasten2 I see, I followed this tutorial: https://documentation.onesignal.com/docs/ios-sdk-setup
so, instead of installing 1.13.3 I should do 2.x.x?

@fernando-sendMail 1.13.3 should only be used if you are using react native noted by it's instructions. You should leave off the version otherwise.

You should add this line:
//Add this line

import

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dirkoswanepoel picture dirkoswanepoel  路  5Comments

halilyuce picture halilyuce  路  3Comments

chmiiller picture chmiiller  路  6Comments

ogres picture ogres  路  3Comments

luai-kalkatawi picture luai-kalkatawi  路  4Comments