1

I am experiencing a strange issue and can't figure out what I am doing wrong. I am forking from Firebase UI in order to set it up for my needs.

What I want to do:

I want to remove the "Back" text from the navigation bar because I have a custom image back button and it is now colliding with the lib's back item. I cannot customize that through the SDK's Api so I decided to remove the lines that are setting the "Back" text in 2 view controllers.

What I did:

So I forked the repo and made the changes directly through the GitHub web interface. I committed my changes in my forked repo.

What I've tried:

1. I followed this post CocoaPods and GitHub forks and tried the first suggestion - pointing CocoaPods to use my forked repo with my latest commit. I got [!] Failed to download 'FirebaseUI'. error when I did pod update.

2. I tried the second suggestion in the post - cloning my forked repo with the needed changes and pointing to it as a local pod. I was able to pod update but then I got build errors in Xcode - Duplicate interface definition for class.

Is it possible that this happens because FirebaseUI consists of different sub-libraries and I only need to use 3 of them? This is what I want to use as in my Podfile:

pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'

This is how my Podfile look like:

pod 'FirebaseUI/Auth', :path => '~/Developer/Forked/FirebaseUI-iOS'
pod 'FirebaseUI/Google', :path => '~/Developer/Forked/FirebaseUI-iOS'
pod 'FirebaseUI/Facebook', :path => '~/Developer/Forked/FirebaseUI-iOS'

and Podfile.lock

PODS:
- FirebaseUI/Auth (5.2.2):
- Firebase/Auth (~> 5.0)
- FirebaseUI/Facebook (5.2.2):
- FBSDKLoginKit (~> 4.0)
- FirebaseUI/Auth
- FirebaseUI/Google (5.2.2):
- FirebaseUI/Auth
- GoogleSignIn (~> 4.0)

DEPENDENCIES:
- FirebaseUI/Auth (from `~/Developer/Forked/FirebaseUI-iOS`)
- FirebaseUI/Facebook (from `~/Developer/Forked/FirebaseUI-iOS`)
- FirebaseUI/Google (from `~/Developer/Forked/FirebaseUI-iOS`) 

EXTERNAL SOURCES:
FirebaseUI:
:path: "~/Developer/Forked/FirebaseUI-iOS"

The exact error message in Xcode:

../Pods/FirebaseUI/FirebaseAuthUI/FUIAuthBaseViewController.h:28:1: Duplicate interface definition for class 'FUIAuthBaseViewController'

Where FUIAuthBaseViewController is one of 2 edited view controllers.

halfer
  • 19,824
  • 17
  • 99
  • 186
Vasil Garov
  • 4,851
  • 1
  • 26
  • 37

1 Answers1

0

From the question you reference, the pod specifier in the Podfile should reference a source location for the forked repo like:

pod 'FirebaseUI/Auth', :git => 'https://github.com/.../FirebaseUI.git', :commit => 'd35...2bc1'

I find the second answer easier of pointing to a local path:

pod 'FirebaseUI/Auth', :path => '~/mypath-to/FirebaseUI'

Make sure that all the FirebaseUI references are changed in the Podfile by examining the generated Podfile.lock.

If you're still having problems share the Podfile and Podfile.lock to help others diagnose.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139