Clang error when integrating facebook ios api

So, I am trying to integrate the facebook iOS api into my iphone application. I copied the src folder to my project and disabled AR with: "-fno-objc-arc" for all new files, since my project has ARC enabled. The problem is that I am still getting this error and I cannot figure out how to solve it. I spent the last two days trying to solve this problem and searched everywhere, so any help would be greatly appreciated.

enter image description here

The FB SDK files that I added to my project:

enter image description here

enter image description here

said that this API is not so friendly overall ...

+4
source share
2 answers

If you really copied the parameter to disable ARC (-fno-objc-arc) from Xcode, you may notice that instead of the usual one, use en dash (-) at the beginning, try -fno-objc- arc.

+4
source

There is also a second way to associate the facebook API with your application, you can drag the src directory from the facebook api, but you need to uncheck the add to destination folder and check "Create groups for any added folders", as in this screenshot

and you need to go to Projektu β†’ Targetets β†’ Build Phases and link libfacebook_ios_sdk.a as on the screen: screen2

everything should be fine now, and remember that the Facebook instance must be in your AppDelegate!

+2
source

Source: https://habr.com/ru/post/1403546/


All Articles