firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.44k stars 3.91k forks source link

firebase_analytics: No known class method for selector 'sessionIDWithCompletion:' #12694

Open abdessalem-aghrib opened 3 weeks ago

abdessalem-aghrib commented 3 weeks ago

Is there an existing issue for this?

Which plugins are affected?

Analytics

Which platforms are affected?

iOS

Description

Launching lib/main.dart on iPhone 15 Pro Max in debug mode... Running pod install... Running Xcode build... Xcode build done. 67.5s Failed to build iOS app ARC Semantic Issue (Xcode): No known class method for selector 'sessionIDWithCompletion:' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:90:16

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAdPersonalization' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:159:15

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAdUserData'; did you mean 'FIRConsentTypeAdStorage'? /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:165:15

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithEmailAddress:' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:190:18

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithPhoneNumber:' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:193:18

Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.

Reproducing the issue

Launching lib/main.dart on iPhone 15 Pro Max in debug mode... Running pod install... Running Xcode build... Xcode build done. 67.5s Failed to build iOS app ARC Semantic Issue (Xcode): No known class method for selector 'sessionIDWithCompletion:' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:90:16

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAdPersonalization' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:159:15

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAdUserData'; did you mean 'FIRConsentTypeAdStorage'? /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:165:15

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithEmailAddress:' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:190:18

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithPhoneNumber:' /Users/apple/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.3/ios/Classes/FLTFirebaseAnalyticsPlugin.m:193:18

Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.

================================= firebase_core: ^2.30.1 firebase_messaging: ^14.9.0 firebase_core_web: ^2.16.0 firebase_crashlytics: ^3.5.3 firebase_analytics: ^10.10.3

Firebase Core version

2.30.1

Flutter Version

3.19.6

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
```yaml Replace this line with the contents of your `flutter pub deps -- --style=compact`. ```

Additional context and comments

Dart 3.3.4 • DevTools 2.31.1

russellwheatley commented 3 weeks ago

Hi @abdessalem-aghrib, run:

flutter clean
flutter pub get 
flutter run

Something has gone wrong with your build.

abdessalem-aghrib commented 3 weeks ago

Hi Russell,

I ran these commands multiple times. this error came after upgrading pod (in ios) and all firebase packages to the latest version

On Thu, 25 Apr 2024 at 12:47, Russell Wheatley @.***> wrote:

Hi @abdessalem-aghrib https://github.com/abdessalem-aghrib, run:

flutter clean flutter pub get flutter run

Something has gone wrong with your build.

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

russellwheatley commented 3 weeks ago

Try deleting Pods & Podfile.lock. If still not working, try creating a fresh, Flutter project with those dependencies. If you can reproduce, post it here and I will take a look.

dev-kasibhatla commented 3 weeks ago

This issue was affecting our builds.

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAdPersonalization'
/Users/username/.pub-cache/hosted/pub.dev/firebase_analytics-10.9.0/ios/Classes/FLTFirebaseAnalyticsPlugin.m:159:15

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAdUserData'; did you mean 'FIRConsentTypeAdStorage'?
/Users/username/.pub-cache/hosted/pub.dev/firebase_analytics-10.9.0/ios/Classes/FLTFirebaseAnalyticsPlugin.m:165:15

Environment:

Temporary solution Reverting flutter package firebase_analytics to 10.8.10 fixes it for now. None of the versions >=10.9.0 are working with iOS. Seems to be a problem with consent mode v2.

This means that we cannot implement the changes required for consent mode v2. Hoping for a fix soon.

abdessalem-aghrib commented 3 weeks ago

Hi team,

When I updated firebase_analytics to version 10.8.10, the error persisted but changed in nature. However, it consistently relates to FLTF files. Here are some details :

Error : Launching lib/main.dart on iPhone 15 Pro Max in debug mode... Running pod install... Running Xcode build... Xcode build done. 72.4s Failed to build iOS app ARC Semantic Issue (Xcode): No known class method for selector 'sessionIDWithCompletion:' /Users/apple/.pub-cache/hosted/ pub.dev/firebase_analytics-10.8.10/ios/Classes/FLTFirebaseAnalyticsPlugin.m:87:16

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithEmailAddress:' /Users/apple/.pub-cache/hosted/ pub.dev/firebase_analytics-10.8.10/ios/Classes/FLTFirebaseAnalyticsPlugin.m:172:18

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithPhoneNumber:' /Users/apple/.pub-cache/hosted/ pub.dev/firebase_analytics-10.8.10/ios/Classes/FLTFirebaseAnalyticsPlugin.m:175:18

Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.

[image: Screenshot 2024-04-27 at 12.37.37 AM.png]

Tools Versions : [image: Screenshot 2024-04-27 at 12.38.09 AM.png] [image: Screenshot 2024-04-27 at 12.38.42 AM.png]

[image: Screenshot 2024-04-27 at 12.40.43 AM.png]

Thanks a lot

abdessalem-aghrib commented 3 weeks ago

Working fine when i comment firebase_analytics package:

[image: Screenshot 2024-04-27 at 1.12.55 AM.png]

On Sat, 27 Apr 2024 at 00:41, Abdessalem Aghrib @.***> wrote:

Hi team,

When I updated firebase_analytics to version 10.8.10, the error persisted but changed in nature. However, it consistently relates to FLTF files. Here are some details :

