Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running into function signature issue for Functions.function(app:) after updating from 8.15 #14097

Open
mshresthasentri opened this issue Nov 12, 2024 · 7 comments

Comments

@mshresthasentri
Copy link

Description

Running into Argument passed to call that takes no arguments when passing instance of FIRApp to Functions.functions(app:).
Above functions seems to be working fine in Swift when using SDK version 8.15 but updating FirebaseSDK above that throws the error. The possible workaround for us was to create instance of Functions using Objective C but we have not been able to navigate the issue for Swift.

Reproducing the issue

No response

Firebase SDK Version

10.22.0

Xcode Version

15.3

Installation Method

CocoaPods

Firebase Product(s)

Functions

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@ncooke3
Copy link
Member

ncooke3 commented Nov 12, 2024

Hi @mshresthasentri, could you please add a small snippet to help us reproduce the problem?

@mshresthasentri
Copy link
Author

mshresthasentri commented Nov 12, 2024

Objective C code

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"ChatAppExample-Info" ofType:@"plist"];
FIROptions *chatOptions = [[FIROptions alloc] initWithContentsOfFile:filePath];
[FIRApp configureWithName:@"mychatappname" options:chatOptions];
chatFirebaseApp = [FIRApp appNamed:@"mychatappname"];
return chatApp

Swift code

let chatFirebaseApp = above objective c function returns the app
let functions = Functions.functions(app: chatFirebaseApp!)

this last line complains about Argument passed to call that takes no arguments

@paulb777
Copy link
Member

Thanks, but I'm still not able to reproduce. The following builds fine for me:

var functions = Functions.functions(app: FirebaseApp.app(name: "abc")!)

We'll likely need a reproducible example to help.

@mshresthasentri
Copy link
Author

Screenshot 2024-11-14 at 6 30 23 AM This is what i see on my end. If I jump to definition I can see the method signature exists. Not exactly sure why it does not pick up the method. Screenshot 2024-11-14 at 6 30 33 AM

@paulb777
Copy link
Member

There may be a problem in the Xcode project settings. Are you able to reproduce in a new project?

@google-oss-bot
Copy link

Hey @mshresthasentri. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants