Skip to content

Commit 1a7adc4

Browse files
committed
add debug polling logs
1 parent 5a37cd9 commit 1a7adc4

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed
247 Bytes
Binary file not shown.
247 Bytes
Binary file not shown.

source/IOSResolver/src/IOSResolver.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,7 @@ private static void AddPodInternal(string podName,
14241424
/// Determine whether the target iOS SDK has changed.
14251425
/// </summary>
14261426
private static void PollTargetIosSdk() {
1427+
LogToDialog("DEDB PollTargetIosSdk");
14271428
iosTargetSdkPoller.Poll(() => TargetIosSdkVersionString,
14281429
(previousValue, currentValue) => { ScheduleCheckTargetIosSdkVersion(); });
14291430
}
@@ -1432,6 +1433,7 @@ private static void PollTargetIosSdk() {
14321433
/// Determine whether the target tvOS SDK has changed.
14331434
/// </summary>
14341435
private static void PollTargetTvosSdk() {
1436+
LogToDialog("DEDB PollTargetTvosSdk");
14351437
tvosTargetSdkPoller.Poll(() => TargetTvosSdkVersionString,
14361438
(previousValue, currentValue) => { ScheduleCheckTargetTvosSdkVersion(); });
14371439
}
@@ -1445,7 +1447,9 @@ private static void PollTargetTvosSdk() {
14451447
/// Cocoapods.
14461448
/// </summary>
14471449
private static void ScheduleCheckTargetIosSdkVersion() {
1450+
LogToDialog("DEDB ScheduleCheckTargetIosSdkVersion");
14481451
if(EditorUserBuildSettings.activeBuildTarget == BuildTarget.iOS) {
1452+
LogToDialog("DEDB Scheduling Check");
14491453
RunOnMainThread.Cancel(checkIosTargetSdkVersionJobId);
14501454
checkIosTargetSdkVersionJobId = RunOnMainThread.Schedule(() => {
14511455
UpdateTargetIosSdkVersion(false);
@@ -1462,7 +1466,9 @@ private static void ScheduleCheckTargetIosSdkVersion() {
14621466
/// Cocoapods.
14631467
/// </summary>
14641468
private static void ScheduleCheckTargetTvosSdkVersion() {
1469+
LogToDialog("DEDB ScheduleCheckTargetTvosSdkVersion");
14651470
if(EditorUserBuildSettings.activeBuildTarget == BuildTarget.tvOS) {
1471+
LogToDialog("DEDB Scheduling Check");
14661472
RunOnMainThread.Cancel(checkTvosTargetSdkJobId);
14671473
checkTvosTargetSdkJobId = RunOnMainThread.Schedule(() => {
14681474
UpdateTargetTvosSdkVersion(false);
@@ -1475,9 +1481,12 @@ private static void ScheduleCheckTargetTvosSdkVersion() {
14751481
/// </summary>
14761482
/// <param name="runningBuild">Whether the build is being processed.</param>
14771483
public static void UpdateTargetIosSdkVersion(bool runningBuild) {
1484+
LogToDialog("DEDB UpdateTargetIosSdkVersion");
14781485
var minVersionAndPodNames = TargetSdkNeedsUpdate(TargetIosSdkVersionNum);
1486+
LogToDialog("DEDB minVersionAndPodNames: " + minVersionAndPodNames);
14791487
if (minVersionAndPodNames.Value != null) {
14801488
var minVersionString = TargetSdkVersionToString(minVersionAndPodNames.Key);
1489+
LogToDialog("DEDB minVersionString: " + minVersionString);
14811490
DialogWindow.Display("Unsupported Target iOS SDK",
14821491
String.Format(
14831492
TARGET_SDK_NEEDS_UPDATE_STRING, /*platformName=*/"iOS",
@@ -1508,10 +1517,13 @@ public static void UpdateTargetIosSdkVersion(bool runningBuild) {
15081517
/// </summary>
15091518
/// <param name="runningBuild">Whether the build is being processed.</param>
15101519
public static void UpdateTargetTvosSdkVersion(bool runningBuild) {
1520+
LogToDialog("DEDB UpdateTargetTvosSdkVersion");
15111521
var minVersionAndPodNames = TargetSdkNeedsUpdate(TargetTvosSdkVersionNum);
1522+
LogToDialog("DEDB minVersionAndPodNames: " + minVersionAndPodNames);
15121523
if (minVersionAndPodNames.Value != null) {
15131524
var minVersionString =
15141525
TargetSdkVersionToString(minVersionAndPodNames.Key);
1526+
LogToDialog("DEDB minVersionString: " + minVersionString);
15151527
DialogWindow.Display("Unsupported Target tvOS SDK",
15161528
String.Format(
15171529
TARGET_SDK_NEEDS_UPDATE_STRING, /*platformName=*/"tvOS",
@@ -1546,6 +1558,7 @@ public static void UpdateTargetTvosSdkVersion(bool runningBuild) {
15461558
/// selected target SDK version does not satisfy pod requirements, the list
15471559
/// (value) is null otherwise.</returns>
15481560
private static KeyValuePair<int, List<string>> TargetSdkNeedsUpdate(int targetSdkVersionNum) {
1561+
LogToDialog("DEDB TargetSdkNeedsUpdate");
15491562
var emptyVersionAndPodNames = new KeyValuePair<int, List<string>>(0, null);
15501563
var minVersionAndPodNames = emptyVersionAndPodNames;
15511564
int maxOfMinRequiredVersions = 0;
@@ -1555,6 +1568,7 @@ private static KeyValuePair<int, List<string>> TargetSdkNeedsUpdate(int targetSd
15551568
minVersionAndPodNames = versionAndPodList;
15561569
}
15571570
}
1571+
LogToDialog("DEDB targetSdkVersionNum: " + targetSdkVersionNum + " maxOfMinRequiredVersions: " + maxOfMinRequiredVersions);
15581572
// If the target SDK version exceeds the minimum required version return an empty tuple
15591573
// otherwise return the minimum required SDK version and the set of pods that need it.
15601574
return targetSdkVersionNum >= maxOfMinRequiredVersions ? emptyVersionAndPodNames :
@@ -1584,6 +1598,7 @@ public static string GetProjectPath(string relativeTo) {
15841598
/// </summary>
15851599
static string TargetIosSdkVersionString {
15861600
get {
1601+
LogToDialog("DEDB TargetIosSdkVersionString get");
15871602
string name = null;
15881603

15891604
var iosSettingsType = typeof(UnityEditor.PlayerSettings.iOS);
@@ -1598,6 +1613,7 @@ static string TargetIosSdkVersionString {
15981613
}
15991614

16001615
set {
1616+
LogToDialog("DEDB TargetIosSdkVersionString set");
16011617
var iosSettingsType = typeof(UnityEditor.PlayerSettings.iOS);
16021618
// Write the version (Unity 5.5 and above).
16031619
var osVersionProperty =
@@ -1622,6 +1638,7 @@ static string TargetIosSdkVersionString {
16221638
/// </summary>
16231639
static string TargetTvosSdkVersionString {
16241640
get {
1641+
LogToDialog("DEDB TargetTvosSdkVersionString get");
16251642
string name = null;
16261643
var tvosSettingsType = typeof(UnityEditor.PlayerSettings.tvOS);
16271644
var osVersionProperty = tvosSettingsType.GetProperty("targetOSVersionString");
@@ -1635,6 +1652,7 @@ static string TargetTvosSdkVersionString {
16351652
}
16361653

16371654
set {
1655+
LogToDialog("DEDB TargetTvosSdkVersionString set");
16381656
var tvosSettingsType = typeof(UnityEditor.PlayerSettings.tvOS);
16391657
var osVersionProperty = tvosSettingsType.GetProperty("targetOSVersionString");
16401658
osVersionProperty.SetValue(null, value, null);
@@ -2298,7 +2316,6 @@ public static void GenPodfile(BuildTarget buildTarget,
22982316

22992317
using (StreamWriter file = new StreamWriter(podfilePath)) {
23002318
file.WriteLine(GeneratePodfileSourcesSection());
2301-
file.WriteLine("# DellaBitta\n");
23022319
switch (EditorUserBuildSettings.activeBuildTarget) {
23032320
case BuildTarget.iOS:
23042321
file.WriteLine(String.Format("platform :ios, '{0}'\n",

0 commit comments

Comments
 (0)