Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2023-10-20 14:58:32 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d06cd6049b0f00cff513c7e72d58d0a9f63ac295
d06cd604
1 parent
72261d64
fix open websiteUrl at MapVC
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.swift
View file @
d06cd60
...
...
@@ -209,9 +209,13 @@ import MapKit
alert
.
addAction
(
UIAlertAction
(
title
:
"Δες το eshop"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
if
(
self
.
merchantsArray
.
count
>
0
)
{
for
item
in
self
.
merchantsArray
{
if
(
self
.
couponSet
!=
nil
)
{
if
let
merchantUuid
:
String
=
self
.
couponSet
?
.
merchant_uuid
{
for
item
in
swiftApi
()
.
getMerchantList
()
{
if
(
item
.
_uuid
==
merchantUuid
)
{
let
eshopWebsite
=
item
.
_website
if
(
eshopWebsite
!=
""
)
{
guard
let
websiteUrl
=
URL
(
string
:
eshopWebsite
)
else
{
print
(
"Error creating URL"
)
...
...
@@ -229,6 +233,29 @@ import MapKit
}
}
}
}
}
// if (self.merchantsArray.count > 0) {
// for item in self.merchantsArray {
// let eshopWebsite = item._website
//
// if (eshopWebsite != "") {
// guard let websiteUrl = URL(string: eshopWebsite) else {
// print("Error creating URL")
// return
// }
//
// // check if link can be opened.
// guard UIApplication.shared.canOpenURL(websiteUrl) else {
// return
// }
//
// swiftApi().logTrackersEvent("click", "SeeShopWebsite")
// UIApplication.shared.open(websiteUrl, options: [:], completionHandler: nil)
// break;
// }
// }
// }
case
.
cancel
:
print
(
"cancel"
)
...
...
Please
register
or
login
to post a comment