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

Issue - headerValue() is unavailable in Swift: Use asyncHeaderValue() async ->String? instead. #898

Closed
Jason-NIU opened this issue Oct 22, 2024 · 4 comments

Comments

@Jason-NIU
Copy link

Jason-NIU commented Oct 22, 2024

Bug report

CHECKLIST

  • [* ] I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
  • [ *] I have checked that no similar issues (open or closed) already exist.

Current behavior:

  1. Upgraded Xcode to 16.0
  2. Upgraded Cordova-plugin-fire based to 17.0.0
  3. Pod update in iOS
  4. The below error is shown when building the iOS App

Expected behavior:

I don’t see the issue in previous version
Steps to reproduce:

Screenshots

IMG_1342

Environment information

  • Cordova CLI version
    • 12.0.0
  • Cordova platform version
    • cordova platform ls
  • Plugins & versions installed in project (including this plugin)
    • iOS 7.1.1
  • Dev machine OS and version, e.g.
    • OSX
      • 14.7

iOS build issue:

  • Node JS version
    • node -v
    • 16.13.1
  • XCode version
    16.0
    Related code:
insert any relevant code here such as plugin API calls / input parameters

Other information:
It seems to be happening on react-native and flutter firebase plugin? invertase/react-native-firebase#8073

@mikehardy
Copy link

The firebase-ios-sdk team asserts that they have reverted the problematic change in Pod FirebaseCoreExtension in freshly released version 11.4.1, if you pod repo update and remove your Podfile.lock then pod install again...things might work for you?

@MaximBelov
Copy link

Workaround solution with https://www.npmjs.com/package/patch-package

1 add to plugin.xml

<pods use-frameworks="true">
...
				<pod name="FirebaseABTesting" spec="11.2.0"/>
				<pod name="FirebaseCoreInternal" spec="11.2.0"/>
				<pod name="FirebaseAuthInterop" spec="11.2.0"/>
				<pod name="FirebaseAppCheckInterop" spec="11.2.0"/>
				<pod name="FirebaseMessagingInterop" spec="11.2.0"/>
				<pod name="FirebaseCoreExtension" spec="11.2.0"/>
				<pod name="FirebaseSessions" spec="11.2.0"/>
				<pod name="FirebaseSharedSwift" spec="11.2.0"/>
				<pod name="FirebaseRemoteConfigInterop" spec="11.2.0"/>
....

2 Add In package.json
"scripts": {

  • "postinstall": "patch-package"
    }

3 Create patch

npx patch-package cordova-plugin-firebasex

@Jason-NIU
Copy link
Author

Thanks guys, much appreciated. I think pod repo update has fixed it for me. It suddenly stopped working few days ago. All good now. Thank you all for the response and support.

@dpa99c dpa99c closed this as completed Nov 5, 2024
@Moskaoud
Copy link

Moskaoud commented Nov 8, 2024

this works for me and build success line 112 before error

 if let heartbeatLogger = requestConfiguration.heartbeatLogger {
      request.setValue(heartbeatLogger.headerValue(), forHTTPHeaderField: "X-Firebase-Client")
    }

solution

 if let heartbeatLogger = requestConfiguration.heartbeatLogger {
        await request.setValue(heartbeatLogger.asyncHeaderValue(), forHTTPHeaderField: "X-Firebase-Client")
    }

image

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

No branches or pull requests

5 participants