Commit 7d4ad639 authored by sugita mamoru's avatar sugita mamoru

Merge commit 'f436dc36' into develop

parents 07a61c4c f436dc36
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AzureNotificationHubs-iOS FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftSignalRClient" "${PODS_ROOT}/AzureNotificationHubs-iOS/WindowsAzureMessaging-SDK-Apple" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AzureNotificationHubs-iOS"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AzureNotificationHubs-iOS/WindowsAzureMessaging-SDK-Apple" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AzureNotificationHubs-iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications" HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftSignalRClient/SwiftSignalRClient.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SwiftSignalRClient" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT} PODS_ROOT = ${SRCROOT}/Pods
PODS_TARGET_SRCROOT = ${PODS_ROOT}/AzureNotificationHubs-iOS
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
${PODS_ROOT}/Target Support Files/Pods-Sailassist/Pods-Sailassist-frameworks.sh
${BUILT_PRODUCTS_DIR}/SwiftSignalRClient/SwiftSignalRClient.framework
\ No newline at end of file
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftSignalRClient.framework
\ No newline at end of file
...@@ -175,7 +175,10 @@ code_sign_if_enabled() { ...@@ -175,7 +175,10 @@ code_sign_if_enabled() {
fi fi
} }
if [[ "$CONFIGURATION" == "Debug" ]]; then if [[ "$CONFIGURATION" == "Canary" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/SwiftSignalRClient/SwiftSignalRClient.framework"
fi
if [[ "$CONFIGURATION" == "QC" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/SwiftSignalRClient/SwiftSignalRClient.framework" install_framework "${BUILT_PRODUCTS_DIR}/SwiftSignalRClient/SwiftSignalRClient.framework"
fi fi
if [[ "$CONFIGURATION" == "Release" ]]; then if [[ "$CONFIGURATION" == "Release" ]]; then
......
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftSignalRClient FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftSignalRClient" "${PODS_ROOT}/AzureNotificationHubs-iOS/WindowsAzureMessaging-SDK-Apple" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AzureNotificationHubs-iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftSignalRClient/SwiftSignalRClient.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "SwiftSignalRClient" -framework "SystemConfiguration" -framework "UIKit" -framework "WindowsAzureMessaging" -weak_framework "UserNotifications"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT} PODS_ROOT = ${SRCROOT}/Pods
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftSignalRClient
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
...@@ -68,6 +68,8 @@ ...@@ -68,6 +68,8 @@
02CE4DDA2ADFBA72002E79BC /* MapRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE4DD92ADFBA72002E79BC /* MapRepresentable.swift */; }; 02CE4DDA2ADFBA72002E79BC /* MapRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE4DD92ADFBA72002E79BC /* MapRepresentable.swift */; };
2029B9BCB93A0DA741B37C99 /* Pods_SailAssistTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B32070D11BBF0B1D8414CA0 /* Pods_SailAssistTests.framework */; }; 2029B9BCB93A0DA741B37C99 /* Pods_SailAssistTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B32070D11BBF0B1D8414CA0 /* Pods_SailAssistTests.framework */; };
8BC191CD6D5B4F87E21A919E /* Pods_Sailassist.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0FEAAD52DBB0E6EEDDF66297 /* Pods_Sailassist.framework */; }; 8BC191CD6D5B4F87E21A919E /* Pods_Sailassist.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0FEAAD52DBB0E6EEDDF66297 /* Pods_Sailassist.framework */; };
D51AA4042B099DCD00EBBDD4 /* SignalRService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51AA4032B099DCD00EBBDD4 /* SignalRService.swift */; };
D51AA4072B099FCC00EBBDD4 /* AlertDB.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51AA4062B099FCC00EBBDD4 /* AlertDB.swift */; };
D5258C992B0334BF00365276 /* SessionShipStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5258C982B0334BF00365276 /* SessionShipStatus.swift */; }; D5258C992B0334BF00365276 /* SessionShipStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5258C982B0334BF00365276 /* SessionShipStatus.swift */; };
D5258C9B2B03401E00365276 /* MonitoringRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5258C9A2B03401E00365276 /* MonitoringRoute.swift */; }; D5258C9B2B03401E00365276 /* MonitoringRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5258C9A2B03401E00365276 /* MonitoringRoute.swift */; };
D5258C9D2B03507A00365276 /* ResMonitoringRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5258C9C2B03507A00365276 /* ResMonitoringRoute.swift */; }; D5258C9D2B03507A00365276 /* ResMonitoringRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5258C9C2B03507A00365276 /* ResMonitoringRoute.swift */; };
...@@ -79,6 +81,10 @@ ...@@ -79,6 +81,10 @@
D52D213A2AEBAC0500324D58 /* HttpRequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21392AEBAC0500324D58 /* HttpRequestType.swift */; }; D52D213A2AEBAC0500324D58 /* HttpRequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21392AEBAC0500324D58 /* HttpRequestType.swift */; };
D52D213F2AEBB7D700324D58 /* RegisteredEca.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D213E2AEBB7D700324D58 /* RegisteredEca.swift */; }; D52D213F2AEBB7D700324D58 /* RegisteredEca.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D213E2AEBB7D700324D58 /* RegisteredEca.swift */; };
D52D21412AEDE18F00324D58 /* EcaCoordinatesTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */; }; D52D21412AEDE18F00324D58 /* EcaCoordinatesTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */; };
D545FC712B09C3F900F206D0 /* sound_eca.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = D545FC702B09C3F900F206D0 /* sound_eca.mp3 */; };
D545FC742B09C74300F206D0 /* AlertManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC732B09C74300F206D0 /* AlertManager.swift */; };
D545FC762B09C81300F206D0 /* PushNotificationTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */; };
D545FC782B09E18D00F206D0 /* no_sound.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = D545FC772B09E18D00F206D0 /* no_sound.mp3 */; };
D5AE351A2AEBA66A00059889 /* ReqLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5AE35182AEBA66A00059889 /* ReqLogin.swift */; }; D5AE351A2AEBA66A00059889 /* ReqLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5AE35182AEBA66A00059889 /* ReqLogin.swift */; };
D5AE351B2AEBA66A00059889 /* ResLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5AE35192AEBA66A00059889 /* ResLogin.swift */; }; D5AE351B2AEBA66A00059889 /* ResLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5AE35192AEBA66A00059889 /* ResLogin.swift */; };
D5AE351D2AEBA6FC00059889 /* SessionLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5AE351C2AEBA6FC00059889 /* SessionLogin.swift */; }; D5AE351D2AEBA6FC00059889 /* SessionLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5AE351C2AEBA6FC00059889 /* SessionLogin.swift */; };
...@@ -189,6 +195,8 @@ ...@@ -189,6 +195,8 @@
219BE6116979A30E49783646 /* Pods-SailAssistTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SailAssistTests.debug.xcconfig"; path = "Target Support Files/Pods-SailAssistTests/Pods-SailAssistTests.debug.xcconfig"; sourceTree = "<group>"; }; 219BE6116979A30E49783646 /* Pods-SailAssistTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SailAssistTests.debug.xcconfig"; path = "Target Support Files/Pods-SailAssistTests/Pods-SailAssistTests.debug.xcconfig"; sourceTree = "<group>"; };
3B32070D11BBF0B1D8414CA0 /* Pods_SailAssistTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SailAssistTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B32070D11BBF0B1D8414CA0 /* Pods_SailAssistTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SailAssistTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5EC865823FADEA24F5D2773B /* Pods-Sailassist.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sailassist.release.xcconfig"; path = "Target Support Files/Pods-Sailassist/Pods-Sailassist.release.xcconfig"; sourceTree = "<group>"; }; 5EC865823FADEA24F5D2773B /* Pods-Sailassist.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sailassist.release.xcconfig"; path = "Target Support Files/Pods-Sailassist/Pods-Sailassist.release.xcconfig"; sourceTree = "<group>"; };
D51AA4032B099DCD00EBBDD4 /* SignalRService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SignalRService.swift; path = Sailassist/SignalR/SignalRService.swift; sourceTree = SOURCE_ROOT; };
D51AA4062B099FCC00EBBDD4 /* AlertDB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AlertDB.swift; path = Sailassist/DataSource/AlertDB.swift; sourceTree = SOURCE_ROOT; };
D5258C982B0334BF00365276 /* SessionShipStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SessionShipStatus.swift; path = Sailassist/ServerSession/SessionShipStatus.swift; sourceTree = SOURCE_ROOT; }; D5258C982B0334BF00365276 /* SessionShipStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SessionShipStatus.swift; path = Sailassist/ServerSession/SessionShipStatus.swift; sourceTree = SOURCE_ROOT; };
D5258C9A2B03401E00365276 /* MonitoringRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MonitoringRoute.swift; path = Sailassist/Map/MonitoringRoute.swift; sourceTree = SOURCE_ROOT; }; D5258C9A2B03401E00365276 /* MonitoringRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MonitoringRoute.swift; path = Sailassist/Map/MonitoringRoute.swift; sourceTree = SOURCE_ROOT; };
D5258C9C2B03507A00365276 /* ResMonitoringRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ResMonitoringRoute.swift; path = Sailassist/Json/ResMonitoringRoute.swift; sourceTree = SOURCE_ROOT; }; D5258C9C2B03507A00365276 /* ResMonitoringRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ResMonitoringRoute.swift; path = Sailassist/Json/ResMonitoringRoute.swift; sourceTree = SOURCE_ROOT; };
...@@ -200,6 +208,10 @@ ...@@ -200,6 +208,10 @@
D52D21392AEBAC0500324D58 /* HttpRequestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HttpRequestType.swift; path = Sailassist/Http/HttpRequestType.swift; sourceTree = SOURCE_ROOT; }; D52D21392AEBAC0500324D58 /* HttpRequestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HttpRequestType.swift; path = Sailassist/Http/HttpRequestType.swift; sourceTree = SOURCE_ROOT; };
D52D213E2AEBB7D700324D58 /* RegisteredEca.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RegisteredEca.swift; path = Sailassist/ECA/RegisteredEca.swift; sourceTree = SOURCE_ROOT; }; D52D213E2AEBB7D700324D58 /* RegisteredEca.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RegisteredEca.swift; path = Sailassist/ECA/RegisteredEca.swift; sourceTree = SOURCE_ROOT; };
D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = EcaCoordinatesTable.swift; path = Sailassist/ECA/EcaCoordinatesTable.swift; sourceTree = SOURCE_ROOT; }; D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = EcaCoordinatesTable.swift; path = Sailassist/ECA/EcaCoordinatesTable.swift; sourceTree = SOURCE_ROOT; };
D545FC702B09C3F900F206D0 /* sound_eca.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = sound_eca.mp3; path = Sailassist/OtherAlertVoice/sound_eca.mp3; sourceTree = SOURCE_ROOT; };
D545FC732B09C74300F206D0 /* AlertManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AlertManager.swift; path = Sailassist/VoiceManager/AlertManager.swift; sourceTree = SOURCE_ROOT; };
D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PushNotificationTypes.swift; path = Sailassist/DataSource/PushNotificationTypes.swift; sourceTree = SOURCE_ROOT; };
D545FC772B09E18D00F206D0 /* no_sound.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = no_sound.mp3; path = Sailassist/OtherAlertVoice/no_sound.mp3; sourceTree = SOURCE_ROOT; };
D5AE35182AEBA66A00059889 /* ReqLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ReqLogin.swift; path = Sailassist/Json/ReqLogin.swift; sourceTree = SOURCE_ROOT; }; D5AE35182AEBA66A00059889 /* ReqLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ReqLogin.swift; path = Sailassist/Json/ReqLogin.swift; sourceTree = SOURCE_ROOT; };
D5AE35192AEBA66A00059889 /* ResLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ResLogin.swift; path = Sailassist/Json/ResLogin.swift; sourceTree = SOURCE_ROOT; }; D5AE35192AEBA66A00059889 /* ResLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ResLogin.swift; path = Sailassist/Json/ResLogin.swift; sourceTree = SOURCE_ROOT; };
D5AE351C2AEBA6FC00059889 /* SessionLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SessionLogin.swift; path = Sailassist/ServerSession/SessionLogin.swift; sourceTree = SOURCE_ROOT; }; D5AE351C2AEBA6FC00059889 /* SessionLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SessionLogin.swift; path = Sailassist/ServerSession/SessionLogin.swift; sourceTree = SOURCE_ROOT; };
...@@ -270,6 +282,10 @@ ...@@ -270,6 +282,10 @@
020B98122AD8C3140029DE4C /* SailAssist */ = { 020B98122AD8C3140029DE4C /* SailAssist */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
D545FC722B09C6DA00F206D0 /* VoiceManager */,
D545FC6F2B09AEF500F206D0 /* OtherAlertVoice */,
D51AA4052B099F6D00EBBDD4 /* DataSource */,
D51AA4022B099DA600EBBDD4 /* SignalR */,
D5EA86482AF2139D0032E810 /* Location */, D5EA86482AF2139D0032E810 /* Location */,
D52D213B2AEBB78E00324D58 /* ECA */, D52D213B2AEBB78E00324D58 /* ECA */,
D52D21382AEBABE700324D58 /* Http */, D52D21382AEBABE700324D58 /* Http */,
...@@ -559,6 +575,23 @@ ...@@ -559,6 +575,23 @@
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D51AA4022B099DA600EBBDD4 /* SignalR */ = {
isa = PBXGroup;
children = (
D51AA4032B099DCD00EBBDD4 /* SignalRService.swift */,
);
path = SignalR;
sourceTree = "<group>";
};
D51AA4052B099F6D00EBBDD4 /* DataSource */ = {
isa = PBXGroup;
children = (
D51AA4062B099FCC00EBBDD4 /* AlertDB.swift */,
D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */,
);
path = DataSource;
sourceTree = "<group>";
};
D52D21382AEBABE700324D58 /* Http */ = { D52D21382AEBABE700324D58 /* Http */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -577,6 +610,23 @@ ...@@ -577,6 +610,23 @@
path = ECA; path = ECA;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D545FC6F2B09AEF500F206D0 /* OtherAlertVoice */ = {
isa = PBXGroup;
children = (
D545FC772B09E18D00F206D0 /* no_sound.mp3 */,
D545FC702B09C3F900F206D0 /* sound_eca.mp3 */,
);
path = OtherAlertVoice;
sourceTree = "<group>";
};
D545FC722B09C6DA00F206D0 /* VoiceManager */ = {
isa = PBXGroup;
children = (
D545FC732B09C74300F206D0 /* AlertManager.swift */,
);
path = VoiceManager;
sourceTree = "<group>";
};
D5AE35172AEBA64800059889 /* Json */ = { D5AE35172AEBA64800059889 /* Json */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -664,7 +714,7 @@ ...@@ -664,7 +714,7 @@
020B98082AD8C3140029DE4C /* Project object */ = { 020B98082AD8C3140029DE4C /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
BuildIndependentTargetsInParallel = 1; BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1500; LastSwiftUpdateCheck = 1500;
LastUpgradeCheck = 1500; LastUpgradeCheck = 1500;
TargetAttributes = { TargetAttributes = {
...@@ -707,7 +757,9 @@ ...@@ -707,7 +757,9 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
020B981B2AD8C3190029DE4C /* Preview Assets.xcassets in Resources */, 020B981B2AD8C3190029DE4C /* Preview Assets.xcassets in Resources */,
D545FC712B09C3F900F206D0 /* sound_eca.mp3 in Resources */,
020B98182AD8C3190029DE4C /* Assets.xcassets in Resources */, 020B98182AD8C3190029DE4C /* Assets.xcassets in Resources */,
D545FC782B09E18D00F206D0 /* no_sound.mp3 in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -830,6 +882,8 @@ ...@@ -830,6 +882,8 @@
D5CB6F992B02088C00EC2010 /* ResShipStatus.swift in Sources */, D5CB6F992B02088C00EC2010 /* ResShipStatus.swift in Sources */,
020B984B2AD915810029DE4C /* QRReadView.swift in Sources */, 020B984B2AD915810029DE4C /* QRReadView.swift in Sources */,
02A1DE332AFB654A005BCF55 /* CustomCornerRadius.swift in Sources */, 02A1DE332AFB654A005BCF55 /* CustomCornerRadius.swift in Sources */,
D545FC762B09C81300F206D0 /* PushNotificationTypes.swift in Sources */,
D545FC742B09C74300F206D0 /* AlertManager.swift in Sources */,
020B98692ADD221E0029DE4C /* Preferences.swift in Sources */, 020B98692ADD221E0029DE4C /* Preferences.swift in Sources */,
02CD06932AE88970005F8D8F /* ServerSession.swift in Sources */, 02CD06932AE88970005F8D8F /* ServerSession.swift in Sources */,
02A1DE312AFB61D8005BCF55 /* MyChatContentView.swift in Sources */, 02A1DE312AFB61D8005BCF55 /* MyChatContentView.swift in Sources */,
...@@ -851,6 +905,7 @@ ...@@ -851,6 +905,7 @@
02CD068F2AE6535F005F8D8F /* MapSource.swift in Sources */, 02CD068F2AE6535F005F8D8F /* MapSource.swift in Sources */,
02C3E5CE2AFCA04700AF7837 /* OtherChatContentView.swift in Sources */, 02C3E5CE2AFCA04700AF7837 /* OtherChatContentView.swift in Sources */,
020B98442AD8E4910029DE4C /* FontStyle.swift in Sources */, 020B98442AD8E4910029DE4C /* FontStyle.swift in Sources */,
D51AA4042B099DCD00EBBDD4 /* SignalRService.swift in Sources */,
025C27FA2AFE119D00BADC49 /* MenuTitleView.swift in Sources */, 025C27FA2AFE119D00BADC49 /* MenuTitleView.swift in Sources */,
02CE4D892ADF62E1002E79BC /* EcaSettingView.swift in Sources */, 02CE4D892ADF62E1002E79BC /* EcaSettingView.swift in Sources */,
D5258CA32B036CC500365276 /* SessionGetMessage.swift in Sources */, D5258CA32B036CC500365276 /* SessionGetMessage.swift in Sources */,
...@@ -859,6 +914,7 @@ ...@@ -859,6 +914,7 @@
020B986C2ADD3E810029DE4C /* InTextLib.swift in Sources */, 020B986C2ADD3E810029DE4C /* InTextLib.swift in Sources */,
02C3E5D12AFCC16800AF7837 /* ChatTitleView.swift in Sources */, 02C3E5D12AFCC16800AF7837 /* ChatTitleView.swift in Sources */,
020B98472AD8FEE30029DE4C /* ColorSet.swift in Sources */, 020B98472AD8FEE30029DE4C /* ColorSet.swift in Sources */,
D51AA4072B099FCC00EBBDD4 /* AlertDB.swift in Sources */,
020B98652ADD14F60029DE4C /* NotificationView.swift in Sources */, 020B98652ADD14F60029DE4C /* NotificationView.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
shouldAutocreateTestPlan = "YES"> shouldAutocreateTestPlan = "YES">
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "020B980F2AD8C3140029DE4C"
BuildableName = "Sailassist.app"
BlueprintName = "Sailassist"
ReferencedContainer = "container:Sailassist.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Canary"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Canary"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "020B980F2AD8C3140029DE4C"
BuildableName = "Sailassist.app"
BlueprintName = "Sailassist"
ReferencedContainer = "container:Sailassist.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "020B980F2AD8C3140029DE4C"
BuildableName = "Sailassist.app"
BlueprintName = "Sailassist"
ReferencedContainer = "container:Sailassist.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Canary">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "020B980F2AD8C3140029DE4C"
BuildableName = "Sailassist.app"
BlueprintName = "Sailassist"
ReferencedContainer = "container:Sailassist.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Canary"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "QC"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "020B980F2AD8C3140029DE4C"
BuildableName = "Sailassist.app"
BlueprintName = "Sailassist"
ReferencedContainer = "container:Sailassist.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "020B980F2AD8C3140029DE4C"
BuildableName = "Sailassist.app"
BlueprintName = "Sailassist"
ReferencedContainer = "container:Sailassist.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Canary">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Canary.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>QC.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>Sailassist.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
</dict>
</dict>
</plist>
//
// AlertDB.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/19.
//
import Foundation
struct WarnRecord {
var title: String
var body: String
let soundName: String
}
enum SwitchingEca {
case Finish
case Start
case Notice
init() {
self = .Notice
}
}
class AlertDB {
// シングルトン宣言
static let OnlyOne = AlertDB()
private var alertEca : [SwitchingEca: WarnRecord] = [
SwitchingEca.Finish: WarnRecord(title: NSLocalizedString("Eca Finish", comment: ""), body: NSLocalizedString("Arrived at switching finished point", comment: ""), soundName: "sound_eca.mp3")
, SwitchingEca.Start: WarnRecord(title: NSLocalizedString("Eca Start", comment: ""), body: NSLocalizedString("Arrivaed at switching start point", comment: ""), soundName: "sound_eca.mp3")
, SwitchingEca.Notice: WarnRecord(title: NSLocalizedString("Eca Notice", comment: ""), body: NSLocalizedString("Arrived at advance notice point", comment: ""), soundName: "sound_eca.mp3")
]
//Eca通知
func GetAlertEcaPoint(point : SwitchingEca) -> WarnRecord {
return alertEca[point]!
}
}
//
// PushNotificationTypes.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/19.
//
import Foundation
struct PushNotificationTypes {
//リモートPush用sendType
enum SendType: Int32{
case Error = -1
case Eca = 0 // Eca
init(){
self = .Error
}
init?(_ code : Int32) {
switch code {
case 0: self = .Eca
default: self = .Error
}
}
}
//ローカルPush用Identifier
enum LocalPushIdentifier: String{
case Reserve = "Reserve" // 予約(初期設定)
case EcaSwitching = "Eca" // Eca
}
}
...@@ -16,6 +16,21 @@ class EcaTask { ...@@ -16,6 +16,21 @@ class EcaTask {
sessionShipStatus.RequestShipStatus(responseShipStatus) sessionShipStatus.RequestShipStatus(responseShipStatus)
} }
/**
* Eca通知
*/
private func notificationEca(point: SwitchingEca) {
let alertDB = AlertDB.OnlyOne
var wernrec = WarnRecord(title:"Eca", body:"", soundName:"")
wernrec = alertDB.GetAlertEcaPoint(point: point)
let formatstr = wernrec.title
wernrec.title = String(format: formatstr)
let voicemanager = AlertManager.OnlyOne
voicemanager.VocalizeAlert(alertrec: wernrec, identifier: .EcaSwitching)
}
func responseShipStatus(result: Result<Data, APIError>) { func responseShipStatus(result: Result<Data, APIError>) {
print(debug: "called") print(debug: "called")
switch result { switch result {
...@@ -29,6 +44,10 @@ class EcaTask { ...@@ -29,6 +44,10 @@ class EcaTask {
SharingData.my.server?.latitude = res.lat SharingData.my.server?.latitude = res.lat
SharingData.my.server?.longitude = res.lon SharingData.my.server?.longitude = res.lon
SharingData.my.dataTime = res.dataTime //2023-11-02T05:25:49.4362123Z SharingData.my.dataTime = res.dataTime //2023-11-02T05:25:49.4362123Z
if Preferences.LocationType == 1 {
SharingData.my.location = SharingData.my.server
}
} }
checkEca() checkEca()
case .failure(let errorCode): case .failure(let errorCode):
...@@ -37,20 +56,20 @@ class EcaTask { ...@@ -37,20 +56,20 @@ class EcaTask {
} }
} }
private func checkEca() { func checkEca() {
let runningEca = eca.ecaArea.first(where: {(key, value) in value.isRunning == true}) let runningEca = eca.ecaArea.first(where: {(key, value) in value.isRunning == true})
if let eca = runningEca?.value { if let eca = runningEca?.value {
if let location = SharingData.my.location { if let location = SharingData.my.location {
let distance = LocationCalculation.checkPolyLine(objPos: eca.points, shipPos: location) let distance = LocationCalculation.checkPolyLine(objPos: eca.points, shipPos: location)
if eca.swStart >= Float(distance) { if eca.swStart >= Float(distance) {
notificationEca(point: SwitchingEca.Start)
} }
if eca.swNotice >= Float(distance) { if eca.swNotice >= Float(distance) {
notificationEca(point: SwitchingEca.Notice)
} }
if eca.swFinish >= Float(distance) { if eca.swFinish >= Float(distance) {
notificationEca(point: SwitchingEca.Finish)
} }
} }
} }
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
import Foundation import Foundation
// TODO: サイトのアドレスを変更 // TODO: サイトのアドレスを変更
#if DEBUG #if CANARY
//MARK: デバッグサーバー用
enum HttpRequestType : String { enum HttpRequestType : String {
case RegisterLogin = "https://ssv-canary-web.azurewebsites.net/sailassistlogin" case RegisterLogin = "https://ssv-canary-web.azurewebsites.net/sailassistlogin"
case SitePolicy = "https://ssv-canary-web.azurewebsites.net/sitepolicy" case SitePolicy = "https://ssv-canary-web.azurewebsites.net/sitepolicy"
...@@ -22,13 +21,40 @@ enum HttpRequestType : String { ...@@ -22,13 +21,40 @@ enum HttpRequestType : String {
case GetMessage = "https://ssv-canary-web.azurewebsites.net/api/chatdata/getmessages?shipId=XXXXX" case GetMessage = "https://ssv-canary-web.azurewebsites.net/api/chatdata/getmessages?shipId=XXXXX"
case SignalR = "https://ssv-canary-web.azurewebsites.net/signalr/shore" case SignalR = "https://ssv-canary-web.azurewebsites.net/signalr/shore"
case UploadImage = "https://ssv-canary-web.azurewebsites.net/api/chatdata/uploadimage" case UploadImage = "https://ssv-canary-web.azurewebsites.net/api/chatdata/uploadimage"
case ConnectionString = "Endpoint=sb://ssv-canary-notification.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=rj2WniCJWWP2SG5gk4J7/2P/nIyChx8+JXKWCfTi8KA="
case HubName = "ssv-canary-notification"
}
#elseif QC
enum HttpRequestType : String {
case RegisterLogin = "https://ssv-qc-web.azurewebsites.net/sailassistlogin"
case SitePolicy = "https://ssv-qc-web.azurewebsites.net/sitepolicy"
case CookiePolicy = "https://ssv-qc-web.azurewebsites.net/cookiepolicy"
case PrivacyPolicy = "https://ssv-qc-web.azurewebsites.net/inapp?" //+バージョン番号
case TaskList = "https://ssv-qc-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case EcaArea = "https://ssv-qc-web.azurewebsites.net/api/sailassist/ecaarea"
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 GetMessage = "https://ssv-qc-web.azurewebsites.net/api/chatdata/getmessages?shipId=XXXXX"
case SignalR = "https://ssv-qc-web.azurewebsites.net/signalr/shore"
case UploadImage = "https://ssv-qc-web.azurewebsites.net/api/chatdata/uploadimage"
case ConnectionString = "Endpoint=sb://tacmiqchub.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=mjGZyOensA5D/T6bMiDDwX6hwhoZNsDcK+GtBBBiUXk="
case HubName = "tacmiqchub"
} }
#else #else
//MARK: 運用サーバー用 //MARK: 運用サーバー用
enum HttpRequestType : String { enum HttpRequestType : String {
case RegisterLogin = "https://ssv.jmarinecloud.com/applogin" case RegisterLogin = "https://ssv.jmarinecloud.com/sailassistlogin"
case SitePolicy = "https://ssv.jmarinecloud.com/sitepolicy" case SitePolicy = "https://ssv.jmarinecloud.com/sitepolicy"
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 EcaArea = "https://ssv.jmarinecloud.com/api/sailassist/ecaarea"
case ShipStatus = "https://ssv.jmarinecloud.com/api/sailassist/shipstatus/XXXXX"
case ShipMonitoringRoute = "https://ssv.jmarinecloud.com/api/sailassist/shipmonitoringroute/XXXXX"
case GetMessage = "https://ssv.jmarinecloud.com/api/chatdata/getmessages?shipId=XXXXX"
case SignalR = "https://ssv.jmarinecloud.com/signalr/shore"
case UploadImage = "https://ssv.jmarinecloud.com/api/chatdata/uploadimage"
case ConnectionString = "Endpoint=sb://tacmihub.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=/IOJAYGLZmS2JvlsHT5aT+ETlPXqNt1+VGuMNDt4bzw="
case HubName = "tacmihub"
} }
#endif #endif
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
<string>pk.eyJ1Ijoiam1hcmluZWNsb3VkIiwiYSI6ImNsbmxjbGYzZjA0dG8yaW82MDgwajQ5OTQifQ.pd8YC9qK1C4YmMUbMx6ywQ</string> <string>pk.eyJ1Ijoiam1hcmluZWNsb3VkIiwiYSI6ImNsbmxjbGYzZjA0dG8yaW82MDgwajQ5OTQifQ.pd8YC9qK1C4YmMUbMx6ywQ</string>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
<array> <array>
<string>audio</string>
<string>location</string> <string>location</string>
<string>remote-notification</string>
</array> </array>
</dict> </dict>
</plist> </plist>
...@@ -43,6 +43,11 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate { ...@@ -43,6 +43,11 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
lastSeenLocation = locations.first lastSeenLocation = locations.first
let targetCoordinate : CLLocationCoordinate2D = lastSeenLocation!.coordinate let targetCoordinate : CLLocationCoordinate2D = lastSeenLocation!.coordinate
SharingData.my.gps = targetCoordinate SharingData.my.gps = targetCoordinate
if Preferences.LocationType == 0 {
SharingData.my.location = SharingData.my.gps
let ecaTask = EcaTask()
ecaTask.checkEca()
}
} }
} }
} }
......
...@@ -26,7 +26,9 @@ class Preferences{ ...@@ -26,7 +26,9 @@ class Preferences{
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipId.rawValue) static var ShipId: String @AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipId.rawValue) static var ShipId: String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipPassword.rawValue) static var ShipPassword: String @AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipPassword.rawValue) static var ShipPassword: String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue) static var UserName: String @AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue) static var UserName: String
// func getPreferences(key)
@AppStorage(wrappedValue:0, PreferencesKey.TypeInt.LocationType.rawValue) static var LocationType: Int
// func getPreferences(key)
@AppStorage(PreferencesKey.TypeURL.ECDIS.rawValue) static var ECDISUrl: URL? @AppStorage(PreferencesKey.TypeURL.ECDIS.rawValue) static var ECDISUrl: URL?
} }
......
...@@ -19,9 +19,9 @@ class PreferencesKey{ ...@@ -19,9 +19,9 @@ class PreferencesKey{
///Int型 ///Int型
enum TypeInt: String{ enum TypeInt: String{
case LocationType
case AppStartUsingDate case AppStartUsingDate
case LastLoginDate case LastLoginDate
} }
enum TypeURL: String{ enum TypeURL: String{
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
...@@ -6,10 +6,13 @@ ...@@ -6,10 +6,13 @@
// //
import SwiftUI import SwiftUI
import UserNotifications
import WindowsAzureMessaging
@main @main
struct SailassistApp: App { struct SailassistApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) private var delegate @UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
var body: some Scene { var body: some Scene {
WindowGroup { WindowGroup {
ContentView() ContentView()
...@@ -18,11 +21,67 @@ struct SailassistApp: App { ...@@ -18,11 +21,67 @@ struct SailassistApp: App {
} }
class AppDelegate: NSObject, UIApplicationDelegate{ class AppDelegate: NSObject, UIApplicationDelegate{
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
print(debug: "called")
//プッシュ通知の利用許可のリクエスト送信
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { (granted, error) in
if error != nil {
return
}
if granted {
UNUserNotificationCenter.current().delegate = self
}
}
application.registerForRemoteNotifications()
MSNotificationHub.start(connectionString: HttpRequestType.ConnectionString.rawValue, hubName: HttpRequestType.HubName.rawValue)
return true
}
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
print(debug: "called")
let config = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role) let config = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role)
config.delegateClass = SceneDelegate.self config.delegateClass = SceneDelegate.self
return config return config
} }
func notificationHub(_ notificationHub: MSNotificationHub!, didReceivePushNotification notification: MSNotificationHubMessage!) {
let title = notification.title ?? ""
let body = notification.body ?? ""
if (UIApplication.shared.applicationState == .background) {
print("Notification received in background: title:\"\(title)\" body:\"\(body)\"")
} else {
let alertController = UIAlertController(title: title, message: body, preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "OK", style: .cancel))
// self.present(alertController, animated: true)
}
}
}
extension AppDelegate: UNUserNotificationCenterDelegate {
// フォアグラウンド状態で通知を受信して表示する
func userNotificationCenter(_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
let userInfo = notification.request.content.userInfo
print(debug: userInfo)
completionHandler([[.banner, .badge, .sound]])
}
// バックグラウンド状態で通知を受信して表示する
func userNotificationCenter(_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void) {
let userInfo = response.notification.request.content.userInfo
print(debug: userInfo)
completionHandler()
}
} }
class SceneDelegate: UIResponder, UIWindowSceneDelegate, ObservableObject { class SceneDelegate: UIResponder, UIWindowSceneDelegate, ObservableObject {
......
//
// SignalRService.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/17.
//
import Foundation
import SwiftSignalRClient
public class SignalRService {
private var connection: HubConnection
public init(url: URL) {
// リクエストURLの組み立て
// let url_string : String = HttpRequestType.SignalR.rawValue
// guard let req_url = URL(string : url_string) else {
// return
// }
connection = HubConnectionBuilder(url: url).withLogging(minLogLevel: .error).build()
connection.on(method: "MessageReceived", callback: { (user: String, message: String) in
do {
self.handleMessage(message, from: user)
} catch {
print(error)
}
})
// hubConnection?.invoke(method: "Your Method Name", arguments: [arg1, arg2]) { error in
// if let error = error {
// print("An error occurred: %@", "\(error)")
// }
// }
//
// hubConnection?.on(method: "YourMethod", callback: { (chatCount: Int, notificationsCount: Int) in
// self.notificationCount = notificationsCount
// self.chatCount = chatCount
// })
connection.start()
}
private func handleMessage(_ message: String, from user: String) {
// Do something with the message.
}
func connectionDidOpen(hubConnection: SwiftSignalRClient.HubConnection) {
print("connectionDidOpen")
// After connection established call registerUserInServer method
DispatchQueue.main.async {
// self.registerUserInServer()
}
}
func connectionDidFailToOpen(error: Error) {
print("connectionDidFailToOpen")
}
func connectionDidClose(error: Error?) {
print("connectionDidClose")
}
func connectionWillReconnect(error: Error) {
print("connectionWillReconnect")
}
func connectionDidReconnect() {
print("connectionDidReconnect")
}
}
//
// AlertManager.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/11/19.
//
import Foundation
import UIKit
import AVFoundation
// 音声を扱うクラスのうち、アラートに関するもの
class AlertManager {
// シングルトン宣言
static let OnlyOne = AlertManager()
private var player: AVAudioPlayer! // ここでインスタンスを作ると例外発生
var lastAlert: PushNotificationTypes.LocalPushIdentifier = .Reserve
var lastSpeech: String = ""
private init() {
//とりあえず音源を仮で置いておく
let soundpath = Bundle.main.bundleURL.appendingPathComponent("no_sound.mp3")
do {
player = try AVAudioPlayer(contentsOf: soundpath)
} catch {
}
}
// 無音を鳴らす
func PlayNoSound( identifier : String ) {
let content = "no_sound.mp3"
lastSpeech = identifier
let soundpath = Bundle.main.bundleURL.appendingPathComponent(content)
do {
if(player.isPlaying){
print(debug: "SOUND Playing: \(content)")
//再生中の音を止めてしてしまうので再生しない
} else {
player = try AVAudioPlayer(contentsOf: soundpath)
player.play()
print(debug: "SOUND Go play: \(content)")
}
} catch {
lastSpeech = ""
print(debug: "SOUND NoSound: \(content)")
return
}
}
// 音声だけ鳴らす
func Speaking( identifier : String, content : String ) {
lastSpeech = identifier
// 音声を再生する
let soundpath = Bundle.main.bundleURL.appendingPathComponent(content)
do {
player = try AVAudioPlayer(contentsOf: soundpath)
player.play()
print(debug: "SOUND Go play: \(content)")
} catch {
lastSpeech = ""
print(debug: "SOUND NoSound: \(content)")
return
}
}
// 音声再生中止
func CancelSpeak( identifier : String ) {
if let alertPlayer = player {
if alertPlayer.isPlaying == true {
if lastSpeech == identifier {
alertPlayer.stop()
}
}
}
lastSpeech = ""
}
// 警報を鳴らす。引数の型定義はAlertDB.swift
func VocalizeAlert( alertrec : WarnRecord ) {
VocalizeAlert( alertrec: alertrec, identifier: .EcaSwitching)
}
func VocalizeAlert( alertrec : WarnRecord, identifier : PushNotificationTypes.LocalPushIdentifier ) {
print(debug: "alertrec = \(alertrec)")
// 警報を通知する
let content = UNMutableNotificationContent()
content.title = alertrec.title
content.body = alertrec.body
/* 「通知」側の音声は、再生時間上限(10sec)の関係で無音とする
* 無音声ファイル(no_sound.mp3)は予め AppDelegateで ${App}/Library/Sounds にコピー済み
*/
content.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: "no_sound.mp3"))
// 「通知」を発生させる
let request = UNNotificationRequest( identifier: identifier.rawValue, content: content, trigger: nil )
// let request = UNNotificationRequest( identifier: "ShipWarn", content: content, trigger: nil )
UNUserNotificationCenter.current().add(request, withCompletionHandler: nil)
lastAlert = identifier
// 音声を再生する
let soundpath = Bundle.main.bundleURL.appendingPathComponent(alertrec.soundName)
do {
player = try AVAudioPlayer(contentsOf: soundpath)
player.play()
print(debug: "SOUND Go play: \(alertrec.soundName)")
} catch {
lastAlert = .Reserve
print(debug: "SOUND NoSound: \(alertrec.soundName)")
return
}
}
// 警報の再生を中断する
func CancelAlert() {
CancelAlert(identifier : .EcaSwitching )
}
// 警報の再生を中断する
func CancelAlert( identifier : PushNotificationTypes.LocalPushIdentifier ) {
if let alertPlayer = player {
if alertPlayer.isPlaying == true {
if lastAlert == identifier {
alertPlayer.stop()
}
}
}
lastAlert = .Reserve
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment