Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Nov 13, 2024
1 parent 0bfda06 commit 00ad894
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ActionSheetPlugin: CAPPlugin, CAPBridgedPlugin {
} else if style == "CANCEL" {
buttonStyle = .cancel
}
let action = UIAlertAction(title: title, style: buttonStyle, handler: { (_) -> Void in
let action = UIAlertAction(title: title, style: buttonStyle, handler: { (_) in
call.resolve([
"index": index
])
Expand Down
10 changes: 5 additions & 5 deletions dialog/ios/Sources/DialogPlugin/DialogPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class DialogPlugin: CAPPlugin, CAPBridgedPlugin {

DispatchQueue.main.async { [weak self] in
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction(title: buttonTitle, style: UIAlertAction.Style.default, handler: { (_) -> Void in
alert.addAction(UIAlertAction(title: buttonTitle, style: UIAlertAction.Style.default, handler: { (_) in
call.resolve()
}))
self?.bridge?.viewController?.present(alert, animated: true, completion: nil)
Expand All @@ -42,12 +42,12 @@ public class DialogPlugin: CAPPlugin, CAPBridgedPlugin {

DispatchQueue.main.async { [weak self] in
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction(title: cancelButtonTitle, style: UIAlertAction.Style.default, handler: { (_) -> Void in
alert.addAction(UIAlertAction(title: cancelButtonTitle, style: UIAlertAction.Style.default, handler: { (_) in
call.resolve([
"value": false
])
}))
alert.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertAction.Style.default, handler: { (_) -> Void in
alert.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertAction.Style.default, handler: { (_) in
call.resolve([
"value": true
])
Expand Down Expand Up @@ -75,13 +75,13 @@ public class DialogPlugin: CAPPlugin, CAPBridgedPlugin {
textField.text = inputText
}

alert.addAction(UIAlertAction(title: cancelButtonTitle, style: UIAlertAction.Style.default, handler: { (_) -> Void in
alert.addAction(UIAlertAction(title: cancelButtonTitle, style: UIAlertAction.Style.default, handler: { (_) in
call.resolve([
"value": "",
"cancelled": true
])
}))
alert.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertAction.Style.default, handler: { (_) -> Void in
alert.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertAction.Style.default, handler: { (_) in
let textField = alert.textFields?[0]
call.resolve([
"value": textField?.text ?? "",
Expand Down
2 changes: 1 addition & 1 deletion network/ios/Sources/NetworkPlugin/Reachability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public extension Reachability {
_ = unmanagedWeakifiedReachability.retain()
return UnsafeRawPointer(unmanagedWeakifiedReachability.toOpaque())
},
release: { (info: UnsafeRawPointer) -> Void in
release: { (info: UnsafeRawPointer) in
let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info)
unmanagedWeakifiedReachability.release()
},
Expand Down

0 comments on commit 00ad894

Please sign in to comment.