iBug
iBug

Reputation: 2352

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

Upvotes: 16

Views: 24642

Answers (2)

ezefire
ezefire

Reputation: 791

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

Upvotes: 18

Rony Rozen
Rony Rozen

Reputation: 4047

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

Upvotes: 16

Related Questions