public static string ParseAndSaveSecretForPlatform()

in Assets/AppCenter/Plugins/AppCenterSDK/Core/Shared/AppCenter.cs [151:198]


        public static string ParseAndSaveSecretForPlatform(string secrets)
        {
            var platformIdentifier = GetPlatformIdentifier();
            if (platformIdentifier == null)
            {
                // Return as is for unsupported platform.
                return secrets;
            }
            if (secrets == null)
            {
                // If "secrets" is null, return that and let the error be dealt
                // with downstream.
                return secrets;
            }

            // If there are no equals signs, then there are no named identifiers
            if (!secrets.Contains("="))
            {
                return secrets;
            }

            var platformIndicator = platformIdentifier + "=";
            var secretIdx = secrets.IndexOf(platformIndicator, StringComparison.Ordinal);
            if (secretIdx == -1)
            {
                // If the platform indicator can't be found, return the original
                // string and let the error be dealt with downstream.
                return secrets;
            }
            secretIdx += platformIndicator.Length;
            var platformSecret = string.Empty;

            while (secretIdx < secrets.Length)
            {
                var nextChar = secrets[secretIdx++];
                if (nextChar == ';')
                {
                    break;
                }

                platformSecret += nextChar;
            }
            if (_secretTask != null)
            {
                _secretTask.SetResult(platformSecret);
            }
            return platformSecret;
        }