Skip to content

Commit

Permalink
0.25.0 Release (#1019)
Browse files Browse the repository at this point in the history
- Improved TorManager. Now app will not kill the Tor instance during bootstrap
- Improved the way how the Tor state requests are handled
- Set NextNet as a default network
- Removed access to the StageNet network
- Deep links will now survive the startup process
- Fixed reported crash. The App will now replace the window with SplashView instead of the SwiftEntryKit window with the window containing HomeView.
- Removed obsolete functionality. The App will no longer try to start the wallet without the passphrase. Reason: FFI library no longer is able to create a wallet without valid passphrase.
- Set min iOS version to iOS 15
- Removed the majority of the iOS 15 obsolete warnings.
- Updated code to be ready for Swift 6.0
- Added additional logging
- Updated FFI Lib to v1.0.0-rc.3
- Updated Tor framework to 408.10.1
- Updated IPtProxy framework to 3.3.0
- Removed unused OpenSSL framework. This framework is used only internally by the Tor framework.
- Updated SwiftLint config
- Fixed SwiftLint warnings
- Removed dead code
- Updated README.md file
- Updated fastlane config
  • Loading branch information
TruszczynskiA authored Jan 30, 2024
1 parent 185e437 commit d320675
Show file tree
Hide file tree
Showing 49 changed files with 341 additions and 482 deletions.
8 changes: 3 additions & 5 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type_body_length: # Target: 250/350
- 400

function_body_length: # Target: 50/100
- 105
- 120
- 90
- 100

file_length: # Target: 400/1000
- 675
Expand All @@ -24,9 +24,7 @@ excluded:
- Pods
- UnitTests
# Files scheduled for refactor
- ./**/TariSettings.swift
- ./**/SettingsViewController.swift
- ./**/AddAmountViewController.swift
- ./**/EmojiIdView.swift
- ./**/AnimatedBalanceLabel.swift
- ./**/TxsListViewController.swift
- ./**/AnimatedBalanceLabel.swift
26 changes: 10 additions & 16 deletions MobileWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
3730E15124C884D500827DFA /* MenuTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3730E15024C884D500827DFA /* MenuTabBarController.swift */; };
373CCDBD2490B66E00D0A2C9 /* CircularProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373CCDBC2490B66E00D0A2C9 /* CircularProgressView.swift */; };
373CCDC52490F3B600D0A2C9 /* FileManager+SecureCopy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373CCDC42490F3B600D0A2C9 /* FileManager+SecureCopy.swift */; };
37547D522460165500EB59CC /* UIApplication+KeyWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37547D512460165500EB59CC /* UIApplication+KeyWindow.swift */; };
37547D522460165500EB59CC /* UIApplication+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37547D512460165500EB59CC /* UIApplication+Utils.swift */; };
37547D5624601BF600EB59CC /* UIView+GlobalFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37547D5524601BF600EB59CC /* UIView+GlobalFrame.swift */; };
375AFDCF2475387700C62CA1 /* WebBrowserViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 375AFDCE2475387700C62CA1 /* WebBrowserViewController.swift */; };
375DB1E0246E90D100B2BEF4 /* NavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 375DB1DF246E90D100B2BEF4 /* NavigationBar.swift */; };
Expand Down Expand Up @@ -302,7 +302,6 @@
3AE138CB28044B1E00443D34 /* CustomDeeplinkPopUpContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE138CA28044B1E00443D34 /* CustomDeeplinkPopUpContentView.swift */; };
3AE138CF2804A88500443D34 /* ToastPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE138CE2804A88500443D34 /* ToastPresenter.swift */; };
3AE138D12804A8B300443D34 /* SuccessToast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE138D02804A8B300443D34 /* SuccessToast.swift */; };
3AE138D32804AB4100443D34 /* UIApplication+Keyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE138D22804AB4100443D34 /* UIApplication+Keyboard.swift */; };
3AE138D52804ACE100443D34 /* WebBrowserPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE138D42804ACE100443D34 /* WebBrowserPresenter.swift */; };
3AE1D58027E0A894001A46C4 /* TransactionDetailsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE1D57F27E0A894001A46C4 /* TransactionDetailsModel.swift */; };
3AE1D58227E0A8C8001A46C4 /* TransactionDetailsConstructor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE1D58127E0A8C8001A46C4 /* TransactionDetailsConstructor.swift */; };
Expand Down Expand Up @@ -339,7 +338,6 @@
491AB8A023F3FF4400372189 /* AddAmountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491AB89F23F3FF4400372189 /* AddAmountViewController.swift */; };
49996E1923F164BA002B6696 /* AnimatedBalanceLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49996E1823F164BA002B6696 /* AnimatedBalanceLabel.swift */; };
4C2C95C7237962CB005058AB /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C2C95C6237962CB005058AB /* libc++.tbd */; };
4C363B762574F15E00D99868 /* OpenSSL.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C363B372574EFE500D99868 /* OpenSSL.xcframework */; };
4CD20A362407967B007B64D8 /* TransportConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD20A352407967B007B64D8 /* TransportConfig.swift */; };
4CDEC323273A5E3600999DCB /* Balance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CDEC322273A5E3500999DCB /* Balance.swift */; };
515299BD56554003EF2BD2FD /* Pods_MobileWallet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A04F26CF08C60019DAC177 /* Pods_MobileWallet.framework */; };
Expand Down Expand Up @@ -637,7 +635,7 @@
3730E15024C884D500827DFA /* MenuTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuTabBarController.swift; sourceTree = "<group>"; };
373CCDBC2490B66E00D0A2C9 /* CircularProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircularProgressView.swift; sourceTree = "<group>"; };
373CCDC42490F3B600D0A2C9 /* FileManager+SecureCopy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileManager+SecureCopy.swift"; sourceTree = "<group>"; };
37547D512460165500EB59CC /* UIApplication+KeyWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+KeyWindow.swift"; sourceTree = "<group>"; };
37547D512460165500EB59CC /* UIApplication+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Utils.swift"; sourceTree = "<group>"; };
37547D5524601BF600EB59CC /* UIView+GlobalFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+GlobalFrame.swift"; sourceTree = "<group>"; };
375AFDCE2475387700C62CA1 /* WebBrowserViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebBrowserViewController.swift; sourceTree = "<group>"; };
375DB1DF246E90D100B2BEF4 /* NavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationBar.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -883,7 +881,6 @@
3AE138CA28044B1E00443D34 /* CustomDeeplinkPopUpContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomDeeplinkPopUpContentView.swift; sourceTree = "<group>"; };
3AE138CE2804A88500443D34 /* ToastPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastPresenter.swift; sourceTree = "<group>"; };
3AE138D02804A8B300443D34 /* SuccessToast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuccessToast.swift; sourceTree = "<group>"; };
3AE138D22804AB4100443D34 /* UIApplication+Keyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Keyboard.swift"; sourceTree = "<group>"; };
3AE138D42804ACE100443D34 /* WebBrowserPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebBrowserPresenter.swift; sourceTree = "<group>"; };
3AE1D57F27E0A894001A46C4 /* TransactionDetailsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionDetailsModel.swift; sourceTree = "<group>"; };
3AE1D58127E0A8C8001A46C4 /* TransactionDetailsConstructor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionDetailsConstructor.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -921,7 +918,6 @@
49996E1823F164BA002B6696 /* AnimatedBalanceLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedBalanceLabel.swift; sourceTree = "<group>"; };
4C2C95B8237959B3005058AB /* MobileWallet-bridging-header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MobileWallet-bridging-header.h"; sourceTree = "<group>"; };
4C2C95C6237962CB005058AB /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
4C363B372574EFE500D99868 /* OpenSSL.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = OpenSSL.xcframework; path = "Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework"; sourceTree = "<group>"; };
4CD20A352407967B007B64D8 /* TransportConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransportConfig.swift; sourceTree = "<group>"; };
4CDEC322273A5E3500999DCB /* Balance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Balance.swift; sourceTree = "<group>"; };
540CB6ED29C1D519003FACEF /* SettingsProfileCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsProfileCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1147,7 +1143,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4C363B762574F15E00D99868 /* OpenSSL.xcframework in Frameworks */,
371189732488FF11004D0CE3 /* CloudKit.framework in Frameworks */,
00DC2E22238554FD00036DDC /* libsqlite3.tbd in Frameworks */,
0070A7BC2379847100C25E1C /* LocalAuthentication.framework in Frameworks */,
Expand Down Expand Up @@ -1217,8 +1212,7 @@
37CB9F892451A2AD00C495F2 /* String+Emoji.swift */,
54621F8A29E00E78000E9659 /* String+Tools.swift */,
549565DF2AA1D21E0092A10F /* Task+Utils.swift */,
3AE138D22804AB4100443D34 /* UIApplication+Keyboard.swift */,
37547D512460165500EB59CC /* UIApplication+KeyWindow.swift */,
37547D512460165500EB59CC /* UIApplication+Utils.swift */,
3A8826C427F1B8320037F779 /* UICollectionViewDiffableDataSource+Animation.swift */,
3AECD493284F46FD00D81C80 /* UIColor+Utils.swift */,
37E0B007249B700F00DFE315 /* UIFont+FontStyle.swift */,
Expand Down Expand Up @@ -1504,7 +1498,6 @@
isa = PBXGroup;
children = (
542725652AFB7E1000FA4973 /* libminotari_wallet_ffi_ios.xcframework */,
4C363B372574EFE500D99868 /* OpenSSL.xcframework */,
371189722488FF11004D0CE3 /* CloudKit.framework */,
0070A7BB2379847100C25E1C /* LocalAuthentication.framework */,
00C520AE2469716E0077BF7F /* libc++.1.tbd */,
Expand Down Expand Up @@ -3558,7 +3551,6 @@
3AF97E6727CF769A00FF6A3F /* BaseNodesAddDeeplink.swift in Sources */,
3A8005CF28EAF9380022A38A /* BaseNodeConnectivityStatus.swift in Sources */,
5444C80F29F1B02B00BF3875 /* BluetoothSettingsHeaderView.swift in Sources */,
3AE138D32804AB4100443D34 /* UIApplication+Keyboard.swift in Sources */,
3A115B1827EC4B14001259E5 /* TransactionDetailsSeparatorView.swift in Sources */,
549E1A012A5EB7B00063022C /* QRCodeScannerBoxView.swift in Sources */,
3A8473CC28EC562E0015E63A /* TariConnectionService.swift in Sources */,
Expand Down Expand Up @@ -3676,7 +3668,7 @@
3A530BCF290AEDB600C423C7 /* BackupServicable.swift in Sources */,
3AF79D602727206200613C24 /* ContactSearchView.swift in Sources */,
3AECD490284F3BB300D81C80 /* BaseNavigationContentView.swift in Sources */,
37547D522460165500EB59CC /* UIApplication+KeyWindow.swift in Sources */,
37547D522460165500EB59CC /* UIApplication+Utils.swift in Sources */,
3A87C3B727A9409E007A553F /* WalletError.swift in Sources */,
00A994332396434B007D9990 /* PulseButton.swift in Sources */,
5460258629A74D8200CF5764 /* ContactDetailsModel.swift in Sources */,
Expand Down Expand Up @@ -3922,7 +3914,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -3979,7 +3971,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "-v";
Expand Down Expand Up @@ -4007,12 +3999,13 @@
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = MobileWallet/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 0.24.0;
MARKETING_VERSION = 0.25.0;
PRODUCT_BUNDLE_IDENTIFIER = com.tari.wallet;
PRODUCT_NAME = "Tari Aurora";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -4039,12 +4032,13 @@
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = MobileWallet/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 0.24.0;
MARKETING_VERSION = 0.25.0;
PRODUCT_BUNDLE_IDENTIFIER = com.tari.wallet;
PRODUCT_NAME = "Tari Aurora";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
15 changes: 9 additions & 6 deletions MobileWallet/Backup/Dropbox/DropboxBackupService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,21 @@ final class DropboxBackupService {
startBackgroundTask()

Task { [weak self] in
guard let self else { return }
do {
_ = try dropboxClient
try await uploadFile(password: password)
self?.syncDate = Date()
self?.syncStatus = .enabled
self.syncDate = Date()
self.syncStatus = .enabled
} catch InternalError.noClient, InternalError.unableToAuthenticateUser {
self?.signIn(task: .upload)
self.signIn(task: .upload)
} catch let error as DropboxBackupError {
self?.syncStatus = .failed(error: error)
self.syncStatus = .failed(error: error)
} catch {
self?.syncStatus = .failed(error: DropboxBackupError.unknown)
self.syncStatus = .failed(error: DropboxBackupError.unknown)
}

self?.endBackgroundTask()
self.endBackgroundTask()
}
}

Expand Down Expand Up @@ -415,6 +416,8 @@ final class DropboxBackupService {

return try await withCheckedThrowingContinuation { [weak self] continuation in

guard let self else { return }

let group = DispatchGroup()

var encryptedFileTimestamp: Date?
Expand Down
4 changes: 2 additions & 2 deletions MobileWallet/Common/AppRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ enum AppRouter {

private static func transition(to controller: UIViewController, type: TransitionType) {

guard let window = UIApplication.shared.windows.first else { return }
guard let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene, let window = scene.windows.first else { return }

guard type != .none else {
window.rootViewController = controller
Expand Down Expand Up @@ -132,7 +132,7 @@ enum AppRouter {

static func presentOnTop(controller: UIViewController) {

guard var topViewController = UIApplication.shared.keyWindow?.rootViewController else { return }
guard var topViewController = UIApplication.shared.topController else { return }

while let presentedViewController = topViewController.presentedViewController {
topViewController = presentedViewController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ enum DeepLinkDefaultActionsHandler {

static func handle(baseNodesAddDeeplink: BaseNodesAddDeeplink) throws {
Task { @MainActor in
try await Task.sleep(nanoseconds: 500000000) // FIXME: Replace it with App state handler
self.showAddBaseNodePopUp(name: baseNodesAddDeeplink.name, peer: baseNodesAddDeeplink.peer)
}
}
Expand Down Expand Up @@ -116,7 +115,6 @@ enum DeepLinkDefaultActionsHandler {
}

@MainActor private static func showAddContactsPopUp(contacts: [ContactData]) async throws {
try await Task.sleep(nanoseconds: 500000000) // FIXME: Replace it with App state handler
guard await showAddContactsDialog(contacts: contacts) else { return }
try add(contacts: contacts)
}
Expand Down
16 changes: 16 additions & 0 deletions MobileWallet/Common/Deep Links/DeeplinkHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import UIKit

enum DeeplinkHandler {

private static var storedDeeplink: DeepLinkable?

static func deeplink(rawDeeplink: String) throws -> DeepLinkable? {

guard let deeplink = URL(string: rawDeeplink) else { return nil }
Expand Down Expand Up @@ -74,6 +76,11 @@ enum DeeplinkHandler {
actionType = .direct
}

if actionType == .popUp, !(Tari.shared.isWalletConnected && AppRouter.isNavigationReady) {
retryHandle(deeplink: deeplink)
return
}

switch deeplink.type {
case .baseNodesAdd:
try handle(baseNodesAddDeeplink: deeplink)
Expand Down Expand Up @@ -105,4 +112,13 @@ enum DeeplinkHandler {
guard let deeplink = transactionSendDeepLink as? TransactionsSendDeeplink else { return }
DeepLinkDefaultActionsHandler.handle(transactionSendDeepLink: deeplink)
}

private static func retryHandle(deeplink: DeepLinkable) {
storedDeeplink = deeplink
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
guard let storedDeeplink else { return }
self.storedDeeplink = nil
try? handle(deeplink: storedDeeplink, showDefaultDialogIfNeeded: true)
}
}
}
4 changes: 2 additions & 2 deletions MobileWallet/Common/Extensions/LAContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ extension LAContext {
onSuccess()
}))

if let topController = UIApplication.shared.topController() {
if let topController = UIApplication.shared.topController {
topController.present(alert, animated: true, completion: nil)
}
}
Expand All @@ -136,7 +136,7 @@ extension LAContext {
}
}))

if let topController = UIApplication.shared.topController() {
if let topController = UIApplication.shared.topController {
topController.present(alert, animated: true, completion: nil)
}
}
Expand Down
47 changes: 0 additions & 47 deletions MobileWallet/Common/Extensions/UIApplication+Keyboard.swift

This file was deleted.

Loading

0 comments on commit d320675

Please sign in to comment.