Skip to content

Commit 921b8c3

Browse files
committed
Comment out CarPlay files till apple approval
1 parent 8e7d749 commit 921b8c3

File tree

8 files changed

+97
-3
lines changed

8 files changed

+97
-3
lines changed

.tools/Bible.Alarm.AudioLinksHarvestor/Program.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
using Microsoft.Extensions.DependencyInjection;
2626
using Microsoft.Extensions.Logging;
2727
using Serilog;
28+
using Serilog.Events;
2829
using DirectoryHelper = Bible.Alarm.AudioLinksHarvestor.Utility.DirectoryHelper;
2930
using ILogger = Serilog.ILogger;
3031

@@ -39,15 +40,25 @@ public class Program
3940

4041
public static async Task<int> Main(string[] args)
4142
{
43+
// Check for verbose logging flag
44+
bool verboseLogging = args.Contains("--verbose", StringComparer.OrdinalIgnoreCase) ||
45+
args.Contains("-v", StringComparer.OrdinalIgnoreCase);
46+
47+
// Set minimum log level: Warning by default (for cleaner CI/CD logs), Information if verbose
48+
var minimumLevel = verboseLogging ? LogEventLevel.Information : LogEventLevel.Warning;
49+
4250
Log.Logger = new LoggerConfiguration()
43-
.MinimumLevel.Information()
51+
.MinimumLevel.Is(minimumLevel)
52+
// Override to always show Information level for important messages
53+
.MinimumLevel.Override("Bible.Alarm.AudioLinksHarvestor.Program", LogEventLevel.Information)
4454
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}")
4555
.CreateLogger();
4656

4757
var services = new ServiceCollection();
4858
services.AddLogging(builder =>
4959
{
5060
builder.AddSerilog(Log.Logger);
61+
// Entity Framework Core logs only show warnings and errors
5162
builder.AddFilter("Microsoft.EntityFrameworkCore", LogLevel.Warning);
5263
});
5364
services.AddSingleton(_ => Log.Logger);

.tools/Bible.Alarm.VersionPatcher.Tests/Services/TestPathService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ public TestPathService()
1818
public string GetIosInfoPlistPath() => Path.Combine(testResourcesPath, "Info.plist");
1919

2020
public string GetWindowsManifestPath() => Path.Combine(testResourcesPath, "Package.appxmanifest");
21+
22+
public string GetCsprojPath() => Path.Combine(testResourcesPath, "Bible.Alarm.csproj");
2123
}

.tools/_index/index.zip

0 Bytes
Binary file not shown.

src/Bible.Alarm/Platforms/iOS/Effects/CarPlayScheduleListEffect.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/* CARPLAY MEDIA LISTING DISABLED - Requires Apple MFi approval
2+
* Commented out to avoid App Store rejection for CarPlay Audio entitlement.
3+
* This effect refreshes the CarPlay schedule list when schedules change.
4+
*
5+
* To re-enable after Apple approval, uncomment this file.
6+
*/
7+
8+
/*
19
#nullable enable
210
using Bible.Alarm.Platforms.iOS.Services.CarPlay;
311
using Bible.Alarm.Stores.Actions.Schedule;
@@ -86,3 +94,12 @@ private void RefreshCarPlayScheduleList(string triggerAction)
8694
}
8795
}
8896
}
97+
*/
98+
99+
// Placeholder class to prevent compilation errors
100+
namespace Bible.Alarm.Platforms.iOS.Effects;
101+
102+
public class CarPlayScheduleListEffect
103+
{
104+
// Empty class - CarPlay listing disabled
105+
}

src/Bible.Alarm/Platforms/iOS/Services/CarPlay/CarPlayPlaybackHandler.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/* CARPLAY MEDIA LISTING DISABLED - Requires Apple MFi approval
2+
* Commented out to avoid App Store rejection for CarPlay Audio entitlement.
3+
* This handler processes playback actions when schedule items are clicked from the CarPlay list.
4+
*
5+
* To re-enable after Apple approval, uncomment this file.
6+
*/
7+
8+
/*
19
#nullable enable
210
using Bible.Alarm.Common;
311
using Bible.Alarm.Services.Media.Interfaces;
@@ -53,3 +61,15 @@ private static void StartPlaybackAsync(int scheduleId)
5361
});
5462
}
5563
}
64+
*/
65+
66+
// Placeholder class to prevent compilation errors
67+
namespace Bible.Alarm.Platforms.iOS.Services.CarPlay;
68+
69+
public sealed class CarPlayPlaybackHandler
70+
{
71+
public static void HandleScheduleItemClicked(int scheduleId)
72+
{
73+
// CarPlay listing disabled - no action
74+
}
75+
}

