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
c3dcabeb
Commit
c3dcabeb
authored
Apr 03, 2024
by
shigemi miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ECAタスク有効のままアプリをアップデートするとクラッシュする不具合を修正
parent
503948c3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
50 deletions
+53
-50
project.pbxproj
Seilassist/Sailassist.xcodeproj/project.pbxproj
+6
-6
EcaArea.swift
Seilassist/Sailassist/ECA/EcaArea.swift
+3
-1
EcaTask.swift
Seilassist/Sailassist/ECA/EcaTask.swift
+41
-40
LocationViewModel.swift
Seilassist/Sailassist/LocationViewModel.swift
+3
-0
LoginView.swift
Seilassist/Sailassist/Login/LoginView.swift
+0
-3
No files found.
Seilassist/Sailassist.xcodeproj/project.pbxproj
View file @
c3dcabeb
...
...
@@ -1238,7 +1238,7 @@
CODE_SIGN_ENTITLEMENTS
=
Sailassist/Sailassist.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
2
0
;
CURRENT_PROJECT_VERSION
=
2
2
;
DEVELOPMENT_ASSET_PATHS
=
"\"Sailassist/Preview Content\""
;
DEVELOPMENT_TEAM
=
D2DC7QNNJ8
;
ENABLE_PREVIEWS
=
YES
;
...
...
@@ -1262,7 +1262,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
1.0.
1
;
MARKETING_VERSION
=
1.0.
2
;
OTHER_SWIFT_FLAGS
=
"-D CANARY -D COCOAPODS"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.jrc.sailassist.canary
;
PRODUCT_NAME
=
"Sail Assist"
;
...
...
@@ -1284,7 +1284,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME
=
AccentColor
;
CODE_SIGN_ENTITLEMENTS
=
Sailassist/Sailassist.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
2
0
;
CURRENT_PROJECT_VERSION
=
2
2
;
DEVELOPMENT_ASSET_PATHS
=
"\"Sailassist/Preview Content\""
;
DEVELOPMENT_TEAM
=
D2DC7QNNJ8
;
ENABLE_PREVIEWS
=
YES
;
...
...
@@ -1305,7 +1305,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
1.0.
1
;
MARKETING_VERSION
=
1.0.
2
;
OTHER_SWIFT_FLAGS
=
"-D COCOAPODS"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.jrc.sailassist
;
PRODUCT_NAME
=
"Sail Assist"
;
...
...
@@ -1468,7 +1468,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME
=
AccentColor
;
CODE_SIGN_ENTITLEMENTS
=
Sailassist/Sailassist.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
2
0
;
CURRENT_PROJECT_VERSION
=
2
2
;
DEVELOPMENT_ASSET_PATHS
=
"\"Sailassist/Preview Content\""
;
DEVELOPMENT_TEAM
=
D2DC7QNNJ8
;
ENABLE_PREVIEWS
=
YES
;
...
...
@@ -1492,7 +1492,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
1.0.
1
;
MARKETING_VERSION
=
1.0.
2
;
OTHER_SWIFT_FLAGS
=
"-D QC -D COCOAPODS"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.jrc.sailassist.qc
;
PRODUCT_NAME
=
"Sail Assist"
;
...
...
Seilassist/Sailassist/ECA/EcaArea.swift
View file @
c3dcabeb
...
...
@@ -57,12 +57,14 @@ class EcaArea {
}
func
start
()
{
print
(
debug
:
"called"
)
tableInit
()
sessionEcaArea
.
RequestEcaArea
(
responseEcaArea
)
}
/**
* ECA領域読み込み
*/
private
func
responseEcaArea
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
...
...
Seilassist/Sailassist/ECA/EcaTask.swift
View file @
c3dcabeb
...
...
@@ -49,7 +49,6 @@ class EcaTask {
SharingData
.
location
.
setLocation
()
print
(
debug
:
"Location:
\(
res
)
"
)
checkEca
()
}
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
...
...
@@ -60,45 +59,47 @@ class EcaTask {
func
checkEca
()
{
let
runningEca
=
eca
.
ecaArea
.
first
(
where
:
{(
key
,
value
)
in
value
.
isRunning
==
true
})
if
let
eca
=
runningEca
?
.
value
{
if
let
location
=
SharingData
.
location
.
location
{
if
let
distance
=
LocationCalculation
.
checkPolyline
(
objPos
:
eca
.
points
,
shipPos
:
location
){
if
SharingData
.
my
.
ecaStatus
==
nil
{
SharingData
.
my
.
ecaStatus
=
EcaState
.
running
}
// if 0.0 >= Float(distance) && SharingData.my.ecaStatus != EcaState.incomplete{
// SharingData.my.ecaStatus = EcaState.incomplete
// var newData = eca
// newData.isRunning = false
// newData.status = EcaState.incomplete
// SharingData.eca.editEcaArea(key: eca.name, value: newData, type: EcaOperation.Incomplete)
// }
if
eca
.
swFinish
>=
Float
(
distance
)
&&
0.0
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
finishPass
{
// notificationEca(point: SwitchingEca.Finish)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
finishPass
let
ecaTask
=
EcaTask
()
ecaTask
.
chengeEcaStatus
(
eca
:
eca
)
}
if
eca
.
swStart
>=
Float
(
distance
)
&&
eca
.
swFinish
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
startPass
{
notificationEca
(
point
:
SwitchingEca
.
Start
)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
startPass
let
ecaTask
=
EcaTask
()
ecaTask
.
chengeEcaStatus
(
eca
:
eca
)
}
if
eca
.
swNotice
>=
Float
(
distance
)
&&
eca
.
swStart
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
noticePass
{
notificationEca
(
point
:
SwitchingEca
.
Notice
)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
noticePass
let
ecaTask
=
EcaTask
()
ecaTask
.
chengeEcaStatus
(
eca
:
eca
)
if
eca
.
points
.
count
!=
0
{
if
let
location
=
SharingData
.
location
.
location
{
if
let
distance
=
LocationCalculation
.
checkPolyline
(
objPos
:
eca
.
points
,
shipPos
:
location
){
if
SharingData
.
my
.
ecaStatus
==
nil
{
SharingData
.
my
.
ecaStatus
=
EcaState
.
running
}
// if 0.0 >= Float(distance) && SharingData.my.ecaStatus != EcaState.incomplete{
// SharingData.my.ecaStatus = EcaState.incomplete
// var newData = eca
// newData.isRunning = false
// newData.status = EcaState.incomplete
// SharingData.eca.editEcaArea(key: eca.name, value: newData, type: EcaOperation.Incomplete)
// }
if
eca
.
swFinish
>=
Float
(
distance
)
&&
0.0
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
finishPass
{
// notificationEca(point: SwitchingEca.Finish)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
finishPass
let
ecaTask
=
EcaTask
()
ecaTask
.
chengeEcaStatus
(
eca
:
eca
)
}
if
eca
.
swStart
>=
Float
(
distance
)
&&
eca
.
swFinish
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
startPass
{
notificationEca
(
point
:
SwitchingEca
.
Start
)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
startPass
let
ecaTask
=
EcaTask
()
ecaTask
.
chengeEcaStatus
(
eca
:
eca
)
}
if
eca
.
swNotice
>=
Float
(
distance
)
&&
eca
.
swStart
<
Float
(
distance
)
&&
SharingData
.
my
.
ecaStatus
!=
EcaState
.
noticePass
{
notificationEca
(
point
:
SwitchingEca
.
Notice
)
SharingData
.
eca
.
isShowEcaAlert
=
true
SharingData
.
my
.
ecaStatus
=
EcaState
.
noticePass
let
ecaTask
=
EcaTask
()
ecaTask
.
chengeEcaStatus
(
eca
:
eca
)
}
}
}
}
...
...
Seilassist/Sailassist/LocationViewModel.swift
View file @
c3dcabeb
...
...
@@ -16,6 +16,9 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
let
ecaTask
=
EcaTask
()
override
init
()
{
let
ecaArea
=
EcaArea
()
ecaArea
.
start
()
locationManager
=
CLLocationManager
()
authorizationStatus
=
locationManager
.
authorizationStatus
...
...
Seilassist/Sailassist/Login/LoginView.swift
View file @
c3dcabeb
...
...
@@ -207,9 +207,6 @@ struct LoginView: View {
Preferences
.
lastLoginDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
isLogin
=
true
let
ecaArea
=
EcaArea
()
ecaArea
.
start
()
timer
=
Timer
.
scheduledTimer
(
withTimeInterval
:
TimerInterval
,
repeats
:
true
)
{
_
in
print
(
debug
:
"called timer"
)
let
eca
=
EcaTask
()
...
...
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