Apple LLVM Error after trying to add google sign in - ios

I tried following this example to the tee:
Swift iOS Google Sign-In
And even tried the pod try Google demo app but that doesn't even go past the splash screen before a SIGABRT.
I'm sure I am still doing something wrong but I can't figure out what it would be. I have added the bridging-header file as it suggested and when I command click on any GID referenced file it links me back to the source. I haven't fully connected up the UI components but I am assuming it should still be able to Build Succeed and launch the app empty nonetheless.
I have isolated it down to just the cocoa pod installation of Google related items. Even after adding the generated file GoogleService-Info.plist from the instructions to all targets and at the root of my XCode project I still get the same error:
clang: error: cannot specify -o when generating multiple output files
When I remove Google items from the Podfile it seems to run fine. I still have Alamofire, SwiftyJSON there so the pods are installing and being referenced just fine. I also have Facebook login working perfectly also! Just can't seem to figure out what's going wrong here...
The full error is again:
Apple LLVM 6.1 Error: clang: error: cannot specify -o when generating multiple output files

Related

Error message - RNFirebase core module was not found natively on iOS

React Native Firebase won’t install on iOS React Native project. It works fine on Android.
I followed this instruction.
https://rnfirebase.io/docs/v5.x.x/installation/initial-setup
I set up Firebase, added the downloaded plist file via XCode, installed and set up Cocoapod.
The moment I add the following line to my App.js, the simulator returns an error message.
import firebase from 'react-native-firebase';
The error message: “RNFirebase core module was not found natively on iOS”
I’ve tried a few things I picked up from this forum:
https://github.com/invertase/react-native-firebase/issues/614
I commented out following lines from Podfile
use_frameworks!
And then pod install, pod update
on Xcode, checked the Build Phases/ Link Binary with Libraries section. I checked libRNFirebase.a was already there.
I've been trying this for a few months now on and off. And I haven't found a way to make React Native Firebase install on iOS project. Any pointer would be much appreciated.
I'm currently maintaining the react-native-firebase v5 branch (current stable) and we do have a problem with the header search paths right now for some reason.
I don't have a definitive fix, but I constructed a demo that goes from react-native init, then installs react-native-firebase, and does all the things necessary such that the project builds and runs on iOS and even archives in release mode.
You may see it here: https://github.com/mikehardy/rnfbdemo
The only thing that is important at the moment is that you need to put one non-documented thing in your Podfile after following all the install instructions, as the last line before the final end
system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")

iOS firebase Mach-O Linker Error without cocapods

I'm trying to import Firebase into my iOS app. I followed this tutorial for doing this manually with Objective-C (as opposed to using CocoaPods).
http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/
When I try to build my project, I get the following errors:
"Apple Mach-O Linker Error"
"Linker command failed with exit code 1 (use -v to see invocation)"
I'm familiar with the Linux CLI (less so with Macs), but I don't understand how to apply the -v flag to XCode's build process to get more info.
I've been Googling this for the last 3 hours, but every answer I find seems to be directed at users who weren't using an XCode workspace with CocoaPods.
I don't have CocoaPods installed, so I don't think this is my issue. Despite that I have converted my project and properly imported it into an XCode workspace, this still didn't solve my problem.
My app is a Swift project, and I have imported the modulemap, firebase.h, and googleServices.plist files.
I've also made my Header and Library search paths recursive for the entire project folder in an attempt to fix this.
Here's my project navigation. Although at this point I suspect it's some kind of build setting that isn't correct.
Some selected answers I've tried to apply without success:
Apple Mach -O Linker command failed
In Xcode how do I create a new workspace and add 1 project to it so that I can see the project and its files?
Framework not found GoogleToolboxForMac
Adding system header search path to Xcode
https://github.com/firebase/firebase-ios-sdk/issues/258
Apple Mach-O Linker & Ditto Error - Xcode 8
https://github.com/invertase/react-native-firebase/issues/198
https://forum.ionicframework.com/t/ios-xcode-8-apple-mach-o-linker-ld-error-group-in-xcode/89903
Upgrading to xcode 9.2 fixes this. It appears to be an issue with earlier versions not properly handling linking.
Which is misleading b/c the firebase documentation indicates it's compatible with xcode 8. But I think that's assuming you use cocoapods. If you don't, and instead try to link the obj-c frameworks you need xcode 9+
Once I knew how to examine the more verbose linking error, googling for x86_64 led me to some helpful answers.
This and other answers helped me investigate upgrading.
ld: framework not found Stripe for architecture x86_64

