firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.55k stars 1.45k forks source link

Analytics events didn't been track successfully on iOS 18 devices #13640

Closed ZDFiosDeveloper closed 2 hours ago

ZDFiosDeveloper commented 4 days ago

Description

Currently we are using the firebase 10.14.0, but we can't track the Analytics events on iOS 18 devices, but it can track successfully on the iOS 17 devices, so I upgrade the firebase version to 11.2.0, but it still been track successfully, so I check the debug log on iOS iOS 17 iOS 18 simulator iOS 18 device
image image image

And I think the scenario is same with https://github.com/firebase/firebase-ios-sdk/issues/13598, but I don't know why that issue had been closed.

Reproducing the issue

No response

Firebase SDK Version

11.2.0

Xcode Version

15.4

Installation Method

Carthage

Firebase Product(s)

Analytics

Targeted Platforms

iOS

Relevant Log Output

No response

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

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

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 4 days ago

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

ncooke3 commented 2 days ago

Hi @ZDFiosDeveloper, thanks for reporting and apologies for the trouble. I closed #13598 because my understanding was that it was due to how the -FIRDebugEnabled flag was being set (https://github.com/firebase/firebase-ios-sdk/issues/13598#issuecomment-2339431660).

Are you passing a debug flag and if so how? It should be set via the scheme's launch arguments rather than at runtime using the Process API.

ZDFiosDeveloper commented 2 days ago

I passed the debug flag at the runtime using the process api, but even I didn’t pass the debug flag, still can’t find the iOS 18 devices in debug view

ncooke3 commented 1 day ago

Thanks, @ZDFiosDeveloper, it seems that the Process API is no longer a reliable way to set the flag in iOS 18.

Could you please try switching over to instead passing the flag as a launch argument and seeing if that makes a difference? See this example:

Screenshot 2024-09-16 at 7 08 04 AM

Additionally, I see you are using Carthage. Please ensure that GoogleUtilities.xcframework is from the lastest 11.2 Carthage distribution rather than leftover from a previous version's install. The version is embedded in the Info.plist at the root of one of the platform directories inside the XCFramework (GoogleUtilities.xcframework/ios-arm64/GoogleUtilities.framework/Info.plist). It should be 8.0.2.

ZDFiosDeveloper commented 3 hours ago

@ncooke3 after change-FIRDebugEnabled to the arguments, it works fine now, thanks.