Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sailassist
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CpjJwWHV
Sailassist
Commits
95aff94d
Commit
95aff94d
authored
Jun 20, 2024
by
shigemi miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NGA対応
parent
7f096f00
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
750 additions
and
225 deletions
+750
-225
project.pbxproj
Seilassist/Sailassist.xcodeproj/project.pbxproj
+0
-0
Contents.json
...sist/Assets.xcassets/Map/addSymbol.imageset/Contents.json
+21
-0
plus.png
...ailassist/Assets.xcassets/Map/addSymbol.imageset/plus.png
+0
-0
Contents.json
...sist/Assets.xcassets/Map/areaPoint.imageset/Contents.json
+21
-0
areaPoint.png
...sist/Assets.xcassets/Map/areaPoint.imageset/areaPoint.png
+0
-0
Contents.json
...lassist/Assets.xcassets/Map/target.imageset/Contents.json
+21
-0
target.png
...Sailassist/Assets.xcassets/Map/target.imageset/target.png
+0
-0
AlertDB.swift
Seilassist/Sailassist/DataSource/AlertDB.swift
+15
-6
PushNotificationTypes.swift
Seilassist/Sailassist/DataSource/PushNotificationTypes.swift
+2
-0
EcaArea.swift
Seilassist/Sailassist/ECA/EcaArea.swift
+1
-1
EcaTask.swift
Seilassist/Sailassist/ECA/EcaTask.swift
+4
-4
RegisteredEca.swift
Seilassist/Sailassist/ECA/RegisteredEca.swift
+2
-2
HttpRequestType.swift
Seilassist/Sailassist/Http/HttpRequestType.swift
+3
-0
ReqNgaList.swift
Seilassist/Sailassist/Json/ReqNgaList.swift
+19
-0
ReqTaskList.swift
Seilassist/Sailassist/Json/ReqTaskList.swift
+2
-0
LocationCalculation.swift
Seilassist/Sailassist/Location/LocationCalculation.swift
+0
-0
LocationViewModel.swift
Seilassist/Sailassist/LocationViewModel.swift
+4
-1
LoginView.swift
Seilassist/Sailassist/Login/LoginView.swift
+3
-0
InputUserNameView.swift
Seilassist/Sailassist/Login/View/InputUserNameView.swift
+3
-0
LayerEnum.swift
Seilassist/Sailassist/Map/LayerEnum.swift
+0
-18
MapInformation.swift
Seilassist/Sailassist/Map/MapInformation.swift
+52
-0
MapRepresentable.swift
Seilassist/Sailassist/Map/MapRepresentable.swift
+0
-0
MapSource.swift
Seilassist/Sailassist/Map/MapSource.swift
+1
-1
EcaListView.swift
Seilassist/Sailassist/Map/Task/View/EcaListView.swift
+2
-2
EcaSettingView.swift
Seilassist/Sailassist/Map/Task/View/EcaSettingView.swift
+2
-4
FuelSwitchingView.swift
Seilassist/Sailassist/Map/Task/View/FuelSwitchingView.swift
+4
-14
MapTaskView.swift
Seilassist/Sailassist/Map/Task/View/MapTaskView.swift
+0
-135
MenuTaskView.swift
Seilassist/Sailassist/Map/Task/View/MenuTaskView.swift
+0
-0
NgaNotificationView.swift
...assist/Sailassist/Map/Task/View/NgaNotificationView.swift
+135
-0
NgaSettingView.swift
Seilassist/Sailassist/Map/Task/View/NgaSettingView.swift
+0
-0
TaskViewModel.swift
Seilassist/Sailassist/Map/Task/ViewModel/TaskViewModel.swift
+2
-2
MenuTitleView.swift
Seilassist/Sailassist/Menu/View/MenuTitleView.swift
+1
-1
DeleteNgaArea.swift
Seilassist/Sailassist/NGA/DeleteNgaArea.swift
+28
-0
GetNgaList.swift
Seilassist/Sailassist/NGA/GetNgaList.swift
+70
-0
NgaTask.swift
Seilassist/Sailassist/NGA/NgaTask.swift
+62
-0
RegistereNga.swift
Seilassist/Sailassist/NGA/RegistereNga.swift
+37
-0
SetNgaArea.swift
Seilassist/Sailassist/NGA/SetNgaArea.swift
+30
-0
ServerSession.swift
Seilassist/Sailassist/ServerSession/ServerSession.swift
+5
-8
SessionNgaList.swift
Seilassist/Sailassist/ServerSession/SessionNgaList.swift
+97
-0
SessionUploadImage.swift
Seilassist/Sailassist/ServerSession/SessionUploadImage.swift
+1
-2
SharingData.swift
Seilassist/Sailassist/SharingData/SharingData.swift
+86
-17
StatusEnum.swift
Seilassist/Sailassist/SharingData/StatusEnum.swift
+8
-0
MainTabView.swift
Seilassist/Sailassist/Tab/MainTabView.swift
+6
-3
AlertManager.swift
Seilassist/Sailassist/VoiceManager/AlertManager.swift
+0
-4
No files found.
Seilassist/Sailassist.xcodeproj/project.pbxproj
View file @
95aff94d
This diff is collapsed.
Click to expand it.
Seilassist/Sailassist/Assets.xcassets/Map/addSymbol.imageset/Contents.json
0 → 100644
View file @
95aff94d
{
"images"
:
[
{
"filename"
:
"plus.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Assets.xcassets/Map/addSymbol.imageset/plus.png
0 → 100644
View file @
95aff94d
530 Bytes
Seilassist/Sailassist/Assets.xcassets/Map/areaPoint.imageset/Contents.json
0 → 100644
View file @
95aff94d
{
"images"
:
[
{
"filename"
:
"areaPoint.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Assets.xcassets/Map/areaPoint.imageset/areaPoint.png
0 → 100644
View file @
95aff94d
680 Bytes
Seilassist/Sailassist/Assets.xcassets/Map/target.imageset/Contents.json
0 → 100644
View file @
95aff94d
{
"images"
:
[
{
"filename"
:
"target.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Assets.xcassets/Map/target.imageset/target.png
0 → 100644
View file @
95aff94d
257 Bytes
Seilassist/Sailassist/DataSource/AlertDB.swift
View file @
95aff94d
...
@@ -12,11 +12,13 @@ struct WarnRecord {
...
@@ -12,11 +12,13 @@ struct WarnRecord {
var
body
:
String
var
body
:
String
}
}
enum
Switching
Eca
{
enum
Switching
Alert
{
case
Finish
case
Finish
case
Start
case
Start
case
Notice
case
Notice
case
NgaPassing
init
()
{
init
()
{
self
=
.
Notice
self
=
.
Notice
}
}
...
@@ -26,14 +28,21 @@ class AlertDB {
...
@@ -26,14 +28,21 @@ class AlertDB {
// シングルトン宣言
// シングルトン宣言
static
let
OnlyOne
=
AlertDB
()
static
let
OnlyOne
=
AlertDB
()
private
var
alertEca
:
[
SwitchingEca
:
WarnRecord
]
=
[
private
var
alertEca
:
[
SwitchingAlert
:
WarnRecord
]
=
[
SwitchingEca
.
Finish
:
WarnRecord
(
title
:
NSLocalizedString
(
"No Fuel Switching Finished"
,
comment
:
""
),
body
:
NSLocalizedString
(
"Arrived at switching finished point."
,
comment
:
""
))
SwitchingAlert
.
Finish
:
WarnRecord
(
title
:
String
(
"No Fuel Switching Finished"
),
body
:
String
(
"Arrived at switching finished point."
)),
,
SwitchingEca
.
Start
:
WarnRecord
(
title
:
NSLocalizedString
(
"Eca Start"
,
comment
:
""
),
body
:
NSLocalizedString
(
"Arrived at switching start point."
,
comment
:
""
))
SwitchingAlert
.
Start
:
WarnRecord
(
title
:
NSLocalizedString
(
"Eca Start"
,
comment
:
""
),
body
:
NSLocalizedString
(
"Arrived at switching start point."
,
comment
:
""
)),
,
SwitchingEca
.
Notice
:
WarnRecord
(
title
:
NSLocalizedString
(
"Eca Notice"
,
comment
:
""
),
body
:
NSLocalizedString
(
"Arrived at advance notice point."
,
comment
:
""
))
SwitchingAlert
.
Notice
:
WarnRecord
(
title
:
NSLocalizedString
(
"Eca Notice"
,
comment
:
""
),
body
:
NSLocalizedString
(
"Arrived at advance notice point."
,
comment
:
""
)),
SwitchingAlert
.
NgaPassing
:
WarnRecord
(
title
:
String
(
"Nga Notice "
),
body
:
String
(
"Nga Passing."
))
]
]
//Eca通知
//Eca通知
func
GetAlertEcaPoint
(
point
:
SwitchingEca
)
->
WarnRecord
{
func
GetAlertEcaPoint
(
point
:
SwitchingAlert
)
->
WarnRecord
{
return
alertEca
[
point
]
!
}
//Nga通知
func
GetAlertNgaPoint
(
point
:
SwitchingAlert
)
->
WarnRecord
{
return
alertEca
[
point
]
!
return
alertEca
[
point
]
!
}
}
}
}
Seilassist/Sailassist/DataSource/PushNotificationTypes.swift
View file @
95aff94d
...
@@ -12,6 +12,7 @@ struct PushNotificationTypes {
...
@@ -12,6 +12,7 @@ struct PushNotificationTypes {
enum
SendType
:
Int32
{
enum
SendType
:
Int32
{
case
Error
=
-
1
case
Error
=
-
1
case
Eca
=
0
// Eca
case
Eca
=
0
// Eca
case
Nga
=
1
//Nga
init
(){
init
(){
self
=
.
Error
self
=
.
Error
...
@@ -29,5 +30,6 @@ struct PushNotificationTypes {
...
@@ -29,5 +30,6 @@ struct PushNotificationTypes {
enum
LocalPushIdentifier
:
String
{
enum
LocalPushIdentifier
:
String
{
case
Reserve
=
"Reserve"
// 予約(初期設定)
case
Reserve
=
"Reserve"
// 予約(初期設定)
case
EcaSwitching
=
"Eca"
// Eca
case
EcaSwitching
=
"Eca"
// Eca
case
NgaAlert
=
"Nga"
// Nga
}
}
}
}
Seilassist/Sailassist/ECA/EcaArea.swift
View file @
95aff94d
...
@@ -47,7 +47,7 @@ class EcaArea {
...
@@ -47,7 +47,7 @@ class EcaArea {
private
func
tableInit
()
{
private
func
tableInit
()
{
for
data
in
ecaDataTable
{
for
data
in
ecaDataTable
{
if
!
ecaData
.
ecaArea
.
keys
.
contains
(
data
.
areaId
)
{
if
!
ecaData
.
ecaArea
.
keys
.
contains
(
data
.
areaId
)
{
var
reg
=
RegisteredEca
(
id
:
data
.
areaId
,
ec
aName
:
data
.
name
)
!
var
reg
=
RegisteredEca
(
id
:
data
.
areaId
,
are
aName
:
data
.
name
)
!
reg
.
color
=
"0xFF0000"
//ライン色(ARGB)
reg
.
color
=
"0xFF0000"
//ライン色(ARGB)
reg
.
centerPosition
=
data
.
centerPosition
reg
.
centerPosition
=
data
.
centerPosition
reg
.
zoomLevel
=
data
.
zoomLevel
reg
.
zoomLevel
=
data
.
zoomLevel
...
...
Seilassist/Sailassist/ECA/EcaTask.swift
View file @
95aff94d
...
@@ -20,7 +20,7 @@ class EcaTask {
...
@@ -20,7 +20,7 @@ class EcaTask {
/**
/**
* Eca通知
* Eca通知
*/
*/
private
func
notificationEca
(
point
:
Switching
Eca
)
{
private
func
notificationEca
(
point
:
Switching
Alert
)
{
let
alertDB
=
AlertDB
.
OnlyOne
let
alertDB
=
AlertDB
.
OnlyOne
var
wernrec
=
WarnRecord
(
title
:
"Eca"
,
body
:
""
)
var
wernrec
=
WarnRecord
(
title
:
"Eca"
,
body
:
""
)
...
@@ -75,7 +75,7 @@ class EcaTask {
...
@@ -75,7 +75,7 @@ class EcaTask {
// }
// }
if
eca
.
swFinish
>=
Float
(
distance
)
&&
0.0
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
finishPass
{
if
eca
.
swFinish
>=
Float
(
distance
)
&&
0.0
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
finishPass
{
// notificationEca(point: Switching
Eca
.Finish)
// notificationEca(point: Switching
Alert
.Finish)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
finishPass
SharingData
.
my
.
ecaStatus
=
EcaState
.
finishPass
...
@@ -84,7 +84,7 @@ class EcaTask {
...
@@ -84,7 +84,7 @@ class EcaTask {
}
}
if
eca
.
swStart
>=
Float
(
distance
)
&&
eca
.
swFinish
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
startPass
{
if
eca
.
swStart
>=
Float
(
distance
)
&&
eca
.
swFinish
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
startPass
{
notificationEca
(
point
:
Switching
Eca
.
Start
)
notificationEca
(
point
:
Switching
Alert
.
Start
)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
startPass
SharingData
.
my
.
ecaStatus
=
EcaState
.
startPass
...
@@ -93,7 +93,7 @@ class EcaTask {
...
@@ -93,7 +93,7 @@ class EcaTask {
}
}
if
eca
.
swNotice
>=
Float
(
distance
)
&&
eca
.
swStart
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
noticePass
{
if
eca
.
swNotice
>=
Float
(
distance
)
&&
eca
.
swStart
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
noticePass
{
notificationEca
(
point
:
Switching
Eca
.
Notice
)
notificationEca
(
point
:
Switching
Alert
.
Notice
)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
noticePass
SharingData
.
my
.
ecaStatus
=
EcaState
.
noticePass
...
...
Seilassist/Sailassist/ECA/RegisteredEca.swift
View file @
95aff94d
...
@@ -44,8 +44,8 @@ struct RegisteredEca {
...
@@ -44,8 +44,8 @@ struct RegisteredEca {
var
zoomLevel
:
CGFloat
=
11.0
var
zoomLevel
:
CGFloat
=
11.0
var
points
:
[
CLLocationCoordinate2D
]
=
[]
var
points
:
[
CLLocationCoordinate2D
]
=
[]
init
?(
id
:
Int
,
ec
aName
:
String
)
{
init
?(
id
:
Int
,
are
aName
:
String
)
{
self
.
areaId
=
id
self
.
areaId
=
id
self
.
name
=
ec
aName
self
.
name
=
are
aName
}
}
}
}
Seilassist/Sailassist/Http/HttpRequestType.swift
View file @
95aff94d
...
@@ -16,6 +16,7 @@ enum HttpRequestType : String {
...
@@ -16,6 +16,7 @@ enum HttpRequestType : String {
// case CookiePolicy = "https://ssv-canary-web.azurewebsites.net/cookiepolicy"
// case CookiePolicy = "https://ssv-canary-web.azurewebsites.net/cookiepolicy"
// case PrivacyPolicy = "https://ssv-canary-web.azurewebsites.net/inapp?" //+バージョン番号
// case PrivacyPolicy = "https://ssv-canary-web.azurewebsites.net/inapp?" //+バージョン番号
case
TaskList
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case
TaskList
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case
NgaList
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/nogoarea/XXXXX"
case
EcaArea
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/ecaarea/XXXXX"
case
EcaArea
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/ecaarea/XXXXX"
case
ShipStatus
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/shipstatus/XXXXX"
case
ShipStatus
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/shipstatus/XXXXX"
case
ShipMonitoringRoute
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/shipmonitoringroute/XXXXX"
case
ShipMonitoringRoute
=
"https://ssv-canary-web.azurewebsites.net/api/sailassist/shipmonitoringroute/XXXXX"
...
@@ -42,6 +43,7 @@ enum HttpRequestType : String {
...
@@ -42,6 +43,7 @@ enum HttpRequestType : String {
// case CookiePolicy = "https://ssv-qc-web.azurewebsites.net/cookiepolicy"
// case CookiePolicy = "https://ssv-qc-web.azurewebsites.net/cookiepolicy"
// case PrivacyPolicy = "https://ssv-qc-web.azurewebsites.net/inapp?" //+バージョン番号
// case PrivacyPolicy = "https://ssv-qc-web.azurewebsites.net/inapp?" //+バージョン番号
case
TaskList
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case
TaskList
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case
NgaList
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/nogoarea/XXXXX"
case
EcaArea
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/ecaarea/XXXXX"
case
EcaArea
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/ecaarea/XXXXX"
case
ShipStatus
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/shipstatus/XXXXX"
case
ShipStatus
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/shipstatus/XXXXX"
case
ShipMonitoringRoute
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/shipmonitoringroute/XXXXX"
case
ShipMonitoringRoute
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/shipmonitoringroute/XXXXX"
...
@@ -69,6 +71,7 @@ enum HttpRequestType : String {
...
@@ -69,6 +71,7 @@ enum HttpRequestType : String {
// case CookiePolicy = "https://ssv.jmarinecloud.com/cookiepolicy"
// case CookiePolicy = "https://ssv.jmarinecloud.com/cookiepolicy"
// case PrivacyPolicy = "https://ssv.jmarinecloud.com/inapp?" //+バージョン番号
// case PrivacyPolicy = "https://ssv.jmarinecloud.com/inapp?" //+バージョン番号
case
TaskList
=
"https://ssv.jmarinecloud.com/api/sailassist/tasklist/XXXXX"
case
TaskList
=
"https://ssv.jmarinecloud.com/api/sailassist/tasklist/XXXXX"
case
NgaList
=
"https://ssv.jmarinecloud.com/api/sailassist/nogoarea/XXXXX"
case
EcaArea
=
"https://ssv.jmarinecloud.com/api/sailassist/ecaarea/XXXXX"
case
EcaArea
=
"https://ssv.jmarinecloud.com/api/sailassist/ecaarea/XXXXX"
case
ShipStatus
=
"https://ssv.jmarinecloud.com/api/sailassist/shipstatus/XXXXX"
case
ShipStatus
=
"https://ssv.jmarinecloud.com/api/sailassist/shipstatus/XXXXX"
case
ShipMonitoringRoute
=
"https://ssv.jmarinecloud.com/api/sailassist/shipmonitoringroute/XXXXX"
case
ShipMonitoringRoute
=
"https://ssv.jmarinecloud.com/api/sailassist/shipmonitoringroute/XXXXX"
...
...
Seilassist/Sailassist/Json/ReqNgaList.swift
0 → 100644
View file @
95aff94d
//
// ReqNgaList.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/06/14.
//
import
Foundation
struct
ReqNgaList
:
Codable
{
var
id
:
String
=
""
var
lock
:
Bool
=
false
var
enabled
:
Bool
=
false
var
geometry
:
[
points
]
=
[]
init
(
Id
:
String
)
{
self
.
id
=
Id
}
}
Seilassist/Sailassist/Json/ReqTaskList.swift
View file @
95aff94d
...
@@ -8,8 +8,10 @@
...
@@ -8,8 +8,10 @@
import
Foundation
import
Foundation
struct
ReqTaskList
:
Codable
{
struct
ReqTaskList
:
Codable
{
// var id: String = ""
var
areaId
:
Int
=
0
var
areaId
:
Int
=
0
var
taskName
:
String
=
""
var
taskName
:
String
=
""
// var name: String = ""
var
noticeRange
:
Float
=
0.0
var
noticeRange
:
Float
=
0.0
var
startRange
:
Float
=
0.0
var
startRange
:
Float
=
0.0
var
finishRange
:
Float
=
0.0
var
finishRange
:
Float
=
0.0
...
...
Seilassist/Sailassist/Location/LocationCalculation.swift
View file @
95aff94d
This diff is collapsed.
Click to expand it.
Seilassist/Sailassist/LocationViewModel.swift
View file @
95aff94d
...
@@ -14,6 +14,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
...
@@ -14,6 +14,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
private
let
locationManager
:
CLLocationManager
private
let
locationManager
:
CLLocationManager
let
ecaTask
=
EcaTask
()
let
ecaTask
=
EcaTask
()
let
ngaTask
=
NgaTask
()
override
init
()
{
override
init
()
{
let
ecaArea
=
EcaArea
()
let
ecaArea
=
EcaArea
()
...
@@ -84,6 +85,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
...
@@ -84,6 +85,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
if
Preferences
.
LocationType
==
0
{
if
Preferences
.
LocationType
==
0
{
ecaTask
.
checkEca
()
ecaTask
.
checkEca
()
ngaTask
.
checkNga
()
}
}
}
}
...
@@ -91,8 +93,9 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
...
@@ -91,8 +93,9 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
if
serverLocationInterval
<=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
{
if
serverLocationInterval
<=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
{
let
eca
=
EcaTask
()
let
eca
=
EcaTask
()
eca
.
start
()
eca
.
start
()
self
.
ecaTask
.
checkEca
()
self
.
ecaTask
.
checkEca
()
self
.
ngaTask
.
checkNga
()
serverLocationInterval
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
+
Int64
(
TimerInterval
)
serverLocationInterval
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
+
Int64
(
TimerInterval
)
}
}
}
}
...
...
Seilassist/Sailassist/Login/LoginView.swift
View file @
95aff94d
...
@@ -221,6 +221,9 @@ struct LoginView: View {
...
@@ -221,6 +221,9 @@ struct LoginView: View {
let
ecaList
=
GetEcaList
()
let
ecaList
=
GetEcaList
()
ecaList
.
start
()
ecaList
.
start
()
let
ngaList
=
GetNgaList
()
ngaList
.
start
()
let
pushHistory
=
GetPushHistory
()
let
pushHistory
=
GetPushHistory
()
pushHistory
.
start
()
pushHistory
.
start
()
}
}
...
...
Seilassist/Sailassist/Login/View/InputUserNameView.swift
View file @
95aff94d
...
@@ -127,6 +127,9 @@ struct InputUserNameView: View {
...
@@ -127,6 +127,9 @@ struct InputUserNameView: View {
let
ecaList
=
GetEcaList
()
let
ecaList
=
GetEcaList
()
ecaList
.
start
()
ecaList
.
start
()
let
ngaList
=
GetNgaList
()
ngaList
.
start
()
let
pushHistory
=
GetPushHistory
()
let
pushHistory
=
GetPushHistory
()
pushHistory
.
start
()
pushHistory
.
start
()
}
}
...
...
Seilassist/Sailassist/Map/LayerEnum.swift
deleted
100644 → 0
View file @
7f096f00
//
// LayerEnum.swift
// forShip
//
// Created by Mamoru Sugita on 2023/10/23.
//
import
Foundation
enum
LayerEnum
:
String
{
case
OwnShip
case
EcaLine
case
SwitchingLine
case
SwLineLabel
case
WayPoints
case
WakeLines
case
OneTimeEca
}
Seilassist/Sailassist/Map/MapInformation.swift
0 → 100644
View file @
95aff94d
//
// MapInformation.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/06/12.
//
import
SwiftUI
struct
MapInformation
:
View
{
@ObservedObject
var
ship
=
SharingData
.
location
@ObservedObject
var
ngaData
=
SharingData
.
nga
var
body
:
some
View
{
VStack
{
VStack
{
Text
(
presentLocation
())
.
font
(
Font
(
UIFont
.
monospacedSystemFont
(
ofSize
:
12
,
weight
:
.
regular
)))
.
foregroundColor
(
Color
.
black
)
.
padding
(
5
)
.
background
(
Color
.
white
.
opacity
(
0.7
))
.
cornerRadius
(
3
)
}
.
padding
(
.
top
,
100
)
.
padding
(
.
trailing
,
200
)
VStack
{
ForEach
(
ngaData
.
ngaArea
.
map
{
$0
.
1
}
.
filter
{
$0
.
passingCnt
>
0
},
id
:
\
.
name
)
{
nga
in
Text
(
"Entering NGA
\(
nga
.
name
)
"
)
.
font
(
FontStyle
.
EmphasisText
.
font
)
.
foregroundColor
(
Color
.
white
)
.
padding
(
5
)
.
background
(
Color
.
red
.
opacity
(
0.7
))
.
cornerRadius
(
3
)
}
}
Spacer
()
}
}
func
presentLocation
()
->
String
{
var
location
=
" 00°00.000'N
\n
000°00.000'E"
if
let
shipPos
=
ship
.
location
{
location
=
LocationCalculation
.
locationDegtoString
(
location
:
shipPos
)
}
return
location
}
}
#Preview {
MapInformation
()
}
Seilassist/Sailassist/Map/MapRepresentable.swift
View file @
95aff94d
This diff is collapsed.
Click to expand it.
Seilassist/Sailassist/Map/MapSource.swift
View file @
95aff94d
...
@@ -13,7 +13,7 @@ struct MapSource {
...
@@ -13,7 +13,7 @@ struct MapSource {
let
layerId
:
String
let
layerId
:
String
var
source
=
GeoJSONSource
()
var
source
=
GeoJSONSource
()
init
(
layer
:
LayerEnum
)
{
init
(
layer
:
MapViewController
.
LayerEnum
)
{
sourceId
=
layer
.
rawValue
+
"Source"
sourceId
=
layer
.
rawValue
+
"Source"
layerId
=
layer
.
rawValue
+
"Layer"
layerId
=
layer
.
rawValue
+
"Layer"
}
}
...
...
Seilassist/Sailassist/Map/Task/View/EcaListView.swift
View file @
95aff94d
...
@@ -26,9 +26,9 @@ struct EcaListView: View {
...
@@ -26,9 +26,9 @@ struct EcaListView: View {
var
newData
=
eca
var
newData
=
eca
newData
.
isEnable
.
toggle
()
newData
.
isEnable
.
toggle
()
ecaData
.
editEcaArea
(
key
:
eca
.
areaId
,
value
:
newData
,
type
:
EcaOperation
.
Insert
)
ecaData
.
editEcaArea
(
key
:
eca
.
areaId
,
value
:
newData
,
type
:
EcaOperation
.
Insert
)
taskViewModel
.
viewMode
=
.
SwitchingMenu
taskViewModel
.
viewMode
=
.
FuelSwitching
taskViewModel
.
edittingEcaArea
=
eca
taskViewModel
.
edittingEcaArea
=
eca
taskViewModel
.
isShowSettingView
=
true
taskViewModel
.
viewMode
=
.
EcaSetting
},
label
:
{
},
label
:
{
Image
(
"icon_plus"
)
Image
(
"icon_plus"
)
.
resizable
()
.
resizable
()
...
...
Seilassist/Sailassist/Map/Task/View/EcaSettingView.swift
View file @
95aff94d
...
@@ -9,8 +9,7 @@ import SwiftUI
...
@@ -9,8 +9,7 @@ import SwiftUI
import
UIKit
import
UIKit
struct
EcaSettingView
:
View
{
struct
EcaSettingView
:
View
{
// @ObservedObject var taskViewModel: TaskViewModel
@ObservedObject
var
taskViewModel
:
TaskViewModel
@Binding
var
isShowSettingEca
:
Bool
@State
var
edittingEca
:
RegisteredEca
@State
var
edittingEca
:
RegisteredEca
var
body
:
some
View
{
var
body
:
some
View
{
...
@@ -40,7 +39,6 @@ struct EcaSettingView: View {
...
@@ -40,7 +39,6 @@ struct EcaSettingView: View {
var
ecaData
=
edittingEca
var
ecaData
=
edittingEca
ecaData
.
isEnable
=
true
ecaData
.
isEnable
=
true
SharingData
.
eca
.
editEcaArea
(
key
:
edittingEca
.
areaId
,
value
:
ecaData
,
type
:
EcaOperation
.
Change
)
SharingData
.
eca
.
editEcaArea
(
key
:
edittingEca
.
areaId
,
value
:
ecaData
,
type
:
EcaOperation
.
Change
)
isShowSettingEca
=
false
},
label
:
{
},
label
:
{
Text
(
"Register"
)
Text
(
"Register"
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
font
(
FontStyle
.
DefaultText
.
font
)
...
@@ -213,5 +211,5 @@ struct EcaSettingView: View {
...
@@ -213,5 +211,5 @@ struct EcaSettingView: View {
}
}
#Preview {
#Preview {
EcaSettingView
(
isShowSettingEca
:
.
constant
(
true
),
edittingEca
:
RegisteredEca
(
id
:
0
,
ecaName
:
"ec
a"
)
!
)
EcaSettingView
(
taskViewModel
:
TaskViewModel
(),
edittingEca
:
RegisteredEca
(
id
:
0
,
areaName
:
"Alert Are
a"
)
!
)
}
}
Seilassist/Sailassist/Map/Task/View/
TaskSwitchingMenu
View.swift
→
Seilassist/Sailassist/Map/Task/View/
FuelSwitching
View.swift
View file @
95aff94d
//
//
//
TaskSwitchingMenu
View.swift
//
FuelSwitching
View.swift
// forShip
// forShip
//
//
// Created by Mamoru Sugita on 2023/10/18.
// Created by Mamoru Sugita on 2023/10/18.
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
import
SwiftUI
import
SwiftUI
struct
TaskSwitchingMenu
View
:
View
{
struct
FuelSwitching
View
:
View
{
@ObservedObject
var
taskViewModel
:
TaskViewModel
@ObservedObject
var
taskViewModel
:
TaskViewModel
@ObservedObject
var
ecaData
=
SharingData
.
eca
@ObservedObject
var
ecaData
=
SharingData
.
eca
@State
var
isDeleteAlert
:
Bool
=
false
@State
var
isDeleteAlert
:
Bool
=
false
...
@@ -57,7 +57,7 @@ struct TaskSwitchingMenuView: View {
...
@@ -57,7 +57,7 @@ struct TaskSwitchingMenuView: View {
Button
{
Button
{
taskViewModel
.
edittingEcaArea
=
eca
taskViewModel
.
edittingEcaArea
=
eca
taskViewModel
.
ecaName
=
eca
.
name
taskViewModel
.
ecaName
=
eca
.
name
taskViewModel
.
isShowSettingView
=
true
taskViewModel
.
viewMode
=
.
EcaSetting
}
label
:
{
}
label
:
{
Text
(
"Edit Notice Setting"
)
Text
(
"Edit Notice Setting"
)
}
}
...
@@ -102,15 +102,6 @@ struct TaskSwitchingMenuView: View {
...
@@ -102,15 +102,6 @@ struct TaskSwitchingMenuView: View {
taskViewModel
.
edittingEcaArea
=
nil
taskViewModel
.
edittingEcaArea
=
nil
}
}
Button
(
"No"
){}
Button
(
"No"
){}
// Button("Cancel"){¥
// if let ecaArea = taskViewModel.edittingEcaArea {
// var newData = ecaArea
// newData.isRunning = false
// newData.status = EcaState.cancel
// ecaData.editEcaArea(key: ecaArea.name, value: newData, type: EcaOperation.Cancel)
// }
// taskViewModel.edittingEcaArea = nil
// }
}
message
:
{
}
message
:
{
Text
(
"Have you finished "
+
taskViewModel
.
ecaName
+
" fuel switching?"
)
Text
(
"Have you finished "
+
taskViewModel
.
ecaName
+
" fuel switching?"
)
}
}
...
@@ -137,11 +128,10 @@ struct TaskSwitchingMenuView: View {
...
@@ -137,11 +128,10 @@ struct TaskSwitchingMenuView: View {
Spacer
()
Spacer
()
}
}
// .padding()
}
}
}
}
#Preview {
#Preview {
TaskSwitchingMenu
View
(
taskViewModel
:
TaskViewModel
())
FuelSwitching
View
(
taskViewModel
:
TaskViewModel
())
}
}
Seilassist/Sailassist/Map/Task/View/MapTaskView.swift
deleted
100644 → 0
View file @
7f096f00
//
// MapTaskView.swift
// forShip
//
// Created by Mamoru Sugita on 2023/10/17.
//
import
SwiftUI
enum
TaskViewMode
{
case
SwitchingMenu
case
EcaList
var
title
:
String
{
switch
self
{
case
.
SwitchingMenu
:
"Fuel Switching"
case
.
EcaList
:
"ECA List"
}
}
}
struct
MapTaskView
:
View
{
@ObservedObject
var
taskViewModel
=
TaskViewModel
()
@ObservedObject
var
eca
=
SharingData
.
eca
var
body
:
some
View
{
VStack
{
if
UIDevice
.
current
.
userInterfaceIdiom
==
.
phone
{
Capsule
()
.
foregroundColor
(
ColorSet
.
ScrollBarColor
.
color
)
.
frame
(
width
:
45
,
height
:
3
)
.
padding
(
.
top
,
10
)
}
//タイトルエリア
HStack
{
Button
(
action
:
{
taskViewModel
.
viewMode
=
.
SwitchingMenu
taskViewModel
.
isShowSettingView
=
false
},
label
:
{
if
taskViewModel
.
viewMode
!=
.
SwitchingMenu
||
taskViewModel
.
isShowSettingView
{
Image
(
"ink_02"
)
}
})
.
frame
(
width
:
48
,
height
:
48
)
Spacer
()
Text
(
taskViewModel
.
isShowSettingView
?
taskViewModel
.
edittingEcaArea
?
.
name
??
""
:
taskViewModel
.
viewMode
.
title
)
.
font
(
FontStyle
.
TitleL
.
font
)
.
frame
(
height
:
20
)
.
padding
(
.
vertical
,
14
)
Spacer
()
Button
(
action
:
{
},
label
:
{
})
.
frame
(
width
:
48
,
height
:
48
)
}
.
padding
(
EdgeInsets
(
top
:
10
,
leading
:
8
,
bottom
:
13
,
trailing
:
17
))
Divider
()
.
background
(
ColorSet
.
LineColor03
.
color
)
ScrollViewReader
{
proxy
in
ScrollView
(
.
vertical
){
switch
taskViewModel
.
viewMode
{
case
.
SwitchingMenu
:
if
let
edittingEcaArea
=
taskViewModel
.
edittingEcaArea
,
taskViewModel
.
isShowSettingView
{
EcaSettingView
(
isShowSettingEca
:
$
taskViewModel
.
isShowSettingView
,
edittingEca
:
edittingEcaArea
)
}
else
{
TaskSwitchingMenuView
(
taskViewModel
:
taskViewModel
)
}
case
.
EcaList
:
EcaListView
(
taskViewModel
:
taskViewModel
)
}
}
.
onChange
(
of
:
taskViewModel
.
viewMode
){
newViewMode
in
// proxy.scrollTo("scroll", anchor: .top)
proxy
.
scrollTo
(
0
,
anchor
:
.
top
)
}
}
Spacer
()
.
frame
(
height
:
55
)
}
.
onAppear
{
let
appVersionModel
=
AppVersionModel
()
appVersionModel
.
start
()
}
.
alert
(
""
,
isPresented
:
$
eca
.
isShowEcaAlert
)
{
// if let ecaArea = eca.ecaArea.map({ $0.1 }).filter({ $0.isRunning }).first{
Button
(
"OK"
){
// let ecaTask = EcaTask()
// ecaTask.chengeEcaStatus(eca: ecaArea)
// if let status = SharingData.my.ecaStatus {
// if status == .finishPass {
// var newData = ecaArea
// newData.isRunning = false
// newData.status = EcaState.incomplete
// SharingData.eca.editEcaArea(key: ecaArea.name, value: newData, type: EcaOperation.Incomplete)
// }
// }
}
// }
}
message
:
{
if
let
ecaArea
=
eca
.
ecaArea
.
map
({
$0
.
1
})
.
filter
({
$0
.
isRunning
})
.
first
{
if
let
status
=
SharingData
.
my
.
ecaStatus
{
switch
status
{
case
.
noticePass
:
Text
(
"Arrived at advance notice point."
)
case
.
startPass
:
Text
(
"Arrived at switching start point."
)
case
.
finishPass
:
Text
(
"Have you finished
\(
ecaArea
.
name
)
fuel switching?
\n
If you finish, you disable it."
)
case
.
incomplete
:
Text
(
"Have you finished
\(
ecaArea
.
name
)
fuel switching?
\n
If you finish, you disable it."
)
default
:
Text
(
""
)
}
}
}
}
}
}
#Preview {
MapTaskView
()
}
Seilassist/Sailassist/Map/Task/View/MenuTaskView.swift
0 → 100644
View file @
95aff94d
This diff is collapsed.
Click to expand it.
Seilassist/Sailassist/Map/Task/View/NgaNotificationView.swift
0 → 100644
View file @
95aff94d
//
// NgaNotificationView.swift
// forShip
//
// Created by Mamoru Sugita on 2023/10/18.
//
import
SwiftUI
struct
NgaNotificationView
:
View
{
@ObservedObject
var
taskViewModel
:
TaskViewModel
@ObservedObject
var
ngaData
=
SharingData
.
nga
@State
var
isDelete
:
Bool
=
false
@State
var
isRunningStopNga
:
Bool
=
false
var
body
:
some
View
{
VStack
{
// ForEach(ngaData.ngaArea.map{ $0.1 }.sorted{ $0.name < $1.name }, id: \.areaId) { nga in
ForEach
(
ngaData
.
ngaArea
.
map
{
$0
.
1
},
id
:
\
.
areaId
)
{
nga
in
VStack
{
HStack
{
//NGA開始・終了ボタン
Button
{
var
newData
=
nga
newData
.
isRunning
.
toggle
()
newData
.
passingCnt
=
0
if
newData
.
isRunning
{
ngaData
.
editNgaArea
(
value
:
newData
,
type
:
NgaOperation
.
Running
)
}
else
{
ngaData
.
editNgaArea
(
value
:
newData
,
type
:
NgaOperation
.
Cancel
)
}
}
label
:
{
HStack
{
Circle
()
.
frame
(
width
:
14
,
height
:
14
)
.
foregroundColor
(
nga
.
isRunning
?
ColorSet
.
PrimaryActiveIcon
.
color
:
ColorSet
.
TaskStateIcon
.
color
)
Spacer
()
.
frame
(
width
:
10
)
}
}
//NGA移動
Text
(
nga
.
name
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
onTapGesture
{
ngaData
.
focusNga
=
nga
.
areaId
.
uuidString
}
Spacer
()
Menu
{
Text
(
nga
.
name
)
Button
{
ngaData
.
editNga
=
nga
taskViewModel
.
viewMode
=
.
NgaSetting
ngaData
.
editType
=
EditNgaType
.
nonEdit
}
label
:
{
Text
(
"Edit Nga Setting"
)
}
//削除
Button
{
ngaData
.
editNga
=
nga
isDelete
=
true
}
label
:
{
Text
(
"Delete NGA Notification"
)
}
.
disabled
(
nga
.
isLock
)
}
label
:
{
Image
(
systemName
:
"ellipsis"
)
.
frame
(
width
:
22
,
height
:
22
)
.
foregroundColor
(
nga
.
isRunning
?
ColorSet
.
Splash
.
color
:
ColorSet
.
Slidebar
.
color
)
}
.
disabled
(
nga
.
isRunning
)
.
alert
(
"Delete"
,
isPresented
:
$
isDelete
)
{
Button
(
"Yes"
)
{
if
let
newData
=
ngaData
.
editNga
{
ngaData
.
editNgaArea
(
value
:
newData
,
type
:
NgaOperation
.
Delete
)
ngaData
.
editNga
=
nil
}
}
Button
(
"No"
){}
}
message
:
{
Text
(
"Delete "
+
nga
.
name
+
" ?"
)
}
.
alert
(
"NGA Switching"
,
isPresented
:
$
isRunningStopNga
)
{
Button
(
"Yes"
)
{
var
newData
=
nga
newData
.
isRunning
=
false
ngaData
.
editNgaArea
(
value
:
newData
,
type
:
NgaOperation
.
Cancel
)
}
Button
(
"No"
){}
}
message
:
{
Text
(
"Have you finished "
+
nga
.
name
+
"switching?"
)
}
}
.
frame
(
height
:
60
)
.
padding
(
.
horizontal
,
30
)
Divider
()
.
background
(
.
white
)
}
}
//Add NGAボタン
let
isAddNga
=
ngaData
.
ngaArea
.
count
<
ngaAreaMax
Button
(
action
:
{
if
var
ngaTmp
=
RegisteredNga
(
areaName
:
""
)
{
ngaTmp
.
isLock
=
false
ngaTmp
.
isRunning
=
false
ngaTmp
.
name
=
"NGA Area"
+
String
(
ngaData
.
ngaArea
.
count
)
ngaData
.
editType
=
EditNgaType
.
nonEdit
ngaData
.
editNga
=
ngaTmp
taskViewModel
.
viewMode
=
.
NgaSetting
}
},
label
:
{
Text
(
"Add NGA Task"
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
padding
()
})
.
frame
(
width
:
153
,
height
:
42
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
!
isAddNga
?
ColorSet
.
SecondaryDisable
.
color
:
ColorSet
.
PrimaryActiveIcon
.
color
)
.
cornerRadius
(
30
)
.
disabled
(
!
isAddNga
)
Spacer
()
}
}
}
#Preview {
NgaNotificationView
(
taskViewModel
:
TaskViewModel
())
}
Seilassist/Sailassist/Map/Task/View/NgaSettingView.swift
0 → 100644
View file @
95aff94d
This diff is collapsed.
Click to expand it.
Seilassist/Sailassist/Map/Task/ViewModel/TaskViewModel.swift
View file @
95aff94d
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
import
Foundation
import
Foundation
class
TaskViewModel
:
ObservableObject
{
class
TaskViewModel
:
ObservableObject
{
@Published
var
viewMode
:
TaskViewMode
=
.
SwitchingMenu
@Published
var
viewMode
:
TaskViewMode
=
.
MenuList
@Published
var
edittingEcaArea
:
RegisteredEca
?
=
nil
@Published
var
edittingEcaArea
:
RegisteredEca
?
=
nil
@Published
var
ecaName
:
String
=
""
@Published
var
ecaName
:
String
=
""
@Published
var
isShowSettingView
:
Bool
=
false
@Published
var
ngaName
:
String
=
""
}
}
Seilassist/Sailassist/Menu/View/MenuTitleView.swift
View file @
95aff94d
...
@@ -10,7 +10,7 @@ import SwiftUI
...
@@ -10,7 +10,7 @@ import SwiftUI
struct
MenuTitleView
:
View
{
struct
MenuTitleView
:
View
{
@Binding
var
path
:
[
MenuPath
]
@Binding
var
path
:
[
MenuPath
]
var
title
=
"Menu"
var
title
=
"Menu
Functions
"
var
body
:
some
View
{
var
body
:
some
View
{
VStack
{
VStack
{
HStack
{
HStack
{
...
...
Seilassist/Sailassist/NGA/DeleteNgaArea.swift
0 → 100644
View file @
95aff94d
//
// DeleteNgaArea.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/05/20.
//
import
Foundation
class
DeleteNgaArea
{
var
sessionNgaList
=
SessionNgaList
()
func
start
(
areaId
:
String
)
{
print
(
debug
:
"called"
)
sessionNgaList
.
RequestDeleteNgaList
(
areaId
,
completion
:
responseDeleteNgaList
)
}
private
func
responseDeleteNgaList
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
case
.
success
(
let
resultData
):
print
(
debug
:
resultData
)
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
break
}
}
}
Seilassist/Sailassist/NGA/GetNgaList.swift
0 → 100644
View file @
95aff94d
//
// GetNgaList.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/06/15.
//
import
Foundation
import
SwiftUI
import
CoreLocation
class
GetNgaList
{
@ObservedObject
var
ngaData
=
SharingData
.
nga
var
sessionNgaList
=
SessionNgaList
()
func
start
()
{
print
(
debug
:
"called"
)
sessionNgaList
.
RequestGetNgaList
(
responseGetNgaList
)
}
private
func
responseGetNgaList
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
print
(
debug
:
"Test: GetNgaList"
)
switch
result
{
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
[
ReqNgaList
]
.
self
)
if
let
res
=
resjson
{
var
ngaAreas
=
ngaData
.
ngaArea
for
ngaList
in
res
{
if
let
id
=
NSUUID
(
uuidString
:
ngaList
.
id
)
{
if
var
nga
=
ngaAreas
[
id
as
UUID
]
{
print
(
debug
:
"Test: 1
\(
nga
)
"
)
// nga.name = ngaList.name
nga
.
isLock
=
ngaList
.
lock
nga
.
points
.
removeAll
()
for
pos
in
ngaList
.
geometry
{
let
point
=
CLLocationCoordinate2D
(
latitude
:
pos
.
lat
!
,
longitude
:
pos
.
lon
!
)
nga
.
points
.
append
(
point
)
}
ngaAreas
.
updateValue
(
nga
,
forKey
:
nga
.
areaId
)
print
(
debug
:
"Test: 2
\(
nga
)
"
)
}
else
{
if
var
nga
=
RegisteredNga
(
areaName
:
"test dammy"
)
{
//TODO: 名称はダミー
nga
.
areaId
=
id
as
UUID
nga
.
isLock
=
ngaList
.
lock
nga
.
isRunning
=
ngaList
.
enabled
if
!
ngaList
.
enabled
{
nga
.
passingCnt
=
0
}
nga
.
color
=
Color
.
green
.
description
for
pos
in
ngaList
.
geometry
{
let
point
=
CLLocationCoordinate2D
(
latitude
:
pos
.
lat
!
,
longitude
:
pos
.
lon
!
)
nga
.
points
.
append
(
point
)
}
ngaAreas
.
updateValue
(
nga
,
forKey
:
nga
.
areaId
)
}
}
}
for
ares
in
ngaAreas
{
ngaData
.
setNgaArea
(
key
:
ares
.
value
.
areaId
,
value
:
ares
.
value
)
}
}
}
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
break
}
}
}
Seilassist/Sailassist/NGA/NgaTask.swift
0 → 100644
View file @
95aff94d
//
// NgaTask.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/06/11.
//
import
Foundation
class
NgaTask
{
var
ngaData
=
SharingData
.
nga
/**
* Nga通知
*/
private
func
notificationNga
(
point
:
SwitchingAlert
,
name
:
String
)
{
let
alertDB
=
AlertDB
.
OnlyOne
var
wernrec
=
WarnRecord
(
title
:
"Nga"
,
body
:
""
)
wernrec
=
alertDB
.
GetAlertNgaPoint
(
point
:
point
)
let
formatstr
=
wernrec
.
title
+
name
wernrec
.
title
=
String
(
format
:
formatstr
)
let
voicemanager
=
AlertManager
.
OnlyOne
voicemanager
.
VocalizeAlert
(
alertrec
:
wernrec
,
identifier
:
.
NgaAlert
)
}
func
checkNga
()
{
ngaData
.
ngaArea
.
forEach
{
nga
in
if
nga
.
value
.
isRunning
{
if
let
location
=
SharingData
.
location
.
location
{
var
shipPos
=
LocationCalculation
.
AreaLatLon
()
shipPos
.
NorthLat
=
location
.
latitude
shipPos
.
SouthLat
=
location
.
latitude
shipPos
.
EastLon
=
location
.
longitude
shipPos
.
WestLon
=
location
.
longitude
var
areaPoints
=
nga
.
value
.
points
areaPoints
.
append
(
nga
.
value
.
points
[
0
])
let
isInside
=
LocationCalculation
.
checkBeset
(
objPos
:
areaPoints
,
minMax
:
shipPos
,
exceed180
:
false
)
var
area
=
nga
.
value
if
isInside
{
//通過中
area
.
passingCnt
+=
1
let
test
=
area
.
passingCnt
print
(
debug
:
"Test:
\(
test
)
"
)
ngaData
.
editNgaArea
(
value
:
area
,
type
:
NgaOperation
.
Passing
)
if
area
.
passingCnt
==
1
{
let
areaName
=
nga
.
value
.
name
notificationNga
(
point
:
SwitchingAlert
.
NgaPassing
,
name
:
areaName
)
}
}
else
{
if
area
.
passingCnt
>
0
{
//通過
area
.
passingCnt
=
0
ngaData
.
editNgaArea
(
value
:
area
,
type
:
NgaOperation
.
Passing
)
}
}
}
}
}
}
}
Seilassist/Sailassist/NGA/RegistereNga.swift
0 → 100644
View file @
95aff94d
//
// RegistereNga.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/05/16.
//
import
Foundation
import
CoreLocation
import
SwiftUI
let
ngaAreaMax
=
30
let
ngaAreaPointMax
=
50
enum
EditNgaType
{
case
nonEdit
case
addPoint
case
movePoint
case
deletePoint
case
registered
}
struct
RegisteredNga
{
var
areaId
=
UUID
()
var
isLock
:
Bool
=
false
var
isRunning
:
Bool
=
false
var
passingCnt
:
Int
=
0
//1以上で通過中
var
name
:
String
=
""
//Area名称
var
datetime
:
String
=
""
//時刻(UTC ISO8601準拠)
var
color
=
Color
.
green
.
description
//ライン色(ARGB)
var
width
:
Int
=
1
//ライン幅
var
points
:
[
CLLocationCoordinate2D
]
=
[]
init
?(
areaName
:
String
)
{
self
.
name
=
areaName
}
}
Seilassist/Sailassist/NGA/SetNgaArea.swift
0 → 100644
View file @
95aff94d
//
// SetNgaArea.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/06/14.
//
import
Foundation
import
SwiftUI
class
SetNgaArea
{
@ObservedObject
var
ngaData
=
SharingData
.
nga
var
sessionNgaList
=
SessionNgaList
()
func
start
(
nga
:
ReqNgaList
)
{
print
(
debug
:
"called"
)
sessionNgaList
.
RequestPostNgaList
(
nga
,
completion
:
responsePostNgaList
)
}
private
func
responsePostNgaList
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
case
.
success
(
let
errorCode
):
print
(
debug
:
"success:
\(
errorCode
)
"
)
case
.
failure
(
let
errorCode
):
print
(
debug
:
"failure:
\(
errorCode
)
"
)
break
}
}
}
Seilassist/Sailassist/ServerSession/ServerSession.swift
View file @
95aff94d
...
@@ -211,32 +211,29 @@ class ServerSession{
...
@@ -211,32 +211,29 @@ class ServerSession{
func
httpBody
(
boundary
:
String
,
_
uploadImage
:
ReqUploadImage
)
->
Data
!
{
func
httpBody
(
boundary
:
String
,
_
uploadImage
:
ReqUploadImage
)
->
Data
!
{
var
httpBody1
=
"--
\(
boundary
)\r\n
"
var
httpBody1
=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
s
hipId
\"\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
S
hipId
\"\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\(
uploadImage
.
shipId
)\r\n
"
httpBody1
+=
"
\(
uploadImage
.
shipId
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
m
essageId
\"\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
M
essageId
\"\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\(
uploadImage
.
messageId
)\r\n
"
httpBody1
+=
"
\(
uploadImage
.
messageId
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
l
ocation
\"\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
L
ocation
\"\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\(
uploadImage
.
location
)\r\n
"
httpBody1
+=
"
\(
uploadImage
.
location
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
f
rom
\"\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
F
rom
\"\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\(
uploadImage
.
from
)\r\n
"
httpBody1
+=
"
\(
uploadImage
.
from
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
f
romId
\"\r\n
"
httpBody1
+=
"Content-Disposition: form-data; name=
\"
F
romId
\"\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\(
uploadImage
.
fromId
)\r\n
"
httpBody1
+=
"
\(
uploadImage
.
fromId
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
httpBody1
+=
"--
\(
boundary
)\r\n
"
// httpBody1 += "Content-Disposition: form-data; name=\"files\"; filename=\"\(uploadImage.files)\"\r\n"
httpBody1
+=
"Content-Type: image/jpeg
\r\n
"
httpBody1
+=
"Content-Type: image/jpeg
\r\n
"
httpBody1
+=
"
\r\n
"
httpBody1
+=
"
\r\n
"
// var tmp = httpBody1.data(using: .utf8)!
var
httpBody
=
Data
()
var
httpBody
=
Data
()
httpBody
.
append
(
httpBody1
.
data
(
using
:
.
utf8
)
!
)
httpBody
.
append
(
httpBody1
.
data
(
using
:
.
utf8
)
!
)
httpBody
.
append
(
uploadImage
.
files
)
httpBody
.
append
(
uploadImage
.
files
)
...
...
Seilassist/Sailassist/ServerSession/SessionNgaList.swift
0 → 100644
View file @
95aff94d
//
// SessionNgaList.swift
// Sailassist
//
// Created by 三浦薫巳 on 2024/06/14.
//
import
Foundation
import
SwiftUI
class
SessionNgaList
:
ObservableObject
{
@Published
var
status
=
false
// シングルトン宣言
static
let
OnlyOne
=
SessionNgaList
()
private
var
serverSession
=
ServerSession
()
private
var
Calling
:
Bool
=
false
// 通信中
/**
* タスクリスト取得
*/
func
RequestGetNgaList
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
Calling
=
true
// リクエストURLの組み立て
let
id
=
Preferences
.
shipId
if
id
!=
0
{
var
url_string
:
String
=
HttpRequestType
.
NgaList
.
rawValue
url_string
=
url_string
.
replacingOccurrences
(
of
:
"XXXXX"
,
with
:
String
(
id
))
guard
let
req_url
=
URL
(
string
:
url_string
)
else
{
Calling
=
false
return
}
serverSession
.
getJson
(
req_url
,
completion
:
completion
)
}
}
/**
* タスク保存
*/
func
RequestPostNgaList
(
_
nga
:
ReqNgaList
,
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
Calling
=
true
// リクエストURLの組み立て
let
id
=
Preferences
.
shipId
if
id
!=
0
{
var
url_string
:
String
=
HttpRequestType
.
NgaList
.
rawValue
url_string
=
url_string
.
replacingOccurrences
(
of
:
"XXXXX"
,
with
:
String
(
id
))
guard
let
req_url
=
URL
(
string
:
url_string
)
else
{
Calling
=
false
return
}
if
let
postdata
=
serverSession
.
toJSON
(
nga
)
{
serverSession
.
postJson
(
req_url
,
postdata
,
completion
:
completion
)
}
else
{
Calling
=
false
return
}
}
}
/**
* NGAタスク削除
*/
func
RequestDeleteNgaList
(
_
ngaId
:
String
,
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
Calling
=
true
// リクエストURLの組み立て
let
id
=
Preferences
.
shipId
if
id
!=
0
{
let
strId
=
String
(
id
)
+
"/"
+
ngaId
var
url_string
:
String
=
HttpRequestType
.
NgaList
.
rawValue
url_string
=
url_string
.
replacingOccurrences
(
of
:
"XXXXX"
,
with
:
strId
)
guard
let
req_url
=
URL
(
string
:
url_string
)
else
{
Calling
=
false
return
}
serverSession
.
deleteJson
(
req_url
,
completion
:
completion
)
}
}
}
Seilassist/Sailassist/ServerSession/SessionUploadImage.swift
View file @
95aff94d
...
@@ -33,8 +33,7 @@ class SessionUploadImage : ObservableObject {
...
@@ -33,8 +33,7 @@ class SessionUploadImage : ObservableObject {
return
return
}
}
// let boundary = "----------" + UUID().uuidString
let
boundary
=
"----------"
+
uploadImage
.
messageId
let
boundary
=
"----WebKitFormBoundaryZLdHZy8HNaBmUX0d"
if
let
postdata
=
serverSession
.
httpBody
(
boundary
:
boundary
,
uploadImage
)
{
if
let
postdata
=
serverSession
.
httpBody
(
boundary
:
boundary
,
uploadImage
)
{
serverSession
.
postForm
(
boundary
:
boundary
,
req_url
,
postdata
,
completion
:
completion
)
serverSession
.
postForm
(
boundary
:
boundary
,
req_url
,
postdata
,
completion
:
completion
)
}
}
...
...
Seilassist/Sailassist/SharingData/SharingData.swift
View file @
95aff94d
...
@@ -112,23 +112,7 @@ class SharingData{
...
@@ -112,23 +112,7 @@ class SharingData{
@Published
var
legLine
:
[
CLLocationCoordinate2D
]
=
[]
@Published
var
legLine
:
[
CLLocationCoordinate2D
]
=
[]
@Published
var
portLine
:
[
CLLocationCoordinate2D
]
=
[]
@Published
var
portLine
:
[
CLLocationCoordinate2D
]
=
[]
@Published
var
starboardLine
:
[
CLLocationCoordinate2D
]
=
[]
@Published
var
starboardLine
:
[
CLLocationCoordinate2D
]
=
[]
}
@Published
var
isMapFree
:
Bool
=
false
static
var
message
=
Message
()
class
Message
:
ObservableObject
{
@Published
var
mode
:
Bool
=
false
// false:通常 , true:Warning中
@Published
var
messages
:
[
ChatMessage
]
=
[]
@Published
var
users
:
[
ChatUser
]
=
[]
@Published
var
viewCnt
:
Int
=
0
//未読数
func
changeMode
(){
self
.
mode
.
toggle
()
}
}
static
var
information
=
Information
()
class
Information
:
ObservableObject
{
@Published
var
content
:
[
ResInformation
]
=
[]
}
}
/**
/**
...
@@ -267,6 +251,91 @@ class SharingData{
...
@@ -267,6 +251,91 @@ class SharingData{
}
}
}
}
/**
* Nga Area
*/
static
var
nga
=
Nga
()
class
Nga
:
ObservableObject
{
@Published
var
ngaArea
:
Dictionary
<
UUID
,
RegisteredNga
>
=
[:]
@Published
var
editType
=
EditNgaType
.
nonEdit
@Published
var
editNga
:
RegisteredNga
?
=
nil
@Published
var
moveNga
:
RegisteredNga
?
=
nil
@Published
var
focusNga
:
String
?
=
nil
@Published
var
targetLocation
:
CLLocationCoordinate2D
?
=
nil
//UserMark.movePointLocation
@Published
var
selectPoint
:
Int
?
func
setNgaArea
(
key
:
UUID
,
value
:
RegisteredNga
)
{
ngaArea
.
updateValue
(
value
,
forKey
:
key
)
}
func
editNgaArea
(
value
:
RegisteredNga
,
type
:
NgaOperation
)
{
let
setNgaArea
=
SetNgaArea
()
var
task
=
ReqNgaList
(
Id
:
value
.
areaId
.
uuidString
)
switch
type
{
case
NgaOperation
.
Change
:
task
.
id
=
value
.
areaId
.
uuidString
task
.
enabled
=
value
.
isRunning
task
.
lock
=
value
.
isLock
for
point
in
value
.
points
{
let
position
=
points
(
lat
:
point
.
latitude
,
lon
:
point
.
longitude
)
task
.
geometry
.
append
(
position
)
}
setNgaArea
.
start
(
nga
:
task
)
ngaArea
.
updateValue
(
value
,
forKey
:
value
.
areaId
)
break
case
NgaOperation
.
Delete
:
let
deleteNgaArea
=
DeleteNgaArea
()
deleteNgaArea
.
start
(
areaId
:
value
.
areaId
.
uuidString
)
ngaArea
.
removeValue
(
forKey
:
value
.
areaId
)
break
case
NgaOperation
.
Running
:
task
.
id
=
value
.
areaId
.
uuidString
task
.
enabled
=
value
.
isRunning
task
.
lock
=
value
.
isLock
for
point
in
value
.
points
{
let
position
=
points
(
lat
:
point
.
latitude
,
lon
:
point
.
longitude
)
task
.
geometry
.
append
(
position
)
}
setNgaArea
.
start
(
nga
:
task
)
ngaArea
.
updateValue
(
value
,
forKey
:
value
.
areaId
)
break
case
NgaOperation
.
Passing
:
ngaArea
.
updateValue
(
value
,
forKey
:
value
.
areaId
)
break
case
NgaOperation
.
Cancel
:
task
.
id
=
value
.
areaId
.
uuidString
task
.
enabled
=
value
.
isRunning
task
.
lock
=
value
.
isLock
for
point
in
value
.
points
{
let
position
=
points
(
lat
:
point
.
latitude
,
lon
:
point
.
longitude
)
task
.
geometry
.
append
(
position
)
}
setNgaArea
.
start
(
nga
:
task
)
ngaArea
.
updateValue
(
value
,
forKey
:
value
.
areaId
)
break
}
}
}
static
var
message
=
Message
()
class
Message
:
ObservableObject
{
@Published
var
mode
:
Bool
=
false
// false:通常 , true:Warning中
@Published
var
messages
:
[
ChatMessage
]
=
[]
@Published
var
users
:
[
ChatUser
]
=
[]
@Published
var
viewCnt
:
Int
=
0
//未読数
func
changeMode
(){
self
.
mode
.
toggle
()
}
}
static
var
information
=
Information
()
class
Information
:
ObservableObject
{
@Published
var
content
:
[
ResInformation
]
=
[]
}
static
var
pushHistory
=
PushHistory
()
static
var
pushHistory
=
PushHistory
()
class
PushHistory
:
ObservableObject
{
class
PushHistory
:
ObservableObject
{
@Published
var
pushHistoryData
:
Dictionary
<
Int
,
ResPushHistory
>
=
[:]
@Published
var
pushHistoryData
:
Dictionary
<
Int
,
ResPushHistory
>
=
[:]
...
...
Seilassist/Sailassist/SharingData/StatusEnum.swift
View file @
95aff94d
...
@@ -20,6 +20,14 @@ enum EcaOperation {
...
@@ -20,6 +20,14 @@ enum EcaOperation {
case
Cancel
case
Cancel
}
}
enum
NgaOperation
{
case
Change
case
Delete
case
Running
case
Cancel
case
Passing
}
enum
ShipAlert
{
enum
ShipAlert
{
case
Offline
case
Offline
case
Unknown
case
Unknown
...
...
Seilassist/Sailassist/Tab/MainTabView.swift
View file @
95aff94d
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
import
SwiftUI
import
SwiftUI
enum
Tab
:
String
,
CaseIterable
{
enum
Tab
:
String
,
CaseIterable
{
case
chat
=
"tab_chat"
case
task
=
"tab_task"
case
task
=
"tab_task"
case
chat
=
"tab_chat"
case
alert
=
"tab_notification"
case
alert
=
"tab_notification"
case
menu
=
"tab_menu"
case
menu
=
"tab_menu"
...
@@ -41,7 +41,10 @@ struct MainTabView: View {
...
@@ -41,7 +41,10 @@ struct MainTabView: View {
ChatView
()
ChatView
()
.
tag
(
Tab
.
chat
)
.
tag
(
Tab
.
chat
)
ZStack
{
MapRepresentable
()
MapRepresentable
()
MapInformation
()
}
.
ignoresSafeArea
()
.
ignoresSafeArea
()
.
tag
(
Tab
.
task
)
.
tag
(
Tab
.
task
)
...
@@ -53,7 +56,7 @@ struct MainTabView: View {
...
@@ -53,7 +56,7 @@ struct MainTabView: View {
}
}
.
hideNativeTabBar
()
.
hideNativeTabBar
()
.
sheet
(
isPresented
:
.
constant
(
isTaskSel
&&
isTabShow
&&
SharingData
.
my
.
isFuelSwitchTask
),
content
:
{
.
sheet
(
isPresented
:
.
constant
(
isTaskSel
&&
isTabShow
&&
SharingData
.
my
.
isFuelSwitchTask
),
content
:
{
M
ap
TaskView
()
M
enu
TaskView
()
.
zIndex
(
0
)
.
zIndex
(
0
)
.
presentationDragIndicator
(
.
hidden
)
.
presentationDragIndicator
(
.
hidden
)
.
presentationDetents
([
.
height
(
150
),
.
medium
,
.
fraction
(
0.99
)])
.
presentationDetents
([
.
height
(
150
),
.
medium
,
.
fraction
(
0.99
)])
...
@@ -81,7 +84,7 @@ struct MainTabView: View {
...
@@ -81,7 +84,7 @@ struct MainTabView: View {
}
}
.
hideNativeTabBar
()
.
hideNativeTabBar
()
.
popover
(
isPresented
:
.
constant
(
isPopover
&&
SharingData
.
my
.
isFuelSwitchTask
),
attachmentAnchor
:
.
point
(
.
bottom
))
{
.
popover
(
isPresented
:
.
constant
(
isPopover
&&
SharingData
.
my
.
isFuelSwitchTask
),
attachmentAnchor
:
.
point
(
.
bottom
))
{
M
ap
TaskView
()
M
enu
TaskView
()
.
presentationCompactAdaptation
(
.
none
)
.
presentationCompactAdaptation
(
.
none
)
.
zIndex
(
0
)
.
zIndex
(
0
)
.
frame
(
minWidth
:
300
,
maxHeight
:
500
)
.
frame
(
minWidth
:
300
,
maxHeight
:
500
)
...
...
Seilassist/Sailassist/VoiceManager/AlertManager.swift
View file @
95aff94d
...
@@ -19,10 +19,6 @@ class AlertManager {
...
@@ -19,10 +19,6 @@ class AlertManager {
var
lastSpeech
:
String
=
""
var
lastSpeech
:
String
=
""
// 警報を鳴らす。引数の型定義はAlertDB.swift
// 警報を鳴らす。引数の型定義はAlertDB.swift
func
VocalizeAlert
(
alertrec
:
WarnRecord
)
{
VocalizeAlert
(
alertrec
:
alertrec
,
identifier
:
.
EcaSwitching
)
}
func
VocalizeAlert
(
alertrec
:
WarnRecord
,
identifier
:
PushNotificationTypes
.
LocalPushIdentifier
)
{
func
VocalizeAlert
(
alertrec
:
WarnRecord
,
identifier
:
PushNotificationTypes
.
LocalPushIdentifier
)
{
print
(
debug
:
"alertrec =
\(
alertrec
)
"
)
print
(
debug
:
"alertrec =
\(
alertrec
)
"
)
...
...
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