diff --git a/lib/models/isar/stack_theme.dart b/lib/models/isar/stack_theme.dart index c11f8144b..557090584 100644 --- a/lib/models/isar/stack_theme.dart +++ b/lib/models/isar/stack_theme.dart @@ -9,6 +9,7 @@ */ import 'dart:convert'; +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:isar/isar.dart'; @@ -2455,9 +2456,20 @@ class ThemeAssetsV3 implements IThemeAssets { static String prependIfNeeded(String relativePath) { final path = StackFileSystem.themesDir!.path; + if (relativePath.startsWith(path)) { return relativePath; } else { + if (Platform.isIOS) { + const pattern = "/var/mobile/Containers/Data/Application/"; + if (relativePath.startsWith(pattern)) { + final parts = relativePath.split("/Library/themes/"); + if (parts.isNotEmpty) { + return "$path/${parts.last}"; + } + } + } + return "$path/$relativePath"; } }