Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
29265d44
Commit
29265d44
authored
May 24, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into modules
# Conflicts: # 1Weather/Model/CCPA/CCPAHelper.swift
parents
c264d4b4
37a45923
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
19 deletions
+36
-19
1Weather/AppDelegate.swift
+21
-19
1Weather/Model/CCPA/CCPAHelper.swift
+9
-0
1Weather/Network/PushNotificationsManager.swift
+3
-0
1Weather/UI/View controllers/Radar/MapTimeControl/MapTimeControlView.swift
+3
-0
No files found.
1Weather/AppDelegate.swift
View file @
29265d44
...
@@ -24,17 +24,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -24,17 +24,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
private
let
appsFlyerLog
=
Logger
(
componentName
:
"AppsFlyer"
)
private
let
appsFlyerLog
=
Logger
(
componentName
:
"AppsFlyer"
)
private
let
log
=
Logger
(
componentName
:
"AppDelegate"
)
private
let
log
=
Logger
(
componentName
:
"AppDelegate"
)
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
func
initializeAppsFlyer
()
{
ThemeManager
.
refreshAppearance
()
// WDT radar setup
SwarmManager
.
sharedManager
.
authentication
=
SkywiseAuthentication
(
app_id
:
WDT_APP_ID
,
app_key
:
WDT_APP_KEY
)
self
.
window
=
UIWindow
(
frame
:
UIScreen
.
main
.
bounds
)
appsFlyerLog
.
info
(
"AppsFlyer initialize with AppsFlyerId:
\(
kAppsFlyerId
)
, Apple App ID:
\(
kAppsFlyerAppId
)
"
)
appsFlyerLog
.
info
(
"AppsFlyer initialize with AppsFlyerId:
\(
kAppsFlyerId
)
, Apple App ID:
\(
kAppsFlyerAppId
)
"
)
appsFlyer
.
appsFlyerDevKey
=
kAppsFlyerId
appsFlyer
.
appsFlyerDevKey
=
kAppsFlyerId
appsFlyer
.
appleAppID
=
kAppsFlyerAppId
appsFlyer
.
appleAppID
=
kAppsFlyerAppId
...
@@ -45,6 +35,26 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -45,6 +35,26 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
#else
#else
appsFlyer
.
isDebug
=
false
appsFlyer
.
isDebug
=
false
#endif
#endif
appsFlyer
.
start
{
[
weak
self
]
dictionary
,
error
in
if
let
error
=
error
{
self
?
.
appsFlyerLog
.
error
(
"AppsFlyer start error:
\(
error
)
"
)
}
else
{
self
?
.
appsFlyerLog
.
info
(
"AppsFlyer start result:
\(
dictionary
)
"
)
}
}
}
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
ThemeManager
.
refreshAppearance
()
// WDT radar setup
SwarmManager
.
sharedManager
.
authentication
=
SkywiseAuthentication
(
app_id
:
WDT_APP_ID
,
app_key
:
WDT_APP_KEY
)
self
.
window
=
UIWindow
(
frame
:
UIScreen
.
main
.
bounds
)
// Note that the Amazon SDK will get assigned a proper value for consent status inside CCPAHelper.onAppLaunch
// Note that the Amazon SDK will get assigned a proper value for consent status inside CCPAHelper.onAppLaunch
// So, make sure this call happens after the
// So, make sure this call happens after the
...
@@ -121,14 +131,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -121,14 +131,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
applicationDidBecomeActive
(
_
application
:
UIApplication
)
{
func
applicationDidBecomeActive
(
_
application
:
UIApplication
)
{
LocationManager
.
shared
.
updateEverythingIfNeeded
()
LocationManager
.
shared
.
updateEverythingIfNeeded
()
appsFlyer
.
start
{
[
weak
self
]
dictionary
,
error
in
if
let
error
=
error
{
self
?
.
appsFlyerLog
.
error
(
"AppsFlyer start error:
\(
error
)
"
)
}
else
{
self
?
.
appsFlyerLog
.
info
(
"AppsFlyer start result:
\(
dictionary
)
"
)
}
}
}
}
func
application
(
_
application
:
UIApplication
,
didRegisterForRemoteNotificationsWithDeviceToken
deviceToken
:
Data
)
{
func
application
(
_
application
:
UIApplication
,
didRegisterForRemoteNotificationsWithDeviceToken
deviceToken
:
Data
)
{
...
...
1Weather/Model/CCPA/CCPAHelper.swift
View file @
29265d44
...
@@ -19,6 +19,7 @@ import CryptoKit
...
@@ -19,6 +19,7 @@ import CryptoKit
import
FBAudienceNetwork
import
FBAudienceNetwork
import
PSMLocationSDK
import
PSMLocationSDK
import
DTBiOSSDK
import
DTBiOSSDK
import
AppsFlyerLib
import
OneWeatherCore
import
OneWeatherCore
fileprivate
let
APP_NAME
=
"ONE_WEATHER"
fileprivate
let
APP_NAME
=
"ONE_WEATHER"
...
@@ -157,6 +158,14 @@ class CCPAHelper {
...
@@ -157,6 +158,14 @@ class CCPAHelper {
// MoEngage
// MoEngage
MoEngage
.
sharedInstance
()
.
optOut
(
ofDataTracking
:
!
canCollectData
)
MoEngage
.
sharedInstance
()
.
optOut
(
ofDataTracking
:
!
canCollectData
)
AppsFlyerLib
.
shared
()
.
isStopped
=
!
canCollectData
if
canCollectData
{
onMain
{
let
appDelegate
=
UIApplication
.
shared
.
delegate
as?
AppDelegate
appDelegate
?
.
initializeAppsFlyer
()
}
}
}
}
private
func
registerApp
(
reason
:
String
)
{
private
func
registerApp
(
reason
:
String
)
{
...
...
1Weather/Network/PushNotificationsManager.swift
View file @
29265d44
...
@@ -90,6 +90,9 @@ public class PushNotificationsManager: NSObject {
...
@@ -90,6 +90,9 @@ public class PushNotificationsManager: NSObject {
log
.
info
(
"Got new APNS token:
\(
tokenString
)
"
)
log
.
info
(
"Got new APNS token:
\(
tokenString
)
"
)
MoEngage
.
sharedInstance
()
.
setPushToken
(
pushToken
)
MoEngage
.
sharedInstance
()
.
setPushToken
(
pushToken
)
AppsFlyerLib
.
shared
()
.
registerUninstall
(
pushToken
)
AppsFlyerLib
.
shared
()
.
registerUninstall
(
pushToken
)
#if DEBUG
AppsFlyerLib
.
shared
()
.
useUninstallSandbox
=
true
#endif
}
}
}
}
...
...
1Weather/UI/View controllers/Radar/MapTimeControl/MapTimeControlView.swift
View file @
29265d44
...
@@ -170,6 +170,9 @@ class MapTimeControlView: UIView {
...
@@ -170,6 +170,9 @@ class MapTimeControlView: UIView {
}
}
@objc
private
func
handleTapGesture
(
gestureRecoginzer
:
UIGestureRecognizer
)
{
@objc
private
func
handleTapGesture
(
gestureRecoginzer
:
UIGestureRecognizer
)
{
guard
!
currentItems
.
isEmpty
else
{
return
}
let
location
=
gestureRecoginzer
.
location
(
in
:
self
)
let
location
=
gestureRecoginzer
.
location
(
in
:
self
)
let
progress
=
max
(
location
.
x
-
stackView
.
frame
.
origin
.
x
,
0
)
/
(
self
.
bounds
.
width
-
stackView
.
frame
.
origin
.
x
)
let
progress
=
max
(
location
.
x
-
stackView
.
frame
.
origin
.
x
,
0
)
/
(
self
.
bounds
.
width
-
stackView
.
frame
.
origin
.
x
)
let
targetIndex
=
Int
(
CGFloat
(
currentItems
.
count
)
*
progress
)
let
targetIndex
=
Int
(
CGFloat
(
currentItems
.
count
)
*
progress
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment