Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Created OR library for iOS

Michael Rademaker14cd882a852a
diff --git a/console/iOS/.swift-version b/console/iOS/.swift-version
new file mode 100644
index 000000000..7c36b4621
--- /dev/null
+++ b/console/iOS/.swift-version
@@ -0,0 +1 @@
+echo "4.0" >> .swift-version
\ No newline at end of file
diff --git a/console/iOS/LICENSE b/console/iOS/LICENSE
new file mode 100644
index 000000000..b025b436d
--- /dev/null
+++ b/console/iOS/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Open Remote
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/console/iOS/ORLib.podspec b/console/iOS/ORLib.podspec
new file mode 100644
index 000000000..d0e80daa1
--- /dev/null
+++ b/console/iOS/ORLib.podspec
@@ -0,0 +1,22 @@
+Pod::Spec.new do |s|
+ s.platform = :ios
+ s.ios.deployment_target = '10'
+ s.pod_target_xcconfig = {
+ "OTHER_LDFLAGS" => '$(inherited) -framework "FirebaseCore" -framework "FirebaseMessaging"',
+ "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => 'YES',
+ "FRAMEWORK_SEARCH_PATHS" => '$(inherited) "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks"'
+ }
+ s.name = "ORLib"
+ s.summary = "The OpenRemote library to create console apps."
+ s.requires_arc = true
+ s.version = '1.0.0'
+ s.authors = 'OpenRemote'
+ s.homepage = "http://www.openremote.com/community/"
+ s.source = { :git => 'https://github.com/openremote/openremote.git', :tag => s.version.to_s }
+ s.dependency 'Firebase/Core', '4.6.0'
+ s.dependency 'Firebase/Messaging', '4.6.0'
+
+ base_dir = "console/iOS"
+ s.source_files = base_dir + 'ORLib/**/*.{swift}'
+ s.license = { :type => "MIT", :file => "base_dir/LICENSE" }
+end
diff --git a/console/iOS/ORLib.xcodeproj/project.pbxproj b/console/iOS/ORLib.xcodeproj/project.pbxproj
new file mode 100644
index 000000000..9c8ce07e2
--- /dev/null
+++ b/console/iOS/ORLib.xcodeproj/project.pbxproj
@@ -0,0 +1,461 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 48;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 4C4C2FB81FD8044A0071CBDA /* ORNotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4C2FB71FD8044A0071CBDA /* ORNotificationService.swift */; };
+ 4C82D73F1FC58ED2009DE853 /* ORLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C82D73D1FC58ED2009DE853 /* ORLib.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4C82D74A1FC58F4E009DE853 /* ORViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C82D7451FC58F4E009DE853 /* ORViewController.swift */; };
+ 4C82D74B1FC58F4E009DE853 /* ORAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C82D7461FC58F4E009DE853 /* ORAppDelegate.swift */; };
+ 4C82D74C1FC58F4E009DE853 /* ProjectConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C82D7471FC58F4E009DE853 /* ProjectConstants.swift */; };
+ 4C82D74D1FC58F4E009DE853 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C82D7481FC58F4E009DE853 /* Constants.swift */; };
+ 4C82D74E1FC58F4E009DE853 /* ORLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C82D7491FC58F4E009DE853 /* ORLoginViewController.swift */; };
+ 4C82D7581FC590FB009DE853 /* ErrorManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C82D7531FC590FB009DE853 /* ErrorManager.swift */; };
+ 4C82D7591FC590FB009DE853 /* TokenManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C82D7541FC590FB009DE853 /* TokenManager.swift */; };
+ 4CBC0D471FD6DDA1000BE8B1 /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CBC0D461FD6DDA1000BE8B1 /* Reachability.swift */; };
+ 7CCC2ED6D141AFD5DC9E5EC1 /* Pods_ORLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 978B95045017E64853668497 /* Pods_ORLib.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 4C4C2FB71FD8044A0071CBDA /* ORNotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ORNotificationService.swift; sourceTree = "<group>"; };
+ 4C82D73A1FC58ED2009DE853 /* ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4C82D73D1FC58ED2009DE853 /* ORLib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORLib.h; sourceTree = "<group>"; };
+ 4C82D73E1FC58ED2009DE853 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 4C82D7451FC58F4E009DE853 /* ORViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORViewController.swift; sourceTree = "<group>"; };
+ 4C82D7461FC58F4E009DE853 /* ORAppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORAppDelegate.swift; sourceTree = "<group>"; };
+ 4C82D7471FC58F4E009DE853 /* ProjectConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProjectConstants.swift; sourceTree = "<group>"; };
+ 4C82D7481FC58F4E009DE853 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
+ 4C82D7491FC58F4E009DE853 /* ORLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORLoginViewController.swift; sourceTree = "<group>"; };
+ 4C82D7531FC590FB009DE853 /* ErrorManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorManager.swift; sourceTree = "<group>"; };
+ 4C82D7541FC590FB009DE853 /* TokenManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenManager.swift; sourceTree = "<group>"; };
+ 4CBC0D461FD6DDA1000BE8B1 /* Reachability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reachability.swift; sourceTree = "<group>"; };
+ 572EED7F064AF79DDABE9FC8 /* Pods-ORLib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ORLib.release.xcconfig"; path = "Pods/Target Support Files/Pods-ORLib/Pods-ORLib.release.xcconfig"; sourceTree = "<group>"; };
+ 978B95045017E64853668497 /* Pods_ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ C641D9E59892499E90E68616 /* Pods-ORLib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ORLib.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ORLib/Pods-ORLib.debug.xcconfig"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 4C82D7361FC58ED2009DE853 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7CCC2ED6D141AFD5DC9E5EC1 /* Pods_ORLib.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 4C82D7301FC58ED2009DE853 = {
+ isa = PBXGroup;
+ children = (
+ 4C82D73C1FC58ED2009DE853 /* ORLib */,
+ 4C82D73B1FC58ED2009DE853 /* Products */,
+ 8B937E998158FCCA944454DF /* Pods */,
+ 659E47451ADA08D6BAAF1568 /* Frameworks */,
+ );
+ sourceTree = "<group>";
+ };
+ 4C82D73B1FC58ED2009DE853 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 4C82D73A1FC58ED2009DE853 /* ORLib.framework */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 4C82D73C1FC58ED2009DE853 /* ORLib */ = {
+ isa = PBXGroup;
+ children = (
+ 4C82D7531FC590FB009DE853 /* ErrorManager.swift */,
+ 4C82D7541FC590FB009DE853 /* TokenManager.swift */,
+ 4CBC0D461FD6DDA1000BE8B1 /* Reachability.swift */,
+ 4C82D7461FC58F4E009DE853 /* ORAppDelegate.swift */,
+ 4C82D7481FC58F4E009DE853 /* Constants.swift */,
+ 4C82D7451FC58F4E009DE853 /* ORViewController.swift */,
+ 4C82D7471FC58F4E009DE853 /* ProjectConstants.swift */,
+ 4C82D7491FC58F4E009DE853 /* ORLoginViewController.swift */,
+ 4C82D73D1FC58ED2009DE853 /* ORLib.h */,
+ 4C82D73E1FC58ED2009DE853 /* Info.plist */,
+ 4C4C2FB71FD8044A0071CBDA /* ORNotificationService.swift */,
+ );
+ path = ORLib;
+ sourceTree = "<group>";
+ };
+ 659E47451ADA08D6BAAF1568 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 978B95045017E64853668497 /* Pods_ORLib.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 8B937E998158FCCA944454DF /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ C641D9E59892499E90E68616 /* Pods-ORLib.debug.xcconfig */,
+ 572EED7F064AF79DDABE9FC8 /* Pods-ORLib.release.xcconfig */,
+ );
+ name = Pods;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 4C82D7371FC58ED2009DE853 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4C82D73F1FC58ED2009DE853 /* ORLib.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 4C82D7391FC58ED2009DE853 /* ORLib */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4C82D7421FC58ED2009DE853 /* Build configuration list for PBXNativeTarget "ORLib" */;
+ buildPhases = (
+ 96B4118FFE24AACE46B60F45 /* [CP] Check Pods Manifest.lock */,
+ 4C82D7351FC58ED2009DE853 /* Sources */,
+ 4C82D7361FC58ED2009DE853 /* Frameworks */,
+ 4C82D7371FC58ED2009DE853 /* Headers */,
+ 4C82D7381FC58ED2009DE853 /* Resources */,
+ C4FE859AEC10E3D92C80C6BB /* [CP] Copy Pods Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = ORLib;
+ productName = ORLib;
+ productReference = 4C82D73A1FC58ED2009DE853 /* ORLib.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 4C82D7311FC58ED2009DE853 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0910;
+ ORGANIZATIONNAME = "Open Remote Inc.";
+ TargetAttributes = {
+ 4C82D7391FC58ED2009DE853 = {
+ CreatedOnToolsVersion = 9.1;
+ LastSwiftMigration = 0910;
+ ProvisioningStyle = Automatic;
+ };
+ };
+ };
+ buildConfigurationList = 4C82D7341FC58ED2009DE853 /* Build configuration list for PBXProject "ORLib" */;
+ compatibilityVersion = "Xcode 8.0";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 4C82D7301FC58ED2009DE853;
+ productRefGroup = 4C82D73B1FC58ED2009DE853 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 4C82D7391FC58ED2009DE853 /* ORLib */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 4C82D7381FC58ED2009DE853 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 96B4118FFE24AACE46B60F45 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-ORLib-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ C4FE859AEC10E3D92C80C6BB /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "[CP] Copy Pods Resources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ORLib/Pods-ORLib-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 4C82D7351FC58ED2009DE853 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4C4C2FB81FD8044A0071CBDA /* ORNotificationService.swift in Sources */,
+ 4C82D7581FC590FB009DE853 /* ErrorManager.swift in Sources */,
+ 4C82D74E1FC58F4E009DE853 /* ORLoginViewController.swift in Sources */,
+ 4C82D74C1FC58F4E009DE853 /* ProjectConstants.swift in Sources */,
+ 4C82D74B1FC58F4E009DE853 /* ORAppDelegate.swift in Sources */,
+ 4CBC0D471FD6DDA1000BE8B1 /* Reachability.swift in Sources */,
+ 4C82D74A1FC58F4E009DE853 /* ORViewController.swift in Sources */,
+ 4C82D74D1FC58F4E009DE853 /* Constants.swift in Sources */,
+ 4C82D7591FC590FB009DE853 /* TokenManager.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 4C82D7401FC58ED2009DE853 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.1;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = Debug;
+ };
+ 4C82D7411FC58ED2009DE853 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.1;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ VALIDATE_PRODUCT = YES;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = Release;
+ };
+ 4C82D7431FC58ED2009DE853 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = C641D9E59892499E90E68616 /* Pods-ORLib.debug.xcconfig */;
+ buildSettings = {
+ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_IDENTITY = "";
+ CODE_SIGN_STYLE = Automatic;
+ DEFINES_MODULE = YES;
+ DEVELOPMENT_TEAM = MD7Q2M7GWA;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "${PODS_ROOT}/Firebase/Core/Sources",
+ "$(inherited)",
+ "\"${PODS_ROOT}/Headers/Public\"",
+ "\"${PODS_ROOT}/Headers/Public/Firebase\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseAnalytics\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseCore\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseInstanceID\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseMessaging\"",
+ "\"$(SRCROOT)/Library\"",
+ );
+ INFOPLIST_FILE = ORLib/Info.plist;
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.3;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = "";
+ MODULEMAP_FILE = "";
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_BUNDLE_IDENTIFIER = org.openremote.ORLib;
+ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+ SKIP_INSTALL = YES;
+ SWIFT_INCLUDE_PATHS = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 4C82D7441FC58ED2009DE853 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 572EED7F064AF79DDABE9FC8 /* Pods-ORLib.release.xcconfig */;
+ buildSettings = {
+ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_IDENTITY = "";
+ CODE_SIGN_STYLE = Automatic;
+ DEFINES_MODULE = YES;
+ DEVELOPMENT_TEAM = MD7Q2M7GWA;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "${PODS_ROOT}/Firebase/Core/Sources",
+ "$(inherited)",
+ "\"${PODS_ROOT}/Headers/Public\"",
+ "\"${PODS_ROOT}/Headers/Public/Firebase\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseAnalytics\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseCore\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseInstanceID\"",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseMessaging\"",
+ "\"$(SRCROOT)/Library\"",
+ );
+ INFOPLIST_FILE = ORLib/Info.plist;
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.3;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = "";
+ MODULEMAP_FILE = "";
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_BUNDLE_IDENTIFIER = org.openremote.ORLib;
+ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+ SKIP_INSTALL = YES;
+ SWIFT_INCLUDE_PATHS = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "";
+ SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4C82D7341FC58ED2009DE853 /* Build configuration list for PBXProject "ORLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4C82D7401FC58ED2009DE853 /* Debug */,
+ 4C82D7411FC58ED2009DE853 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 4C82D7421FC58ED2009DE853 /* Build configuration list for PBXNativeTarget "ORLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4C82D7431FC58ED2009DE853 /* Debug */,
+ 4C82D7441FC58ED2009DE853 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 4C82D7311FC58ED2009DE853 /* Project object */;
+}
diff --git a/console/iOS/ORLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/console/iOS/ORLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 000000000..4148ebba8
--- /dev/null
+++ b/console/iOS/ORLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:ORLib.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/console/iOS/ORLib.xcodeproj/project.xcworkspace/xcuserdata/michael.xcuserdatad/UserInterfaceState.xcuserstate b/console/iOS/ORLib.xcodeproj/project.xcworkspace/xcuserdata/michael.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 000000000..7e3c341bb
Binary files /dev/null and b/console/iOS/ORLib.xcodeproj/project.xcworkspace/xcuserdata/michael.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/console/iOS/ORLib.xcodeproj/xcshareddata/xcschemes/ORLib.xcscheme b/console/iOS/ORLib.xcodeproj/xcshareddata/xcschemes/ORLib.xcscheme
new file mode 100644
index 000000000..94040077f
--- /dev/null
+++ b/console/iOS/ORLib.xcodeproj/xcshareddata/xcschemes/ORLib.xcscheme
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0910"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4C82D7391FC58ED2009DE853"
+ BuildableName = "ORLib.framework"
+ BlueprintName = "ORLib"
+ ReferencedContainer = "container:ORLib.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ language = ""
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ language = ""
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4C82D7391FC58ED2009DE853"
+ BuildableName = "ORLib.framework"
+ BlueprintName = "ORLib"
+ ReferencedContainer = "container:ORLib.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4C82D7391FC58ED2009DE853"
+ BuildableName = "ORLib.framework"
+ BlueprintName = "ORLib"
+ ReferencedContainer = "container:ORLib.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/console/iOS/NotificationExtension/NotificationExtension.entitlements b/console/iOS/ORLib.xcodeproj/xcuserdata/michael.xcuserdatad/xcschemes/xcschememanagement.plist
similarity index 50%
rename from console/iOS/NotificationExtension/NotificationExtension.entitlements
rename to console/iOS/ORLib.xcodeproj/xcuserdata/michael.xcuserdatad/xcschemes/xcschememanagement.plist
index e38707f06..ac3b17f0a 100644
--- a/console/iOS/NotificationExtension/NotificationExtension.entitlements
+++ b/console/iOS/ORLib.xcodeproj/xcuserdata/michael.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -2,10 +2,13 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>com.apple.security.application-groups</key>
- <array>
- <string>group.org.openremote.console</string>
- <string>group.org.openremote.console.NotificationExtension</string>
- </array>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>ORLib.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>4</integer>
+ </dict>
+ </dict>
</dict>
</plist>
diff --git a/console/iOS/ORLib/0.1.0/ORLib.podspec b/console/iOS/ORLib/0.1.0/ORLib.podspec
new file mode 100644
index 000000000..4ff9b0403
--- /dev/null
+++ b/console/iOS/ORLib/0.1.0/ORLib.podspec
@@ -0,0 +1,21 @@
+Pod::Spec.new do |s|
+ s.platform = :ios
+ s.ios.deployment_target = '10'
+ s.pod_target_xcconfig = {
+ "OTHER_LDFLAGS" => '$(inherited) -framework "FirebaseCore" -framework "FirebaseMessaging"',
+ "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => 'YES',
+ "FRAMEWORK_SEARCH_PATHS" => '$(inherited) "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks"'
+ }
+ s.name = "ORLib"
+ s.summary = "The OpenRemote library to create console apps."
+ s.requires_arc = true
+ s.version = '0.1.0'
+ s.license = { :type => "MIT", :file => "LICENSE" }
+ s.authors = 'OpenRemote'
+ s.homepage = "http://www.openremote.com/community/"
+ s.source = { :git => 'https://bitbucket.org/AppBriek/openremoteios.git', :tag => s.version.to_s }
+ s.dependency 'Firebase/Core', '4.6.0'
+ s.dependency 'Firebase/Messaging', '4.6.0'
+ s.source_files = 'ORLib/**/*.{swift}'
+ s.resources = 'ORLib/**/*.{storyboard,xib}'
+end
diff --git a/console/iOS/console/Constants.swift b/console/iOS/ORLib/Constants.swift
similarity index 91%
rename from console/iOS/console/Constants.swift
rename to console/iOS/ORLib/Constants.swift
index 87eb13a0e..e2d1be730 100644
--- a/console/iOS/console/Constants.swift
+++ b/console/iOS/ORLib/Constants.swift
@@ -20,32 +20,32 @@
import Foundation
-enum AccesTokenResult<String>
+public enum AccesTokenResult<String>
{
case Success(String?)
case Failure(NSError?)
}
-enum DefaultsKey {
+public enum DefaultsKey {
static let token = "token"
static let refreshToken = "refreshToken"
static let idToken = "idToken"
static let deviceId = "deviceToken"
}
-enum NotificationsNames {
+public enum NotificationsNames {
static let isAuthenticated = "isAuthenticated"
static let isdeviceIdSent = "isdeviceIdSent"
}
-enum Notifications {
+public enum Notifications {
static let needsReachabilityCheck = Notification.Name("NeedsReachabilityCheck")
static let fullScreenShown = Notification.Name("fullScreenShown")
static let fullScreenHidden = Notification.Name("fullScreenHidden")
static let idleTimerFired = Notification.Name("idleTimerFired")
}
-enum ActionType {
+public enum ActionType {
static let ACTION_DEEP_LINK = "LINK"
static let ACTION_ACTUATOR = "ACTUATOR"
}
diff --git a/console/iOS/console/ErrorManager.swift b/console/iOS/ORLib/ErrorManager.swift
similarity index 97%
rename from console/iOS/console/ErrorManager.swift
rename to console/iOS/ORLib/ErrorManager.swift
index 22c0f8156..b02b18691 100644
--- a/console/iOS/console/ErrorManager.swift
+++ b/console/iOS/ORLib/ErrorManager.swift
@@ -21,7 +21,7 @@
import Foundation
import UIKit
-class ErrorManager : NSObject {
+public class ErrorManager : NSObject {
static func showError(error : Error) {
DispatchQueue.main.async {
diff --git a/console/iOS/NotificationExtension/Info.plist b/console/iOS/ORLib/Info.plist
similarity index 60%
rename from console/iOS/NotificationExtension/Info.plist
rename to console/iOS/ORLib/Info.plist
index a0597e040..1007fd9dd 100644
--- a/console/iOS/NotificationExtension/Info.plist
+++ b/console/iOS/ORLib/Info.plist
@@ -3,9 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleDisplayName</key>
- <string>NotificationExtension</string>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@@ -15,17 +13,12 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
- <string>XPC!</string>
+ <string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>1.1</string>
+ <string>1.0</string>
<key>CFBundleVersion</key>
- <string>15</string>
- <key>NSExtension</key>
- <dict>
- <key>NSExtensionPointIdentifier</key>
- <string>com.apple.usernotifications.service</string>
- <key>NSExtensionPrincipalClass</key>
- <string>$(PRODUCT_MODULE_NAME).NotificationService</string>
- </dict>
+ <string>$(CURRENT_PROJECT_VERSION)</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
</dict>
</plist>
diff --git a/console/iOS/console/AppDelegate.swift b/console/iOS/ORLib/ORAppDelegate.swift
similarity index 74%
rename from console/iOS/console/AppDelegate.swift
rename to console/iOS/ORLib/ORAppDelegate.swift
index 16aee2af9..90a035c1e 100644
--- a/console/iOS/console/AppDelegate.swift
+++ b/console/iOS/ORLib/ORAppDelegate.swift
@@ -20,20 +20,19 @@
import UIKit
import UserNotifications
-import Firebase
-
+import FirebaseCore
+import FirebaseMessaging
@UIApplicationMain
-class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
-
- var window: UIWindow?
- let gcmMessageIDKey = "gcm.message_id"
- var reachabilityAlert : UIAlertController?
- var reachabilityAlertShown = false
- let internetReachability = Reachability.forInternetConnection()
+open class ORAppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
+ public var window: UIWindow?
+ public let gcmMessageIDKey = "gcm.message_id"
+ public var reachabilityAlert : UIAlertController?
+ public var reachabilityAlertShown = false
+ public let internetReachability = Reachability()
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+ open func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
UNUserNotificationCenter.current().delegate = self
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
@@ -48,12 +47,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
selector: #selector(self.reachabilityChanged(note:)),
name: NSNotification.Name.reachabilityChanged,
object: internetReachability)
- internetReachability?.startNotifier()
- self.updateReachabilityStatus(reachability: internetReachability!)
+ do {
+ try internetReachability?.startNotifier()
+ self.updateReachabilityStatus(reachability: internetReachability!)
+ } catch {
+ print("Unable to start notifier")
+ }
return true
}
- func applicationWillResignActive(_ application: UIApplication) {
+ open func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
reachabilityAlert?.dismiss(animated: true, completion: nil)
@@ -61,7 +64,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
internetReachability?.stopNotifier()
}
- func applicationDidEnterBackground(_ application: UIApplication) {
+ open func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
reachabilityAlert?.dismiss(animated: true, completion: nil)
@@ -69,49 +72,57 @@ class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
internetReachability?.stopNotifier()
}
- func applicationWillEnterForeground(_ application: UIApplication) {
+ open func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
- self.internetReachability?.startNotifier()
- self.updateReachabilityStatus(reachability: self.internetReachability!)
+ do {
+ try self.internetReachability?.startNotifier()
+ self.updateReachabilityStatus(reachability: self.internetReachability!)
+ } catch {
+ print("Unable to start notifier")
+ }
}
}
- func applicationDidBecomeActive(_ application: UIApplication) {
+ open func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
- self.internetReachability?.startNotifier()
- self.updateReachabilityStatus(reachability: self.internetReachability!)
+ do {
+ try self.internetReachability?.startNotifier()
+ self.updateReachabilityStatus(reachability: self.internetReachability!)
+ } catch {
+ print("Unable to start notifier")
+ }
}
}
- func applicationWillTerminate(_ application: UIApplication) {
+ open func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
reachabilityAlert?.dismiss(animated: true, completion: nil)
reachabilityAlertShown = false
internetReachability?.stopNotifier()
}
- func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
+ open func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken
}
- func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
+ open func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
completionHandler(UIBackgroundFetchResult.newData)
}
- func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
+ open func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
return true
}
- @objc func reachabilityChanged(note: NSNotification) {
+ @objc open func reachabilityChanged(note: NSNotification) {
if let reachability = note.object as? Reachability {
updateReachabilityStatus(reachability: reachability)
}
}
private func updateReachabilityStatus(reachability: Reachability) {
- if reachability.currentReachabilityStatus() == NetworkStatus.NotReachable {
+ if reachability.connection == .none {
if (!reachabilityAlertShown) {
let topWindow = UIWindow(frame: UIScreen.main.bounds)
topWindow.rootViewController = UIViewController()
@@ -143,9 +154,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
}
- func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+ open func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {
- if challenge.protectionSpace.host == Server.hostURL {
+ if challenge.protectionSpace.host == ORServer.hostURL {
completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
} else {
completionHandler(.performDefaultHandling, nil)
@@ -154,13 +165,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
}
}
-extension AppDelegate : UNUserNotificationCenterDelegate {
+extension ORAppDelegate : UNUserNotificationCenterDelegate {
- func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
+ open func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
completionHandler([.alert, .sound])
}
- func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
+ open func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
var assetId : String = ""
var attributeName : String = ""
var rawJson : String = ""
@@ -168,8 +179,8 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
switch response.actionIdentifier {
case ActionType.ACTION_DEEP_LINK :
if let urlToOpen = response.notification.request.content.userInfo["appUrl"] { // until now we are considering anchor name (without the #)
- guard let urlRequest = URL(string:String(format: "%@://%@/%@%@", Server.scheme, Server.hostURL, Server.navigationPath, urlToOpen as! String)) else { return }
- (self.window?.rootViewController as! ViewController).loadUrl(url:urlRequest)
+ guard let urlRequest = URL(string:String(format: "%@://%@/%@%@", ORServer.scheme, ORServer.hostURL, ORServer.navigationPath, urlToOpen as! String)) else { return }
+ (self.window?.rootViewController as! ORLoginViewController).loadUrl(url:urlRequest)
NSLog("Action asked : %@", response.actionIdentifier)
}
case ActionType.ACTION_ACTUATOR :
@@ -181,7 +192,7 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
rawJson = (actions as! Dictionary<String,String>)["rawJson"]!
}
- (self.window?.rootViewController as! ViewController).updateAssetAttribute(assetId : assetId, attributeName : attributeName, rawJson : rawJson)
+ (self.window?.rootViewController as! ORLoginViewController).updateAssetAttribute(assetId : assetId, attributeName : attributeName, rawJson : rawJson)
default : break
}
if let alertId = response.notification.request.content.userInfo["alertId"] {
@@ -191,7 +202,7 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
UIApplication.shared.isNetworkActivityIndicatorVisible = false
ErrorManager.showError(error: error!)
case .Success(let accessToken) :
- guard let urlRequest = URL(string: String(format:"%@%i", Server.deleteNotifiedAlertResource, alertId as! Int)) else { return }
+ guard let urlRequest = URL(string: String(format:"%@%i", ORServer.deleteNotifiedAlertResource, alertId as! Int)) else { return }
let request = NSMutableURLRequest(url: urlRequest)
request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField:"Content-Type");
request.httpMethod = "DELETE"
@@ -229,13 +240,13 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
}
}
-extension AppDelegate : MessagingDelegate {
- func messaging(_ messaging: Messaging, didRefreshRegistrationToken fcmToken: String) {
+extension ORAppDelegate : MessagingDelegate {
+ open func messaging(_ messaging: Messaging, didRefreshRegistrationToken fcmToken: String) {
print("Firebase registration token: \(fcmToken)")
TokenManager.sharedInstance.storeDeviceId(token: fcmToken)
}
- func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
+ open func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
print("Firebase registration token: \(fcmToken)")
TokenManager.sharedInstance.storeDeviceId(token: fcmToken)
}
diff --git a/console/iOS/ORLib/ORLib.h b/console/iOS/ORLib/ORLib.h
new file mode 100644
index 000000000..19955aca8
--- /dev/null
+++ b/console/iOS/ORLib/ORLib.h
@@ -0,0 +1,19 @@
+//
+// ORLib.h
+// ORLib
+//
+// Created by Michael Rademaker on 22/11/2017.
+// Copyright © 2017 Open Remote Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+//! Project version number for ORLib.
+FOUNDATION_EXPORT double ORLibVersionNumber;
+
+//! Project version string for ORLib.
+FOUNDATION_EXPORT const unsigned char ORLibVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <ORLib/PublicHeader.h>
+
+
diff --git a/console/iOS/console/ViewController.swift b/console/iOS/ORLib/ORLoginViewController.swift
similarity index 79%
rename from console/iOS/console/ViewController.swift
rename to console/iOS/ORLib/ORLoginViewController.swift
index dd92ca608..f5fa73bd0 100644
--- a/console/iOS/console/ViewController.swift
+++ b/console/iOS/ORLib/ORLoginViewController.swift
@@ -20,20 +20,20 @@
import UIKit
-class ViewController: UIViewController {
- var isInError : Bool = false
- let loginButton = UIButton(type: .roundedRect)
- let orViewController = ORViewcontroller()
+open class ORLoginViewController: UIViewController {
+ public var isInError : Bool = false
+ public let loginButton = UIButton(type: .roundedRect)
+ public let orViewController = ORViewcontroller()
@IBOutlet weak var loginViewController: UIWebView!
- override func viewDidLoad() {
+ open override func viewDidLoad() {
super.viewDidLoad()
let deviceIdSentName = Notification.Name(NotificationsNames.isdeviceIdSent)
NotificationCenter.default.addObserver(self, selector: #selector(isdeviceIdSent), name: deviceIdSentName, object: nil)
}
- override func viewWillAppear(_ animated: Bool) {
+ open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if isInError {
loginButton.isHidden = false
@@ -42,7 +42,7 @@ class ViewController: UIViewController {
}
}
- override func viewDidAppear(_ animated: Bool) {
+ open override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if (!isInError) {
showLoginPage()
@@ -54,7 +54,7 @@ class ViewController: UIViewController {
}
}
- func showLoginPage() {
+ open func showLoginPage() {
// This is some leftover from the initial way the app was architected, must be eventually cleaned up
if (self.presentedViewController == nil) {
@@ -62,20 +62,20 @@ class ViewController: UIViewController {
}
}
- @objc func isdeviceIdSent() {
+ @objc open func isdeviceIdSent() {
showLoginPage()
}
- @objc func login() {
+ @objc open func login() {
self.loginButton.removeFromSuperview()
self.showLoginPage()
}
- func loadUrl(url: URL) {
+ open func loadUrl(url: URL) {
self.orViewController.loadURL(url: url)
}
- func updateAssetAttribute(assetId : String, attributeName : String, rawJson : String) {
+ open func updateAssetAttribute(assetId : String, attributeName : String, rawJson : String) {
self.orViewController.updateAssetAttribute(assetId: assetId, attributeName: attributeName, rawJson: rawJson)
}
}
diff --git a/console/iOS/NotificationExtension/NotificationService.swift b/console/iOS/ORLib/ORNotificationService.swift
similarity index 89%
rename from console/iOS/NotificationExtension/NotificationService.swift
rename to console/iOS/ORLib/ORNotificationService.swift
index 692e5f6e9..a18e59599 100644
--- a/console/iOS/NotificationExtension/NotificationService.swift
+++ b/console/iOS/ORLib/ORNotificationService.swift
@@ -20,22 +20,22 @@
import UserNotifications
-class NotificationService: UNNotificationServiceExtension, URLSessionDelegate {
-
- var contentHandler: ((UNNotificationContent) -> Void)?
- var bestAttemptContent: UNMutableNotificationContent?
-
- override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
+open class ORNotificationService: UNNotificationServiceExtension, URLSessionDelegate {
+
+ public var contentHandler: ((UNNotificationContent) -> Void)?
+ public var bestAttemptContent: UNMutableNotificationContent?
+
+ open override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
NSLog("NotifExtension Change content : %@ ", bestAttemptContent?.userInfo ?? "")
if let bestAttemptContent = bestAttemptContent {
// Call backend to get payload and adapt title, body and actions
- let defaults = UserDefaults(suiteName: AppGroup.entitlement)
-
+ let defaults = UserDefaults(suiteName: ORAppGroup.entitlement)
+
defaults?.synchronize()
-
- guard let tkurlRequest = URL(string:String(format: "\(Server.scheme)://%@/auth/realms/%@/protocol/openid-connect/token", Server.hostURL, Server.realm))
+
+ guard let tkurlRequest = URL(string:String(format: "\(ORServer.scheme)://%@/auth/realms/%@/protocol/openid-connect/token", ORServer.hostURL, ORServer.realm))
else { return }
let tkRequest = NSMutableURLRequest(url: tkurlRequest)
tkRequest.addValue("application/x-www-form-urlencoded", forHTTPHeaderField:"Content-Type");
@@ -49,7 +49,7 @@ class NotificationService: UNNotificationServiceExtension, URLSessionDelegate {
do {
let jsonDictionnary: Dictionary = try JSONSerialization.jsonObject(with: data!, options: []) as! [String:Any]
if ((jsonDictionnary["access_token"]) != nil) {
- guard let urlRequest = URL(string: Server.apiTestResource) else { return }
+ guard let urlRequest = URL(string: ORServer.apiTestResource) else { return }
let request = NSMutableURLRequest(url: urlRequest)
request.addValue(String(format:"Bearer %@", jsonDictionnary["access_token"] as! String), forHTTPHeaderField: "Authorization")
let sessionConfiguration = URLSessionConfiguration.default
@@ -120,11 +120,11 @@ class NotificationService: UNNotificationServiceExtension, URLSessionDelegate {
}
})
req.resume()
-
+
}
}
-
- override func serviceExtensionTimeWillExpire() {
+
+ open override func serviceExtensionTimeWillExpire() {
// Called just before the extension will be terminated by the system.
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
NSLog("NotifExtension Time has expired")
@@ -134,10 +134,10 @@ class NotificationService: UNNotificationServiceExtension, URLSessionDelegate {
contentHandler(bestAttemptContent)
}
}
-
- func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+
+ open func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {
- if challenge.protectionSpace.host == Server.hostURL {
+ if challenge.protectionSpace.host == ORServer.hostURL {
completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
} else {
completionHandler(.performDefaultHandling,nil)
@@ -145,3 +145,4 @@ class NotificationService: UNNotificationServiceExtension, URLSessionDelegate {
}
}
}
+
diff --git a/console/iOS/console/ORViewController.swift b/console/iOS/ORLib/ORViewController.swift
similarity index 75%
rename from console/iOS/console/ORViewController.swift
rename to console/iOS/ORLib/ORViewController.swift
index 958b9a579..1c8385409 100644
--- a/console/iOS/console/ORViewController.swift
+++ b/console/iOS/ORLib/ORViewController.swift
@@ -22,24 +22,24 @@ import Foundation
import UIKit
import WebKit
-class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHandler, WKUIDelegate, WKNavigationDelegate {
+open class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHandler, WKUIDelegate, WKNavigationDelegate {
- var data : Data?
- var myWebView : WKWebView?
- var defaults : UserDefaults?
- var webCfg : WKWebViewConfiguration?
+ public var data : Data?
+ public var myWebView : WKWebView?
+ public var defaults : UserDefaults?
+ public var webCfg : WKWebViewConfiguration?
- override func viewDidLoad() {
+ open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor.white
}
- override func viewWillAppear(_ animated: Bool) {
+ open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.configureAccess()
}
- func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
+ open func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
let jsonDictionnary = message.body as? [String : Any]
let type = jsonDictionnary?["type"] as! String
switch (type) {
@@ -53,14 +53,14 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
}
- func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) {
+ open func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) {
NSLog("error %@", message)
TokenManager.sharedInstance.resetTokenAndAuthenticate()
self.dismiss(animated: true, completion: nil)
completionHandler()
}
- func webView(_ webView: WKWebView, runJavaScriptTextInputPanelWithPrompt prompt: String, defaultText: String?, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping (String?) -> Void) {
+ open func webView(_ webView: WKWebView, runJavaScriptTextInputPanelWithPrompt prompt: String, defaultText: String?, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping (String?) -> Void) {
var exec_template : String? = nil
switch (prompt) {
case "token":
@@ -74,8 +74,8 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
completionHandler(exec_template)
}
-
- func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
+
+ open func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
if (navigationAction.request.url?.absoluteString.contains("logout"))! {
TokenManager.sharedInstance.logout()
decisionHandler(.cancel)
@@ -92,8 +92,8 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
}
}
}
-
- func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) {
+
+ open func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) {
if let response = navigationResponse.response as? HTTPURLResponse {
if response.statusCode != 200 && response.statusCode != 204 {
decisionHandler(.cancel)
@@ -101,7 +101,7 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
let error = NSError(domain: "", code: 0, userInfo: [
NSLocalizedDescriptionKey : NSLocalizedString("HTTPErrorReturned", value: "Connection Error", comment: "")
])
- if let vc = self.presentingViewController as? ViewController {
+ if let vc = self.presentingViewController as? ORLoginViewController {
vc.isInError = true
}
self.dismiss(animated: true) {
@@ -112,16 +112,16 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
decisionHandler(.allow)
}
- func login() {
- guard let request = URL(string: String(format:"\(Server.scheme)://%@/%@", Server.hostURL, Server.initialPath)) else { return }
+ open func login() {
+ guard let request = URL(string: String(format:"\(ORServer.scheme)://%@/%@", ORServer.hostURL, ORServer.initialPath)) else { return }
UIApplication.shared.isNetworkActivityIndicatorVisible = true
_ = self.myWebView?.load(URLRequest(url: request))
}
- func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
+ open func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
NSLog("error %@", error.localizedDescription)
UIApplication.shared.isNetworkActivityIndicatorVisible = false
- if let vc = self.presentingViewController as? ViewController {
+ if let vc = self.presentingViewController as? ORLoginViewController {
vc.isInError = true
}
self.dismiss(animated: true) {
@@ -131,9 +131,9 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
}
}
- func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+ open func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {
- if challenge.protectionSpace.host == Server.hostURL {
+ if challenge.protectionSpace.host == ORServer.hostURL {
completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
} else {
completionHandler(.performDefaultHandling, nil)
@@ -141,13 +141,13 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
}
}
- func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
+ open func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
UIApplication.shared.isNetworkActivityIndicatorVisible = false
}
- func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+ open func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {
- if challenge.protectionSpace.host == Server.hostURL {
+ if challenge.protectionSpace.host == ORServer.hostURL {
completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
} else {
completionHandler(.performDefaultHandling, nil)
@@ -155,7 +155,7 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
}
}
- func configureAccess() {
+ open func configureAccess() {
let webCfg:WKWebViewConfiguration = WKWebViewConfiguration()
let userController:WKUserContentController = WKUserContentController()
@@ -177,12 +177,12 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
self.login()
}
- func loadURL(url : URL) {
+ open func loadURL(url : URL) {
UIApplication.shared.isNetworkActivityIndicatorVisible = true
_ = self.myWebView?.load(URLRequest(url:url))
}
- func updateAssetAttribute(assetId : String, attributeName : String, rawJson : String) {
+ open func updateAssetAttribute(assetId : String, attributeName : String, rawJson : String) {
UIApplication.shared.isNetworkActivityIndicatorVisible = true
TokenManager.sharedInstance.getAccessToken { (accessTokenResult) in
switch accessTokenResult {
@@ -190,7 +190,7 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMessageHa
UIApplication.shared.isNetworkActivityIndicatorVisible = false
ErrorManager.showError(error: error!)
case .Success(let accessToken) :
- guard let urlRequest = URL(string: String(String(format: "\(Server.scheme)://%@/%@/asset/%@/attribute/%@", Server.hostURL, Server.realm, assetId, attributeName))) else { return }
+ guard let urlRequest = URL(string: String(String(format: "\(ORServer.scheme)://%@/%@/asset/%@/attribute/%@", ORServer.hostURL, ORServer.realm, assetId, attributeName))) else { return }
let request = NSMutableURLRequest(url: urlRequest)
request.httpMethod = "PUT"
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
diff --git a/console/iOS/ORLib/ProjectConstants.swift b/console/iOS/ORLib/ProjectConstants.swift
new file mode 100644
index 000000000..9e3bf2686
--- /dev/null
+++ b/console/iOS/ORLib/ProjectConstants.swift
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017, OpenRemote Inc.
+ *
+ * See the CONTRIBUTORS.txt file in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import Foundation
+
+public enum ORServer {
+ public static var scheme = "https"
+ public static var hostURL = "openremote.io"
+ public static var initialPath = "console/\(ORServer.realm)/"
+ public static var navigationPath = "console/\(ORServer.realm)/"
+ public static var realm = "openremote"
+ public static var apiTestResource = String(format:"\(ORServer.scheme)://%@/%@/notification/alert",ORServer.hostURL,ORServer.realm)
+
+ public static var registerDeviceResource = String(format:"\(ORServer.scheme)://%@/%@/notification/token",ORServer.hostURL,ORServer.realm)
+ public static var deleteNotifiedAlertResource = String(format:"\(ORServer.scheme)://%@/%@/notification/alert/",ORServer.hostURL,ORServer.realm)
+}
+
+public enum ORClient {
+ public static var clientId = "openremote"
+}
+
+public enum ORFCM {
+ public static var serverKey = "Dummy"
+}
+
+public enum ORAppGroup {
+ public static var entitlement = "group.org.openremote.console"
+}
diff --git a/console/iOS/ORLib/Reachability.swift b/console/iOS/ORLib/Reachability.swift
new file mode 100644
index 000000000..6f8e6e266
--- /dev/null
+++ b/console/iOS/ORLib/Reachability.swift
@@ -0,0 +1,327 @@
+/*
+ Copyright (c) 2014, Ashley Mills
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import SystemConfiguration
+import Foundation
+
+public enum ReachabilityError: Error {
+ case FailedToCreateWithAddress(sockaddr_in)
+ case FailedToCreateWithHostname(String)
+ case UnableToSetCallback
+ case UnableToSetDispatchQueue
+}
+
+@available(*, unavailable, renamed: "Notification.Name.reachabilityChanged")
+public let ReachabilityChangedNotification = NSNotification.Name("ReachabilityChangedNotification")
+
+extension Notification.Name {
+ public static let reachabilityChanged = Notification.Name("reachabilityChanged")
+}
+
+func callback(reachability:SCNetworkReachability, flags: SCNetworkReachabilityFlags, info: UnsafeMutableRawPointer?) {
+
+ guard let info = info else { return }
+
+ let reachability = Unmanaged<Reachability>.fromOpaque(info).takeUnretainedValue()
+ reachability.reachabilityChanged()
+}
+
+public class Reachability {
+
+ public typealias NetworkReachable = (Reachability) -> ()
+ public typealias NetworkUnreachable = (Reachability) -> ()
+
+ @available(*, unavailable, renamed: "Conection")
+ public enum NetworkStatus: CustomStringConvertible {
+ case notReachable, reachableViaWiFi, reachableViaWWAN
+ public var description: String {
+ switch self {
+ case .reachableViaWWAN: return "Cellular"
+ case .reachableViaWiFi: return "WiFi"
+ case .notReachable: return "No Connection"
+ }
+ }
+ }
+
+ public enum Connection: CustomStringConvertible {
+ case none, wifi, cellular
+ public var description: String {
+ switch self {
+ case .cellular: return "Cellular"
+ case .wifi: return "WiFi"
+ case .none: return "No Connection"
+ }
+ }
+ }
+
+ public var whenReachable: NetworkReachable?
+ public var whenUnreachable: NetworkUnreachable?
+
+ @available(*, deprecated: 4.0, renamed: "allowsCellularConnection")
+ public let reachableOnWWAN: Bool = true
+
+ /// Set to `false` to force Reachability.connection to .none when on cellular connection (default value `true`)
+ public var allowsCellularConnection: Bool
+
+ // The notification center on which "reachability changed" events are being posted
+ public var notificationCenter: NotificationCenter = NotificationCenter.default
+
+ @available(*, deprecated: 4.0, renamed: "connection.description")
+ public var currentReachabilityString: String {
+ return "\(connection)"
+ }
+
+ @available(*, unavailable, renamed: "connection")
+ public var currentReachabilityStatus: Connection {
+ return connection
+ }
+
+ public var connection: Connection {
+
+ guard isReachableFlagSet else { return .none }
+
+ // If we're reachable, but not on an iOS device (i.e. simulator), we must be on WiFi
+ guard isRunningOnDevice else { return .wifi }
+
+ var connection = Connection.none
+
+ if !isConnectionRequiredFlagSet {
+ connection = .wifi
+ }
+
+ if isConnectionOnTrafficOrDemandFlagSet {
+ if !isInterventionRequiredFlagSet {
+ connection = .wifi
+ }
+ }
+
+ if isOnWWANFlagSet {
+ if !allowsCellularConnection {
+ connection = .none
+ } else {
+ connection = .cellular
+ }
+ }
+
+ return connection
+ }
+
+ fileprivate var previousFlags: SCNetworkReachabilityFlags?
+
+ fileprivate var isRunningOnDevice: Bool = {
+ #if (arch(i386) || arch(x86_64)) && os(iOS)
+ return false
+ #else
+ return true
+ #endif
+ }()
+
+ fileprivate var notifierRunning = false
+ fileprivate let reachabilityRef: SCNetworkReachability
+
+ fileprivate let reachabilitySerialQueue = DispatchQueue(label: "uk.co.ashleymills.reachability")
+
+ required public init(reachabilityRef: SCNetworkReachability) {
+ allowsCellularConnection = true
+ self.reachabilityRef = reachabilityRef
+ }
+
+ public convenience init?(hostname: String) {
+
+ guard let ref = SCNetworkReachabilityCreateWithName(nil, hostname) else { return nil }
+
+ self.init(reachabilityRef: ref)
+ }
+
+ public convenience init?() {
+
+ var zeroAddress = sockaddr()
+ zeroAddress.sa_len = UInt8(MemoryLayout<sockaddr>.size)
+ zeroAddress.sa_family = sa_family_t(AF_INET)
+
+ guard let ref = SCNetworkReachabilityCreateWithAddress(nil, &zeroAddress) else { return nil }
+
+ self.init(reachabilityRef: ref)
+ }
+
+ deinit {
+ stopNotifier()
+ }
+}
+
+public extension Reachability {
+
+ // MARK: - *** Notifier methods ***
+ func startNotifier() throws {
+
+ guard !notifierRunning else { return }
+
+ var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)
+ context.info = UnsafeMutableRawPointer(Unmanaged<Reachability>.passUnretained(self).toOpaque())
+ if !SCNetworkReachabilitySetCallback(reachabilityRef, callback, &context) {
+ stopNotifier()
+ throw ReachabilityError.UnableToSetCallback
+ }
+
+ if !SCNetworkReachabilitySetDispatchQueue(reachabilityRef, reachabilitySerialQueue) {
+ stopNotifier()
+ throw ReachabilityError.UnableToSetDispatchQueue
+ }
+
+ // Perform an initial check
+ reachabilitySerialQueue.async {
+ self.reachabilityChanged()
+ }
+
+ notifierRunning = true
+ }
+
+ func stopNotifier() {
+ defer { notifierRunning = false }
+
+ SCNetworkReachabilitySetCallback(reachabilityRef, nil, nil)
+ SCNetworkReachabilitySetDispatchQueue(reachabilityRef, nil)
+ }
+
+ // MARK: - *** Connection test methods ***
+ @available(*, deprecated: 4.0, message: "Please use `connection != .none`")
+ var isReachable: Bool {
+
+ guard isReachableFlagSet else { return false }
+
+ if isConnectionRequiredAndTransientFlagSet {
+ return false
+ }
+
+ if isRunningOnDevice {
+ if isOnWWANFlagSet && !reachableOnWWAN {
+ // We don't want to connect when on cellular connection
+ return false
+ }
+ }
+
+ return true
+ }
+
+ @available(*, deprecated: 4.0, message: "Please use `connection == .cellular`")
+ var isReachableViaWWAN: Bool {
+ // Check we're not on the simulator, we're REACHABLE and check we're on WWAN
+ return isRunningOnDevice && isReachableFlagSet && isOnWWANFlagSet
+ }
+
+ @available(*, deprecated: 4.0, message: "Please use `connection == .wifi`")
+ var isReachableViaWiFi: Bool {
+
+ // Check we're reachable
+ guard isReachableFlagSet else { return false }
+
+ // If reachable we're reachable, but not on an iOS device (i.e. simulator), we must be on WiFi
+ guard isRunningOnDevice else { return true }
+
+ // Check we're NOT on WWAN
+ return !isOnWWANFlagSet
+ }
+
+ var description: String {
+
+ let W = isRunningOnDevice ? (isOnWWANFlagSet ? "W" : "-") : "X"
+ let R = isReachableFlagSet ? "R" : "-"
+ let c = isConnectionRequiredFlagSet ? "c" : "-"
+ let t = isTransientConnectionFlagSet ? "t" : "-"
+ let i = isInterventionRequiredFlagSet ? "i" : "-"
+ let C = isConnectionOnTrafficFlagSet ? "C" : "-"
+ let D = isConnectionOnDemandFlagSet ? "D" : "-"
+ let l = isLocalAddressFlagSet ? "l" : "-"
+ let d = isDirectFlagSet ? "d" : "-"
+
+ return "\(W)\(R) \(c)\(t)\(i)\(C)\(D)\(l)\(d)"
+ }
+}
+
+fileprivate extension Reachability {
+
+ func reachabilityChanged() {
+ guard previousFlags != flags else { return }
+
+ let block = connection != .none ? whenReachable : whenUnreachable
+
+ DispatchQueue.main.async {
+ block?(self)
+ self.notificationCenter.post(name: .reachabilityChanged, object:self)
+ }
+
+ previousFlags = flags
+ }
+
+ var isOnWWANFlagSet: Bool {
+ #if os(iOS)
+ return flags.contains(.isWWAN)
+ #else
+ return false
+ #endif
+ }
+ var isReachableFlagSet: Bool {
+ return flags.contains(.reachable)
+ }
+ var isConnectionRequiredFlagSet: Bool {
+ return flags.contains(.connectionRequired)
+ }
+ var isInterventionRequiredFlagSet: Bool {
+ return flags.contains(.interventionRequired)
+ }
+ var isConnectionOnTrafficFlagSet: Bool {
+ return flags.contains(.connectionOnTraffic)
+ }
+ var isConnectionOnDemandFlagSet: Bool {
+ return flags.contains(.connectionOnDemand)
+ }
+ var isConnectionOnTrafficOrDemandFlagSet: Bool {
+ return !flags.intersection([.connectionOnTraffic, .connectionOnDemand]).isEmpty
+ }
+ var isTransientConnectionFlagSet: Bool {
+ return flags.contains(.transientConnection)
+ }
+ var isLocalAddressFlagSet: Bool {
+ return flags.contains(.isLocalAddress)
+ }
+ var isDirectFlagSet: Bool {
+ return flags.contains(.isDirect)
+ }
+ var isConnectionRequiredAndTransientFlagSet: Bool {
+ return flags.intersection([.connectionRequired, .transientConnection]) == [.connectionRequired, .transientConnection]
+ }
+
+ var flags: SCNetworkReachabilityFlags {
+ var flags = SCNetworkReachabilityFlags()
+ if SCNetworkReachabilityGetFlags(reachabilityRef, &flags) {
+ return flags
+ } else {
+ return SCNetworkReachabilityFlags()
+ }
+ }
+}
+
diff --git a/console/iOS/console/TokenManager.swift b/console/iOS/ORLib/TokenManager.swift
similarity index 85%
rename from console/iOS/console/TokenManager.swift
rename to console/iOS/ORLib/TokenManager.swift
index bcac3e7d8..10756ca7d 100644
--- a/console/iOS/console/TokenManager.swift
+++ b/console/iOS/ORLib/TokenManager.swift
@@ -22,18 +22,18 @@ import Foundation
import UIKit
import WebKit
-class TokenManager:NSObject, URLSessionDelegate {
+public class TokenManager:NSObject, URLSessionDelegate {
- var offlineToken : String?
- var refreshToken : String?
- var idToken : String?
- var deviceId : String?
- var hasToken: Bool
+ public var offlineToken : String?
+ public var refreshToken : String?
+ public var idToken : String?
+ public var deviceId : String?
+ public var hasToken: Bool
- static let sharedInstance = TokenManager()
+ public static let sharedInstance = TokenManager()
override init() {
- let defaults = UserDefaults(suiteName: AppGroup.entitlement)
+ let defaults = UserDefaults(suiteName: ORAppGroup.entitlement)
defaults?.synchronize()
if defaults?.value(forKey: DefaultsKey.token) != nil
&& defaults?.value(forKey: DefaultsKey.refreshToken) != nil
@@ -52,8 +52,8 @@ class TokenManager:NSObject, URLSessionDelegate {
super.init()
}
- func storeTokens(tokenJsonDictionnary : [String : String]?) {
- let defaults = UserDefaults(suiteName: AppGroup.entitlement)
+ public func storeTokens(tokenJsonDictionnary : [String : String]?) {
+ let defaults = UserDefaults(suiteName: ORAppGroup.entitlement)
if (tokenJsonDictionnary?["token"] != nil
&& tokenJsonDictionnary?["refreshToken"] != nil
@@ -71,34 +71,34 @@ class TokenManager:NSObject, URLSessionDelegate {
}
}
- func logout() {
+ public func logout() {
resetToken()
}
- func resetToken() {
+ public func resetToken() {
hasToken = false
offlineToken = nil
refreshToken = nil
idToken = nil
- let defaults = UserDefaults(suiteName: AppGroup.entitlement)
+ let defaults = UserDefaults(suiteName: ORAppGroup.entitlement)
defaults?.removeObject(forKey: DefaultsKey.token)
defaults?.removeObject(forKey: DefaultsKey.refreshToken)
defaults?.removeObject(forKey: DefaultsKey.idToken)
}
- func resetTokenAndAuthenticate() {
+ public func resetTokenAndAuthenticate() {
resetToken()
// authenticate()
}
- func storeDeviceId(token : String) {
- let defaults = UserDefaults(suiteName: AppGroup.entitlement)
+ public func storeDeviceId(token : String) {
+ let defaults = UserDefaults(suiteName: ORAppGroup.entitlement)
deviceId = token
defaults?.set(token, forKey: DefaultsKey.deviceId)
sendDeviceId()
}
- func sendDeviceId() {
+ public func sendDeviceId() {
if (deviceId != nil && hasToken) {
UIApplication.shared.isNetworkActivityIndicatorVisible = true
self.getAccessToken { (accessTokenResult) in
@@ -107,7 +107,7 @@ class TokenManager:NSObject, URLSessionDelegate {
UIApplication.shared.isNetworkActivityIndicatorVisible = false
ErrorManager.showError(error: error!)
case .Success(let accessToken) :
- guard let urlRequest = URL(string: String(Server.registerDeviceResource)) else { return }
+ guard let urlRequest = URL(string: String(ORServer.registerDeviceResource)) else { return }
let request = NSMutableURLRequest(url: urlRequest)
request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField:"Content-Type");
request.httpMethod = "PUT"
@@ -146,12 +146,12 @@ class TokenManager:NSObject, URLSessionDelegate {
}
}
- func getAccessToken(callback: @escaping (AccesTokenResult<String>) -> ()) {
- guard let tkurlRequest = URL(string: String(format:"\(Server.scheme)://%@/auth/realms/%@/protocol/openid-connect/token", Server.hostURL, Server.realm)) else { return }
+ public func getAccessToken(callback: @escaping (AccesTokenResult<String>) -> ()) {
+ guard let tkurlRequest = URL(string: String(format:"\(ORServer.scheme)://%@/auth/realms/%@/protocol/openid-connect/token", ORServer.hostURL, ORServer.realm)) else { return }
let tkRequest = NSMutableURLRequest(url: tkurlRequest)
tkRequest.addValue("application/x-www-form-urlencoded", forHTTPHeaderField:"Content-Type");
tkRequest.httpMethod = "POST"
- let postString = String(format:"grant_type=refresh_token&refresh_token=%@&client_id=%@", refreshToken!, Client.clientId)
+ let postString = String(format:"grant_type=refresh_token&refresh_token=%@&client_id=%@", refreshToken!, ORClient.clientId)
tkRequest.httpBody = postString.data(using: .utf8)
let sessionConfiguration = URLSessionConfiguration.default
@@ -200,9 +200,9 @@ class TokenManager:NSObject, URLSessionDelegate {
req.resume()
}
- func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+ public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {
- if challenge.protectionSpace.host == Server.hostURL {
+ if challenge.protectionSpace.host == ORServer.hostURL {
completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
} else {
completionHandler(.performDefaultHandling, nil)
diff --git a/console/iOS/console.xcodeproj/project.pbxproj b/console/iOS/console.xcodeproj/project.pbxproj
deleted file mode 100644
index c84c8c823..000000000
--- a/console/iOS/console.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,622 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 06B097EA1EA902CF00DF5C43 /* ErrorManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06B097E91EA902CF00DF5C43 /* ErrorManager.swift */; };
- 06B097EB1EA902CF00DF5C43 /* ErrorManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06B097E91EA902CF00DF5C43 /* ErrorManager.swift */; };
- 06B097EC1EA902D900DF5C43 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2D48301E560B7500C95665 /* Constants.swift */; };
- 87A2313B4335644906A6C5DB /* Pods_console.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4964874264350BC5EAC8F84 /* Pods_console.framework */; };
- 911DB1B11F82AFF80035A8A1 /* ProjectConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 911DB1B01F82AFF40035A8A1 /* ProjectConstants.swift */; };
- 911DB1B21F82AFF80035A8A1 /* ProjectConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 911DB1B01F82AFF40035A8A1 /* ProjectConstants.swift */; };
- FA1D73E21E53374E00F6240A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA1D73E11E53374E00F6240A /* AppDelegate.swift */; };
- FA1D73E41E53374E00F6240A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA1D73E31E53374E00F6240A /* ViewController.swift */; };
- FA1D73E71E53374E00F6240A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA1D73E51E53374E00F6240A /* Main.storyboard */; };
- FA1D73E91E53374E00F6240A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA1D73E81E53374E00F6240A /* Assets.xcassets */; };
- FA1D73EC1E53374E00F6240A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA1D73EA1E53374E00F6240A /* LaunchScreen.storyboard */; };
- FA1D73F61E53392F00F6240A /* ORViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA1D73F51E53392F00F6240A /* ORViewController.swift */; };
- FA2D48311E560B7500C95665 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2D48301E560B7500C95665 /* Constants.swift */; };
- FAA226B81E71563F009A8FEC /* TokenManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA226B71E71563F009A8FEC /* TokenManager.swift */; };
- FABC54E81E7AEBD300B7B718 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = FABC54E71E7AEBD300B7B718 /* Reachability.m */; };
- FAFF2E2D1E7A95120076BDE3 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAFF2E2C1E7A95120076BDE3 /* NotificationService.swift */; };
- FAFF2E311E7A95120076BDE3 /* NotificationExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = FAFF2E2A1E7A95120076BDE3 /* NotificationExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- FAFF2E2F1E7A95120076BDE3 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = FA1D73D61E53374E00F6240A /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = FAFF2E291E7A95120076BDE3;
- remoteInfo = NotificationExtension;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- FAAFD0C61E78115700F01155 /* Embed App Extensions */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 13;
- files = (
- FAFF2E311E7A95120076BDE3 /* NotificationExtension.appex in Embed App Extensions */,
- );
- name = "Embed App Extensions";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 06B097E91EA902CF00DF5C43 /* ErrorManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorManager.swift; sourceTree = "<group>"; };
- 146098EE6A2181297FD32B8D /* Pods-console.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-console.debug.xcconfig"; path = "Pods/Target Support Files/Pods-console/Pods-console.debug.xcconfig"; sourceTree = "<group>"; };
- 6A25CEFE37281B00C9BA7EB5 /* Pods-console.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-console.release.xcconfig"; path = "Pods/Target Support Files/Pods-console/Pods-console.release.xcconfig"; sourceTree = "<group>"; };
- 911DB1B01F82AFF40035A8A1 /* ProjectConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProjectConstants.swift; sourceTree = "<group>"; };
- D4964874264350BC5EAC8F84 /* Pods_console.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_console.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- FA1D73DE1E53374E00F6240A /* console.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = console.app; sourceTree = BUILT_PRODUCTS_DIR; };
- FA1D73E11E53374E00F6240A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
- FA1D73E31E53374E00F6240A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
- FA1D73E61E53374E00F6240A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
- FA1D73E81E53374E00F6240A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
- FA1D73EB1E53374E00F6240A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
- FA1D73ED1E53374E00F6240A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
- FA1D73F51E53392F00F6240A /* ORViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORViewController.swift; sourceTree = "<group>"; };
- FA2D48301E560B7500C95665 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
- FA3297A91E8A4AE5008B77D3 /* NotificationExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NotificationExtension.entitlements; sourceTree = "<group>"; };
- FAA226B71E71563F009A8FEC /* TokenManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenManager.swift; sourceTree = "<group>"; };
- FAAFD0B41E77EB6E00F01155 /* console.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = console.entitlements; sourceTree = "<group>"; };
- FABC54E51E7AEBD200B7B718 /* console-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "console-Bridging-Header.h"; sourceTree = "<group>"; };
- FABC54E61E7AEBD300B7B718 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
- FABC54E71E7AEBD300B7B718 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
- FAFF2E2A1E7A95120076BDE3 /* NotificationExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
- FAFF2E2C1E7A95120076BDE3 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
- FAFF2E2E1E7A95120076BDE3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
- FAFF2E3A1E7AD2080076BDE3 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; };
- FAFF2E3C1E7AD2080076BDE3 /* UserNotificationsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotificationsUI.framework; path = System/Library/Frameworks/UserNotificationsUI.framework; sourceTree = SDKROOT; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- FA1D73DB1E53374E00F6240A /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 87A2313B4335644906A6C5DB /* Pods_console.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- FAFF2E271E7A95120076BDE3 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- B5A9A3A4436D6649979AAD5D /* Pods */ = {
- isa = PBXGroup;
- children = (
- 146098EE6A2181297FD32B8D /* Pods-console.debug.xcconfig */,
- 6A25CEFE37281B00C9BA7EB5 /* Pods-console.release.xcconfig */,
- );
- name = Pods;
- sourceTree = "<group>";
- };
- D99D42C10629DD05EE566F2F /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- D4964874264350BC5EAC8F84 /* Pods_console.framework */,
- FAFF2E3A1E7AD2080076BDE3 /* UserNotifications.framework */,
- FAFF2E3C1E7AD2080076BDE3 /* UserNotificationsUI.framework */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
- FA1D73D51E53374E00F6240A = {
- isa = PBXGroup;
- children = (
- FA1D73E01E53374E00F6240A /* console */,
- FAFF2E2B1E7A95120076BDE3 /* NotificationExtension */,
- FA1D73DF1E53374E00F6240A /* Products */,
- B5A9A3A4436D6649979AAD5D /* Pods */,
- D99D42C10629DD05EE566F2F /* Frameworks */,
- );
- sourceTree = "<group>";
- };
- FA1D73DF1E53374E00F6240A /* Products */ = {
- isa = PBXGroup;
- children = (
- FA1D73DE1E53374E00F6240A /* console.app */,
- FAFF2E2A1E7A95120076BDE3 /* NotificationExtension.appex */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- FA1D73E01E53374E00F6240A /* console */ = {
- isa = PBXGroup;
- children = (
- FAAFD0B41E77EB6E00F01155 /* console.entitlements */,
- FA1D73E11E53374E00F6240A /* AppDelegate.swift */,
- FA1D73E31E53374E00F6240A /* ViewController.swift */,
- FA1D73F51E53392F00F6240A /* ORViewController.swift */,
- FA2D48301E560B7500C95665 /* Constants.swift */,
- 911DB1B01F82AFF40035A8A1 /* ProjectConstants.swift */,
- FA2D48291E55D9F600C95665 /* utils */,
- FA1D73E51E53374E00F6240A /* Main.storyboard */,
- FA1D73E81E53374E00F6240A /* Assets.xcassets */,
- FA1D73EA1E53374E00F6240A /* LaunchScreen.storyboard */,
- FA1D73ED1E53374E00F6240A /* Info.plist */,
- );
- path = console;
- sourceTree = "<group>";
- };
- FA2D48291E55D9F600C95665 /* utils */ = {
- isa = PBXGroup;
- children = (
- 06B097E91EA902CF00DF5C43 /* ErrorManager.swift */,
- FABC54E61E7AEBD300B7B718 /* Reachability.h */,
- FABC54E71E7AEBD300B7B718 /* Reachability.m */,
- FAA226B71E71563F009A8FEC /* TokenManager.swift */,
- FABC54E51E7AEBD200B7B718 /* console-Bridging-Header.h */,
- );
- name = utils;
- sourceTree = "<group>";
- };
- FAFF2E2B1E7A95120076BDE3 /* NotificationExtension */ = {
- isa = PBXGroup;
- children = (
- FA3297A91E8A4AE5008B77D3 /* NotificationExtension.entitlements */,
- FAFF2E2C1E7A95120076BDE3 /* NotificationService.swift */,
- FAFF2E2E1E7A95120076BDE3 /* Info.plist */,
- );
- path = NotificationExtension;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- FA1D73DD1E53374E00F6240A /* console */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = FA1D73F01E53374E00F6240A /* Build configuration list for PBXNativeTarget "console" */;
- buildPhases = (
- 81ECFB768977B845BC1CB19F /* [CP] Check Pods Manifest.lock */,
- FA1D73DA1E53374E00F6240A /* Sources */,
- FA1D73DB1E53374E00F6240A /* Frameworks */,
- FA1D73DC1E53374E00F6240A /* Resources */,
- 2E1F88AEF407A152C63657FF /* [CP] Embed Pods Frameworks */,
- EE81FADDE7C1DBD70C93FA57 /* [CP] Copy Pods Resources */,
- FAAFD0C61E78115700F01155 /* Embed App Extensions */,
- );
- buildRules = (
- );
- dependencies = (
- FAFF2E301E7A95120076BDE3 /* PBXTargetDependency */,
- );
- name = console;
- productName = console;
- productReference = FA1D73DE1E53374E00F6240A /* console.app */;
- productType = "com.apple.product-type.application";
- };
- FAFF2E291E7A95120076BDE3 /* NotificationExtension */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = FAFF2E321E7A95120076BDE3 /* Build configuration list for PBXNativeTarget "NotificationExtension" */;
- buildPhases = (
- FAFF2E261E7A95120076BDE3 /* Sources */,
- FAFF2E271E7A95120076BDE3 /* Frameworks */,
- FAFF2E281E7A95120076BDE3 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = NotificationExtension;
- productName = NotificationExtension;
- productReference = FAFF2E2A1E7A95120076BDE3 /* NotificationExtension.appex */;
- productType = "com.apple.product-type.app-extension";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- FA1D73D61E53374E00F6240A /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0820;
- LastUpgradeCheck = 0900;
- ORGANIZATIONNAME = TInSys;
- TargetAttributes = {
- FA1D73DD1E53374E00F6240A = {
- CreatedOnToolsVersion = 8.2.1;
- LastSwiftMigration = 0900;
- ProvisioningStyle = Automatic;
- SystemCapabilities = {
- com.apple.ApplicationGroups.iOS = {
- enabled = 1;
- };
- com.apple.BackgroundModes = {
- enabled = 1;
- };
- com.apple.Push = {
- enabled = 1;
- };
- };
- };
- FAFF2E291E7A95120076BDE3 = {
- CreatedOnToolsVersion = 8.2.1;
- LastSwiftMigration = 0900;
- ProvisioningStyle = Automatic;
- SystemCapabilities = {
- com.apple.ApplicationGroups.iOS = {
- enabled = 1;
- };
- };
- };
- };
- };
- buildConfigurationList = FA1D73D91E53374E00F6240A /* Build configuration list for PBXProject "console" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = FA1D73D51E53374E00F6240A;
- productRefGroup = FA1D73DF1E53374E00F6240A /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- FA1D73DD1E53374E00F6240A /* console */,
- FAFF2E291E7A95120076BDE3 /* NotificationExtension */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- FA1D73DC1E53374E00F6240A /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- FA1D73EC1E53374E00F6240A /* LaunchScreen.storyboard in Resources */,
- FA1D73E91E53374E00F6240A /* Assets.xcassets in Resources */,
- FA1D73E71E53374E00F6240A /* Main.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- FAFF2E281E7A95120076BDE3 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 2E1F88AEF407A152C63657FF /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "${SRCROOT}/Pods/Target Support Files/Pods-console/Pods-console-frameworks.sh",
- "${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
- "${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
- "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
- );
- name = "[CP] Embed Pods Frameworks";
- outputPaths = (
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-console/Pods-console-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- 81ECFB768977B845BC1CB19F /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-console-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
- EE81FADDE7C1DBD70C93FA57 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-console/Pods-console-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- FA1D73DA1E53374E00F6240A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- FA2D48311E560B7500C95665 /* Constants.swift in Sources */,
- 06B097EA1EA902CF00DF5C43 /* ErrorManager.swift in Sources */,
- FA1D73E41E53374E00F6240A /* ViewController.swift in Sources */,
- FABC54E81E7AEBD300B7B718 /* Reachability.m in Sources */,
- FAA226B81E71563F009A8FEC /* TokenManager.swift in Sources */,
- 911DB1B11F82AFF80035A8A1 /* ProjectConstants.swift in Sources */,
- FA1D73F61E53392F00F6240A /* ORViewController.swift in Sources */,
- FA1D73E21E53374E00F6240A /* AppDelegate.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- FAFF2E261E7A95120076BDE3 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 06B097EB1EA902CF00DF5C43 /* ErrorManager.swift in Sources */,
- 911DB1B21F82AFF80035A8A1 /* ProjectConstants.swift in Sources */,
- FAFF2E2D1E7A95120076BDE3 /* NotificationService.swift in Sources */,
- 06B097EC1EA902D900DF5C43 /* Constants.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- FAFF2E301E7A95120076BDE3 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = FAFF2E291E7A95120076BDE3 /* NotificationExtension */;
- targetProxy = FAFF2E2F1E7A95120076BDE3 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
- FA1D73E51E53374E00F6240A /* Main.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- FA1D73E61E53374E00F6240A /* Base */,
- );
- name = Main.storyboard;
- sourceTree = "<group>";
- };
- FA1D73EA1E53374E00F6240A /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- FA1D73EB1E53374E00F6240A /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- FA1D73EE1E53374E00F6240A /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- FA1D73EF1E53374E00F6240A /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- FA1D73F11E53374E00F6240A /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 146098EE6A2181297FD32B8D /* Pods-console.debug.xcconfig */;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = console/console.entitlements;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = console/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = org.openremote.console;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "console/console-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.0;
- };
- name = Debug;
- };
- FA1D73F21E53374E00F6240A /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 6A25CEFE37281B00C9BA7EB5 /* Pods-console.release.xcconfig */;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = console/console.entitlements;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = console/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = org.openremote.console;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "console/console-Bridging-Header.h";
- SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.0;
- };
- name = Release;
- };
- FAFF2E331E7A95120076BDE3 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_ENTITLEMENTS = NotificationExtension/NotificationExtension.entitlements;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = NotificationExtension/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = org.openremote.console.NotificationExtension;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.0;
- };
- name = Debug;
- };
- FAFF2E341E7A95120076BDE3 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_ENTITLEMENTS = NotificationExtension/NotificationExtension.entitlements;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = NotificationExtension/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = org.openremote.console.NotificationExtension;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.0;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- FA1D73D91E53374E00F6240A /* Build configuration list for PBXProject "console" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- FA1D73EE1E53374E00F6240A /* Debug */,
- FA1D73EF1E53374E00F6240A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- FA1D73F01E53374E00F6240A /* Build configuration list for PBXNativeTarget "console" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- FA1D73F11E53374E00F6240A /* Debug */,
- FA1D73F21E53374E00F6240A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- FAFF2E321E7A95120076BDE3 /* Build configuration list for PBXNativeTarget "NotificationExtension" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- FAFF2E331E7A95120076BDE3 /* Debug */,
- FAFF2E341E7A95120076BDE3 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = FA1D73D61E53374E00F6240A /* Project object */;
-}
diff --git a/console/iOS/console.xcodeproj/xcuserdata/wbalcaen.xcuserdatad/xcschemes/NotificationExtension.xcscheme b/console/iOS/console.xcodeproj/xcuserdata/wbalcaen.xcuserdatad/xcschemes/NotificationExtension.xcscheme
deleted file mode 100644
index 5c8f29950..000000000
--- a/console/iOS/console.xcodeproj/xcuserdata/wbalcaen.xcuserdatad/xcschemes/NotificationExtension.xcscheme
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "0820"
- wasCreatedForAppExtension = "YES"
- version = "2.0">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "FAFF2E291E7A95120076BDE3"
- BuildableName = "NotificationExtension.appex"
- BlueprintName = "NotificationExtension"
- ReferencedContainer = "container:console.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "FA1D73DD1E53374E00F6240A"
- BuildableName = "console.app"
- BlueprintName = "console"
- ReferencedContainer = "container:console.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
- <Testables>
- </Testables>
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "FAFF2E291E7A95120076BDE3"
- BuildableName = "NotificationExtension.appex"
- BlueprintName = "NotificationExtension"
- ReferencedContainer = "container:console.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- <AdditionalOptions>
- </AdditionalOptions>
- </TestAction>
- <LaunchAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = ""
- selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- debugServiceExtension = "internal"
- allowLocationSimulation = "YES"
- launchAutomaticallySubstyle = "2">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "FA1D73DD1E53374E00F6240A"
- BuildableName = "console.app"
- BlueprintName = "console"
- ReferencedContainer = "container:console.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- <AdditionalOptions>
- </AdditionalOptions>
- </LaunchAction>
- <ProfileAction
- buildConfiguration = "Release"
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- debugDocumentVersioning = "YES"
- launchAutomaticallySubstyle = "2">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "FA1D73DD1E53374E00F6240A"
- BuildableName = "console.app"
- BlueprintName = "console"
- ReferencedContainer = "container:console.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/console/iOS/console.xcodeproj/xcuserdata/wbalcaen.xcuserdatad/xcschemes/xcschememanagement.plist b/console/iOS/console.xcodeproj/xcuserdata/wbalcaen.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index 34c0146ff..000000000
--- a/console/iOS/console.xcodeproj/xcuserdata/wbalcaen.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-<?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>NotificationExtension.xcscheme</key>
- <dict>
- <key>orderHint</key>
- <integer>5</integer>
- </dict>
- <key>console.xcscheme</key>
- <dict>
- <key>orderHint</key>
- <integer>0</integer>
- </dict>
- </dict>
- <key>SuppressBuildableAutocreation</key>
- <dict>
- <key>FA1D73DD1E53374E00F6240A</key>
- <dict>
- <key>primary</key>
- <true/>
- </dict>
- <key>FA6985B01E7A84BD005BE296</key>
- <dict>
- <key>primary</key>
- <true/>
- </dict>
- <key>FAAFD0BA1E78115700F01155</key>
- <dict>
- <key>primary</key>
- <true/>
- </dict>
- <key>FAFF2E291E7A95120076BDE3</key>
- <dict>
- <key>primary</key>
- <true/>
- </dict>
- <key>FAFF2E381E7AD2080076BDE3</key>
- <dict>
- <key>primary</key>
- <true/>
- </dict>
- </dict>
-</dict>
-</plist>
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Contents.json b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index dee3b58f5..000000000
--- a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,106 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "iphone",
- "size" : "20x20",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "20x20",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "3x"
- },
- {
- "idiom" : "ipad",
- "size" : "20x20",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "20x20",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-29.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-40.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-76.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-29.png b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-29.png
deleted file mode 100644
index e4d1da987..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-29.png and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 450ca00af..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 450ca00af..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index db6a7ff6b..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-40.png
deleted file mode 100644
index b3c85ecab..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-40.png and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 690801a1d..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 690801a1d..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index c7d23d90e..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index c7d23d90e..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 87e5d9b7c..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-76.png
deleted file mode 100644
index c3f4927e7..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/Icon-76.png and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 2a71d7f6e..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index d057dfa3b..000000000
Binary files a/console/iOS/console/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/console/iOS/console/Base.lproj/LaunchScreen.storyboard b/console/iOS/console/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index fdf3f97d1..000000000
--- a/console/iOS/console/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
- <dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
- </dependencies>
- <scenes>
- <!--View Controller-->
- <scene sceneID="EHf-IW-A2E">
- <objects>
- <viewController id="01J-lp-oVM" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
- <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="53" y="375"/>
- </scene>
- </scenes>
-</document>
diff --git a/console/iOS/console/Base.lproj/Main.storyboard b/console/iOS/console/Base.lproj/Main.storyboard
deleted file mode 100644
index e7f91fec6..000000000
--- a/console/iOS/console/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1217" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
- <device id="retina4_7" orientation="portrait">
- <adaptation id="fullscreen"/>
- </device>
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
- </dependencies>
- <scenes>
- <!--View Controller-->
- <scene sceneID="tne-QT-ifu">
- <objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
- <viewController id="BYZ-38-t0r" customClass="ViewController" customModule="console" customModuleProvider="target" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
- <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- </view>
- <navigationItem key="navigationItem" id="Mok-S7-Wng"/>
- </viewController>
- </objects>
- <point key="canvasLocation" x="1076" y="138.98050974512745"/>
- </scene>
- <!--ORViewController-->
- <scene sceneID="qgf-bG-ovp">
- <objects>
- <viewController id="vUD-eX-fRf" userLabel="ORViewController" customClass="ORViewcontroller" customModule="console" customModuleProvider="target" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="RuV-kJ-0cp"/>
- <viewControllerLayoutGuide type="bottom" id="PzT-Fu-ZtE"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="Pd7-Uh-WsQ">
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="2MI-jb-AAz" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="1757.5999999999999" y="112.89355322338831"/>
- </scene>
- </scenes>
-</document>
diff --git a/console/iOS/console/GoogleService-Info.plist b/console/iOS/console/GoogleService-Info.plist
deleted file mode 100644
index a39c33379..000000000
--- a/console/iOS/console/GoogleService-Info.plist
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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>AD_UNIT_ID_FOR_BANNER_TEST</key>
- <string>ca-app-pub-3940256099942544/2934735716</string>
- <key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
- <string>ca-app-pub-3940256099942544/4411468910</string>
- <key>CLIENT_ID</key>
- <string>423923723820-74pcf7mst282obnoe1g82dlhtgmu01pb.apps.googleusercontent.com</string>
- <key>REVERSED_CLIENT_ID</key>
- <string>com.googleusercontent.apps.423923723820-74pcf7mst282obnoe1g82dlhtgmu01pb</string>
- <key>API_KEY</key>
- <string>AIzaSyC5VHfpI8AMEf7k4V9fV1kg9Lv6xENXD7I</string>
- <key>GCM_SENDER_ID</key>
- <string>423923723820</string>
- <key>PLIST_VERSION</key>
- <string>1</string>
- <key>BUNDLE_ID</key>
- <string>io.openremote.blok61</string>
- <key>PROJECT_ID</key>
- <string>blok61-c156b</string>
- <key>STORAGE_BUCKET</key>
- <string>blok61-c156b.appspot.com</string>
- <key>IS_ADS_ENABLED</key>
- <true/>
- <key>IS_ANALYTICS_ENABLED</key>
- <false/>
- <key>IS_APPINVITE_ENABLED</key>
- <false/>
- <key>IS_GCM_ENABLED</key>
- <true/>
- <key>IS_SIGNIN_ENABLED</key>
- <true/>
- <key>GOOGLE_APP_ID</key>
- <string>1:423923723820:ios:b18bf9b5f8e49573</string>
- <key>DATABASE_URL</key>
- <string>https://blok61-c156b.firebaseio.com</string>
-</dict>
-</plist>
\ No newline at end of file
diff --git a/console/iOS/console/Info.plist b/console/iOS/console/Info.plist
deleted file mode 100644
index 57865217a..000000000
--- a/console/iOS/console/Info.plist
+++ /dev/null
@@ -1,60 +0,0 @@
-<?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>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>$(PRODUCT_NAME)</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.1</string>
- <key>CFBundleURLTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>CFBundleURLSchemes</key>
- <array>
- <string>org.openremote.console</string>
- </array>
- </dict>
- </array>
- <key>CFBundleVersion</key>
- <string>14</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>NSPhotoLibraryUsageDescription</key>
- <string>$(PRODUCT_NAME) photo use</string>
- <key>UIBackgroundModes</key>
- <array>
- <string>remote-notification</string>
- </array>
- <key>UILaunchStoryboardName</key>
- <string>LaunchScreen</string>
- <key>UIMainStoryboardFile</key>
- <string>Main</string>
- <key>UIRequiredDeviceCapabilities</key>
- <array>
- <string>armv7</string>
- </array>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- </array>
- <key>UISupportedInterfaceOrientations~ipad</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
-</dict>
-</plist>
diff --git a/console/iOS/console/ProjectConstants.swift b/console/iOS/console/ProjectConstants.swift
deleted file mode 100644
index a3e953563..000000000
--- a/console/iOS/console/ProjectConstants.swift
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2017, OpenRemote Inc.
- *
- * See the CONTRIBUTORS.txt file in the distribution for a
- * full listing of individual contributors.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import Foundation
-
-enum Server {
- static let scheme = "https"
- // static let hostURL = "192.168.1.145:8080"
- static let hostURL = "blok61.openremote.io"
- static let initialPath = "console/\(Server.realm)/"
- static let navigationPath = "console/\(Server.realm)/"
- static let realm = "blok61"
- static let apiTestResource = String(format:"\(Server.scheme)://%@/%@/notification/alert",Server.hostURL,Server.realm)
-
- static let registerDeviceResource = String(format:"\(Server.scheme)://%@/%@/notification/token",Server.hostURL,Server.realm)
- static let deleteNotifiedAlertResource = String(format:"\(Server.scheme)://%@/%@/notification/alert/",Server.hostURL,Server.realm)
-}
-
-enum Client {
- static let clientId = "openremote"
-}
-
-enum FCM {
- static let serverKey = "Dummy"
-}
-
-enum AppGroup {
- static let entitlement = "group.org.openremote.console"
-}
diff --git a/console/iOS/console/Reachability.h b/console/iOS/console/Reachability.h
deleted file mode 100644
index 812e268f3..000000000
--- a/console/iOS/console/Reachability.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- Copyright (C) 2016 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
- */
-
-#import <Foundation/Foundation.h>
-#import <SystemConfiguration/SystemConfiguration.h>
-#import <netinet/in.h>
-
-
-typedef NS_ENUM(NSUInteger, NetworkStatus) {
- NotReachable = 0,
- ReachableViaWiFi = 1,
- ReachableViaWWAN = 2
-};
-
-#pragma mark IPv6 Support
-//Reachability fully support IPv6. For full details, see ReadMe.md.
-
-
-extern NSString *kReachabilityChangedNotification;
-
-
-@interface Reachability : NSObject
-
-/*!
- * Use to check the reachability of a given host name.
- */
-+ (instancetype)reachabilityWithHostName:(NSString *)hostName;
-
-/*!
- * Use to check the reachability of a given IP address.
- */
-+ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress;
-
-/*!
- * Checks whether the default route is available. Should be used by applications that do not connect to a particular host.
- */
-+ (instancetype)reachabilityForInternetConnection;
-
-
-#pragma mark reachabilityForLocalWiFi
-//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
-//+ (instancetype)reachabilityForLocalWiFi;
-
-/*!
- * Start listening for reachability notifications on the current run loop.
- */
-- (BOOL)startNotifier;
-- (void)stopNotifier;
-
-- (NetworkStatus)currentReachabilityStatus;
-
-/*!
- * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand.
- */
-- (BOOL)connectionRequired;
-
-+ (BOOL)isConnectedToNetwork;
-
-@end
-
-
diff --git a/console/iOS/console/Reachability.m b/console/iOS/console/Reachability.m
deleted file mode 100644
index 0c96c4e3b..000000000
--- a/console/iOS/console/Reachability.m
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- Copyright (C) 2016 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
- */
-
-#import <arpa/inet.h>
-#import <ifaddrs.h>
-#import <netdb.h>
-#import <sys/socket.h>
-#import <netinet/in.h>
-
-#import <CoreFoundation/CoreFoundation.h>
-
-#import "Reachability.h"
-
-#pragma mark IPv6 Support
-//Reachability fully support IPv6. For full details, see ReadMe.md.
-
-
-NSString *kReachabilityChangedNotification = @"kNetworkReachabilityChangedNotification";
-
-
-#pragma mark - Supporting functions
-
-#define kShouldPrintReachabilityFlags 0
-
-static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment)
-{
-#if kShouldPrintReachabilityFlags
-
- NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n",
- (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-',
- (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-',
-
- (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-',
- (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-',
- (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-',
- (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-',
- (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-',
- (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-',
- (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-',
- comment
- );
-#endif
-}
-
-
-static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info)
-{
- Reachability* noteObject = (__bridge Reachability *)info;
- // Post a notification to notify the client that the network reachability changed.
- [[NSNotificationCenter defaultCenter] postNotificationName: kReachabilityChangedNotification object: noteObject];
-}
-
-
-#pragma mark - Reachability implementation
-
-@implementation Reachability
-{
- SCNetworkReachabilityRef _reachabilityRef;
-}
-
-+ (instancetype)reachabilityWithHostName:(NSString *)hostName
-{
- Reachability* returnValue = NULL;
- SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]);
- if (reachability != NULL)
- {
- returnValue= [[self alloc] init];
- if (returnValue != NULL)
- {
- returnValue->_reachabilityRef = reachability;
- }
- else {
- CFRelease(reachability);
- }
- }
- return returnValue;
-}
-
-
-+ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress
-{
- SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, hostAddress);
-
- Reachability* returnValue = NULL;
-
- if (reachability != NULL)
- {
- returnValue = [[self alloc] init];
- if (returnValue != NULL)
- {
- returnValue->_reachabilityRef = reachability;
- }
- else {
- CFRelease(reachability);
- }
- }
- return returnValue;
-}
-
-
-+ (instancetype)reachabilityForInternetConnection
-{
- struct sockaddr_in zeroAddress;
- bzero(&zeroAddress, sizeof(zeroAddress));
- zeroAddress.sin_len = sizeof(zeroAddress);
- zeroAddress.sin_family = AF_INET;
-
- return [self reachabilityWithAddress: (const struct sockaddr *) &zeroAddress];
-}
-
-#pragma mark reachabilityForLocalWiFi
-//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
-//+ (instancetype)reachabilityForLocalWiFi
-
-
-
-#pragma mark - Start and stop notifier
-
-- (BOOL)startNotifier
-{
- BOOL returnValue = NO;
- SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
-
- if (SCNetworkReachabilitySetCallback(_reachabilityRef, ReachabilityCallback, &context))
- {
- if (SCNetworkReachabilityScheduleWithRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode))
- {
- returnValue = YES;
- }
- }
-
- return returnValue;
-}
-
-
-- (void)stopNotifier
-{
- if (_reachabilityRef != NULL)
- {
- SCNetworkReachabilityUnscheduleFromRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
- }
-}
-
-
-- (void)dealloc
-{
- [self stopNotifier];
- if (_reachabilityRef != NULL)
- {
- CFRelease(_reachabilityRef);
- }
-}
-
-
-#pragma mark - Network Flag Handling
-
-- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags
-{
- PrintReachabilityFlags(flags, "networkStatusForFlags");
- if ((flags & kSCNetworkReachabilityFlagsReachable) == 0)
- {
- // The target host is not reachable.
- return NotReachable;
- }
-
- NetworkStatus returnValue = NotReachable;
-
- if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0)
- {
- /*
- If the target host is reachable and no connection is required then we'll assume (for now) that you're on Wi-Fi...
- */
- returnValue = ReachableViaWiFi;
- }
-
- if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) ||
- (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))
- {
- /*
- ... and the connection is on-demand (or on-traffic) if the calling application is using the CFSocketStream or higher APIs...
- */
-
- if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0)
- {
- /*
- ... and no [user] intervention is needed...
- */
- returnValue = ReachableViaWiFi;
- }
- }
-
- if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN)
- {
- /*
- ... but WWAN connections are OK if the calling application is using the CFNetwork APIs.
- */
- returnValue = ReachableViaWWAN;
- }
-
- return returnValue;
-}
-
-- (BOOL)connectionRequired
-{
- NSAssert(_reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef");
- SCNetworkReachabilityFlags flags;
-
- if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags))
- {
- return (flags & kSCNetworkReachabilityFlagsConnectionRequired);
- }
-
- return NO;
-}
-
-- (NetworkStatus)currentReachabilityStatus
-{
- NSAssert(_reachabilityRef != NULL, @"currentNetworkStatus called with NULL SCNetworkReachabilityRef");
- NetworkStatus returnValue = NotReachable;
- SCNetworkReachabilityFlags flags;
-
- if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags))
- {
- returnValue = [self networkStatusForFlags:flags];
- }
-
- return returnValue;
-}
-
-+ (BOOL)isConnectedToNetwork
-{
- NetworkStatus status = [Reachability reachabilityForInternetConnection].currentReachabilityStatus;
- if (status != NotReachable) {
- return true;
- }
- return false;
-}
-
-@end
diff --git a/console/iOS/console/console-Bridging-Header.h b/console/iOS/console/console-Bridging-Header.h
deleted file mode 100644
index 5c344b317..000000000
--- a/console/iOS/console/console-Bridging-Header.h
+++ /dev/null
@@ -1,5 +0,0 @@
-//
-// Use this file to import your target's public headers that you would like to expose to Swift.
-//
-
-#import "Reachability.h"
diff --git a/console/iOS/console/console.entitlements b/console/iOS/console/console.entitlements
deleted file mode 100644
index c2389227d..000000000
--- a/console/iOS/console/console.entitlements
+++ /dev/null
@@ -1,13 +0,0 @@
-<?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>
- <key>com.apple.security.application-groups</key>
- <array>
- <string>group.org.openremote.console</string>
- <string>group.org.openremote.console.NotificationExtension</string>
- </array>
-</dict>
-</plist>
diff --git a/console/iOS/console/podfile b/console/iOS/console/podfile
deleted file mode 100644
index 1dc4e98d1..000000000
--- a/console/iOS/console/podfile
+++ /dev/null
@@ -1,4 +0,0 @@
-target 'or-shell' do
-use_frameworks!
-pod 'AeroGearOAuth2'
-end
diff --git a/console/iOS/podfile b/console/iOS/podfile
deleted file mode 100644
index fa88ce6bd..000000000
--- a/console/iOS/podfile
+++ /dev/null
@@ -1,7 +0,0 @@
-platform :ios, '10.2'
-
-target 'console' do
-use_frameworks!
-pod 'Firebase/Core'
-pod 'Firebase/Messaging'
-end