Add monero_c build for real ios, more fixes and adjustments
What changed, and why it matters
This commit is mostly a routine iOS build-system update for a Monero wallet app. It swaps a single-architecture iOS framework for a universal 'xcframework' that supports both real iPhones and the simulator, and makes a few small platform-specific cleanups in the Dart code. There is no clear security bug being fixed here; it looks like normal development work to get the iOS app building and running correctly.
Treat as a normal build/compatability commit. If reviewing for security, verify the new MoneroWallet.xcframework binaries were built from a known, audited monero_c source revision and that their hashes match an expected release artifact. Otherwise no immediate security action is required.
Security signals we found
Binary framework replaced (MoneroWallet.framework -> MoneroWallet.xcframework) — supply-chain surface changed but no evidence of malicious content
New iOS cleanup helper deletes tor_cache and tor_state directories on launch — reduces stale Tor state exposure
Background periodic tasks and notification initialization narrowed from Android+iOS to Android only — reduces attack surface on iOS
No explicit security fix, CVE reference, or researcher attribution in commit message or diff
Evidence from the diff
The change replaces the embedded MoneroWallet.framework with a MoneroWallet.xcframework containing separate ios-arm64 and ios-arm64-simulator slices. The Xcode project is updated to link the xcframework instead. In Dart, initialization is made platform-conditional: Linux creates the app directory, Android copies a CA cert and registers background tasks/notifications, and iOS now cleans leftover tor_cache/tor_state directories on startup. Periodic background tasks and a settings toggle are restricted to Android only. No vulnerability pattern (e.g., injection, memory corruption, authentication bypass, insecure storage) is visible in the diff.
Changed components
ios/Frameworks/MoneroWallet.xcframeworkios/Runner.xcodeproj/project.pbxprojlib/main.dartlib/periodic_tasks.dartlib/screens/settings.dartlib/util/dirs.dartInspect captured patch +338 / −134
diff --git a/ios/.gitignore b/ios/.gitignore
index 7a7f987..90cc183 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -26,6 +26,7 @@ Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
+build/
# Exceptions to above rules.
!default.mode1v3
diff --git a/ios/Frameworks/MoneroWallet.framework/Info.plist b/ios/Frameworks/MoneroWallet.framework/Info.plist
deleted file mode 100644
index eff78ac..0000000
--- a/ios/Frameworks/MoneroWallet.framework/Info.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleExecutable</key>
- <string>MoneroWallet</string>
- <key>CFBundleIdentifier</key>
- <string>com.skylight.MoneroWallet</string>
- <key>CFBundleName</key>
- <string>MoneroWallet</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>UIBackgroundModes</key>
- <array>
- <string>fetch</string>
- </array>
-</dict>
-</plist>
\ No newline at end of file
diff --git a/ios/Frameworks/MoneroWallet.framework/MoneroWallet b/ios/Frameworks/MoneroWallet.framework/MoneroWallet
deleted file mode 100755
index 1bad79c..0000000
Binary files a/ios/Frameworks/MoneroWallet.framework/MoneroWallet and /dev/null differ
diff --git a/ios/Frameworks/MoneroWallet.framework/_CodeSignature/CodeResources b/ios/Frameworks/MoneroWallet.framework/_CodeSignature/CodeResources
deleted file mode 100644
index 9bfb14b..0000000
--- a/ios/Frameworks/MoneroWallet.framework/_CodeSignature/CodeResources
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>files</key>
- <dict>
- <key>Info.plist</key>
- <data>
- RrK6+FmVdJY+1UKmkipQpIlKocw=
- </data>
- </dict>
- <key>files2</key>
- <dict/>
- <key>rules</key>
- <dict>
- <key>^.*</key>
- <true/>
- <key>^.*\.lproj/</key>
- <dict>
- <key>optional</key>
- <true/>
- <key>weight</key>
- <real>1000</real>
- </dict>
- <key>^.*\.lproj/locversion.plist$</key>
- <dict>
- <key>omit</key>
- <true/>
- <key>weight</key>
- <real>1100</real>
- </dict>
- <key>^Base\.lproj/</key>
- <dict>
- <key>weight</key>
- <real>1010</real>
- </dict>
- <key>^version.plist$</key>
- <true/>
- </dict>
- <key>rules2</key>
- <dict>
- <key>.*\.dSYM($|/)</key>
- <dict>
- <key>weight</key>
- <real>11</real>
- </dict>
- <key>^(.*/)?\.DS_Store$</key>
- <dict>
- <key>omit</key>
- <true/>
- <key>weight</key>
- <real>2000</real>
- </dict>
- <key>^.*</key>
- <true/>
- <key>^.*\.lproj/</key>
- <dict>
- <key>optional</key>
- <true/>
- <key>weight</key>
- <real>1000</real>
- </dict>
- <key>^.*\.lproj/locversion.plist$</key>
- <dict>
- <key>omit</key>
- <true/>
- <key>weight</key>
- <real>1100</real>
- </dict>
- <key>^Base\.lproj/</key>
- <dict>
- <key>weight</key>
- <real>1010</real>
- </dict>
- <key>^Info\.plist$</key>
- <dict>
- <key>omit</key>
- <true/>
- <key>weight</key>
- <real>20</real>
- </dict>
- <key>^PkgInfo$</key>
- <dict>
- <key>omit</key>
- <true/>
- <key>weight</key>
- <real>20</real>
- </dict>
- <key>^embedded\.provisionprofile$</key>
- <dict>
- <key>weight</key>
- <real>20</real>
- </dict>
- <key>^version\.plist$</key>
- <dict>
- <key>weight</key>
- <real>20</real>
- </dict>
- </dict>
-</dict>
-</plist>
diff --git a/ios/Frameworks/MoneroWallet.xcframework/Info.plist b/ios/Frameworks/MoneroWallet.xcframework/Info.plist
new file mode 100644
index 0000000..e5089c3
--- /dev/null
+++ b/ios/Frameworks/MoneroWallet.xcframework/Info.plist
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>AvailableLibraries</key>
+ <array>
+ <dict>
+ <key>BinaryPath</key>
+ <string>MoneroWallet.framework/MoneroWallet</string>
+ <key>LibraryIdentifier</key>
+ <string>ios-arm64</string>
+ <key>LibraryPath</key>
+ <string>MoneroWallet.framework</string>
+ <key>SupportedArchitectures</key>
+ <array>
+ <string>arm64</string>
+ </array>
+ <key>SupportedPlatform</key>
+ <string>ios</string>
+ </dict>
+ <dict>
+ <key>BinaryPath</key>
+ <string>MoneroWallet.framework/MoneroWallet</string>
+ <key>LibraryIdentifier</key>
+ <string>ios-arm64-simulator</string>
+ <key>LibraryPath</key>
+ <string>MoneroWallet.framework</string>
+ <key>SupportedArchitectures</key>
+ <array>
+ <string>arm64</string>
+ </array>
+ <key>SupportedPlatform</key>
+ <string>ios</string>
+ <key>SupportedPlatformVariant</key>
+ <string>simulator</string>
+ </dict>
+ </array>
+ <key>CFBundlePackageType</key>
+ <string>XFWK</string>
+ <key>XCFrameworkFormatVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/Info.plist b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/Info.plist
new file mode 100644
index 0000000..eff78ac
--- /dev/null
+++ b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>MoneroWallet</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.skylight.MoneroWallet</string>
+ <key>CFBundleName</key>
+ <string>MoneroWallet</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>UIBackgroundModes</key>
+ <array>
+ <string>fetch</string>
+ </array>
+</dict>
+</plist>
\ No newline at end of file
diff --git a/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/MoneroWallet b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/MoneroWallet
new file mode 100755
index 0000000..067f7f6
Binary files /dev/null and b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/MoneroWallet differ
diff --git a/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/_CodeSignature/CodeResources b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/_CodeSignature/CodeResources
new file mode 100644
index 0000000..adc5032
--- /dev/null
+++ b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64-simulator/MoneroWallet.framework/_CodeSignature/CodeResources
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>files</key>
+ <dict>
+ <key>Info.plist</key>
+ <data>
+ 2kVW1k5o5ode9nL7rdgHm2OzSG0=
+ </data>
+ </dict>
+ <key>files2</key>
+ <dict/>
+ <key>rules</key>
+ <dict>
+ <key>^.*</key>
+ <true/>
+ <key>^.*\.lproj/</key>
+ <dict>
+ <key>optional</key>
+ <true/>
+ <key>weight</key>
+ <real>1000</real>
+ </dict>
+ <key>^.*\.lproj/locversion.plist$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>1100</real>
+ </dict>
+ <key>^Base\.lproj/</key>
+ <dict>
+ <key>weight</key>
+ <real>1010</real>
+ </dict>
+ <key>^version.plist$</key>
+ <true/>
+ </dict>
+ <key>rules2</key>
+ <dict>
+ <key>.*\.dSYM($|/)</key>
+ <dict>
+ <key>weight</key>
+ <real>11</real>
+ </dict>
+ <key>^(.*/)?\.DS_Store$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>2000</real>
+ </dict>
+ <key>^.*</key>
+ <true/>
+ <key>^.*\.lproj/</key>
+ <dict>
+ <key>optional</key>
+ <true/>
+ <key>weight</key>
+ <real>1000</real>
+ </dict>
+ <key>^.*\.lproj/locversion.plist$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>1100</real>
+ </dict>
+ <key>^Base\.lproj/</key>
+ <dict>
+ <key>weight</key>
+ <real>1010</real>
+ </dict>
+ <key>^Info\.plist$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ <key>^PkgInfo$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ <key>^embedded\.provisionprofile$</key>
+ <dict>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ <key>^version\.plist$</key>
+ <dict>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/Info.plist b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/Info.plist
new file mode 100644
index 0000000..eff78ac
--- /dev/null
+++ b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>MoneroWallet</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.skylight.MoneroWallet</string>
+ <key>CFBundleName</key>
+ <string>MoneroWallet</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>UIBackgroundModes</key>
+ <array>
+ <string>fetch</string>
+ </array>
+</dict>
+</plist>
\ No newline at end of file
diff --git a/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/MoneroWallet b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/MoneroWallet
new file mode 100755
index 0000000..a691650
Binary files /dev/null and b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/MoneroWallet differ
diff --git a/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/_CodeSignature/CodeResources b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/_CodeSignature/CodeResources
new file mode 100644
index 0000000..adc5032
--- /dev/null
+++ b/ios/Frameworks/MoneroWallet.xcframework/ios-arm64/MoneroWallet.framework/_CodeSignature/CodeResources
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>files</key>
+ <dict>
+ <key>Info.plist</key>
+ <data>
+ 2kVW1k5o5ode9nL7rdgHm2OzSG0=
+ </data>
+ </dict>
+ <key>files2</key>
+ <dict/>
+ <key>rules</key>
+ <dict>
+ <key>^.*</key>
+ <true/>
+ <key>^.*\.lproj/</key>
+ <dict>
+ <key>optional</key>
+ <true/>
+ <key>weight</key>
+ <real>1000</real>
+ </dict>
+ <key>^.*\.lproj/locversion.plist$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>1100</real>
+ </dict>
+ <key>^Base\.lproj/</key>
+ <dict>
+ <key>weight</key>
+ <real>1010</real>
+ </dict>
+ <key>^version.plist$</key>
+ <true/>
+ </dict>
+ <key>rules2</key>
+ <dict>
+ <key>.*\.dSYM($|/)</key>
+ <dict>
+ <key>weight</key>
+ <real>11</real>
+ </dict>
+ <key>^(.*/)?\.DS_Store$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>2000</real>
+ </dict>
+ <key>^.*</key>
+ <true/>
+ <key>^.*\.lproj/</key>
+ <dict>
+ <key>optional</key>
+ <true/>
+ <key>weight</key>
+ <real>1000</real>
+ </dict>
+ <key>^.*\.lproj/locversion.plist$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>1100</real>
+ </dict>
+ <key>^Base\.lproj/</key>
+ <dict>
+ <key>weight</key>
+ <real>1010</real>
+ </dict>
+ <key>^Info\.plist$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ <key>^PkgInfo$</key>
+ <dict>
+ <key>omit</key>
+ <true/>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ <key>^embedded\.provisionprofile$</key>
+ <dict>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ <key>^version\.plist$</key>
+ <dict>
+ <key>weight</key>
+ <real>20</real>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 120a73f..9e8df5a 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -10,8 +10,8 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 6F680F332F0C235200E6DE71 /* MoneroWallet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F680F312F0C231F00E6DE71 /* MoneroWallet.framework */; };
- 6F680F342F0C235200E6DE71 /* MoneroWallet.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6F680F312F0C231F00E6DE71 /* MoneroWallet.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 6FF8B85D2F19277F00206EFD /* MoneroWallet.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FF8B85C2F19277F00206EFD /* MoneroWallet.xcframework */; };
+ 6FF8B85E2F19277F00206EFD /* MoneroWallet.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6FF8B85C2F19277F00206EFD /* MoneroWallet.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
79D78220F5B529E1F8AAEC80 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5801F2E4C06C47481468529E /* Pods_Runner.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
@@ -37,7 +37,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
- 6F680F342F0C235200E6DE71 /* MoneroWallet.framework in Embed Frameworks */,
+ 6FF8B85E2F19277F00206EFD /* MoneroWallet.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -55,7 +55,7 @@
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
5801F2E4C06C47481468529E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5921F250118D12D155280500 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
- 6F680F312F0C231F00E6DE71 /* MoneroWallet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MoneroWallet.framework; sourceTree = "<group>"; };
+ 6FF8B85C2F19277F00206EFD /* MoneroWallet.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MoneroWallet.xcframework; path = Frameworks/MoneroWallet.xcframework; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -84,8 +84,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 6FF8B85D2F19277F00206EFD /* MoneroWallet.xcframework in Frameworks */,
79D78220F5B529E1F8AAEC80 /* Pods_Runner.framework in Frameworks */,
- 6F680F332F0C235200E6DE71 /* MoneroWallet.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -95,6 +95,7 @@
238254620A1D6CBD8992FC9E /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 6FF8B85C2F19277F00206EFD /* MoneroWallet.xcframework */,
6F680F322F0C231F00E6DE71 /* Frameworks */,
5801F2E4C06C47481468529E /* Pods_Runner.framework */,
9A82A71B64192DCF8A518EB3 /* Pods_RunnerTests.framework */,
@@ -113,7 +114,6 @@
6F680F322F0C231F00E6DE71 /* Frameworks */ = {
isa = PBXGroup;
children = (
- 6F680F312F0C231F00E6DE71 /* MoneroWallet.framework */,
);
path = Frameworks;
sourceTree = "<group>";
diff --git a/lib/main.dart b/lib/main.dart
index 09b90ba..c1b3850 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -62,10 +62,21 @@ void main() async {
};
timeago.setLocaleMessages('pt', timeago.PtBrMessages());
- await createAppDir();
- copyCacertToAppDocumentsDir();
- await registerPeriodicTasks();
- await NotificationService().init();
+
+ if (Platform.isLinux) {
+ await createAppDir();
+ }
+
+ if (Platform.isAndroid) {
+ copyCacertToAppDocumentsDir();
+ registerPeriodicTasks();
+ NotificationService().init();
+ }
+
+ if (Platform.isIOS) {
+ await cleanTorDirectoriesOnIOS();
+ }
+
cleanOldLogFiles();
runApp(MyApp());
},
diff --git a/lib/periodic_tasks.dart b/lib/periodic_tasks.dart
index 9993c62..a81ff3e 100644
--- a/lib/periodic_tasks.dart
+++ b/lib/periodic_tasks.dart
@@ -109,8 +109,8 @@ Future<void> registerTxNotifierTaskIfAllowed() async {
// old release from remaining forever.
await Workmanager().cancelByUniqueName(PeriodicTasks.txNotifier);
await Workmanager().registerPeriodicTask(
- "New transactions check",
PeriodicTasks.txNotifier,
+ "New transactions check",
frequency: Duration(minutes: 15),
constraints: Constraints(networkType: NetworkType.connected, requiresBatteryNotLow: true),
);
@@ -121,7 +121,7 @@ Future<void> unregisterPeriodicTasks() async {
}
Future<void> registerPeriodicTasks() async {
- if (!(Platform.isAndroid || Platform.isIOS)) {
+ if (!Platform.isAndroid) {
return;
}
diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart
index 4577792..e54531d 100644
--- a/lib/screens/settings.dart
+++ b/lib/screens/settings.dart
@@ -477,7 +477,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
Switch(value: _appLockEnabled, onChanged: _setAppLockEnabled),
],
),
- if (Platform.isAndroid || Platform.isIOS)
+ if (Platform.isAndroid)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
diff --git a/lib/util/dirs.dart b/lib/util/dirs.dart
index 577c5e2..a82a264 100644
--- a/lib/util/dirs.dart
+++ b/lib/util/dirs.dart
@@ -2,6 +2,34 @@ import 'dart:io';
import 'package:path_provider/path_provider.dart';
+import 'package:skylight_wallet/util/logging.dart';
+
+Future<void> cleanTorDirectoriesOnIOS() async {
+ if (!Platform.isIOS) return;
+
+ final documentsDir = await getApplicationDocumentsDirectory();
+ final torCacheDir = Directory('${documentsDir.path}/tor_cache');
+ final torStateDir = Directory('${documentsDir.path}/tor_state');
+
+ if (await torCacheDir.exists()) {
+ try {
+ await torCacheDir.delete(recursive: true);
+ log(LogLevel.info, 'Deleted tor_cache directory');
+ } catch (e) {
+ log(LogLevel.error, 'Failed to delete tor_cache directory: $e');
+ }
+ }
+
+ if (await torStateDir.exists()) {
+ try {
+ await torStateDir.delete(recursive: true);
+ log(LogLevel.info, 'Deleted tor_state directory');
+ } catch (e) {
+ log(LogLevel.error, 'Failed to delete tor_state directory: $e');
+ }
+ }
+}
+
Future<void> createAppDir() async {
final appDir = await getAppDir();
if (!await appDir.exists()) {
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.