FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

Cannot use Swift Package Manager to add FirebaseUI, missing Package.swift

Open AphroditeSoftware opened this issue 4 years ago • 18 comments

Welcome to FirebaseUI and thanks for submitting an issue!

Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.

If your issue concerns the CocoaPods error, "...transitive dependencies that include static binaries", please take a look at any of the following issues and see if your problem is solved: #48, #47, #46, #34, #23.

If not, please feel free to fill in the following info so we can help faster!

Step 1: Are you in the right place?

  • For issues or feature requests related to the code in this repository file a GitHub issue.
  • For general technical questions, post a question on StackOverflow tagged appropriately.
  • For general Firebase discussion, use the firebase-talk google group
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel

Step 2: Describe your environment

  • Objective C or Swift: Swift__
  • iOS version: 15.2___
  • Firebase SDK version: 9.0.0___
  • FirebaseUI version: 0.6.1__
  • Xcode Version: 14.0__

Step 3: Describe the problem:

Steps to reproduce:

  1. In Xcode, File-> Add Packages___
  2. Enter http://github.com/firebase/firebaseui-ios___
  3. Select firebaseui-ios___

Observed Results:

  • Xcode attempted to load in firebaseui-io but ended with this error:
Screen Shot 2022-09-18 at 3 20 26 PM

Selecting "Add anyway" does not give the option to select modules and results in many build errors.

I tried using Xcode 13.4.1 and got a slightly different error:

Screen Shot 2022-09-18 at 3 35 52 PM

Expected Results:

Package to be added successfully.

Relevant Code:

/n/a

AphroditeSoftware avatar Sep 18 '22 21:09 AphroditeSoftware

Same issue

image

cutmail avatar Oct 05 '22 00:10 cutmail

Hey all, this happens if you specify a version of FirebaseUI before SPM support was added. The error should go away if you set the version to at least 12.0.

morganchen12 avatar Oct 11 '22 17:10 morganchen12

@morganchen12

Hi, I used Xcode 14.2 (14C18) and I tried the below approaches but the package "FirebaseUI-iOS could not be resolved".

There're 6 options in Dependency rule to pick:

  • Up to next major version: its default value is 0.6.1 < 1.0.0
  • Up to next minor version: its default value is 0.6.1 < 0.7.0
  • Range of versions: its default value is 0.6.1 < 0.7.0
  • Exact version: its default value is 0.6.1
  • Branch: default value is master
  • Commit: I tried w/ the commit bc6f34f6834384e64f87f50a4b77f4f7f57559eb on Nov 18, 2022
Screenshot 2022-12-26 at 2 08 21 PM

Any help is appreciated.

Thanks.

projectxmaker avatar Dec 26 '22 07:12 projectxmaker

Same Xcode version and same issue with @projectxmaker.

vito-royeca avatar Mar 24 '23 15:03 vito-royeca

Hey all, sorry for the slow response. Have you tried using the exact version and changing the default value to 12.0?

morganchen12 avatar Mar 24 '23 18:03 morganchen12

@morganchen12

I tried to set Exact Version to 12.0 but Xcode will not allow me.

Hence, I set Exact Version to 12.0.0 but still I could not add the package. Screenshot 2023-04-08 at 12 44 48 AM Screenshot 2023-04-08 at 12 45 34 AM

vito-royeca avatar Apr 08 '23 04:04 vito-royeca

Finally figured it out. You need to set the version to 12.0.0 even though the default suggested one is 0.6.1. You can do that by selecting your Xcode project > Package Dependencies > FirebaseUI-iOS.

Screenshot 2023-04-09 at 7 57 53 PM

toddlee avatar Apr 10 '23 03:04 toddlee

Is there a potential for conflict between the FirebaseUI-iOS.git package and the firebase-ios-sdk.git if you choose incompatible versions? -- or does the swift package manager inform you of that at the time of attempted download?

ghost avatar Aug 28 '23 04:08 ghost

