Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

social.framework ios5

Tags:

ios

When I run my app with social framework for facebook on ios5 it crashes, and I can understand that. Is there a way to import it just if the device is ios6?

I tried this, where ver_float is the ios version:

if (ver_float >= 6.0) {
    #import <Social/Social.h>
}

But the app fails to run if I remove the #import from the top of the code page.

like image 842
Alessandro Avatar asked Sep 28 '12 15:09

Alessandro


1 Answers

Just make sure you set the Social.framework as optional under Build Phases.

like image 197
Alessandro Avatar answered Oct 14 '22 00:10

Alessandro