Skip to content

armgit / core

Public Imported from GitHub
0

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

Console settings improvements (#1143)

Michael Rademakerdae58f0d40b3
diff --git a/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj b/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj
index 9c8c5706c..66f53d15e 100644
--- a/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj
+++ b/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj
@@ -7,10 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
- 4CBDF29E2AE2797E00C7D94C /* ORLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CBDF29D2AE2797E00C7D94C /* ORLib.framework */; };
- 4CBDF29F2AE2797E00C7D94C /* ORLib.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4CBDF29D2AE2797E00C7D94C /* ORLib.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 4CBDF2A22AE2798700C7D94C /* ORLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CBDF2A12AE2798700C7D94C /* ORLib.framework */; };
- 4CBDF2A32AE2798700C7D94C /* ORLib.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4CBDF2A12AE2798700C7D94C /* ORLib.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 4CBDF2B62AE2862500C7D94C /* ORLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CBDF2B52AE2862500C7D94C /* ORLib.framework */; };
+ 4CBDF2BA2AE2862A00C7D94C /* ORLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CBDF2B92AE2862A00C7D94C /* ORLib.framework */; };
+ 4CBDF2BB2AE2862A00C7D94C /* ORLib.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4CBDF2B92AE2862A00C7D94C /* ORLib.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
4CEDA25D25405B1E00C47E3B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4CEDA25C25405B1E00C47E3B /* GoogleService-Info.plist */; };
4CEDA2A7254074D100C47E3B /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4CEDA2A6254074D100C47E3B /* Storyboard.storyboard */; };
4CEDA2CE254075D400C47E3B /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CEDA2CD254075D400C47E3B /* SplashViewController.swift */; };
@@ -26,6 +25,7 @@
910893A0285DB30D00D4ABA7 /* WizardAppViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9108939F285DB30D00D4ABA7 /* WizardAppViewController.swift */; };
910893A2285DB37C00D4ABA7 /* WizardDomainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 910893A1285DB37C00D4ABA7 /* WizardDomainViewController.swift */; };
91543FDE293FA2F20009016E /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91543FDD293FA2F20009016E /* SettingsViewController.swift */; };
+ 915BFDFC29685A7200A4FD67 /* ProjectTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 915BFDFB29685A7200A4FD67 /* ProjectTableViewCell.swift */; };
91658F952889C15D000FF05C /* WizardRealmViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91658F942889C15D000FF05C /* WizardRealmViewController.swift */; };
/* End PBXBuildFile section */
@@ -40,24 +40,13 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
- 4CBDF2A02AE2797E00C7D94C /* Embed Frameworks */ = {
+ 4CBDF2BC2AE2862A00C7D94C /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
- 4CBDF29F2AE2797E00C7D94C /* ORLib.framework in Embed Frameworks */,
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
- 4CBDF2A42AE2798700C7D94C /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- 4CBDF2A32AE2798700C7D94C /* ORLib.framework in Embed Frameworks */,
+ 4CBDF2BB2AE2862A00C7D94C /* ORLib.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -80,8 +69,8 @@
46FD90D41833A0E2C4C7DDA6 /* Pods-NotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.release.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.release.xcconfig"; sourceTree = "<group>"; };
4C38E9C02548089A00E381C6 /* OpenRemote.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OpenRemote.entitlements; sourceTree = "<group>"; };
4C38E9C12548090200E381C6 /* NotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NotificationService.entitlements; sourceTree = "<group>"; };
- 4CBDF29D2AE2797E00C7D94C /* ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 4CBDF2A12AE2798700C7D94C /* ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4CBDF2B52AE2862500C7D94C /* ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4CBDF2B92AE2862A00C7D94C /* ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4CEDA25C25405B1E00C47E3B /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
4CEDA2A6254074D100C47E3B /* Storyboard.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Storyboard.storyboard; sourceTree = "<group>"; };
4CEDA2CD254075D400C47E3B /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = "<group>"; };
@@ -100,6 +89,7 @@
9108939F285DB30D00D4ABA7 /* WizardAppViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WizardAppViewController.swift; sourceTree = "<group>"; };
910893A1285DB37C00D4ABA7 /* WizardDomainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WizardDomainViewController.swift; sourceTree = "<group>"; };
91543FDD293FA2F20009016E /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
+ 915BFDFB29685A7200A4FD67 /* ProjectTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProjectTableViewCell.swift; sourceTree = "<group>"; };
91658F8F28897BC0000FF05C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
91658F942889C15D000FF05C /* WizardRealmViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WizardRealmViewController.swift; sourceTree = "<group>"; };
A994B3D3E3853BA4D16AA5A8 /* Pods-GenericApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GenericApp.debug.xcconfig"; path = "Target Support Files/Pods-GenericApp/Pods-GenericApp.debug.xcconfig"; sourceTree = "<group>"; };
@@ -112,7 +102,7 @@
buildActionMask = 2147483647;
files = (
756FA8BF24545CB0CC18CA6E /* Pods_GenericApp.framework in Frameworks */,
- 4CBDF2A22AE2798700C7D94C /* ORLib.framework in Frameworks */,
+ 4CBDF2BA2AE2862A00C7D94C /* ORLib.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -121,7 +111,7 @@
buildActionMask = 2147483647;
files = (
5952998DA2B50AFF73DDCAE1 /* Pods_NotificationService.framework in Frameworks */,
- 4CBDF29E2AE2797E00C7D94C /* ORLib.framework in Frameworks */,
+ 4CBDF2B62AE2862500C7D94C /* ORLib.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -211,6 +201,7 @@
910893A1285DB37C00D4ABA7 /* WizardDomainViewController.swift */,
91658F942889C15D000FF05C /* WizardRealmViewController.swift */,
91543FDD293FA2F20009016E /* SettingsViewController.swift */,
+ 915BFDFB29685A7200A4FD67 /* ProjectTableViewCell.swift */,
);
path = UI;
sourceTree = "<group>";
@@ -218,8 +209,8 @@
E76367874E329A8C268BC128 /* Frameworks */ = {
isa = PBXGroup;
children = (
- 4CBDF2A12AE2798700C7D94C /* ORLib.framework */,
- 4CBDF29D2AE2797E00C7D94C /* ORLib.framework */,
+ 4CBDF2B92AE2862A00C7D94C /* ORLib.framework */,
+ 4CBDF2B52AE2862500C7D94C /* ORLib.framework */,
4E012F268F107177E6B242E8 /* Pods_GenericApp.framework */,
570B5A477F4AA747A62A45EF /* Pods_NotificationService.framework */,
);
@@ -239,7 +230,7 @@
878D2D07249A490300011484 /* Resources */,
878D2D2C249A498900011484 /* Embed App Extensions */,
1916A4B7304981F2A7B97168 /* [CP] Embed Pods Frameworks */,
- 4CBDF2A42AE2798700C7D94C /* Embed Frameworks */,
+ 4CBDF2BC2AE2862A00C7D94C /* Embed Frameworks */,
);
buildRules = (
);
@@ -259,7 +250,6 @@
878D2D20249A498900011484 /* Sources */,
878D2D21249A498900011484 /* Frameworks */,
878D2D22249A498900011484 /* Resources */,
- 4CBDF2A02AE2797E00C7D94C /* Embed Frameworks */,
);
buildRules = (
);
@@ -401,6 +391,7 @@
91658F952889C15D000FF05C /* WizardRealmViewController.swift in Sources */,
4CF3439127A13F2200EB5A0E /* String+Utils.swift in Sources */,
91543FDE293FA2F20009016E /* SettingsViewController.swift in Sources */,
+ 915BFDFC29685A7200A4FD67 /* ProjectTableViewCell.swift in Sources */,
878D2D0D249A490300011484 /* AppDelegate.swift in Sources */,
910893A0285DB30D00D4ABA7 /* WizardAppViewController.swift in Sources */,
910893A2285DB37C00D4ABA7 /* WizardDomainViewController.swift in Sources */,
@@ -562,7 +553,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GenericApp/OpenRemote.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 42;
+ CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 4AC88KZHJZ;
ENABLE_PREVIEWS = YES;
@@ -588,7 +579,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GenericApp/OpenRemote.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 42;
+ CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 4AC88KZHJZ;
ENABLE_PREVIEWS = YES;
diff --git a/console/iOS/GenericApp/GenericApp/AppDelegate.swift b/console/iOS/GenericApp/GenericApp/AppDelegate.swift
index 272703711..bdc1515d6 100644
--- a/console/iOS/GenericApp/GenericApp/AppDelegate.swift
+++ b/console/iOS/GenericApp/GenericApp/AppDelegate.swift
@@ -25,6 +25,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
var fcmToken: String?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+ UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor(named: "or_green") as Any], for: .normal)
+ UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor(named: "or_green") as Any]
+ UIBarButtonItem.appearance().tintColor = UIColor(named: "or_green")
+
IQKeyboardManager.shared.enable = true
UNUserNotificationCenter.current().delegate = self
@@ -75,12 +79,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {
func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
if shortcutItem.type == "settings" {
let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement)
- userDefaults?.removeObject(forKey: DefaultsKey.projectKey)
userDefaults?.removeObject(forKey: DefaultsKey.realmKey)
-
-
- // TODO: try displaying a simple image
-
(self.window?.rootViewController as? SplashViewController)?.displaySettings = true
self.window?.rootViewController?.dismiss(animated: false)
}
@@ -237,17 +236,20 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
let userInfo = response.notification.request.content.userInfo
var notificationId : Int64? = nil
var consoleId : String?
- var urlString: String?
+ var project: ProjectConfig?
if let notificationIdString = userInfo[ActionType.notificationId] as? String{
notificationId = Int64(notificationIdString)
}
-
+
if let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement) {
- consoleId = userDefaults.string(forKey: GeofenceProvider.consoleIdKey)
- let host = userDefaults.string(forKey: DefaultsKey.hostKey)
- let realm = userDefaults.string(forKey: DefaultsKey.realmKey)
- urlString = host!.appending("/api/\(realm!)")
+ consoleId = userDefaults.string(forKey: GeofenceProvider.consoleIdKey) // TODO: geofence provider should also be adapted to store "per project"
+
+ let selectedProjectId = userDefaults.string(forKey: DefaultsKey.projectKey)
+ if let projectsData = userDefaults.data(forKey: DefaultsKey.projectsConfigurationKey) {
+ let projects = (try? JSONDecoder().decode([ProjectConfig].self, from: projectsData)) ?? []
+ project = projects.first(where:{ $0.id == selectedProjectId })
+ }
}
NSLog("%@", "Action chosen: \(response.actionIdentifier)")
@@ -259,7 +261,7 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
if urlTo.hasPrefix("http") || urlTo.hasPrefix("https") {
urlRequest = URL(string:urlTo)
} else {
- if let url = urlString {
+ if let url = project?.baseURL {
urlRequest = URL(string: "\(url)/console/\(urlTo)")
}
}
@@ -292,7 +294,7 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
if action.url.hasPrefix("http") || action.url.hasPrefix("https") {
urlRequest = URL(string:action.url)
} else {
- if let url = urlString {
+ if let url = project?.baseURL {
urlRequest = URL(string: "\(url)/console/\(action.url)")
}
}
diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_green.colorset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_green.colorset/Contents.json
index a8574edeb..ae9e650d3 100644
--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_green.colorset/Contents.json
+++ b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_green.colorset/Contents.json
@@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
- "blue" : "0.176",
- "green" : "0.612",
- "red" : "0.290"
+ "blue" : "0x2C",
+ "green" : "0x9C",
+ "red" : "0x49"
}
},
"idiom" : "universal"
@@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
- "blue" : "0.176",
- "green" : "0.610",
- "red" : "0.291"
+ "blue" : "0x2A",
+ "green" : "0x9D",
+ "red" : "0x4D"
}
},
"idiom" : "universal"
diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_grey_background.colorset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_grey_background.colorset/Contents.json
new file mode 100644
index 000000000..95954f7f4
--- /dev/null
+++ b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_grey_background.colorset/Contents.json
@@ -0,0 +1,38 @@
+{
+ "colors" : [
+ {
+ "color" : {
+ "color-space" : "srgb",
+ "components" : {
+ "alpha" : "1.000",
+ "blue" : "0xF9",
+ "green" : "0xF9",
+ "red" : "0xF9"
+ }
+ },
+ "idiom" : "universal"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "color" : {
+ "color-space" : "srgb",
+ "components" : {
+ "alpha" : "1.000",
+ "blue" : "0xF9",
+ "green" : "0xF9",
+ "red" : "0xF9"
+ }
+ },
+ "idiom" : "universal"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/console/iOS/GenericApp/GenericApp/Info.plist b/console/iOS/GenericApp/GenericApp/Info.plist
index 03d97536a..6efd12995 100644
--- a/console/iOS/GenericApp/GenericApp/Info.plist
+++ b/console/iOS/GenericApp/GenericApp/Info.plist
@@ -2,6 +2,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>NSBluetoothAlwaysUsageDescription</key>
+ <string>Bluetooth is needed in order to connect to local devices</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
diff --git a/console/iOS/GenericApp/GenericApp/Storyboard.storyboard b/console/iOS/GenericApp/GenericApp/Storyboard.storyboard
index eb446322b..3c6874ecc 100644
--- a/console/iOS/GenericApp/GenericApp/Storyboard.storyboard
+++ b/console/iOS/GenericApp/GenericApp/Storyboard.storyboard
@@ -4,11 +4,28 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
+ <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
+ <!--Navigation Controller-->
+ <scene sceneID="rdM-dC-Axh">
+ <objects>
+ <navigationController id="21M-Zl-EXA" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" contentMode="scaleToFill" id="0H5-oT-M2w">
+ <rect key="frame" x="0.0" y="48" width="414" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="uoK-29-uZr" kind="relationship" relationship="rootViewController" id="yRF-XH-Bcz"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="Eh6-Kw-RtT" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-14400" y="-1081"/>
+ </scene>
<!--Splash View Controller-->
<scene sceneID="xjs-uN-Dtd">
<objects>
@@ -22,7 +39,7 @@
<connections>
<segue destination="HSA-l5-YFF" kind="presentation" identifier="goToWebView" modalPresentationStyle="fullScreen" id="5Oq-tw-rj7"/>
<segue destination="7TF-fh-Sa5" kind="presentation" identifier="goToWizardDomainView" modalPresentationStyle="fullScreen" id="ttr-A8-IEy"/>
- <segue destination="uoK-29-uZr" kind="presentation" identifier="goToSettingsView" modalPresentationStyle="fullScreen" id="PCt-br-aki"/>
+ <segue destination="21M-Zl-EXA" kind="presentation" identifier="goToSettingsView" modalPresentationStyle="fullScreen" id="rYX-YJ-3zl"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Afh-RU-OvJ" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -103,7 +120,7 @@
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="El4-H3-bSM"/>
- <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <color key="backgroundColor" name="or_grey_background"/>
<constraints>
<constraint firstItem="RWD-5Z-rop" firstAttribute="leading" secondItem="El4-H3-bSM" secondAttribute="leading" constant="30" id="83B-XS-r1h"/>
<constraint firstItem="WNe-Oj-DbK" firstAttribute="top" secondItem="El4-H3-bSM" secondAttribute="top" constant="20" id="8fa-ya-RZF"/>
@@ -117,6 +134,7 @@
</view>
<navigationItem key="navigationItem" title="Domain" id="BpY-3s-ku9"/>
<connections>
+ <outlet property="boxView" destination="RWD-5Z-rop" id="A4Q-61-a5p"/>
<outlet property="domainTextInput" destination="LdF-6W-ii0" id="cU5-lf-fnQ"/>
<outlet property="nextButton" destination="uoR-Y9-80o" id="F7l-Qe-lg1"/>
<segue destination="ccW-7o-aWn" kind="show" identifier="goToWizardAppView" id="okt-Gc-Qir"/>
@@ -198,7 +216,7 @@
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="C0m-OJ-atI"/>
- <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <color key="backgroundColor" name="or_grey_background"/>
<constraints>
<constraint firstItem="GVA-jq-dIF" firstAttribute="leading" secondItem="C0m-OJ-atI" secondAttribute="leading" constant="30" id="Avn-Cc-29U"/>
<constraint firstItem="rds-tC-Xfi" firstAttribute="top" secondItem="GVA-jq-dIF" secondAttribute="bottom" constant="20" id="XdW-U9-RRG"/>
@@ -210,6 +228,7 @@
</view>
<navigationItem key="navigationItem" title="Realm" id="FZA-KJ-vqn"/>
<connections>
+ <outlet property="boxView" destination="rds-tC-Xfi" id="pYa-HZ-Ney"/>
<outlet property="nextButton" destination="Jn1-hW-fFq" id="7Ex-bk-Rms"/>
<outlet property="realmTextInput" destination="QCb-6J-rL4" id="Kf8-36-Kxo"/>
<outlet property="realmsSelectionButton" destination="pE2-qw-0Zp" id="rSu-57-Pzp"/>
@@ -291,7 +310,7 @@
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="JdK-us-UvR"/>
- <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <color key="backgroundColor" name="or_grey_background"/>
<constraints>
<constraint firstItem="JdK-us-UvR" firstAttribute="trailing" secondItem="a8w-Ut-lvr" secondAttribute="trailing" constant="30" id="H8O-bM-YUP"/>
<constraint firstItem="bYT-CK-7We" firstAttribute="leading" secondItem="JdK-us-UvR" secondAttribute="leading" constant="30" id="JYy-v5-wnQ"/>
@@ -305,6 +324,7 @@
<connections>
<outlet property="appTextInput" destination="Z5X-eO-DYi" id="L02-fU-0VB"/>
<outlet property="appsSelectionButton" destination="Gvc-Wg-7aG" id="9fP-P9-zUk"/>
+ <outlet property="boxView" destination="bYT-CK-7We" id="GzP-8Q-Y9q"/>
<outlet property="nextButton" destination="LOC-Pp-fDB" id="GUN-8i-a9a"/>
<segue destination="P3v-2u-Uf5" kind="show" identifier="goToWizardRealmView" id="61Y-JM-NmK"/>
</connections>
@@ -335,26 +355,75 @@
<scene sceneID="UWg-Ah-L22">
<objects>
<tableViewController id="uoK-29-uZr" customClass="SettingsViewController" customModule="OpenRemote" customModuleProvider="target" sceneMemberID="viewController">
- <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" id="gda-jc-Zpb">
+ <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="gda-jc-Zpb">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
- <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="ProjectCell" id="Y2L-n2-cJa">
- <rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
+ <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="ProjectCell" id="Y2L-n2-cJa" customClass="ProjectTableViewCell" customModule="OpenRemote" customModuleProvider="target">
+ <rect key="frame" x="20" y="55.5" width="374" height="102"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Y2L-n2-cJa" id="Zgr-l4-ccF">
- <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
+ <rect key="frame" x="0.0" y="0.0" width="374" height="102"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tg5-mN-nGy">
- <rect key="frame" x="224" y="11" width="42" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="y0W-JM-etk">
+ <rect key="frame" x="10" y="10" width="354" height="82"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EtF-YJ-IWv">
+ <rect key="frame" x="0.0" y="0.0" width="354" height="21"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KP5-vy-3yX">
+ <rect key="frame" x="0.0" y="31" width="354" height="20.5"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E1L-sy-49t">
+ <rect key="frame" x="0.0" y="61.5" width="354" height="20.5"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ </stackView>
+ </subviews>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="y0W-JM-etk" secondAttribute="bottom" constant="10" id="9aF-UA-T6i"/>
+ <constraint firstAttribute="trailing" secondItem="y0W-JM-etk" secondAttribute="trailing" constant="10" id="PCL-P9-YCx"/>
+ <constraint firstItem="y0W-JM-etk" firstAttribute="top" secondItem="Zgr-l4-ccF" secondAttribute="top" constant="10" id="QXZ-0r-amW"/>
+ <constraint firstItem="y0W-JM-etk" firstAttribute="leading" secondItem="Zgr-l4-ccF" secondAttribute="leading" constant="10" id="jRg-pT-Xps"/>
+ </constraints>
+ </tableViewCellContentView>
+ <connections>
+ <outlet property="appLabel" destination="KP5-vy-3yX" id="DA2-6M-JY6"/>
+ <outlet property="domainLabel" destination="EtF-YJ-IWv" id="H1P-qr-vB5"/>
+ <outlet property="realmLabel" destination="E1L-sy-49t" id="Ukk-Yd-KWY"/>
+ </connections>
+ </tableViewCell>
+ <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="NoProjectsCell" id="yWF-fc-yGg" customClass="ProjectTableViewCell" customModule="OpenRemote" customModuleProvider="target">
+ <rect key="frame" x="20" y="157.5" width="374" height="41"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="yWF-fc-yGg" id="iQt-oN-W3l">
+ <rect key="frame" x="0.0" y="0.0" width="374" height="41"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="No projects defined, please add one" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HVr-9p-A9z">
+ <rect key="frame" x="20" y="10" width="354" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="HVr-9p-A9z" secondAttribute="bottom" constant="10" id="LpB-Do-INq"/>
+ <constraint firstItem="HVr-9p-A9z" firstAttribute="leading" secondItem="iQt-oN-W3l" secondAttribute="leading" constant="10" id="iJU-21-x8L"/>
+ <constraint firstItem="HVr-9p-A9z" firstAttribute="top" secondItem="iQt-oN-W3l" secondAttribute="top" constant="10" id="spt-2N-eFE"/>
+ <constraint firstAttribute="trailing" secondItem="HVr-9p-A9z" secondAttribute="trailing" constant="10" id="xHX-RI-fNC"/>
+ </constraints>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
@@ -364,18 +433,26 @@
<outlet property="delegate" destination="uoK-29-uZr" id="2g4-I7-4nv"/>
</connections>
</tableView>
+ <navigationItem key="navigationItem" id="dHG-vp-5iB"/>
+ <connections>
+ <segue destination="Pi7-Rw-ZSt" kind="show" identifier="addProject" id="LIp-dG-xAs"/>
+ </connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Yg6-ke-1om" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="-13877" y="-1122"/>
+ <point key="canvasLocation" x="-13488" y="-1081"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="61Y-JM-NmK"/>
+ <segue reference="LIp-dG-xAs"/>
<segue reference="4Aa-7e-CLQ"/>
</inferredMetricsTieBreakers>
<resources>
<image name="or_push_icon" width="16" height="16"/>
+ <namedColor name="or_grey_background">
+ <color red="0.97647058823529409" green="0.97647058823529409" blue="0.97647058823529409" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
diff --git a/console/iOS/GenericApp/GenericApp/UI/ProjectTableViewCell.swift b/console/iOS/GenericApp/GenericApp/UI/ProjectTableViewCell.swift
new file mode 100644
index 000000000..6b516471b
--- /dev/null
+++ b/console/iOS/GenericApp/GenericApp/UI/ProjectTableViewCell.swift
@@ -0,0 +1,27 @@
+//
+// ProjectCell.swift
+// GenericApp
+//
+// Created by Eric Bariaux on 06/01/2023.
+// Copyright © 2023 OpenRemote. All rights reserved.
+//
+
+import UIKit
+import ORLib
+
+
+class ProjectTableViewCell: UITableViewCell {
+
+ @IBOutlet weak var domainLabel: UILabel!
+ @IBOutlet weak var appLabel: UILabel!
+ @IBOutlet weak var realmLabel: UILabel!
+
+ var project: ProjectConfig?
+
+ func setProject(_ project: ProjectConfig) {
+ self.project = project
+ domainLabel.text = project.domain
+ appLabel.text = "App: \(project.app)"
+ realmLabel.text = project.realm != nil ? "Realm: \(project.realm!)" : ""
+ }
+}
diff --git a/console/iOS/GenericApp/GenericApp/UI/SettingsViewController.swift b/console/iOS/GenericApp/GenericApp/UI/SettingsViewController.swift
index c798670df..6b1f72a44 100644
--- a/console/iOS/GenericApp/GenericApp/UI/SettingsViewController.swift
+++ b/console/iOS/GenericApp/GenericApp/UI/SettingsViewController.swift
@@ -7,19 +7,122 @@
//
import UIKit
+import ORLib
class SettingsViewController: UITableViewController {
+ private var projects = [ProjectConfig]()
+ private var selectedProjectId: String?
+
override func viewDidLoad() {
super.viewDidLoad()
+
+ if let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement) {
+ selectedProjectId = userDefaults.string(forKey: DefaultsKey.projectKey)
+ if let projectsData = userDefaults.data(forKey: DefaultsKey.projectsConfigurationKey) {
+ projects = (try? JSONDecoder().decode([ProjectConfig].self, from: projectsData)) ?? []
+ }
+ }
+
+ navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(doneTapped))
+ navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addTapped))
+ navigationItem.title = "Projects"
}
- override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- return 1;
+ override func setEditing(_ editing: Bool, animated: Bool) {
+ if editing {
+ navigationItem.leftBarButtonItem = nil
+ } else {
+ navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(doneTapped))
+ }
+ super.setEditing(editing, animated: animated)
+ }
+
+ @objc func addTapped() {
+ self.performSegue(withIdentifier: Segues.addProject, sender: self)
+ }
+
+ @objc func doneTapped() {
+ self.dismiss(animated: true)
+ }
+
+ override func numberOfSections(in tableView: UITableView) -> Int {
+ return 2
}
+
+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return section == 0 ? projects.count : 1
+ }
+
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- return tableView.dequeueReusableCell(withIdentifier: "ProjectCell", for: indexPath)
+ if indexPath.section == 0 {
+ let cell: ProjectTableViewCell = tableView.dequeueReusableCell(withIdentifier: "ProjectCell", for: indexPath) as! ProjectTableViewCell
+ let project = projects[indexPath.row]
+ cell.setProject(project)
+ cell.accessoryType = project.id == selectedProjectId ? .checkmark : .none
+ cell.tintColor = UIColor(named: "or_green")
+ return cell
+ } else {
+ let cell = tableView.dequeueReusableCell(withIdentifier: "NoProjectsCell", for: indexPath)
+ cell.isHidden = projects.count > 0
+ return cell
+ }
+ }
+
+ override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ var rowsToReload = [IndexPath]()
+ if editingStyle == .delete {
+ let removedProject = projects.remove(at: indexPath.row)
+ if projects.isEmpty {
+ rowsToReload.append(IndexPath(row: 0, section: 1))
+ } else {
+ if selectedProjectId == removedProject.id {
+ selectProject(id: projects.first?.id)
+ rowsToReload.append(IndexPath(row: 0, section: 0))
+ }
+ }
+
+ do {
+ if let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement) {
+ let data = try JSONEncoder().encode(projects)
+ userDefaults.setValue(data, forKey: DefaultsKey.projectsConfigurationKey)
+ }
+ tableView.deleteRows(at: [indexPath], with: .fade)
+ } catch {
+ print(error.localizedDescription)
+ }
+ }
+ if !rowsToReload.isEmpty {
+ tableView.reloadRows(at: rowsToReload, with: .none)
+ }
}
+ override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ tableView.deselectRow(at: indexPath, animated: false)
+
+ if let currentlySelectedProject = projects.first(where:{ $0.id == selectedProjectId }),
+ let cellIndex = projects.firstIndex(of: currentlySelectedProject),
+ let previousCell = tableView.cellForRow(at: IndexPath(row: cellIndex, section: indexPath.section)) {
+ previousCell.accessoryType = .none
+ }
+
+ let project = projects[indexPath.row]
+ selectProject(id: project.id)
+ if let cell = tableView.cellForRow(at: indexPath) {
+ cell.accessoryType = .checkmark
+ }
+ doneTapped()
+ }
+
+ private func selectProject(id: String?) {
+ selectedProjectId = id
+ if let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement) {
+ if id != nil {
+ userDefaults.setValue(id, forKey: DefaultsKey.projectKey)
+ } else {
+ userDefaults.removeObject(forKey: DefaultsKey.projectKey)
+ }
+ }
+ }
}
diff --git a/console/iOS/GenericApp/GenericApp/UI/SplashViewController.swift b/console/iOS/GenericApp/GenericApp/UI/SplashViewController.swift
index 699d255b0..5f5c25746 100644
--- a/console/iOS/GenericApp/GenericApp/UI/SplashViewController.swift
+++ b/console/iOS/GenericApp/GenericApp/UI/SplashViewController.swift
@@ -55,8 +55,6 @@ class SplashViewController: UIViewController {
// orViewController.baseUrl = host
}
- } else if segue.identifier == Segues.goToSettingsView {
- let settingsViewController = segue.destination as! SettingsViewController
}
}
diff --git a/console/iOS/GenericApp/GenericApp/UI/WizardAppViewController.swift b/console/iOS/GenericApp/GenericApp/UI/WizardAppViewController.swift
index 085f7ec3f..30a0cfc37 100644
--- a/console/iOS/GenericApp/GenericApp/UI/WizardAppViewController.swift
+++ b/console/iOS/GenericApp/GenericApp/UI/WizardAppViewController.swift
@@ -21,6 +21,7 @@ class WizardAppViewController: UIViewController {
@IBOutlet weak var appTextInput: ORTextInput!
@IBOutlet weak var nextButton: MDCRaisedButton!
+ @IBOutlet weak var boxView: UIView!
@IBOutlet weak var appsSelectionButton: UIButton!
var dropDown = DropDown()
@@ -32,6 +33,8 @@ class WizardAppViewController: UIViewController {
nextButton.backgroundColor = orGreenColor
nextButton.tintColor = UIColor.white
+
+ boxView.layer.cornerRadius = 10
}
override func viewDidAppear(_ animated: Bool) {
diff --git a/console/iOS/GenericApp/GenericApp/UI/WizardDomainViewController.swift b/console/iOS/GenericApp/GenericApp/UI/WizardDomainViewController.swift
index 76202e04d..a6b3fc2d3 100644
--- a/console/iOS/GenericApp/GenericApp/UI/WizardDomainViewController.swift
+++ b/console/iOS/GenericApp/GenericApp/UI/WizardDomainViewController.swift
@@ -18,7 +18,8 @@ class WizardDomainViewController: UIViewController {
@IBOutlet weak var domainTextInput: ORTextInput!
@IBOutlet weak var nextButton: MDCRaisedButton!
-
+ @IBOutlet var boxView: UIView!
+
override func viewDidLoad() {
super.viewDidLoad()
@@ -26,6 +27,7 @@ class WizardDomainViewController: UIViewController {
nextButton.backgroundColor = orGreenColor
nextButton.tintColor = UIColor.white
+ boxView.layer.cornerRadius = 10
}
override func viewDidAppear(_ animated: Bool) {
diff --git a/console/iOS/GenericApp/GenericApp/UI/WizardRealmViewController.swift b/console/iOS/GenericApp/GenericApp/UI/WizardRealmViewController.swift
index ffa43f36e..518be35fe 100644
--- a/console/iOS/GenericApp/GenericApp/UI/WizardRealmViewController.swift
+++ b/console/iOS/GenericApp/GenericApp/UI/WizardRealmViewController.swift
@@ -22,6 +22,7 @@ class WizardRealmViewController: UIViewController {
@IBOutlet weak var realmTextInput: ORTextInput!
@IBOutlet weak var nextButton: MDCRaisedButton!
+ @IBOutlet weak var boxView: UIView!
@IBOutlet weak var realmsSelectionButton: UIButton!
var dropDown = DropDown()
@@ -33,6 +34,8 @@ class WizardRealmViewController: UIViewController {
nextButton.backgroundColor = orGreenColor
nextButton.tintColor = UIColor.white
+
+ boxView.layer.cornerRadius = 10
}
override func viewDidAppear(_ animated: Bool) {
@@ -97,9 +100,15 @@ class WizardRealmViewController: UIViewController {
switch state {
case let .complete(project):
if let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement) {
- // TODO: we really want to add to the existing collection
do {
- let data = try JSONEncoder().encode([project])
+ var projects: [ProjectConfig]
+ if let projectsData = userDefaults.data(forKey: DefaultsKey.projectsConfigurationKey) {
+ projects = (try? JSONDecoder().decode([ProjectConfig].self, from: projectsData)) ?? []
+ projects.append(project)
+ } else {
+ projects = [project]
+ }
+ let data = try JSONEncoder().encode(projects)
userDefaults.setValue(data, forKey: DefaultsKey.projectsConfigurationKey)
userDefaults.setValue(project.id, forKey: DefaultsKey.projectKey)
self.performSegue(withIdentifier: Segues.goToWebView, sender: self)
diff --git a/console/iOS/ORLib/ORLib.xcodeproj/project.pbxproj b/console/iOS/ORLib/ORLib.xcodeproj/project.pbxproj
index 986a40489..f61ac7d48 100644
--- a/console/iOS/ORLib/ORLib.xcodeproj/project.pbxproj
+++ b/console/iOS/ORLib/ORLib.xcodeproj/project.pbxproj
@@ -7,34 +7,36 @@
objects = {
/* Begin PBXBuildFile section */
- 4C0E4A10274BDCE0008CB352 /* ScannerOverlayPreviewLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0E4A0F274BDCE0008CB352 /* ScannerOverlayPreviewLayer.swift */; };
- 4C0E4A12274BE411008CB352 /* QrScannerProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0E4A11274BE411008CB352 /* QrScannerProvider.swift */; };
- 4C2CE794274BB48500416B1A /* QrScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2CE793274BB48500416B1A /* QrScannerViewController.swift */; };
- 4C537EE2299D3BA0006EFB94 /* ORLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C537EE1299D3BA0006EFB94 /* ORLib.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 4C649E6829C251A300FFBEA4 /* BleProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C649E6729C251A300FFBEA4 /* BleProvider.swift */; };
- 4C649E6A29C2554F00FFBEA4 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C649E6929C2554F00FFBEA4 /* CoreBluetooth.framework */; };
- 4CB8B7BA29CAFB5200085BBD /* ORConsoleConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91658F9028897E55000FF05C /* ORConsoleConfig.swift */; };
- 4CB8B7BB29CAFB5200085BBD /* ORAppInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91658F9228897EDD000FF05C /* ORAppInfo.swift */; };
- 4CB8B7BC29CAFB5200085BBD /* ProjectConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AA79F028D4D525005B9913 /* ProjectConfig.swift */; };
- 4CB8B7BD29CAFB5200085BBD /* ApiManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A9A8FE28BF6C4C00DF8928 /* ApiManager.swift */; };
- 4CB8B7BF29CAFB5200085BBD /* ConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A9A8FC28BF6A9900DF8928 /* ConfigManager.swift */; };
- 4CF5D04B27143EEC00D705BE /* ORLib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D04A27143EEC00D705BE /* ORLib.swift */; };
- 4CF5D06927143F2000D705BE /* StorageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05227143F1F00D705BE /* StorageProvider.swift */; };
- 4CF5D06A27143F2000D705BE /* GeofenceProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05327143F1F00D705BE /* GeofenceProvider.swift */; };
- 4CF5D06B27143F2000D705BE /* PushNotificationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05427143F1F00D705BE /* PushNotificationProvider.swift */; };
- 4CF5D06D27143F2000D705BE /* ORTextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05727143F1F00D705BE /* ORTextInput.swift */; };
- 4CF5D06E27143F2000D705BE /* ORViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05827143F1F00D705BE /* ORViewController.swift */; };
- 4CF5D07027143F2000D705BE /* ErrorManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05A27143F1F00D705BE /* ErrorManager.swift */; };
- 4CF5D07127143F2000D705BE /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05C27143F1F00D705BE /* Constants.swift */; };
- 4CF5D07227143F2000D705BE /* Window+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05D27143F1F00D705BE /* Window+Utils.swift */; };
- 4CF5D07327143F2000D705BE /* UIColor+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05E27143F1F00D705BE /* UIColor+Utils.swift */; };
- 4CF5D07427143F2000D705BE /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05F27143F1F00D705BE /* Reachability.swift */; };
- 4CF5D07527143F2000D705BE /* String+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06027143F1F00D705BE /* String+Utils.swift */; };
- 4CF5D07727143F2000D705BE /* ORLinkConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06327143F1F00D705BE /* ORLinkConfig.swift */; };
- 4CF5D07827143F2000D705BE /* ORPushNotificationButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06427143F1F00D705BE /* ORPushNotificationButton.swift */; };
- 4CF5D07927143F2000D705BE /* ORPushNotificationAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06527143F1F00D705BE /* ORPushNotificationAction.swift */; };
- 4CF5D07A27143F2000D705BE /* ORNotificationResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06727143F1F00D705BE /* ORNotificationResource.swift */; };
- 4CF5D07B27143F2000D705BE /* HttpApiManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06827143F1F00D705BE /* HttpApiManager.swift */; };
+ 321D41E7A29ED29205BD441C /* Pods_ORLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 850D0E4EC689CD46245628A2 /* Pods_ORLib.framework */; };
+ 4CBDF2AD2AE285E400C7D94C /* ORLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CBDF2AC2AE285E400C7D94C /* ORLib.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4CBDF2BD2AE2869D00C7D94C /* StorageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05227143F1F00D705BE /* StorageProvider.swift */; };
+ 4CBDF2BE2AE2869D00C7D94C /* GeofenceProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05327143F1F00D705BE /* GeofenceProvider.swift */; };
+ 4CBDF2BF2AE2869D00C7D94C /* PushNotificationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05427143F1F00D705BE /* PushNotificationProvider.swift */; };
+ 4CBDF2C02AE2869D00C7D94C /* QrScannerProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0E4A11274BE411008CB352 /* QrScannerProvider.swift */; };
+ 4CBDF2C12AE2869D00C7D94C /* BleProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C649E6729C251A300FFBEA4 /* BleProvider.swift */; };
+ 4CBDF2C22AE2869D00C7D94C /* ORLinkConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06327143F1F00D705BE /* ORLinkConfig.swift */; };
+ 4CBDF2C32AE2869D00C7D94C /* ORPushNotificationButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06427143F1F00D705BE /* ORPushNotificationButton.swift */; };
+ 4CBDF2C42AE2869D00C7D94C /* ORPushNotificationAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06527143F1F00D705BE /* ORPushNotificationAction.swift */; };
+ 4CBDF2C52AE2869D00C7D94C /* ORConsoleConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91658F9028897E55000FF05C /* ORConsoleConfig.swift */; };
+ 4CBDF2C62AE2869D00C7D94C /* ORAppInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91658F9228897EDD000FF05C /* ORAppInfo.swift */; };
+ 4CBDF2C72AE2869D00C7D94C /* ProjectConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AA79F028D4D525005B9913 /* ProjectConfig.swift */; };
+ 4CBDF2C82AE2869D00C7D94C /* ORNotificationResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06727143F1F00D705BE /* ORNotificationResource.swift */; };
+ 4CBDF2C92AE2869D00C7D94C /* HttpApiManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06827143F1F00D705BE /* HttpApiManager.swift */; };
+ 4CBDF2CA2AE2869D00C7D94C /* ApiManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A9A8FE28BF6C4C00DF8928 /* ApiManager.swift */; };
+ 4CBDF2CB2AE2869D00C7D94C /* ORTextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05727143F1F00D705BE /* ORTextInput.swift */; };
+ 4CBDF2CC2AE2869D00C7D94C /* ORViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05827143F1F00D705BE /* ORViewController.swift */; };
+ 4CBDF2CD2AE2869D00C7D94C /* ErrorManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05A27143F1F00D705BE /* ErrorManager.swift */; };
+ 4CBDF2CE2AE2869D00C7D94C /* QrScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2CE793274BB48500416B1A /* QrScannerViewController.swift */; };
+ 4CBDF2CF2AE2869D00C7D94C /* ScannerOverlayPreviewLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0E4A0F274BDCE0008CB352 /* ScannerOverlayPreviewLayer.swift */; };
+ 4CBDF2D02AE2869D00C7D94C /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05C27143F1F00D705BE /* Constants.swift */; };
+ 4CBDF2D12AE2869D00C7D94C /* Window+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05D27143F1F00D705BE /* Window+Utils.swift */; };
+ 4CBDF2D22AE2869D00C7D94C /* UIColor+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05E27143F1F00D705BE /* UIColor+Utils.swift */; };
+ 4CBDF2D32AE2869D00C7D94C /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D05F27143F1F00D705BE /* Reachability.swift */; };
+ 4CBDF2D42AE2869D00C7D94C /* String+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D06027143F1F00D705BE /* String+Utils.swift */; };
+ 4CBDF2D52AE2869D00C7D94C /* ORLib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5D04A27143EEC00D705BE /* ORLib.swift */; };
+ 4CBDF2D62AE2869D00C7D94C /* ConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A9A8FC28BF6A9900DF8928 /* ConfigManager.swift */; };
+ 4CBDF2D72AE286DF00C7D94C /* Media.xcassets in Sources */ = {isa = PBXBuildFile; fileRef = 4CC64C3E27C3CDD400A2FA4C /* Media.xcassets */; };
+ 4CBDF2D82AE286E200C7D94C /* ORLib.h in Sources */ = {isa = PBXBuildFile; fileRef = 4C537EE1299D3BA0006EFB94 /* ORLib.h */; };
914F7D4429215D3500655A22 /* test12.json in Resources */ = {isa = PBXBuildFile; fileRef = 914F7D4329215D3500655A22 /* test12.json */; };
9156512A28FC6D6700062E16 /* test9.json in Resources */ = {isa = PBXBuildFile; fileRef = 9156512928FC6D6700062E16 /* test9.json */; };
91932F9328C66A3C00BABBA3 /* test1.json in Resources */ = {isa = PBXBuildFile; fileRef = 91932F9228C66A3C00BABBA3 /* test1.json */; };
@@ -51,7 +53,7 @@
91D2D11A28E988B10030E2FB /* test8.json in Resources */ = {isa = PBXBuildFile; fileRef = 91D2D11928E988B10030E2FB /* test8.json */; };
91DD9FEE29102A5800912F79 /* test10.json in Resources */ = {isa = PBXBuildFile; fileRef = 91DD9FED2910280900912F79 /* test10.json */; };
91DD9FF029102A8B00912F79 /* test11.json in Resources */ = {isa = PBXBuildFile; fileRef = 91DD9FEF29102A8B00912F79 /* test11.json */; };
- F8ADB5E4C72BC3900710C0C5 /* Pods_ORLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 850D0E4EC689CD46245628A2 /* Pods_ORLib.framework */; };
+ 91DF424E299FA79600DFF85E /* test13.json in Resources */ = {isa = PBXBuildFile; fileRef = 91DF424D299FA79600DFF85E /* test13.json */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -62,6 +64,8 @@
4C537EE1299D3BA0006EFB94 /* ORLib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORLib.h; sourceTree = "<group>"; };
4C649E6729C251A300FFBEA4 /* BleProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BleProvider.swift; sourceTree = "<group>"; };
4C649E6929C2554F00FFBEA4 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/CoreBluetooth.framework; sourceTree = DEVELOPER_DIR; };
+ 4CBDF2AA2AE285E400C7D94C /* ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4CBDF2AC2AE285E400C7D94C /* ORLib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORLib.h; sourceTree = "<group>"; };
4CC64C3E27C3CDD400A2FA4C /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = "<group>"; };
4CF5D04A27143EEC00D705BE /* ORLib.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ORLib.swift; sourceTree = "<group>"; };
4CF5D05227143F1F00D705BE /* StorageProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageProvider.swift; sourceTree = "<group>"; };
@@ -105,16 +109,16 @@
91D2D11928E988B10030E2FB /* test8.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test8.json; sourceTree = "<group>"; };
91DD9FED2910280900912F79 /* test10.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test10.json; sourceTree = "<group>"; };
91DD9FEF29102A8B00912F79 /* test11.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test11.json; sourceTree = "<group>"; };
+ 91DF424D299FA79600DFF85E /* test13.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test13.json; sourceTree = "<group>"; };
F756B4974BD868B38AAE7D31 /* Pods-ORLib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ORLib.release.xcconfig"; path = "Target Support Files/Pods-ORLib/Pods-ORLib.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- 4C537EDC299D3BA0006EFB94 /* Frameworks */ = {
+ 4CBDF2A72AE285E400C7D94C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 4C649E6A29C2554F00FFBEA4 /* CoreBluetooth.framework in Frameworks */,
- F8ADB5E4C72BC3900710C0C5 /* Pods_ORLib.framework in Frameworks */,
+ 321D41E7A29ED29205BD441C /* Pods_ORLib.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -128,12 +132,21 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 4CBDF2AB2AE285E400C7D94C /* ORLib */ = {
+ isa = PBXGroup;
+ children = (
+ 4CBDF2AC2AE285E400C7D94C /* ORLib.h */,
+ );
+ path = ORLib;
+ sourceTree = "<group>";
+ };
4CF5D03E27143EEB00D705BE = {
isa = PBXGroup;
children = (
4CC64C3E27C3CDD400A2FA4C /* Media.xcassets */,
4CF5D04927143EEC00D705BE /* ORLib */,
91A9A8F128BF6A3300DF8928 /* Tests */,
+ 4CBDF2AB2AE285E400C7D94C /* ORLib */,
4CF5D04827143EEC00D705BE /* Products */,
717C35290053DAF6024CFEA7 /* Frameworks */,
CE88590B0599667DB0A16FEE /* Pods */,
@@ -145,6 +158,7 @@
children = (
91A9A8F028BF6A3300DF8928 /* Tests.xctest */,
4C537EDF299D3BA0006EFB94 /* ORLib.framework */,
+ 4CBDF2AA2AE285E400C7D94C /* ORLib.framework */,
);
name = Products;
sourceTree = "<group>";
@@ -248,6 +262,7 @@
91DD9FED2910280900912F79 /* test10.json */,
91DD9FEF29102A8B00912F79 /* test11.json */,
914F7D4329215D3500655A22 /* test12.json */,
+ 91DF424D299FA79600DFF85E /* test13.json */,
);
path = Fixtures;
sourceTree = "<group>";
@@ -277,34 +292,34 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
- 4C537EDA299D3BA0006EFB94 /* Headers */ = {
+ 4CBDF2A52AE285E400C7D94C /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
- 4C537EE2299D3BA0006EFB94 /* ORLib.h in Headers */,
+ 4CBDF2AD2AE285E400C7D94C /* ORLib.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
- 4C537EDE299D3BA0006EFB94 /* ORLib */ = {
+ 4CBDF2A92AE285E400C7D94C /* ORLib */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 4C537EE5299D3BA0006EFB94 /* Build configuration list for PBXNativeTarget "ORLib" */;
+ buildConfigurationList = 4CBDF2B02AE285E400C7D94C /* Build configuration list for PBXNativeTarget "ORLib" */;
buildPhases = (
- 42E045723516D58977A621BC /* [CP] Check Pods Manifest.lock */,
- 4C537EDA299D3BA0006EFB94 /* Headers */,
- 4C537EDB299D3BA0006EFB94 /* Sources */,
- 4C537EDC299D3BA0006EFB94 /* Frameworks */,
- 4C537EDD299D3BA0006EFB94 /* Resources */,
+ 822E907AABDEA9DF9A849F71 /* [CP] Check Pods Manifest.lock */,
+ 4CBDF2A52AE285E400C7D94C /* Headers */,
+ 4CBDF2A62AE285E400C7D94C /* Sources */,
+ 4CBDF2A72AE285E400C7D94C /* Frameworks */,
+ 4CBDF2A82AE285E400C7D94C /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = ORLib;
- productName = ORLibb;
- productReference = 4C537EDF299D3BA0006EFB94 /* ORLib.framework */;
+ productName = ORLib;
+ productReference = 4CBDF2AA2AE285E400C7D94C /* ORLib.framework */;
productType = "com.apple.product-type.framework";
};
91A9A8EF28BF6A3300DF8928 /* Tests */ = {
@@ -333,8 +348,8 @@
LastSwiftUpdateCheck = 1340;
LastUpgradeCheck = 1250;
TargetAttributes = {
- 4C537EDE299D3BA0006EFB94 = {
- CreatedOnToolsVersion = 14.2;
+ 4CBDF2A92AE285E400C7D94C = {
+ CreatedOnToolsVersion = 15.0;
};
91A9A8EF28BF6A3300DF8928 = {
CreatedOnToolsVersion = 13.4.1;
@@ -355,13 +370,13 @@
projectRoot = "";
targets = (
91A9A8EF28BF6A3300DF8928 /* Tests */,
- 4C537EDE299D3BA0006EFB94 /* ORLib */,
+ 4CBDF2A92AE285E400C7D94C /* ORLib */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
- 4C537EDD299D3BA0006EFB94 /* Resources */ = {
+ 4CBDF2A82AE285E400C7D94C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -382,6 +397,7 @@
91932F9828C6738A00BABBA3 /* test3.json in Resources */,
91932F9C28C673DC00BABBA3 /* test4.json in Resources */,
91932F9E28C6752C00BABBA3 /* test6.json in Resources */,
+ 91DF424E299FA79600DFF85E /* test13.json in Resources */,
914F7D4429215D3500655A22 /* test12.json in Resources */,
91932F9B28C673DC00BABBA3 /* test5.json in Resources */,
);
@@ -390,7 +406,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 42E045723516D58977A621BC /* [CP] Check Pods Manifest.lock */ = {
+ 822E907AABDEA9DF9A849F71 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -415,36 +431,38 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
- 4C537EDB299D3BA0006EFB94 /* Sources */ = {
+ 4CBDF2A62AE285E400C7D94C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 4CB8B7BA29CAFB5200085BBD /* ORConsoleConfig.swift in Sources */,
- 4CB8B7BB29CAFB5200085BBD /* ORAppInfo.swift in Sources */,
- 4CB8B7BC29CAFB5200085BBD /* ProjectConfig.swift in Sources */,
- 4CB8B7BD29CAFB5200085BBD /* ApiManager.swift in Sources */,
- 4CB8B7BF29CAFB5200085BBD /* ConfigManager.swift in Sources */,
- 4C649E6829C251A300FFBEA4 /* BleProvider.swift in Sources */,
- 4CF5D07027143F2000D705BE /* ErrorManager.swift in Sources */,
- 4CF5D07227143F2000D705BE /* Window+Utils.swift in Sources */,
- 4C0E4A12274BE411008CB352 /* QrScannerProvider.swift in Sources */,
- 4CF5D07727143F2000D705BE /* ORLinkConfig.swift in Sources */,
- 4C2CE794274BB48500416B1A /* QrScannerViewController.swift in Sources */,
- 4CF5D06E27143F2000D705BE /* ORViewController.swift in Sources */,
- 4CF5D07327143F2000D705BE /* UIColor+Utils.swift in Sources */,
- 4CF5D06D27143F2000D705BE /* ORTextInput.swift in Sources */,
- 4CF5D07A27143F2000D705BE /* ORNotificationResource.swift in Sources */,
- 4CF5D07827143F2000D705BE /* ORPushNotificationButton.swift in Sources */,
- 4CF5D06A27143F2000D705BE /* GeofenceProvider.swift in Sources */,
- 4CF5D06927143F2000D705BE /* StorageProvider.swift in Sources */,
- 4CF5D07127143F2000D705BE /* Constants.swift in Sources */,
- 4CF5D07B27143F2000D705BE /* HttpApiManager.swift in Sources */,
- 4CF5D04B27143EEC00D705BE /* ORLib.swift in Sources */,
- 4CF5D06B27143F2000D705BE /* PushNotificationProvider.swift in Sources */,
- 4CF5D07527143F2000D705BE /* String+Utils.swift in Sources */,
- 4C0E4A10274BDCE0008CB352 /* ScannerOverlayPreviewLayer.swift in Sources */,
- 4CF5D07427143F2000D705BE /* Reachability.swift in Sources */,
- 4CF5D07927143F2000D705BE /* ORPushNotificationAction.swift in Sources */,
+ 4CBDF2D82AE286E200C7D94C /* ORLib.h in Sources */,
+ 4CBDF2D72AE286DF00C7D94C /* Media.xcassets in Sources */,
+ 4CBDF2BD2AE2869D00C7D94C /* StorageProvider.swift in Sources */,
+ 4CBDF2BE2AE2869D00C7D94C /* GeofenceProvider.swift in Sources */,
+ 4CBDF2BF2AE2869D00C7D94C /* PushNotificationProvider.swift in Sources */,
+ 4CBDF2C02AE2869D00C7D94C /* QrScannerProvider.swift in Sources */,
+ 4CBDF2C12AE2869D00C7D94C /* BleProvider.swift in Sources */,
+ 4CBDF2C22AE2869D00C7D94C /* ORLinkConfig.swift in Sources */,
+ 4CBDF2C32AE2869D00C7D94C /* ORPushNotificationButton.swift in Sources */,
+ 4CBDF2C42AE2869D00C7D94C /* ORPushNotificationAction.swift in Sources */,
+ 4CBDF2C52AE2869D00C7D94C /* ORConsoleConfig.swift in Sources */,
+ 4CBDF2C62AE2869D00C7D94C /* ORAppInfo.swift in Sources */,
+ 4CBDF2C72AE2869D00C7D94C /* ProjectConfig.swift in Sources */,
+ 4CBDF2C82AE2869D00C7D94C /* ORNotificationResource.swift in Sources */,
+ 4CBDF2C92AE2869D00C7D94C /* HttpApiManager.swift in Sources */,
+ 4CBDF2CA2AE2869D00C7D94C /* ApiManager.swift in Sources */,
+ 4CBDF2CB2AE2869D00C7D94C /* ORTextInput.swift in Sources */,
+ 4CBDF2CC2AE2869D00C7D94C /* ORViewController.swift in Sources */,
+ 4CBDF2CD2AE2869D00C7D94C /* ErrorManager.swift in Sources */,
+ 4CBDF2CE2AE2869D00C7D94C /* QrScannerViewController.swift in Sources */,
+ 4CBDF2CF2AE2869D00C7D94C /* ScannerOverlayPreviewLayer.swift in Sources */,
+ 4CBDF2D02AE2869D00C7D94C /* Constants.swift in Sources */,
+ 4CBDF2D12AE2869D00C7D94C /* Window+Utils.swift in Sources */,
+ 4CBDF2D22AE2869D00C7D94C /* UIColor+Utils.swift in Sources */,
+ 4CBDF2D32AE2869D00C7D94C /* Reachability.swift in Sources */,
+ 4CBDF2D42AE2869D00C7D94C /* String+Utils.swift in Sources */,
+ 4CBDF2D52AE2869D00C7D94C /* ORLib.swift in Sources */,
+ 4CBDF2D62AE2869D00C7D94C /* ConfigManager.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -462,10 +480,11 @@
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
- 4C537EE3299D3BA0006EFB94 /* Debug */ = {
+ 4CBDF2AE2AE285E400C7D94C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 6D810B7A4C47B5174F44A8CE /* Pods-ORLib.debug.xcconfig */;
buildSettings = {
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
@@ -474,6 +493,9 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
+ ENABLE_MODULE_VERIFIER = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -483,10 +505,14 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.ORLibb;
+ MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
+ MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
+ PRODUCT_BUNDLE_IDENTIFIER = io.openremote.ORLib;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -495,10 +521,11 @@
};
name = Debug;
};
- 4C537EE4299D3BA0006EFB94 /* Release */ = {
+ 4CBDF2AF2AE285E400C7D94C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F756B4974BD868B38AAE7D31 /* Pods-ORLib.release.xcconfig */;
buildSettings = {
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
@@ -507,6 +534,9 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
+ ENABLE_MODULE_VERIFIER = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -516,8 +546,11 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.ORLibb;
+ MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
+ MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
+ PRODUCT_BUNDLE_IDENTIFIER = io.openremote.ORLib;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -685,11 +718,11 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 4C537EE5299D3BA0006EFB94 /* Build configuration list for PBXNativeTarget "ORLib" */ = {
+ 4CBDF2B02AE285E400C7D94C /* Build configuration list for PBXNativeTarget "ORLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- 4C537EE3299D3BA0006EFB94 /* Debug */,
- 4C537EE4299D3BA0006EFB94 /* Release */,
+ 4CBDF2AE2AE285E400C7D94C /* Debug */,
+ 4CBDF2AF2AE285E400C7D94C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
diff --git a/console/iOS/ORLib/ORLib/ConfigManager.swift b/console/iOS/ORLib/ORLib/ConfigManager.swift
index fdb0285af..4a7c8d5b8 100644
--- a/console/iOS/ORLib/ORLib/ConfigManager.swift
+++ b/console/iOS/ORLib/ORLib/ConfigManager.swift
@@ -83,7 +83,13 @@ public class ConfigManager {
if cc.allowedApps == nil || cc.allowedApps!.isEmpty {
do {
let apps = try await api.getApps()
- await state = .selectApp(baseUrl, filterPotentialApps(apiManager: api, potentialApps: apps))
+ let filteredApps = await filterPotentialApps(apiManager: api, potentialApps: apps)
+ if let fa = filteredApps, fa.count == 1, let appName = fa.first {
+ state = .selectRealm(baseUrl, appName, nil)
+ } else {
+ state = .selectApp(baseUrl, filteredApps)
+ }
+
} catch ApiManagerError.communicationError(let httpStatusCode) {
if httpStatusCode == 404 || httpStatusCode == 403 {
if cc.showRealmTextInput {
@@ -94,7 +100,12 @@ public class ConfigManager {
}
}
} else {
- await self.state = .selectApp(baseUrl, filterPotentialApps(apiManager: api, potentialApps: cc.allowedApps))
+ let filteredApps = await filterPotentialApps(apiManager: api, potentialApps: cc.allowedApps)
+ if let fa = filteredApps, fa.count == 1, let appName = fa.first {
+ state = .selectRealm(baseUrl, appName, nil)
+ } else {
+ state = .selectApp(baseUrl, filteredApps)
+ }
}
return state
} catch {
diff --git a/console/iOS/ORLib/ORLib/Models/ProjectConfig.swift b/console/iOS/ORLib/ORLib/Models/ProjectConfig.swift
index 1b7fb3244..5895a8553 100644
--- a/console/iOS/ORLib/ORLib/Models/ProjectConfig.swift
+++ b/console/iOS/ORLib/ORLib/Models/ProjectConfig.swift
@@ -11,13 +11,13 @@ public struct ProjectConfig: Codable, Equatable {
public var id: String
var projectName = "TODO"
- var domain: String
- var app: String
- var realm: String?
+ public var domain: String
+ public var app: String
+ public var realm: String?
public var providers: [String]?
- var baseURL: String {
+ public var baseURL: String {
return domain
}
diff --git a/console/iOS/ORLib/ORLib/ORLib.h b/console/iOS/ORLib/ORLib/ORLib.h
index 72b12a6dd..b6d26b9a7 100644
--- a/console/iOS/ORLib/ORLib/ORLib.h
+++ b/console/iOS/ORLib/ORLib/ORLib.h
@@ -1,18 +1,18 @@
//
-// ORLibb.h
-// ORLibb
+// ORLib.h
+// ORLib
//
-// Created by Michael Rademaker on 15/02/2023.
+// Created by Michael Rademaker on 20/10/2023.
//
#import <Foundation/Foundation.h>
-//! Project version number for ORLibb.
-FOUNDATION_EXPORT double ORLibbVersionNumber;
+//! Project version number for ORLib.
+FOUNDATION_EXPORT double ORLibVersionNumber;
-//! Project version string for ORLibb.
-FOUNDATION_EXPORT const unsigned char ORLibbVersionString[];
+//! 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 <ORLibb/PublicHeader.h>
+// 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/ORLib/ORLib/Utils/Constants.swift b/console/iOS/ORLib/ORLib/Utils/Constants.swift
index bd028077f..e383f7c7d 100644
--- a/console/iOS/ORLib/ORLib/Utils/Constants.swift
+++ b/console/iOS/ORLib/ORLib/Utils/Constants.swift
@@ -27,6 +27,7 @@ public enum Segues {
public static var goToWizardAppView = "goToWizardAppView"
public static var goToWizardRealmView = "goToWizardRealmView"
public static var goToWebView = "goToWebView"
+ public static var addProject = "addProject"
}
public enum DefaultsKey {
diff --git a/console/iOS/ORLib/Tests/ConfigManagerTest.swift b/console/iOS/ORLib/Tests/ConfigManagerTest.swift
index 0783c42a5..53a5236b3 100644
--- a/console/iOS/ORLib/Tests/ConfigManagerTest.swift
+++ b/console/iOS/ORLib/Tests/ConfigManagerTest.swift
@@ -134,4 +134,11 @@ class ConfigManagerTest: XCTestCase {
XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test12.openremote.app", app: "Console 1", realm: "master1")))
}
+ func test13() async throws {
+ var state = try await configManager.setDomain(domain: "test13")
+ XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test13.openremote.app", "Console 1", nil))
+ state = try configManager.setRealm(realm: "master")
+ XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test13.openremote.app", app: "Console 1", realm: "master")))
+ }
+
}
diff --git a/console/iOS/ORLib/Tests/Fixtures/Tests.md b/console/iOS/ORLib/Tests/Fixtures/Tests.md
index 3081843ab..f50725714 100644
--- a/console/iOS/ORLib/Tests/Fixtures/Tests.md
+++ b/console/iOS/ORLib/Tests/Fixtures/Tests.md
@@ -48,6 +48,9 @@ Similar to Test 9 but Console 1 is not selectable as app
### Test 12
Similar to Test 7 but with no realms defined in the AppInfo
+### Test 13
+ConsoleConfig with no specified app and no allowed apps but apps list available via Apps call only contains 1 app
+
diff --git a/console/iOS/ORLib/Tests/Fixtures/test13.json b/console/iOS/ORLib/Tests/Fixtures/test13.json
new file mode 100644
index 000000000..19260ff4f
--- /dev/null
+++ b/console/iOS/ORLib/Tests/Fixtures/test13.json
@@ -0,0 +1,10 @@
+{
+ "consoleConfig": {
+ "showAppTextInput" : false,
+ "showRealmTextInput" : false,
+ "app" : null,
+ "allowedApps" : [],
+ "apps" : {}
+ },
+ "apps": ["Console 1"]
+}