Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook SDK Error on Installing Cocoapods Objective-C

After installing Facebook SDK via Cocoapods in my Objective-C app, hundreds of errors were appearing.

Things like this:

Undefined symbol: protocol descriptor for Foundation._ErrorCodeProtocol
Undefined symbol: method descriptor for Foundation._BridgedStoredNSError.init(_nsError: __C.NSError) -> A
Undefined symbol: associated type descriptor for Foundation._BridgedStoredNSError.Code
Undefined symbol: base conformance descriptor for Foundation._BridgedStoredNSError: Swift.Hashable

[...]

I lost hours and hours trying to figure out why this errors occurred, installed, re-installed and nothing.

enter image description here

like image 437
Jhonsore Avatar asked Jun 22 '20 18:06

Jhonsore


1 Answers

So, i found the solution for this errors on another problem completely different from mine. On this github post the guy said to follow this steps, and i did:

1 - Open ios/YourAppName.xcodeproj in Xcode

2 - Right-click on Your App Name in the Project Navigator on the left, and click New File…

3 - Create a single empty Swift file to the project (make sure that Your App Name target is selected when adding)

4 - when Xcode asks, press Create Bridging Header and do not remove Swift file then. re-run your build. This should fix the problem

And it worked like a charm.

If you have the same problem, i hope help you guys!

like image 159
Jhonsore Avatar answered Oct 03 '22 16:10

Jhonsore