Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dotnet-maui/DittoMauiTasksApp/DittoMauiTasksApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
</PropertyGroup>
Expand All @@ -47,7 +47,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.1" />
<PackageReference Include="Ditto" Version="4.12.3" />
<PackageReference Include="Ditto" Version="5.0.0-experimental-net-kmp-publishing.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
Expand Down
16 changes: 8 additions & 8 deletions dotnet-maui/DittoMauiTasksApp/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ private static Ditto SetupDitto()
AppId = envVars["DITTO_APP_ID"];
PlaygroundToken = envVars["DITTO_PLAYGROUND_TOKEN"];
var authUrl = envVars["DITTO_AUTH_URL"];
var websocketUrl = envVars["DITTO_WEBSOCKET_URL"];

var ditto = new Ditto(DittoIdentity
.OnlinePlayground(
AppId,
PlaygroundToken,
false, // This is required to be set to false to use the correct URLs
authUrl), Path.Combine(FileSystem.Current.AppDataDirectory, "ditto"));
var websocketUrl = envVars["DITTO_WEBSOCKET_URL"];
var config = new DittoConfig(AppId, new DittoConfigConnect.Server(new Uri(authUrl)), "ditto");
var ditto = Ditto.Open(config);
ditto.Auth.ExpirationHandler += async (sender, args) =>
{
await ditto.Auth.LoginAsync(PlaygroundToken, DittoAuthenticationProvider.Development);
};

// Set the transport configuration
// https://docs.ditto.live/sdk/latest/sync/customizing-transport-configurations#enabling-and-disabling-transports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
<uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="35" android:compileSdkVersion="35"/>
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="35" android:compileSdkVersion="35"/>
</manifest>

Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
{
// Register observer, which runs against the local database on this peer
// https://docs.ditto.live/sdk/latest/crud/observing-data-changes#setting-up-store-observers
ditto.Store.RegisterObserver(SelectQuery, async (queryResult) =>

Check warning on line 250 in dotnet-maui/DittoMauiTasksApp/ViewModels/TasksPageviewModel.cs

View workflow job for this annotation

GitHub Actions / Build Android

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 250 in dotnet-maui/DittoMauiTasksApp/ViewModels/TasksPageviewModel.cs

View workflow job for this annotation

GitHub Actions / Build Android

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
try
{
Expand Down Expand Up @@ -329,7 +329,7 @@
{
try
{
ditto.StartSync();
ditto.Sync.Start();

// Register a subscription, which determines what data syncs to this peer
// https://docs.ditto.live/sdk/latest/sync/syncing-data#creating-subscriptions
Expand Down Expand Up @@ -358,7 +358,7 @@

try
{
ditto.StopSync();
ditto.Sync.Stop();
}
catch (Exception e)
{
Expand Down
Loading