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
2022-09-07 17:05:58 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2eed980999cea42d08aa69360cfc2e5c686894ac
2eed9809
1 parent
3767180d
minor fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
2eed980
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
View file @
2eed980
...
...
@@ -10,7 +10,7 @@ import UIKit
import
WebKit
import
SwiftEventBus
var
timer
:
DispatchSourceTimer
?
var
timer
2
:
DispatchSourceTimer
?
@objc
public
class
CampaignViewController
:
UIViewController
,
WKNavigationDelegate
,
WKScriptMessageHandler
{
@IBOutlet
weak
var
webview
:
WKWebView
!
...
...
@@ -63,9 +63,9 @@ var timer: DispatchSourceTimer?
print
(
"========= Webview Timer Started! ========="
)
let
queue
=
DispatchQueue
(
label
:
Bundle
.
main
.
bundleIdentifier
!
+
".webview.timer"
)
timer
=
DispatchSource
.
makeTimerSource
(
queue
:
queue
)
timer
!.
schedule
(
deadline
:
.
now
(),
repeating
:
.
seconds
(
1
))
timer
!.
setEventHandler
{
[
weak
self
]
in
timer
2
=
DispatchSource
.
makeTimerSource
(
queue
:
queue
)
timer
2
!.
schedule
(
deadline
:
.
now
(),
repeating
:
.
seconds
(
1
))
timer
2
!.
setEventHandler
{
[
weak
self
]
in
// do whatever stuff you want on the background queue here here
print
(
"========= Webview interval! ========="
)
...
...
@@ -82,13 +82,13 @@ var timer: DispatchSourceTimer?
})
}
}
timer
!.
resume
()
timer
2
!.
resume
()
}
func
stopTimer
()
{
print
(
"========= Webview Timer Stopped! ========="
)
timer
?
.
cancel
()
timer
=
nil
timer
2
?
.
cancel
()
timer
2
=
nil
}
// MARK: - API Calls
...
...
Please
register
or
login
to post a comment