Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Issues testing on store builds (testflight and Android Internal test)

Discussion in 'Unity Remote Config' started by nobluff67, Jul 6, 2022.

  1. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    Hi,

    Testing works fine in editor however when I build the game to store, it does not work. Are there permission setting that I need to set?

    e.g. (This is from iOS Certificates, Identifiers & Profiles).

    Also, does remote update change the compliance export questions for iOS.

    upload_2022-7-6_15-8-38.png
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    There are no special permissions. Can you define "does not work", how are you debugging? You mention "on the store", when you build directly to a device locally, does it work then? You generally want to test on an actual device locally before publishing to the store. This may help with debugging https://forum.unity.com/threads/tips-for-new-unity-users.701864/#post-5057741 and https://forum.unity.com/threads/how-to-capturing-device-logs-on-ios.529920/
     
  3. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    Thanks for the info. As far as the store goes, I was testing through testflight. I will revert back to local device test (android) to see if the issues persist.

    What I meant by "not working", is that the information was not being updated, while in editor test the information was being updated via remote config.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please share your code that demonstrates the information that is not being updated.
     
  5. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    Well, working now, user fault with regards to no internet access and a > sign would have been a < sign (which comes into play when there is no internet).

    Here is my code, warts and all, for the sole purposes of critique.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Unity.Services.Core;
    5. using Unity.Services.Authentication;
    6. using Unity.RemoteConfig;
    7. using UnityEngine.SceneManagement;
    8.  
    9. public class RemoteGameOverrides : MonoBehaviour
    10. {
    11.  
    12.     public RemoteUpdateSO remoteUpdateSo;
    13.  
    14.     private bool gotRemoteConfigs = false;
    15.     private float counter = 0;
    16.     public struct userAttributes
    17.     {
    18.        
    19.     }
    20.     public struct appAttributes
    21.     {
    22.        
    23.     }
    24.  
    25.     async void Start()
    26.     {
    27.         await UnityServices.InitializeAsync();
    28.         if (!AuthenticationService.Instance.IsSignedIn)
    29.         {
    30.             await AuthenticationService.Instance.SignInAnonymouslyAsync();
    31.         }
    32.  
    33.         ConfigManager.FetchCompleted += ConfigManager_FetchCompleted;
    34.         ConfigManager.FetchConfigs(new userAttributes(),new appAttributes());
    35.         StartCoroutine(LoadScene());
    36.     }
    37.  
    38.     void ConfigManager_FetchCompleted(ConfigResponse configResponse)
    39.     {
    40.         switch (configResponse.requestOrigin)
    41.         {
    42.             case ConfigOrigin.Default:
    43.                 Debug.Log("Default Values");
    44.                 break;
    45.             case ConfigOrigin.Cached:
    46.                 Debug.Log("Cached Values");
    47.                 break;
    48.             case ConfigOrigin.Remote:
    49.                 Debug.Log("Remote Values");
    50.                 remoteUpdateSo.adRewardsGiven = ConfigManager.appConfig.GetInt("RewardAmount");
    51.                 Debug.Log("B " + remoteUpdateSo.initialPopUpString);
    52.                 remoteUpdateSo.initialPopUpString  = ConfigManager.appConfig.GetString("InitialPopUpString");
    53.                 Debug.Log("A " + remoteUpdateSo.initialPopUpString);
    54.                 remoteUpdateSo.popUpOnStartup  = ConfigManager.appConfig.GetString("PopUpOnStartup");
    55.                 remoteUpdateSo.popUpOnStartupVersion  = ConfigManager.appConfig.GetInt("PopUpOnStartupVersion");
    56.                 remoteUpdateSo.popUpOnStartupLastVersion  = ConfigManager.appConfig.GetInt("popUpOnStartupLastVersion");
    57.                 remoteUpdateSo.minDifficultyLevel  = ConfigManager.appConfig.GetInt("minDifficultyLevel");
    58.                 remoteUpdateSo.difficultyLevelJump  = ConfigManager.appConfig.GetInt("difficultyLevelJump");
    59.                 remoteUpdateSo.difficultyTimerMinimum  = ConfigManager.appConfig.GetInt("difficultyTimerMinimum");
    60.                 remoteUpdateSo.maxDifficultyTimer  = ConfigManager.appConfig.GetInt("maxDifficultyTimer");
    61.                 break;
    62.         }
    63.         gotRemoteConfigs = true;
    64.     }
    65.  
    66.     IEnumerator LoadScene()
    67.     {
    68.         while (!gotRemoteConfigs && counter < 2)
    69.         {
    70.             counter += Time.deltaTime;
    71.             Debug.Log(counter);
    72.             yield return null;
    73.         }
    74.         SceneManager.LoadSceneAsync("MainGame");
    75.         yield return null;
    76.     }
    77. }
    most of it originally taken from the remote config example.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Glad you got it working! Remember that the Get* methods all take a second parameter which is a default value.