Undefined symbols for architecture x86_64 Swift Xcode - swift

The error code from my compiler
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GTMOAuth2KeychainCompatibility", referenced from:
objc-class-ref in GoogleSignIn(GIDAuthStateMigration_bdf842e92d17b12b5f020e0e721bd017.o)
"_OBJC_CLASS_$_OIDServiceConfiguration", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OIDResponseTypeCode", referenced from:
-[GIDSignIn authenticateInteractivelyWithOptions:] in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_OIDAuthorizationService", referenced from:
objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
"_OBJC_CLASS_$_OIDURLQueryComponent", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_OIDAuthorizationRequest", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_GTMAppAuthFetcherAuthorization", referenced from:
_OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
(maybe you meant: _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate, _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport )
"_OIDOAuthTokenErrorDomain", referenced from:
___46-[GIDAuthentication refreshTokensWithHandler:]_block_invoke in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
"_OBJC_CLASS_$_OIDIDToken", referenced from:
objc-class-ref in GoogleSignIn(GIDGoogleUser_2bdd4a676c033bc6ca21970e75d9159c.o)
"_OBJC_METACLASS_$_GTMAppAuthFetcherAuthorization", referenced from:
_OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
(maybe you meant: _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport, _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate )
"_OIDOAuthErrorResponseErrorKey", referenced from:
+[GIDAuthentication handleTokenFetchEMMError:completion:] in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
"_OBJC_CLASS_$_GTMKeychain", referenced from:
objc-class-ref in GoogleSignIn(GIDAuthStateMigration_bdf842e92d17b12b5f020e0e721bd017.o)
"_OBJC_CLASS_$_OIDAuthState", referenced from:
objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have already tried everything to make It work again and everything I read on stack overflow from other posts who face a similar issue
-reinstall pod
-update pod
-new podifle
-removing target
-deleting derived data
-cleaning project
-restarting simulator
-restarting Xcode
i don't even know what I have changed to make this problem appear, never faces this issue before
any help is appreciated!

The error came by me accidentally deleting code in the pod file, which I was not aware of.
deleting the pod and moving it back in did not help
halt helped was
pod deintegrate
pod install

W/o sample project we can only guess what did you make wrong.
So my guess...
If you updated to Xcode 12 - go to project settings, scroll to the bottom User-Defined section and remove VALID_ARCHS setting. If you don't have it there - then my guess was wrong and I wish you good luck :D.
UPD:
I found same answer

Related

AWS implementation issue on AWSMobileHubHelper.framework

