flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

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

Open abdessalem-aghrib opened this issue 1 year ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

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

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

abdessalem-aghrib avatar Apr 24 '24 00:04 abdessalem-aghrib

Hi @abdessalem-aghrib, run:

flutter clean
flutter pub get 
flutter run

Something has gone wrong with your build.

russellwheatley avatar Apr 25 '24 08:04 russellwheatley

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: @.***>

abdessalem-aghrib avatar Apr 25 '24 20:04 abdessalem-aghrib

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.

russellwheatley avatar Apr 26 '24 07:04 russellwheatley

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:

  • Flutter version 3.19.0 on channel stable
  • Dart version 3.3.0
  • DevTools version 2.31.1
  • Xcode 15.3
  • iOS 17.4 (SDK)

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.

dev-kasibhatla avatar Apr 26 '24 10:04 dev-kasibhatla

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 avatar Apr 26 '24 20:04 abdessalem-aghrib

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

abdessalem-aghrib avatar Apr 26 '24 21:04 abdessalem-aghrib

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).

amrgetment avatar May 10 '24 13:05 amrgetment

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

russellwheatley avatar May 14 '24 14:05 russellwheatley

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:
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)

e-reifer avatar May 15 '24 20:05 e-reifer

Hey @abdessalem-aghrib. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 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!

google-oss-bot avatar May 24 '24 01:05 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@abdessalem-aghrib if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Jun 04 '24 01:06 google-oss-bot

I have a same issue.

huynguyen2308 avatar Jun 04 '24 02:06 huynguyen2308