0
votes

I got error when debugging iOS application and am stuck all day.

What I did is:

  1. install OAuth2Client library via cocoapods.
  2. create viewcontroller to show google login page.
  3. got the following error when debugging.

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_NXOAuth2Request", referenced from: objc-class-ref in GXLoginGoogleViewController.o "_OBJC_CLASS_$_NXOAuth2AccountStore", referenced from: objc-class-ref in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreErrorKey", referenced from: ___54-[GXLoginGoogleViewController setupOAuth2AccountStore]_block_invoke60 in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreAccountsDidChangeNotification", referenced from: -[GXLoginGoogleViewController setupOAuth2AccountStore] in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreDidFailToRequestAccessNotification", referenced from: -[GXLoginGoogleViewController setupOAuth2AccountStore] in GXLoginGoogleViewController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have already searched many similar topics but I could not resolved yet.

Can anyone suggest any direction to solve this problem?

1

1 Answers

0
votes

So when I downloaded the project from github, the first thing I noticed was that the project settings weren't set up very intuitively:

These Settings Should Be Changed

The "$" in the Target's Architecture column should be switched to specify iOS Standard Architectures:

To iOS standard architectures

And at that point you should be able to build and run on the device. If you want to support the simulator as well, you'll need to add in "i386" as an architecture.