firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
828 stars 428 forks source link

Google Analytics for Firebase has not been created. Please, configure Firebase by calling [FIRApp configure] #1212

Closed MuhammadSafyan closed 2 years ago

MuhammadSafyan commented 2 years ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the question here:

I followed this setup : https://firebase.google.com/download/unity and added in the main screen FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task => { dependencyStatus = task.Result; if (dependencyStatus == DependencyStatus.Available) { DebugLog("Enabling data collection."); FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);

  DebugLog("Set user properties.");
  // Set the user's sign up method.
  FirebaseAnalytics.SetUserProperty(
    FirebaseAnalytics.UserPropertySignUpMethod,
    "Google");
  // Set the user ID.
  FirebaseAnalytics.SetUserId("uber_user_510");
  // Set default session duration values.
  FirebaseAnalytics.SetSessionTimeoutDuration(new TimeSpan(0, 30, 0));
  firebaseInitialized = true;
    } else {
      Debug.LogError(
        "Could not resolve all Firebase dependencies: " + dependencyStatus);
    }

When i build for Xcode following errors Screenshot 2021-12-22 at 10 51 51 AM

When i Build for android every thing is OK and i can see events in Debug view as well as dashboard

MuhammadSafyan commented 2 years ago

I then noticed that when the app starts, about 150 warnings of the following kind are printed to the log:

Screenshot 2021-12-22 at 12 00 44 PM

MuhammadSafyan commented 2 years ago

I have salved the problem by Enableing the static link library in Assets=>ExternalDependaymanager=>IOSResolver=>Setting then check link static labrary

paulinon commented 2 years ago

Hi @MuhammadSafyan,

Thanks for sharing your solution. I'll be closing this ticket for now. Let me know if a new issue arises.