100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Split Constants file in 2 parts: one generic and one project specific
Eric Bariaux66cdfc687550
diff --git a/console/iOS/console.xcodeproj/project.pbxproj b/console/iOS/console.xcodeproj/project.pbxprojindex 1acb16b6b..6cfe87711 100644--- a/console/iOS/console.xcodeproj/project.pbxproj+++ b/console/iOS/console.xcodeproj/project.pbxproj@@ -11,6 +11,8 @@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 */; };@@ -54,6 +56,7 @@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>"; };@@ -145,6 +148,7 @@FA1D73E31E53374E00F6240A /* ViewController.swift */,FA1D73F51E53392F00F6240A /* ORViewController.swift */,FA2D48301E560B7500C95665 /* Constants.swift */,+ 911DB1B01F82AFF40035A8A1 /* ProjectConstants.swift */,FA2D48291E55D9F600C95665 /* utils */,FA1D73E51E53374E00F6240A /* Main.storyboard */,FA1D73E81E53374E00F6240A /* Assets.xcassets */,@@ -356,6 +360,7 @@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 */,);@@ -366,6 +371,7 @@buildActionMask = 2147483647;files = (06B097EB1EA902CF00DF5C43 /* ErrorManager.swift in Sources */,+ 911DB1B21F82AFF80035A8A1 /* ProjectConstants.swift in Sources */,FAFF2E2D1E7A95120076BDE3 /* NotificationService.swift in Sources */,06B097EC1EA902D900DF5C43 /* Constants.swift in Sources */,);diff --git a/console/iOS/console/Constants.swift b/console/iOS/console/Constants.swiftindex 15ba2b190..87eb13a0e 100644--- a/console/iOS/console/Constants.swift+++ b/console/iOS/console/Constants.swift@@ -26,26 +26,6 @@ enum AccesTokenResult<String>case Failure(NSError?)}-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 DefaultsKey {static let token = "token"static let refreshToken = "refreshToken"@@ -58,10 +38,6 @@ enum NotificationsNames {static let isdeviceIdSent = "isdeviceIdSent"}-enum AppGroup {- static let entitlement = "group.org.openremote.console"-}-enum Notifications {static let needsReachabilityCheck = Notification.Name("NeedsReachabilityCheck")static let fullScreenShown = Notification.Name("fullScreenShown")diff --git a/console/iOS/console/ProjectConstants.swift b/console/iOS/console/ProjectConstants.swiftnew file mode 100644index 000000000..a3e953563--- /dev/null+++ b/console/iOS/console/ProjectConstants.swift@@ -0,0 +1,46 @@+/*+ * 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"+}