I have searched the web for a possible solution, but without any luck.
Currently i'm trying to integrate the default AWS frameworks into my project. But i can't get rid of the following errors.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_AWSSNSGetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_AWSSNSSubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_GIDSignIn", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSGoogleSignInProvider.o)
"_OBJC_CLASS_$_AWSSNSSetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_AWSSNS", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_FBSDKGraphRequest", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_AWSSNSCreatePlatformEndpointInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSUnsubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_AWSSNSErrorDomain", referenced from:
___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.239 in AWSMobileHubHelper(AWSPushManager.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tryed removing "-ObjC" from "Other linker flags", without luck.
Because these frameworks aren't the only frameworks i use, not all solutions work for me. Simply removing 'ARM64' is no solution.
Please help.

Getting clang: error: linker command failed with exit code 1 (use -v to see invocation) while google signing

I'm getting this error while linking Google sign in without using cocoa pods.
I have referred many solutions here but none of them solved my issue. please guide me through a proper solution.
Undefined symbols for architecture x86_64:
"_GSDK_NSClassFromString", referenced from:
l010 in GoogleSignIn(GIDSignIn.o)
l059 in GoogleSignIn(GIDSignIn.o)
"_OBJC_CLASS_$_GSDK_GTMOAuth2Authentication", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
objc-class-ref in GoogleSignIn(GIDAuthentication.o)
"_OBJC_CLASS_$_GSDK_GTMOAuth2Keychain", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
"_OBJC_CLASS_$_GSDK_GTMOAuth2SignIn", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
objc-class-ref in GoogleSignIn(GIDAuthentication.o)
"_OBJC_CLASS_$_GSDK_GTMOAuth2ViewControllerTouch", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
objc-class-ref in GoogleSignIn(GIDRuntimeConfigFetcher.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
"_OBJC_CLASS_$_GSDK_OpenInChromeController", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
GoogleAppUtilities.framework
GoogleAuthUtilities.framework
GoogleNetworkingUtilities.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
GoogleSignIn.framework
SystemConfiguration.framework
SafariServices.framework
AddressBook.framework
GoogleSignIn.bundle
libz.tbd
Add all framework in your project https://developers.google.com/identity/sign-in/ios/sdk/ download Google Sign-In SDK 4.0.0
Having the same error in integrating GIDSignin in my app , but resolved the error after installing it through cocoa pods.Try to install it through pods.
add all this from sdk(google_signin_sdk_4_0_0) to your project:
GoogleAppUtilities.framework
GoogleAuthUtilities.framework
GoogleNetworkingUtilities.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
GoogleSignIn.framework
GoogleSignIn.bundle
Go to
build Phases -> link binary with Libraries
and add these frameworks:
SafariServices.framework
AddressBook.framework
SystemConfiguration.framework
Also add this two files:
libc++.tbd
libz.tbd
Did you do cocoa pod using pod 'Google'? if so then do it using 'Google/SignIn'. Possibly you didn't do the appropriate import.

Undefined symbols for architecture i386: "_OBJC_CLASS_$_GDataDateTime", referenced from:

I have worked in google calendar. Now i have download the sample code from this link:
"http://code.google.com/p/iphone-gcal/".
But in this code it is some Gdata codes are missing. So i have implemented that code but also i got this below errors. Please some body help me to solve this errors.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GDataDateTime", referenced from:
objc-class-ref in RootViewController.o
objc-class-ref in EditingViewController.o
"_OBJC_CLASS_$_GDataEntryCalendarEvent", referenced from:
objc-class-ref in EditingViewController.o
"_OBJC_CLASS_$_GDataQueryCalendar", referenced from:
objc-class-ref in RootViewController.o
"_OBJC_CLASS_$_GDataServiceGoogleCalendar", referenced from:
objc-class-ref in RootViewController.o
"_OBJC_CLASS_$_GDataWhen", referenced from:
objc-class-ref in RootViewController.o
objc-class-ref in EditingViewController.o
"_OBJC_CLASS_$_GDataWhere", referenced from:
objc-class-ref in EditingViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You need to add the gdata .m files (GDataDateTime.m, GDataEntryCalendarEvent.m, etc.) to your target's “Compile Sources” build phase.
One way to do this is using the File Inspector. See this answer for an animated example.

implement youtube API

Currently, I am developing an App in which I have implemented you tube API for sending videos
into you tube.For this I have used https://github.com/nparry/gdata-objectivec-clien/tree/master/Source
library and its work fine for me when I am individually use it.but when I am merge this API
in my working App it shows me following error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GDataYouTubeMediaGroup", referenced from:
objc-class-ref in YoutubeViewController.o
"_OBJC_CLASS_$_GDataUtilities", referenced from:
objc-class-ref in YoutubeViewController.o
"_OBJC_CLASS_$_GDataMediaTitle", referenced from:
objc-class-ref in YoutubeViewController.o
"_OBJC_CLASS_$_GDataServiceGoogleYouTube", referenced from:
objc-class-ref in YoutubeViewController.o
"_OBJC_CLASS_$_GDataMediaKeywords", referenced from:
objc-class-ref in YoutubeViewController.o
"_kGDataSchemeYouTubeCategory", referenced from:
-[YoutubeViewController uploadPressed:] in YoutubeViewController.o
"_OBJC_CLASS_$_GDataMediaDescription", referenced from:
objc-class-ref in YoutubeViewController.o
"_OBJC_CLASS_$_GDataEntryYouTubeUpload", referenced from:
objc-class-ref in YoutubeViewController.o
"_OBJC_CLASS_$_GDataMediaCategory", referenced from:
objc-class-ref in YoutubeViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have searched so hard for removing this error but can't find any solution.How can I solve
this?
this is an error that comes on adding files from external sources into project, all you need to do is : go to "Build Phases" under "Targets", there you need to add all .m files in "Compile Sources".
It sounds like you haven't linked the gdata files to the target. Easiest way to do that is remove them from the project, and then add them again, making sure you check the box next to your project under "add to targets".
Hope this helps

Undefined symbols for architecture i386

while i am trying to build my iOS project where iam using storyboard .
Also using transition and animation classes in my project.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_FooterView", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_FullScreenView", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_HeaderView", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_LayoutViewExtention", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_MessageModel", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_TitleAndTextView", referenced from:
objc-class-ref in WallViewController.o
"_RGBACOLOR", referenced from:
-[WallViewController showViewInFullScreen:withModel:] in WallViewController.o
-[WallViewController animationEnd:finished:context:] in WallViewController.o
-[AFKPageFlipper initFlip] in AFKPageFlipper.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It is difficult to analyse such questions without a project at your eyes. But as they are linker errors and you seem to use one of the latest Xcodes and WallViewController is not standard UIKit class (as far as i know(there is no 'UI' prefix)), i guess that you included the files improperly.
Try to delete references to the WallViewController files and add them again into the project by right clicking the group where you want to put them and then "add files..." (my xcode doesn't like dragging for some unknown reason).
Pls have look at link.
Select project and goto build phase and add the missing file "WallViewController.m" to compile source.