SPM will inform you if there's an incompatibility in your versions, but only if you explicitly specify the versions you want. Otherwise it will downgrade Firebase or FirebaseUI to meet the version compatibility constraints.

morganchen12 avatar Aug 28 '23 17:08 morganchen12

Seems everyone resolved with version dependency rule setting with 12.0.0, but I'm still having same issue. is anyone have idea with it? Screenshot 2023-10-11 at 1 02 03 AM

royyang90 avatar Oct 10 '23 16:10 royyang90

@royyang90 do you have any constraints on upstream Firebase?

morganchen12 avatar Oct 10 '23 22:10 morganchen12

Yes I tried to set up login with fire base basic UI in iOS, and importing FirebaseAuthUI in Xcode seems requires FirebaseUI package for it. But having package resolution failure when I try to push it to Xcode even though I set the dependency rule at least 12.0.0

Can you help this out?

2023년 10월 11일 (수) 오전 7:06, Morgan Chen @.***>님이 작성:

@royyang90 https://github.com/royyang90 do you have any constraints on upstream Firebase?

— Reply to this email directly, view it on GitHub https://github.com/firebase/FirebaseUI-iOS/issues/1094#issuecomment-1756334489, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCQ3ESP5MGO3YTDIWU5ZDRLX6XBFPAVCNFSM6AAAAAAQPTOXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWGMZTINBYHE . You are receiving this because you were mentioned.Message ID: @.***>

royyang90 avatar Oct 11 '23 04:10 royyang90

Can you share your project? You can upload it to an empty git repository.

morganchen12 avatar Oct 11 '23 18:10 morganchen12

Hi Morgan

Thanks for your email

I just resolved it through setting up a new project in xcode.

I don't know what was the problem but really appreciate your help

On Thu, Oct 12, 2023 at 3:05 AM Morgan Chen @.***> wrote:

Can you share your project? You can upload it to an empty git repository.

— Reply to this email directly, view it on GitHub https://github.com/firebase/FirebaseUI-iOS/issues/1094#issuecomment-1758210243, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCQ3ESI57OTT2GZVJCDF2YDX63NWPANCNFSM6AAAAAAQPTOXAI . You are receiving this because you were mentioned.Message ID: @.***>

royyang90 avatar Oct 13 '23 14:10 royyang90

Still an issue. I had to remove FirebaseSDK 10.17.0 package from the project which I was already using in my app. Only after that I was able to add FirebaseUI 13.1.0 which relies on the same Firebase 10.17.0 and fetches it as a dependency.

Update:

Still can't added to the existing project, only can add FirebaseUI to a newly created Xcode project.

Update 2:

I was able to add FirebaseUI 13.1.0 to old project when I cleared project cache.

nmtitov avatar Nov 06 '23 04:11 nmtitov

I'm a relative beginner and this issue just stumped me for many hours... I appreciate the friendliness of Firebase documentation but the FirebaseUI docs in particular are extremely sparse on installation details if you're not using CocoaPods in your projects.

  • FirebaseUI docs should specify explicitly state that https://github.com/firebase/FirebaseUI-iOS needs to be installed separately as a dependency in your project using SPM (if not using CocoaPods). It's not clear right now that it needs to be installed on top of core Firebase package.
  • FirebaseUI docs and the README for Firebase-UI-iOS should document the SPM installation instructions mentioned above - i.e using 12.0.0 as a minimum version (worked for me after hours of confused google searching)

I realize some of this might be obvious to more experienced devs / wonderful engineers building FirebaseUI, but it's not at all clear for someone just starting out and building basic apps. These changes can save a lot of frustration for folks like me. Thanks to @toddlee for the 12.0.0 solution.

metedata avatar Nov 24 '23 21:11 metedata

Any updates on this? Has anyone been able to add FirebaseUI as SPM? I just tried the 15.0.0 version and it did not work

Knapiii avatar Dec 18 '24 10:12 Knapiii

@Knapiii same situation here. As of today, the most recent version that works for me is v14.2.6

lgvalle avatar Jan 02 '25 07:01 lgvalle