Error : Launching lib/main.dart on iPhone 15 Pro Max in debug mode... Running pod install... Running Xcode build... Xcode build done. 72.4s Failed to build iOS app ARC Semantic Issue (Xcode): No known class method for selector 'sessionIDWithCompletion:' /Users/apple/.pub-cache/hosted/ pub.dev/firebase_analytics-10.8.10/ios/Classes/FLTFirebaseAnalyticsPlugin.m:87:16

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithEmailAddress:' /Users/apple/.pub-cache/hosted/ pub.dev/firebase_analytics-10.8.10/ios/Classes/FLTFirebaseAnalyticsPlugin.m:172:18

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithPhoneNumber:' /Users/apple/.pub-cache/hosted/ pub.dev/firebase_analytics-10.8.10/ios/Classes/FLTFirebaseAnalyticsPlugin.m:175:18

Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.

[image: Screenshot 2024-04-27 at 12.37.37 AM.png]

Tools Versions : [image: Screenshot 2024-04-27 at 12.38.09 AM.png] [image: Screenshot 2024-04-27 at 12.38.42 AM.png]

[image: Screenshot 2024-04-27 at 12.40.43 AM.png]

Thanks a lot

amrgetment commented 1 week ago

Full log for Macbook Pro M2 with latest firebase_analytics: ^10.10.5

Launching lib/main.dart on iPhone 15 in debug mode...
Xcode build done.                                           211.5s
Failed to build iOS app
Semantic Issue (Xcode): Unknown receiver 'FIRAnalytics'; did you mean 'FIRCrashlytics'?
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:90:3

ARC Semantic Issue (Xcode): No known class method for selector 'sessionIDWithCompletion:'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:90:16

Semantic Issue (Xcode): Unknown receiver 'FIRAnalytics'; did you mean 'FIRCrashlytics'?
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:104:5

ARC Semantic Issue (Xcode): No known class method for selector 'logEventWithName:parameters:'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:104:18

Semantic Issue (Xcode): Unknown receiver 'FIRAnalytics'; did you mean 'FIRCrashlytics'?
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:106:5

ARC Semantic Issue (Xcode): No known class method for selector 'logEventWithName:parameters:'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:106:18

Semantic Issue (Xcode): Unknown receiver 'FIRAnalytics'; did you mean 'FIRCrashlytics'?
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:114:3

ARC Semantic Issue (Xcode): No known class method for selector 'setUserID:'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:114:16

Semantic Issue (Xcode): Unknown receiver 'FIRAnalytics'; did you mean 'FIRCrashlytics'?
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:122:3

ARC Semantic Issue (Xcode): No known class method for selector 'setUserPropertyString:forName:'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:122:16

Semantic Issue (Xcode): Unknown receiver 'FIRAnalytics'; did you mean 'FIRCrashlytics'?
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:130:3

ARC Semantic Issue (Xcode): No known class method for selector 'setAnalyticsCollectionEnabled:'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:130:16

Semantic Issue (Xcode): Unknown receiver 'FIRAnalytics'; did you mean 'FIRCrashlytics'?
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:135:3

ARC Semantic Issue (Xcode): No known class method for selector 'resetAnalyticsData'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:135:16

Generics Issue (Xcode): No type or protocol named 'FIRConsentType'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:146:22

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAdStorage'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:150:15

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentStatusGranted'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:151:39

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentStatusDenied'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:151:65

Semantic Issue (Xcode): Use of undeclared identifier 'FIRConsentTypeAnalyticsStorage'
/Users/.pub-cache/hosted/pub.dev/firebase_analytics-10.10.5/ios/Classes/FLTFirebaseAnalyticsPlugin.m:154:15

Error (Xcode): too many errors emitted, stopping now

Could not build the application for the simulator.
Error launching application on iPhone 15.

Exited (1).
russellwheatley commented 4 days ago

I've just ran the analytics example app and it was fine:

  example git:(master) ✗ flutter run
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         3.4s
Xcode build done.                                           21.9s
Syncing files to device iPhone 15 Pro Max...                        48ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on iPhone 15 Pro Max is available at: http://127.0.0.1:60387/S7MC1R0X8dw=/
The Flutter DevTools debugger and profiler on iPhone 15 Pro Max is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:60387/S7MC1R0X8dw=/

Example app uses the latest version which is 10.10.5

e-reifer commented 2 days ago

Same problem on my M2...

I've downgraded to 10.8.10 (https://github.com/firebase/flutterfire/issues/12694#issuecomment-2079153940) resolved this message but causes:

ARC Semantic Issue (Xcode): No known class method for selector 'initiateOnDeviceConversionMeasurementWithPhoneNumber:'

Downgrading to 10.7.4 builds the app without errors.

I'm using:

  environment:
    sdk: ">=3.0.0 <=3.4.0"
  firebase_crashlytics: ^3.5.5
  firebase_dynamic_links: ^5.5.5
  firebase_core: ^2.31.0
  firebase_core_platform_interface: ^5.0.0
  firebase_messaging: ^14.9.2
  flutter_local_notifications: ^17.1.2
  flutter_google_places_sdk: ^0.3.9
Environment: ```console Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.0, on macOS 14.0 23A344 darwin-arm64, locale en-DE) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.89.0) [✓] Connected device (6 available) ```