Merge pull request #357 from microsoft/fix/auth-manifest-merger

[Auth] Fix merger script
This commit is contained in:
Jae Lim 2019-11-06 14:50:51 -08:00 коммит произвёл GitHub
Родитель ab06092807 9730e281d8
Коммит 31b35a1d72
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 16 добавлений и 10 удалений

Просмотреть файл

@ -143,14 +143,8 @@ public class CreateManifest
Directory.Delete(loaderFolder, true);
return;
}
var activityElements = applicationElements[0].Elements().Where(element => element.Name.LocalName == "activity").ToList();
var activityElementOld = applicationElements[0].Elements().FirstOrDefault(element => element.Name.LocalName == "activity");
// Delete the unzipped folder if the activity element already exists in the AndroidManifest.xml file
if (activityElements.Count == 1)
{
Directory.Delete(loaderFolder, true);
return;
}
var intentElement = new XElement("intent-filter");
XNamespace ns = "http://schemas.android.com/apk/res/android";
@ -171,7 +165,15 @@ public class CreateManifest
intentElement.Add(categoryElement2);
intentElement.Add(dataElement);
activityElement.Add(intentElement);
if (activityElementOld != null)
{
activityElementOld.ReplaceWith(activityElement);
}
else
{
applicationElements[0].Add(activityElement);
}
xmlFile.Save(manifestPath);
// Delete the AndroidManifest.xml.meta file if generated

Просмотреть файл

@ -12,6 +12,10 @@ Updated native SDK versions:
* **[Fix]** Fix `AppCenterStarter.m` was not included in the first build.
* **[Fix]** Fix Unity 2019.3 iOS build.
### App Center Auth
* **[Fix]** Fix Auth was incorrectly caching the old app secret in the manifest if it was changed.
### App Center Crashes
#### Android