Google Authenticator for iOS Missing Files - ios

I have cloned the Google Authenticator source code from here. After opening the iOS project in Xcode, I realized that a lot of files are missing, thus resulting in hundreds of compilation errors when I try to build. Just a few of the missing files are:
GTMNSDictionary+URLArguments.h
GTMNSString+URLArguments.h
GTMLocalizedString.h
GTMRegex.h
Has anyone been able to build the iOS project for Google Authenticator?
UPDATE (June 29, 2015)
I was able to find the missing ZXing files here and the missing Google Toolbox for Mac files here. Then, I ran into a build error in OTPAuthURLEntryController.m at this line:
#property (nonatomic, retain) __attribute__((NSObject)) dispatch_queue_t queue;
I fixed it by changing the line to:
#property (nonatomic, retain) dispatch_queue_t queue;
Now I'm trying to fix the following "symbol(s) not found" issue:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Decoder", referenced from:
objc-class-ref in OTPAuthURLEntryController.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've searched all over SO but still haven't figured it out yet. Any help would be greatly appreciated!

I was able to find the missing ZXing files here and the missing Google Toolbox for Mac files here. I then added the appropriate missing files to the project. After this, I ran into a build error in OTPAuthURLEntryController.m at this line:
#property (nonatomic, retain) __attribute__((NSObject)) dispatch_queue_t queue;
I fixed it by changing the line to:
#property (nonatomic, retain) dispatch_queue_t queue;
After that, I ran into the following "symbol(s) not found" error message:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Decoder", referenced from:
objc-class-ref in OTPAuthURLEntryController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It turns out that the main project (OTPAuth) is linking to a library called libZXingWidget.a, which is missing (like many other things). I opened up the ZXingWidget project in the missing ZXing files and fixed the build errors by removing the custom flags that treated warnings as errors. Then, I built the static library and set the build target to iOS Device. This generated the libZXingWidget.a file I needed. I linked that file in the Build Phases of the main project (OTPAuth), and now Google Authenticator runs on the iPhone 6 simulator!

Related

React Native Share Extension won't build

I'm trying to add a Share Extension to a React Native app and when I try to build the app I get this linking error:
Undefined symbols for architecture x86_64:
"_RCTRegisterModule", referenced from:
_initialize_ShareManager in ShareManager-75b70a88150f3f544e5598c2fcbaaa49e4e22b3f47bce8d9a721bf31763b426d.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is the offending code (when I comment this out the rest of the app builds fine):
#interface RCT_EXTERN_MODULE(ShareManager, NSObject)
RCT_EXTERN_METHOD(getURL: (RCTResponseSenderBlock)callback)
#end
Has anyone got any insight into how I can fix this? I've done a lot of googling and tried a hundred different permutations of linking binaries, different linker flags etc. But so far I've got nowhere.
Thanks for any help!

Xcode 9 _OBJC_CLASS_$_FBSDKApplicationDelegate

I'm trying to implement Facebook SDK into my project and I get the same issue
Facebook sdk is not a dylib error after update update Xcode 7?
Well, I have Bolts in my Frameworks Directory, also
In my Build Settings:
Frameworks Search Path: ~/Documents/Frameworks/FacebookSDKs-iOS-4.27.0
(That is correct for my path)
In my Briding-Header.h
#import <Bolts/Bolts.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
But, I'm still getting the same error, also, I just deleted the Derived data.
The error is:
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKCoreKit.framework/FBSDKCoreKit', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKCoreKit.framework/FBSDKCoreKit is not a dylib
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/Bolts.framework/Bolts', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/Bolts.framework/Bolts is not a dylib
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKLoginKit.framework/FBSDKLoginKit', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKLoginKit.framework/FBSDKLoginKit is not a dylib
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Some one has an idea about this error?
Well, the solution was weird, basically, I removed the Drag and Drop to my Framework group, and I added the FBSDKCoreKit, FBSDKLoginKit and Bolt using the general settings adding them in Linked Frameworks and Libraries
I also got this error and cleaning the project and building it again 4-5 times worked for me.
Cleaning - Command + Shift + K
Building - Command + B
Another solution is to delete these files in the project folder:enter image description here
pod install
instead of using the method described in FB official reference, I used pods to install them and I easily got rid of this problem

Library causes Build Errors in new Xcode

I'm trying to integrate MetatoneOSC into a brand new Swift iOS project.
What I've done so far:
Create new iOS Swift Project
Drag folder full of .h and .m files into Xcode project
Create a functioning bridging header (autocomplete now works for methods in the library) - #import "MetatoneOSC/F53OSC.h"
Put the following code in ViewController.swift:
let client = F53OSCClient.init()
The build fails with the following error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_F53OSCClient", referenced from:
type metadata accessor for __ObjC.F53OSCClient in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Each new class I use in my code creates a duplicate error, with a different class name after $_F53OSC in the error message.
I have tried setting up a new Objective-C project to make sure it's not a bridging error, and I get exactly the same error. Anyone know how I can resolve this?
This generally means you forgot to compile the relevant .m file. In you "Build Phases > Compile Sources" step for the target, make sure you've included all the relevant files. This doesn't always happen automatically if you just drag them into the project.

clang: error: linker command failed with exit code 1 (use -v to see invocation) when doing unit test on xcode

I meet this error when I do a unit test on xcode. I try to import "SignIn.h" and test the VerifyEmail class which is defined in SignIn.h/SignIn.m.
My code is as follows:
#import <XCTest/XCTest.h>
#import "SignIn.h"
#interface SignInTests : XCTestCase
#property (nonatomic) VerifyEmail* verifyEmail;
#end
#implementation SignInTests
- (void)testVerifyEmail
{
_verifyEmail = [[VerifyEmail alloc] init];
}
...
I just follow the usual unit test pipeline. import "SignIn.h" and #property (nonatomic) VerifyEmail* verifyEmail are okay, but when I try to initialize verifyEmail (_verifyEmail = [[VerifyEmail alloc] init];) there is an error as below:
ld: warning: directory not found for option '-Llibs/Debug-iphonesimulator'
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_VerifyEmail", referenced from:
objc-class-ref in SignInTests.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 been working on this for a long time and really need someone to help. Thanks!
When trying to add unit test to an existing iOS project, sometimes one need to set "Symbols Hidden by Default" in the build settings in the main app target to No.
Check this post: http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/
It still works for xcode 7. Thanks Todd!

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ToDoItem"

I'm trying to the Xcode Tutorial on a iOS ToDoApp. I've done all the steps and certainly I've got compile errors.
I've searched around and I've seen that I'm not the only one with this problem, and I have tried peoples solutions but with no success.
This is my error message:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ToDoItem", referenced from:
objc-class-ref in ToDoListTableViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems you are missing ToDoItem.m (or better said the #implementation ToDoItem) in your project. Either it's not there at all or the file is not included in the build target.
Try to search #implementation ToDoItem in your project. If it's missing, you have to add it. If it's not missing, make sure that the file is added to the target you are trying to build.

Resources