ios - Parse loginWithUsernameInBackground block callback not working -


so have parse app in appstore already. i'm submit update app using latest parse sdk 1.7.4 , noticed manual parse login not working!

i hope due code , not parse issue because that's major f**k if ask me...

anyway, here code, appreciated.

[pfuser loginwithusernameinbackground:username password:password block:^(pfuser *user, nserror *error) {         if (!error) {    //do stuff user } else {     //error handling here      } 

i of course did search on internet find answer , people saying not use background functions because things need run on main thread. , tried using dispatch async , forced run on main thread still no callback login.

here error msg i'm getting:

-[bftask isfaulted]: unrecognized selector sent instance   *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[bftask isfaulted]: unrecognized selector sent instance 

when run below code:

nserror *error; pfuser *user = (pfuser *)[pfuser loginwithusername:username password:password error:&error]; if (error) {    //do error handling here } else {    //do stuff user object here , go logged in screen. } 

also, wanna note, have this:

nsstring *const bftaskmultipleexceptionsexception = @"bfmultipleexceptionsexception"; 

in appdelegate able compile , run app ever since upgraded parse 1.7.4 sdk.

these errors if take out line appdelegate:

  "_bftaskmultipleexceptionsexception", referenced from:       ___53+[pfobject(private) deleteallasync:withsessiontoken:]_block_invoke226 in parse(pfobject.o)       ___65+[pfobject(private) _deepsaveasync:withcurrentuser:sessiontoken:]_block_invoke319 in parse(pfobject.o) 

here question that's similar in parse blogs that's not solved:

https://www.parse.com/questions/ios-sdk-loginwithusernameinbackgroundpasswordblock-does-not-execute-block-on-error-case

thanks in advance help.

unfortunately cannot comment on question (not enough reputation), seems have old facebooksdk in project. xcode gives duplicate symbols error, caused fact (old) facebooksdk has bolts integrated. moment integrate parse sdk, have 2 times in project, resulting in duplicate symbols error.

please update facebooksdk last v3 version, available here. then, use latest parsesdk, , include parse (also parseui, bolts, etc, sdk folder except v4facebook framework) project.

this should trick , method:

[pfuser loginwithusernameinbackground:username password:password block:^(pfuser *user, nserror *error) {         if (!error) {    //do stuff user } else {     //error handling here      } 

should work.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -