Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture arm64 "_OBJC_CLASS_$_SFSafariViewController"

I am trying to integrate Google sign in into my iOS app. I have followed instructions mentioned by Google.

I have added SafariService.framework as well.

Still I am getting this error:

    Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SFSafariViewController", referenced from:
      objc-class-ref in GoogleSignIn(GIDSignIn.o)

How to fix this issue?

Any ideas?

Thanks

like image 318
iBug Avatar asked Oct 01 '15 06:10

iBug


2 Answers

I had the same issue. But my problem was i haven't included the SafariServices framework.

I added it as required and it worked fine.

Make sure you have the next configuration:

  • Disabled BITE_CODE
  • Added all needed frameworks
  • The linker flag -ObjC (not -Objc)
  • Added the needed url types
  • Imported GoogleSignIn.h
  • GoogleServices-Info.plist imported in your target

In my configuration i'm using 7.0 as deployment target

Hope it helps. Regards

like image 139
ezefire Avatar answered Nov 19 '22 05:11

ezefire


Since the SafariServices framework is only available on iOS9 and above, is it possible that you are trying to run this on a device with iOS lower than that? If so, is it possible that when you added the framework, you added it as required (making it impossible for the app to run on older versions of iOS)? Try setting it as optional (attaching an image to better explain what I mean).

enter image description here

like image 16
Rony Rozen Avatar answered Nov 19 '22 05:11

Rony Rozen