facebook - ParseFacebookUtilsV4::initializeFacebookWithApplicationLaunchOptions issue in IOS using Parse/FB SDK -
i still using objective-c in project, since legacy one. using parse before , trying add fb integration. managed make compile - these have installed via cocoapods.
using bolts (1.2.0) installing fbsdkcorekit (4.3.0) installing fbsdkloginkit (4.3.0) using parse (1.7.5) installing parsefacebookutilsv4 (1.7.5)
here code.
firstviewcontroller
-(void) viewdidappear:(bool)animated { // additional setup after loading view, typically nib. if (![pfuser currentuser] || // check if user cached ![pffacebookutils islinkedwithuser:[pfuser currentuser]]) { // check if user linked facebook pfloginviewcontroller *logincontroller = [[pfloginviewcontroller alloc] init]; logincontroller.fields = (pfloginfieldsusernameandpassword | pfloginfieldsfacebook | pfloginfieldsdismissbutton); [self presentviewcontroller:logincontroller animated:yes completion:nil]; [self presentviewcontroller:loginviewcontroller animated:yes completion:null]; } else { nslog(@"user cached , showing content."); } }
when view shows , click on log-in facebook, have error.
*** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'you must initialize pffacebookutils call +initializefacebookwithapplicationlaunchoptions'
if add on appdelegate, [pffacebookutils initializefacebookwithapplicationlaunchoptions:launchoptions];
i compilation issue - no known class.
based on this, should add temporary hack in pffacebookutils, method initializefacebookwithapplicationlaunchoptions
not exist in file.
i tried adding in appdelegate.
[pffacebookutils initializefacebook];
in case, error :
+[pffacebookutils initializefacebook]: unrecognized selector sent class 0x10024f420 *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '+[pffacebookutils initializefacebook]: unrecognized selector sent class 0x10024f420'
any ideas/solutions?
make sure you're importing v4 of framework
#import <parsefacebookutilsv4/pffacebookutils.h>
it's subtle, important difference, , will, reason, compile importing
#import <parsefacebookutils/pffacebookutils.h>
especially if switched regular fb utils.
Comments
Post a Comment