6

I am getting the following error when i am working with facebook Login

Yes, It is a basic mistake "unrecognized selector sent to instance" But i did not get where the mistake is

[UIStatusBar orientation]: unrecognized selector sent to instance 0xa9a9c00
2012-11-23 11:15:46.854 Tattoo Later[1265:1cd03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIStatusBar orientation]: unrecognized selector sent to instance 0xa9a9c00'

In this Method

- (void)loginToFacebook:(id) loginDelegate
{
fbServiceRequestingobj = loginDelegate;
 NSArray* permissions = [[NSArray alloc] initWithObjects:
                            @"publish_stream",@"user_birthday",@"read_stream",@"user_about_me",@"offline_access",@"email",@"read_mailbox",@"user_about_me",nil];
 [facebook authorize:permissions delegate:self];
}

App Crashes in this line [facebook authorize:permissions delegate:self];

In My project i intergrated "GPUImage" I am working on ios6

Thanks in advance

Babul
  • 1,268
  • 2
  • 15
  • 42
  • Could be an error in memory management, did you try with [`NSZombieEnabled`](http://stackoverflow.com/questions/2190227/how-do-i-set-up-nszombieenabled-in-xcode-4)? – zoul Nov 23 '12 at 07:46
  • Yes, i tried as you said But i did not find where it is @zoul – Babul Nov 23 '12 at 09:22
  • Could you please provide more code? Where are you initializing your "facebook" variable? – Dave Nov 23 '12 at 09:33
  • I am doing this in "ViewDidLoad" like this facebook = [[Facebook alloc] initWithAppId:@"172038482843979"]; @Dave – Babul Nov 23 '12 at 09:44
  • Maybe you can try to create a strong/retain property for this. – Dave Nov 23 '12 at 10:03
  • Try getting the exact exception trace as shown [here](http://stackoverflow.com/questions/8100054/no-exception-stack-trace-in-console-under-xcode-4-2-ios-5)...Then you'll be in a better position to tackle the problem. – tipycalFlow Nov 23 '12 at 10:03
  • What Facebook SDK are you using?? is it before SDK 3.0?? – Saliom Nov 23 '12 at 10:07
  • How to find the SDK? i do not know which SDK i am using the Facebook files from my previous project @Saliom – Babul Nov 23 '12 at 10:20
  • In Facebook.m static NSString* kSDKVersion = @"2"; – Saliom Nov 23 '12 at 10:21
  • I Tried as you said , Now My app not crashing but the log is like below 0 CoreFoundation 0x02e9802e __exceptionPreprocess + 206 1 libobjc.A.dylib 0x02bfbe7e objc_exception_throw + 44 2 CoreFoundation 0x02f234bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 253 3 CoreFoundation 0x02e87bbc ___forwarding___ + 588 4 CoreFoundation 0x02e8794e _CF_forwarding_prep_0 + 14 5 Tattoo Later 0x00052b00 -[FBDialog sizeToFitOrientation:] + 848 @tipycalFlow – Babul Nov 23 '12 at 10:21
  • i used strong property in my app @Dave – Babul Nov 23 '12 at 10:22
  • OK... It is SDKVersion -2 @Saliom – Babul Nov 23 '12 at 10:23
  • You might want to put a breakpoint in Facebook.m at line 144 and see if it crashes right after that one (might be called multiple times so keep looking until it crashes) – Saliom Nov 23 '12 at 10:26
  • It is Crashing at this line [_loginDialog show]; @Saliom – Babul Nov 23 '12 at 10:32
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/19988/discussion-between-saliom-and-babul) – Saliom Nov 23 '12 at 10:37
  • In `[_loginDialog show];`, go into the method definition of `show` and that'll lead you to the error. It might be because Apple has changed the way you handle orientations in iOS6. But when you get the exact error, you'll know the exact solution. You can also try posting it as a bug on FB connect's github page. – tipycalFlow Nov 23 '12 at 11:13

2 Answers2

1

In ios6 there is no method called [facebook authorise: delegate:] ...its just [Facebook authorise: ]

Divya
  • 818
  • 8
  • 10
0

It's not related to Facebook. It's related to UIStatusBar and his orientation method.

Please provide your source related to this issue.

Gonzalo
  • 81
  • 1
  • 2
  • i am calling the method like this [appDelegate loginToFacebook:self]; i placed the calling method in AppDelegate . i think we do not have orientation code in AppDelegate But my app Crashes there @gonzaloaizpun – Babul Nov 26 '12 at 04:56