-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1281 from WalletConnect/just-works-fix
Just works
- Loading branch information
Showing
99 changed files
with
1,498 additions
and
982 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
.swiftpm/xcode/xcshareddata/xcschemes/WalletConnectSignTests.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1510" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "WalletConnectSignTests" | ||
BuildableName = "WalletConnectSignTests" | ||
BlueprintName = "WalletConnectSignTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
53 changes: 53 additions & 0 deletions
53
.swiftpm/xcode/xcshareddata/xcschemes/WalletConnectUtilsTests.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1520" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "WalletConnectUtilsTests" | ||
BuildableName = "WalletConnectUtilsTests" | ||
BlueprintName = "WalletConnectUtilsTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ import WalletConnectUtils | |
|
||
final class Application { | ||
var uri: WalletConnectURI? | ||
var requestSent = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import UIKit | ||
|
||
class ActivityIndicatorManager { | ||
static let shared = ActivityIndicatorManager() | ||
private var activityIndicator: UIActivityIndicatorView? | ||
private let serialQueue = DispatchQueue(label: "com.yourapp.activityIndicatorManager") | ||
|
||
private init() {} | ||
|
||
func start() { | ||
serialQueue.async { | ||
self.stopInternal() | ||
|
||
DispatchQueue.main.async { | ||
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, | ||
let window = windowScene.windows.first(where: { $0.isKeyWindow }) else { return } | ||
|
||
let activityIndicator = UIActivityIndicatorView(style: .large) | ||
activityIndicator.center = window.center | ||
activityIndicator.color = .white | ||
activityIndicator.startAnimating() | ||
window.addSubview(activityIndicator) | ||
|
||
self.activityIndicator = activityIndicator | ||
} | ||
} | ||
} | ||
|
||
func stop() { | ||
serialQueue.async { | ||
self.stopInternal() | ||
} | ||
} | ||
|
||
private func stopInternal() { | ||
DispatchQueue.main.sync { | ||
self.activityIndicator?.stopAnimating() | ||
self.activityIndicator?.removeFromSuperview() | ||
self.activityIndicator = nil | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import Foundation | ||
import SwiftMessages | ||
import UIKit | ||
|
||
struct AlertPresenter { | ||
enum MessageType { | ||
case warning | ||
case error | ||
case info | ||
case success | ||
} | ||
|
||
static func present(message: String, type: AlertPresenter.MessageType) { | ||
DispatchQueue.main.async { | ||
let view = MessageView.viewFromNib(layout: .cardView) | ||
switch type { | ||
case .warning: | ||
view.configureTheme(.warning, iconStyle: .subtle) | ||
case .error: | ||
view.configureTheme(.error, iconStyle: .subtle) | ||
case .info: | ||
view.configureTheme(.info, iconStyle: .subtle) | ||
case .success: | ||
view.configureTheme(.success, iconStyle: .subtle) | ||
} | ||
view.button?.isHidden = true | ||
view.layoutMarginAdditions = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20) | ||
view.configureContent(title: "", body: message) | ||
var config = SwiftMessages.Config() | ||
config.presentationStyle = .top | ||
config.duration = .seconds(seconds: 1.5) | ||
SwiftMessages.show(config: config, view: view) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.