From 0666400b60ded93ab300659a751d926bd3064fd0 Mon Sep 17 00:00:00 2001 From: Bruno Muniz Azevedo Filho <bruno@elixxir.io> Date: Wed, 23 Nov 2022 11:54:48 -0300 Subject: [PATCH] all packages now have version --- App/client-ios/Resources/Info.plist | 4 ++ Package.swift | 34 ++++----- Sources/AppCore/RootViewController.swift | 6 +- Sources/AppFeature/AppDelegate.swift | 16 ++--- .../ViewModels/RestoreViewModel.swift | 2 - .../xcshareddata/swiftpm/Package.resolved | 69 ++++++------------- 6 files changed, 49 insertions(+), 82 deletions(-) diff --git a/App/client-ios/Resources/Info.plist b/App/client-ios/Resources/Info.plist index ee4d813d..76cc3739 100644 --- a/App/client-ios/Resources/Info.plist +++ b/App/client-ios/Resources/Info.plist @@ -67,6 +67,10 @@ <key>NSAllowsArbitraryLoadsInWebContent</key> <true/> </dict> + <key>NSBonjourServices</key> + <array> + <string>_pulse._tcp</string> + </array> <key>NSCameraUsageDescription</key> <string>This permission is required for scanning qr codes</string> <key>NSFaceIDUsageDescription</key> diff --git a/Package.swift b/Package.swift index 155b1dd4..ef4dc8f0 100644 --- a/Package.swift +++ b/Package.swift @@ -48,14 +48,6 @@ let package = Package( .library(name: "RequestPermissionFeature", targets: ["RequestPermissionFeature"]), ], dependencies: [ - .package( - url: "https://github.com/Quick/Quick", - .upToNextMajor(from: "3.0.0") - ), - .package( - url: "https://github.com/Quick/Nimble", - .upToNextMajor(from: "9.0.0") - ), .package( url: "https://github.com/SnapKit/SnapKit", .upToNextMajor(from: "5.0.1") @@ -89,17 +81,17 @@ let package = Package( .upToNextMajor(from: "4.2.1") ), .package( - path: "../elixxir-dapps-sdk-swift" - //url: "https://git.xx.network/elixxir/elixxir-dapps-sdk-swift", - //branch: "development" - ), - .package( - path: "../xxm-cloud-providers" + url: "https://git.xx.network/elixxir/elixxir-dapps-sdk-swift", + .upToNextMajor(from: "1.0.0") ), .package( url: "https://git.xx.network/elixxir/client-ios-db.git", .upToNextMajor(from: "1.1.0") ), + .package( + url: "https://git.xx.network/elixxir/xxm-cloud-providers.git", + .upToNextMajor(from: "1.0.2") + ), .package( url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "8.10.0") @@ -108,10 +100,6 @@ let package = Package( url: "https://github.com/pointfreeco/swift-composable-architecture.git", .upToNextMajor(from: "0.43.0") ), - .package( - url: "https://github.com/pointfreeco/swift-custom-dump.git", - .upToNextMajor(from: "0.5.0") - ), .package( url: "https://github.com/swiftcsv/SwiftCSV.git", from: "0.8.0" @@ -250,6 +238,9 @@ let package = Package( ), .target( name: "AppResources", + exclude: [ + "swiftgen.yml", + ], resources: [ .process("Resources") ] @@ -319,9 +310,6 @@ let package = Package( .product(name: "DifferenceKit", package: "DifferenceKit"), .product(name: "SwiftProtobuf", package: "swift-protobuf"), ], - exclude: [ - "swiftgen.yml", - ], resources: [ .process("Resources"), ] @@ -417,6 +405,10 @@ let package = Package( .target(name: "Shared"), .target(name: "Defaults"), .target(name: "AppNavigation"), + .product( + name: "ComposableArchitecture", + package: "swift-composable-architecture" + ), ] ), .target( diff --git a/Sources/AppCore/RootViewController.swift b/Sources/AppCore/RootViewController.swift index 5082447d..2c794a01 100644 --- a/Sources/AppCore/RootViewController.swift +++ b/Sources/AppCore/RootViewController.swift @@ -3,9 +3,9 @@ import Combine import Dependencies public final class RootViewController: UIViewController { - @Dependency(\.app.statusBar) var statusBar: StatusBarStylist - @Dependency(\.app.hudManager) var hudManager: HUDManager - @Dependency(\.app.toastManager) var toastManager: ToastManager + @Dependency(\.app.statusBar) var statusBar + @Dependency(\.app.hudManager) var hudManager + @Dependency(\.app.toastManager) var toastManager var hud: HUDView? var cancellables = Set<AnyCancellable>() diff --git a/Sources/AppFeature/AppDelegate.swift b/Sources/AppFeature/AppDelegate.swift index 3f9cc3ec..4d876946 100644 --- a/Sources/AppFeature/AppDelegate.swift +++ b/Sources/AppFeature/AppDelegate.swift @@ -19,7 +19,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { private var backgroundTimer: Timer? private var backgroundTask: UIBackgroundTaskIdentifier? - @Dependency(\.app.log) var logger + @Dependency(\.app.log) var log @Dependency(\.navigator) var navigator @Dependency(\.app.messenger) var messenger @Dependency(\.pushNotificationRouter) var pushNotificationRouter @@ -31,6 +31,8 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + LoggingSystem.bootstrap(PersistentLogHandler.init) + UNUserNotificationCenter.current().delegate = self let navController = UINavigationController(rootViewController: LaunchController()) @@ -40,9 +42,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { pushNotificationRouter.set(.live(navigationController: navController)) - // MARK: - TO REMOVE FROM PRODUCTION: - LoggingSystem.bootstrap(PersistentLogHandler.init) - +// #if DEBUG NotificationCenter.default.addObserver( forName: UIApplication.userDidTakeScreenshotNotification, object: nil, @@ -57,7 +57,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { ) ) } - // MARK: - +// #endif return true } @@ -122,7 +122,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate { isPushNotificationsEnabled = true } catch { isPushNotificationsEnabled = false - logger(.error(error as NSError)) + log(.error(error as NSError)) print(error.localizedDescription) } } @@ -213,7 +213,7 @@ extension AppDelegate { try messenger.start() } } catch { - logger(.error(error as NSError)) + log(.error(error as NSError)) print(error.localizedDescription) } } @@ -230,7 +230,7 @@ extension AppDelegate { self.backgroundTimer?.invalidate() try self.messenger.stop() } catch { - self.logger(.error(error as NSError)) + self.log(.error(error as NSError)) print(error.localizedDescription) } if let backgroundTask = self.backgroundTask { diff --git a/Sources/RestoreFeature/ViewModels/RestoreViewModel.swift b/Sources/RestoreFeature/ViewModels/RestoreViewModel.swift index 8c0c4f29..1f7d8849 100644 --- a/Sources/RestoreFeature/ViewModels/RestoreViewModel.swift +++ b/Sources/RestoreFeature/ViewModels/RestoreViewModel.swift @@ -146,8 +146,6 @@ final class RestoreViewModel { let multilookup = try self.messenger.lookupContacts(ids: result.restoredContacts) multilookup.contacts.forEach { - print(">>> Found \(try! $0.getFact(.username)?.value)") - try! self.dbManager.getDB().saveContact(.init( id: try $0.getId(), marshaled: $0.data, diff --git a/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved index 97e0e358..09979e25 100644 --- a/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Alamofire/Alamofire.git", "state" : { - "revision" : "8dd85aee02e39dd280c75eef88ffdb86eed4b07b", - "version" : "5.6.2" + "revision" : "78424be314842833c04bc3bef5b72e85fff99204", + "version" : "5.6.4" } }, { @@ -73,30 +73,21 @@ } }, { - "identity" : "cwlcatchexception", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mattgallagher/CwlCatchException.git", - "state" : { - "revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea", - "version" : "2.1.1" - } - }, - { - "identity" : "cwlpreconditiontesting", + "identity" : "differencekit", "kind" : "remoteSourceControl", - "location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", + "location" : "https://github.com/ra1028/DifferenceKit", "state" : { - "revision" : "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688", - "version" : "2.1.0" + "revision" : "073b9671ce2b9b5b96398611427a1f929927e428", + "version" : "1.3.0" } }, { - "identity" : "differencekit", + "identity" : "elixxir-dapps-sdk-swift", "kind" : "remoteSourceControl", - "location" : "https://github.com/ra1028/DifferenceKit", + "location" : "https://git.xx.network/elixxir/elixxir-dapps-sdk-swift", "state" : { - "revision" : "073b9671ce2b9b5b96398611427a1f929927e428", - "version" : "1.3.0" + "revision" : "c433b384a1bd49627bb8e15bc1dc0ae4cb9a8ec1", + "version" : "1.0.0" } }, { @@ -207,15 +198,6 @@ "version" : "1.22.2" } }, - { - "identity" : "libssh2prebuild", - "kind" : "remoteSourceControl", - "location" : "https://github.com/DimaRU/Libssh2Prebuild.git", - "state" : { - "branch" : "1.10.0+OpenSSL_1_1_1o", - "revision" : "a91bcf205a6cbc84144f840c44145656abbd266a" - } - }, { "identity" : "nanopb", "kind" : "remoteSourceControl", @@ -225,15 +207,6 @@ "version" : "2.30908.0" } }, - { - "identity" : "nimble", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Quick/Nimble", - "state" : { - "revision" : "c93f16c25af5770f0d3e6af27c9634640946b068", - "version" : "9.2.1" - } - }, { "identity" : "promises", "kind" : "remoteSourceControl", @@ -252,15 +225,6 @@ "version" : "2.1.3" } }, - { - "identity" : "quick", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Quick/Quick", - "state" : { - "revision" : "8cce6acd38f965f5baa3167b939f86500314022b", - "version" : "3.1.2" - } - }, { "identity" : "retry", "kind" : "remoteSourceControl", @@ -284,8 +248,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/darrarski/Shout.git", "state" : { - "branch" : "master", - "revision" : "df5a662293f0ac15eeb4f2fd3ffd0c07b73d0de0" + "revision" : "cda197619ac395b9a2c3ddd1c6c8fad16114b830", + "version" : "0.5.5" } }, { @@ -395,6 +359,15 @@ "revision" : "16e6409ee82e1b81390bdffbf217b9c08ab32784", "version" : "0.5.0" } + }, + { + "identity" : "xxm-cloud-providers", + "kind" : "remoteSourceControl", + "location" : "https://git.xx.network/elixxir/xxm-cloud-providers.git", + "state" : { + "revision" : "7e2fe50560f4c9c477d549e9c68a4c87d686d44c", + "version" : "1.0.2" + } } ], "version" : 2 -- GitLab