Files
turso/bindings/dotnet/samples/MobilePackageConsumer/iOS/AppDelegate.cs
awakecoding b6fa585040 bindings/dotnet: validate packaged consumers
Exercise the completed replica API through packed NativeAOT, Android, and iOS consumers so package layout, native asset resolution, trimming, and sync exports are checked before NuGet publication.

Keep the published turso_sdk_kit filenames and package version unchanged while allowing samples to select locally packed package versions.

Tests: dotnet format whitespace; local NuGet pack inspection; win-x64 NativeAOT packaged consumer run
2026-09-08 17:26:18 -04:00

20 lines
613 B
C#

using Foundation;
using Turso.Samples;
using UIKit;
namespace Turso.PackageConsumer.iOS;
[Register("AppDelegate")]
public sealed class AppDelegate : UIApplicationDelegate
{
public override bool FinishedLaunching(UIApplication application, NSDictionary? launchOptions)
{
var directory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var result = ReplicaPackageSmoke.Run(Path.Combine(directory, "replica.db"));
if (result.Rows != 3)
throw new InvalidOperationException($"Expected 3 rows, got {result.Rows}.");
return true;
}
}