src/Bible.Alarm/Platforms/iOS/Services/CarPlay/CarPlaySceneDelegate.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/* CARPLAY MEDIA LISTING DISABLED - Requires Apple MFi approval
2+
* Commented out to avoid App Store rejection for CarPlay Audio entitlement.
3+
* Now Playing (current playback display) remains active via iOSNowPlayingInfoManager.
4+
*
5+
* To re-enable after Apple approval:
6+
* 1. Uncomment this entire file
7+
* 2. Add com.apple.developer.carplay-audio entitlement in Entitlements.plist
8+
* 3. Uncomment CarPlayScheduleListEffect.cs
9+
* 4. Uncomment CarPlayScheduleHelper.cs
10+
* 5. Uncomment CarPlayPlaybackHandler.cs
11+
*/
12+
13+
/*
114
#nullable enable
215
using CarPlay;
316
using Foundation;
@@ -232,3 +245,15 @@ public void RefreshScheduleList()
232245
}
233246
}
234247
}
248+
*/
249+
250+
// Placeholder class to prevent compilation errors
251+
#nullable enable
252+
namespace Bible.Alarm.Platforms.iOS.Services.CarPlay;
253+
254+
public class CarPlaySceneDelegate
255+
{
256+
public static bool IsCarPlayConnected { get; private set; } = false;
257+
public static CarPlaySceneDelegate? Current { get; private set; } = null;
258+
public void RefreshScheduleList() { }
259+
}

src/Bible.Alarm/Platforms/iOS/Services/CarPlay/CarPlayScheduleHelper.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/* CARPLAY MEDIA LISTING DISABLED - Requires Apple MFi approval
2+
* Commented out to avoid App Store rejection for CarPlay Audio entitlement.
3+
* This helper provides methods for loading schedules and formatting display information.
4+
*
5+
* To re-enable after Apple approval, uncomment this file.
6+
*/
7+
8+
/*
19
#nullable enable
210
using Bible.Alarm.Common;
311
using Bible.Alarm.Shared.Helpers;
@@ -155,3 +163,14 @@ public static string BuildScheduleSubtitle(ScheduleStateItem scheduleItem)
155163
return $"{statusText} • {timeText}";
156164
}
157165
}
166+
*/
167+
168+
// Placeholder class to prevent compilation errors
169+
namespace Bible.Alarm.Platforms.iOS.Services.CarPlay;
170+
171+
public static class CarPlayScheduleHelper
172+
{
173+
public static List<object> LoadScheduleStateItemsFromState() => new();
174+
public static string BuildScheduleTitle(object scheduleItem) => string.Empty;
175+
public static string BuildScheduleSubtitle(object scheduleItem) => string.Empty;
176+
}

src/Bible.Alarm/Services/Media/PreparePlaybackService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public sealed class PreparePlaybackService(
5555
// Calculate total expected bytes
5656
var totalBytesExpected = trackSizes.Values
5757
.Where(v => v.HasValue)
58-
.Sum(v => v.Value);
58+
.Sum(v => v!.Value);
5959

6060
// Phase 2: Download tracks in parallel with concurrency limit
6161
var preparedTracks = new AudioPlayerTrack?[totalTracks]; // Use array to maintain order
@@ -116,7 +116,7 @@ void DownloadProgressCallback(long bytesDownloaded, long? totalBytes)
116116
// Set final size for this track (use actual size if known, otherwise keep current progress)
117117
if (trackSizes[index].HasValue)
118118
{
119-
trackProgress[index] = trackSizes[index].Value;
119+
trackProgress[index] = trackSizes[index]!.Value;
120120
}
121121

122122
var totalBytesDownloaded = trackProgress.Values.Sum();

0 commit comments

Comments
 (0)