@@ -7,15 +7,15 @@ import Capacitor
77 */
88@objc ( NativeMarket)
99public class NativeMarket : CAPPlugin {
10-
10+
1111 @objc func openStoreListing( _ call: CAPPluginCall ) {
1212 if let appId = call. getString ( " appId " ) {
1313 let url = " itms-apps://itunes.apple.com/app/ " + appId
1414 let appUrl = URL ( string: url)
15-
15+
1616 DispatchQueue . main. async {
1717 if UIApplication . shared. canOpenURL ( appUrl!) {
18- UIApplication . shared. open ( appUrl!, options: [ : ] ) { ( success ) in
18+ UIApplication . shared. open ( appUrl!, options: [ : ] ) { ( _ ) in
1919 call. resolve ( )
2020 }
2121 }
@@ -24,26 +24,26 @@ public class NativeMarket: CAPPlugin {
2424 call. reject ( " appId is missing " )
2525 }
2626 }
27-
27+
2828 @objc func openDevPage( _ call: CAPPluginCall ) {
2929 call. resolve ( ) // TODO: Implement
3030 }
31-
31+
3232 @objc func openCollection( _ call: CAPPluginCall ) {
3333 call. resolve ( ) // TODO: Implement
3434 }
35-
35+
3636 @objc func openEditorChoicePage( _ call: CAPPluginCall ) {
3737 call. resolve ( ) // TODO: Implement
3838 }
39-
39+
4040 @objc func search( _ call: CAPPluginCall ) {
4141 if let terms = call. getString ( " terms " ) {
4242 let url = " itms-apps://itunes.apple.com/search?term= " + terms
4343 let appUrl = URL ( string: url)
44-
44+
4545 if UIApplication . shared. canOpenURL ( appUrl!) {
46- UIApplication . shared. open ( appUrl!, options: [ : ] ) { ( success ) in
46+ UIApplication . shared. open ( appUrl!, options: [ : ] ) { ( _ ) in
4747 call. resolve ( )
4848 }
4949 }
0 commit comments