How to solve liker error:can't link directly with lib system_configuration.dylib

I am adding Google Analytics a bit older version by directly downloading the libraries for a reason.
Followed this tutorial https://www.raywenderlich.com/53459/google-analytics-ios
but after adding all the files and trying to build basic analytics code I am stuck at a linker error
ld: cannot link directly with /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/lib/system/libsystem_configuration.dylib. Link against the umbrella framework 'System.framework' instead. for architecture x86_64
I am not sure what exactly is happening , my Xcode is at 7.2 and trying to run this code on iPhone 6 simulator.
**** EDIT ***
Also above error has occurred after adding Google Analytics specific libs and headers

Xcode 7.3.1 - Can't properly setup AWS

A year ago I had a project where I was using AWS. I forget exactly how it worked but it involved a BridgingHeader and no use of Frameworks.
I came back to this project today and none of the AWS stuff was working. I deleted all AWS/pod related files, got rid of the BridgingHeader reliance, cleaned the project, and proceeded to follow the pod-based instructions here:
http://docs.aws.amazon.com/mobile/sdkforios/developerguide/setup.html
However, the project still doesn't recognize any of the AWS libraries (getting the error "Use of unresolved identifier AWS...").
I saw a post by someone that suggested simply putting "import Framework" at the top of the files that use that Framework, but this doesn't work (it doesn't recognize AWSS3 when I put "import AWSS3", for example).
Then I saw advice that suggested figuring out the correct "Framework/Header/Library Search Paths" and so I created a brand new project, copied the podfile, and ran pod install. In this new project I am getting the error:
ld: warning: directory not found for option
'-F/Users/username/Library/Developer/Xcode/DerivedData/TestProj-gmhzshcpuyuvaffaocakhunyepaw/Build/Products/Debug-iphonesimulator/AWSAutoScaling'
for each of the AWS libraries.
When I go into the target build settings, I see that the Framework Search Paths have strings relating to the AWS libraries, but when I delete them I then get the error "ld: Framework not found AWSAutoScaling".
I tried giving the direct path to the respective folders but I get the same error.
I fixed the problem by opening the .xcworkspace file instead of the the .xcodeproj file.

Xcode 7.3: error: could not read CFBundleIdentifier from Info.plist (null) after pods configuration

I've downloaded Telegram's code and I'm playing around trying to add Auth0 with it, so I tried to used pods, replicating the practice code.
After some pain regarding PODS_ROOT, I finally managed to get it going, only to encounter the above error.
And now I'm not sure what to do. This answer leads me to believe there's an issue with the info.plist file location, but there's too many:
UPDATE:
I saw that the Bundle Identifiers for the Targets were blank, in contrast to the 'base' Telegram app (perhaps something to do with switching from config configuration to Pods-Telegraph?), which had values in it. So I copied over the Bundle Identifiers from the 'base' app like so:
And promptly ended with this new issue:
ld: library not found for -lPods-watchkitapp Extension
clang: error: linker command failed with exit code 1 (use -v to see invocation)
EDIT:
For reference:
Telegram (iOS version is Objective-C)
Auth0
For replication, I:
Downloaded necessary files for each project. Telegram is missing some files scattered around the net, and Auth0 requires a (free) account for configuration.
Created a podfile for Telegram.
Modified it to resemble Auth0 podfile - Target main app only. If done right, this should replicate the error in question.
Filled in Bundle Filters (erased upon pod install), based off original values. If done right, this should replicate the UPDATE error in question.
Close your project . Open Again. Clean your project and try to run.
And if its not works then Search info.plist right click -> Remove reference . And add it again. and try to Build.
EDIT :- After installing pod You need open project from .xcworkspace in place of .xcodeproject .

Resources