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
Remove Android and iOS console code (now in own repos) (#1253)
Wouter Born42cb01cba1a7
diff --git a/console/android/GenericApp/.buildignore b/console/android/GenericApp/.buildignoredeleted file mode 100644index 5322bb279..000000000--- a/console/android/GenericApp/.buildignore+++ /dev/null@@ -1 +0,0 @@-# Ignore this project in composite/superproject build\ No newline at end of filediff --git a/console/android/GenericApp/app/.buildignore b/console/android/GenericApp/app/.buildignoredeleted file mode 100644index 5322bb279..000000000--- a/console/android/GenericApp/app/.buildignore+++ /dev/null@@ -1 +0,0 @@-# Ignore this project in composite/superproject build\ No newline at end of filediff --git a/console/android/GenericApp/app/build.gradle b/console/android/GenericApp/app/build.gradledeleted file mode 100644index e57450794..000000000--- a/console/android/GenericApp/app/build.gradle+++ /dev/null@@ -1,54 +0,0 @@-apply plugin: 'com.android.application'-apply plugin: 'kotlin-android'-apply plugin: 'com.google.gms.google-services'--android {- defaultConfig {- applicationId "io.openremote.app"- minSdkVersion 25- compileSdk 33- targetSdkVersion 33- versionCode 42- versionName "1.1.1"-- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"-- resValue "string", "NOTIFICATION_CHANNEL_ID", applicationId + ".ORAppMessage"- }--- buildTypes {- release {- minifyEnabled false- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'- }- }-- buildFeatures {- viewBinding true- }-- compileOptions {- sourceCompatibility JavaVersion.VERSION_17- targetCompatibility JavaVersion.VERSION_17- }-- kotlinOptions {- jvmTarget = '17'- }- namespace 'io.openremote.app'-}--dependencies {- implementation fileTree(dir: "libs", include: ["*.jar"])- implementation 'androidx.core:core-ktx:1.10.1'- implementation 'androidx.appcompat:appcompat:1.6.1'- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'- implementation 'androidx.preference:preference-ktx:1.2.1'- implementation "com.google.android.gms:play-services-location:21.0.1"- implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1"- implementation platform('com.google.firebase:firebase-bom:26.0.0')- implementation 'com.google.firebase:firebase-messaging-ktx'- implementation 'com.google.android.material:material:1.9.0'- implementation project(':ORLib')-}diff --git a/console/android/GenericApp/app/google-services.json b/console/android/GenericApp/app/google-services.jsondeleted file mode 100644index 8880fd56a..000000000--- a/console/android/GenericApp/app/google-services.json+++ /dev/null@@ -1,47 +0,0 @@-{- "project_info": {- "project_number": "667022545910",- "firebase_url": "https://openremoteapp-a6a60.firebaseio.com",- "project_id": "openremoteapp-a6a60",- "storage_bucket": "openremoteapp-a6a60.appspot.com"- },- "client": [- {- "client_info": {- "mobilesdk_app_id": "1:667022545910:android:23c352988b6d3d6ea5add7",- "android_client_info": {- "package_name": "io.openremote.app"- }- },- "oauth_client": [- {- "client_id": "667022545910-g53k1fiocps3sso32hqvotr34fe2libr.apps.googleusercontent.com",- "client_type": 3- }- ],- "api_key": [- {- "current_key": "AIzaSyCXUqMM_P0Vo_pGmebCLgyD8RWeSN71TxU"- }- ],- "services": {- "appinvite_service": {- "other_platform_oauth_client": [- {- "client_id": "667022545910-g53k1fiocps3sso32hqvotr34fe2libr.apps.googleusercontent.com",- "client_type": 3- },- {- "client_id": "667022545910-9fee9uvb8iguprjtimmq8uea6cqt2p5i.apps.googleusercontent.com",- "client_type": 2,- "ios_info": {- "bundle_id": "io.openremote.app"- }- }- ]- }- }- }- ],- "configuration_version": "1"-}\ No newline at end of filediff --git a/console/android/GenericApp/app/proguard-rules.pro b/console/android/GenericApp/app/proguard-rules.prodeleted file mode 100644index 481bb4348..000000000--- a/console/android/GenericApp/app/proguard-rules.pro+++ /dev/null@@ -1,21 +0,0 @@-# Add project specific ProGuard rules here.-# You can control the set of applied configuration files using the-# proguardFiles setting in build.gradle.-#-# For more details, see-# http://developer.android.com/guide/developing/tools/proguard.html--# If your project uses WebView with JS, uncomment the following-# and specify the fully qualified class name to the JavaScript interface-# class:-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {-# public *;-#}--# Uncomment this to preserve the line number information for-# debugging stack traces.-#-keepattributes SourceFile,LineNumberTable--# If you keep the line number information, uncomment this to-# hide the original source file name.-#-renamesourcefileattribute SourceFile\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/AndroidManifest.xml b/console/android/GenericApp/app/src/main/AndroidManifest.xmldeleted file mode 100644index 8c27bab2d..000000000--- a/console/android/GenericApp/app/src/main/AndroidManifest.xml+++ /dev/null@@ -1,82 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<manifest xmlns:android="http://schemas.android.com/apk/res/android">-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />- <uses-permission android:name="android.permission.INTERNET" />- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />- <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />-- <application- android:allowBackup="true"- android:icon="@mipmap/ic_launcher"- android:label="@string/app_name"- android:roundIcon="@mipmap/ic_launcher_round"- android:supportsRtl="true"- android:theme="@style/OpenRemoteTheme">- <meta-data- android:name="com.google.firebase.messaging.default_notification_icon"- android:resource="@drawable/ic_notification" />- <meta-data- android:name="com.google.firebase.messaging.default_notification_color"- android:resource="@color/medium_green" />- <meta-data- android:name="com.google.firebase.messaging.default_notification_channel_id"- android:value="@string/NOTIFICATION_CHANNEL_ID" />-- <activity- android:name=".ui.SplashActivity"- android:exported="true"- android:label="@string/app_name"- android:screenOrientation="portrait">- <intent-filter>- <action android:name="android.intent.action.MAIN" />- <category android:name="android.intent.category.LAUNCHER" />- </intent-filter>-- <meta-data- android:name="android.app.shortcuts"- android:resource="@xml/shortcuts" />- </activity>- <activity- android:name="io.openremote.orlib.ui.OrMainActivity"- android:screenOrientation="portrait" />- <activity- android:name="io.openremote.orlib.ui.OrPrivacyPolicyActivity"- android:screenOrientation="portrait" />- <activity- android:name=".ui.ProjectWizardActivity"- android:exported="false"- android:screenOrientation="portrait" />- <activity- android:name=".ui.ProjectListActivity"- android:exported="false"- android:screenOrientation="portrait"/>-- <service- android:name="io.openremote.orlib.service.ORFirebaseMessagingService"- android:exported="false">- <intent-filter>- <action android:name="com.google.firebase.MESSAGING_EVENT" />- </intent-filter>- </service>- <service android:name="io.openremote.orlib.service.ORMessagingActionService" />-- <receiver- android:name="io.openremote.orlib.service.GeofenceBootCompleteReceiver"- android:exported="false">- <intent-filter>- <action android:name="android.intent.action.BOOT_COMPLETED" />- </intent-filter>- </receiver>- <receiver- android:name="io.openremote.orlib.service.GeofenceTransitionsIntentService"- android:enabled="true"- android:exported="true" />- </application>--</manifest>diff --git a/console/android/GenericApp/app/src/main/ic_launcher-playstore.png b/console/android/GenericApp/app/src/main/ic_launcher-playstore.pngdeleted file mode 100644index 5299cf64f..000000000Binary files a/console/android/GenericApp/app/src/main/ic_launcher-playstore.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ORAppInfo.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ORAppInfo.ktdeleted file mode 100644index 973713822..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ORAppInfo.kt+++ /dev/null@@ -1,8 +0,0 @@-package io.openremote.app.model--data class ORAppInfo(- val consoleAppIncompatible: Boolean,- val realms: List<String>,- val providers: List<String>,- val description: String-)diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ORConsoleConfig.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ORConsoleConfig.ktdeleted file mode 100644index ec320a95c..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ORConsoleConfig.kt+++ /dev/null@@ -1,9 +0,0 @@-package io.openremote.app.model--data class ORConsoleConfig (- val showAppTextInput: Boolean,- val showRealmTextInput: Boolean,- val app: String?,- val allowedApps: List<String>?,- val apps: Map<String, ORAppInfo>?-)diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ProjectItem.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ProjectItem.ktdeleted file mode 100644index 943fe240e..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/model/ProjectItem.kt+++ /dev/null@@ -1,8 +0,0 @@-package io.openremote.app.model--data class ProjectItem (- val host: String,- val app: String,- val realm: String?,- val url: String-)diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/network/ApiManager.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/network/ApiManager.ktdeleted file mode 100644index 92cf94fb9..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/network/ApiManager.kt+++ /dev/null@@ -1,144 +0,0 @@-package io.openremote.app.network--import android.net.Uri-import android.util.Log-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.fasterxml.jackson.module.kotlin.readValue-import io.openremote.app.model.ORAppInfo-import io.openremote.app.model.ORConsoleConfig-import java.net.HttpURLConnection-import java.net.URL-import javax.net.ssl.HttpsURLConnection-import kotlin.concurrent.thread---typealias ResponseBlock<T> = (statusCode: Int, model: T?, error: Throwable?) -> Unit--class ApiManager(private val baseUrl: String) {-- val mapper = jacksonObjectMapper()-- enum class HttpMethod {- GET,- POST,- PUT,- }-- fun getApps(callback: ResponseBlock<List<String>>?) {- get(arrayOf("apps"), callback)- }-- fun getAppInfos(callback: ResponseBlock<Map<String, ORAppInfo>>?) {- get(arrayOf("apps", "info"), callback)- }-- fun getConsoleConfig(callback: ResponseBlock<ORConsoleConfig>?) {- get(arrayOf("apps", "consoleConfig"), callback)- }-- /*********************************Private functions*******************************/- fun createUrlRequest(- method: HttpMethod,- pathComponents: Array<String>,- queryParameters: Map<String, Any>? = null- ): HttpURLConnection {- val builder = Uri.parse(baseUrl).buildUpon()-- for (pathComponent in pathComponents) builder.appendPath(pathComponent)-- if (queryParameters != null) {- for ((queryParameterKey, queryParameterValue) in queryParameters)- builder.appendQueryParameter(- queryParameterKey,- queryParameterValue.toString()- )- }-- val url = URL(builder.build().toString())- with(url.openConnection() as HttpsURLConnection) {- requestMethod = method.toString()- setRequestProperty("Accept", "application/json")-- if (method == HttpMethod.POST || method == HttpMethod.PUT) {- setRequestProperty("Content-Type", "application/json")- doOutput = true- }-- return this- }- }-- inline fun <reified T : Any> get(- pathComponents: Array<String>,- noinline callback: ResponseBlock<T>?,- queryParameters: Map<String, Any>? = null- ) {- thread(start = true) {- val urlRequest = createUrlRequest(HttpMethod.GET, pathComponents, queryParameters)- parseResponse(urlRequest, callback)- }- }--- private inline fun <reified T : Any> post(- pathComponents: Array<String>, item: Any, noinline callback: ResponseBlock<T>?- ) {- thread(start = true) {- val urlRequest = createUrlRequest(HttpMethod.POST, pathComponents)- urlRequest.apply {- writeBody(item)- }.let { httpConnection ->- parseResponse(httpConnection, callback)- }- }- }-- private inline fun <reified T : Any> put(- pathComponents: Array<String>, item: Any, noinline callback: ResponseBlock<T>?- ) {- thread(start = true) {- val urlRequest = createUrlRequest(HttpMethod.PUT, pathComponents)- urlRequest.apply {- writeBody(item)- }.let { httpConnection ->- parseResponse(httpConnection, callback)- }- }- }-- inline fun <reified T : Any> parseResponse(- httpConnection: HttpURLConnection,- noinline callback: ResponseBlock<T>?- ) {- with(httpConnection) {- val parsedResult = try {- if (this.responseCode in 200..299) {- Triple(- this.responseCode, mapper.readValue<T>(- this.inputStream.bufferedReader().readText()- ), null- )- } else {- val errorResponse = this.errorStream.bufferedReader().readText()- Triple(this.responseCode, null, Throwable(errorResponse))- }- } catch (e: Exception) {- Triple(0, null, e)- }-- parsedResult.third?.let {- Log.e(this::class.simpleName, it.message, it)- }- callback?.invoke(parsedResult.first, parsedResult.second, parsedResult.third)- this.disconnect()- }- }-- private fun HttpURLConnection.writeBody(item: Any) {- val outputWriter = outputStream.bufferedWriter()- outputWriter.write(- mapper.writeValueAsString(item)- )- outputWriter.flush()- }-}diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/AppSelectionFragment.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/AppSelectionFragment.ktdeleted file mode 100644index 51cb2bf3f..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/AppSelectionFragment.kt+++ /dev/null@@ -1,253 +0,0 @@-package io.openremote.app.ui--import android.os.Bundle-import android.view.LayoutInflater-import android.view.View-import android.view.ViewGroup-import android.widget.AdapterView-import android.widget.ArrayAdapter-import androidx.core.widget.doOnTextChanged-import androidx.fragment.app.Fragment-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.fasterxml.jackson.module.kotlin.readValue-import io.openremote.app.R-import io.openremote.app.databinding.FragmentAppSelectionBinding-import io.openremote.app.model.ORAppInfo--private const val ARG_APP_LIST = "appList"-private const val ARG_APP_MAP = "appMap"-private const val ARG_SHOW_APP_TEXT_INPUT = "showAppTextInput"-private const val ARG_SHOW_REALM_TEXT_INPUT = "showRealmTextInput"--/**- * A simple [Fragment] subclass.- * Use the [AppSelectionFragment.newInstance] factory method to- * create an instance of this fragment.- */-class AppSelectionFragment : Fragment() {- private lateinit var binding: FragmentAppSelectionBinding- private lateinit var parentActivity: ProjectWizardActivity-- lateinit var appArrayAdapter: ArrayAdapter<String>-- private var appList: List<String>? = null- private var appMap: Map<String, ORAppInfo>? = null- private var showAppTextInput: Boolean = false- private var showRealmTextInput: Boolean = false- private val mapper = jacksonObjectMapper()-- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)-- parentActivity = requireActivity() as ProjectWizardActivity-- arguments?.let {- it.getString(ARG_APP_LIST)?.let {- appList = mapper.readValue<List<String>>(it)- }- it.getString(ARG_APP_MAP)?.let {- appMap = mapper.readValue<Map<String, ORAppInfo>>(it)- }- showAppTextInput = it.getBoolean(ARG_SHOW_APP_TEXT_INPUT, false)- showRealmTextInput = it.getBoolean(ARG_SHOW_REALM_TEXT_INPUT, false)- }-- if (!appList.isNullOrEmpty()) {- if (appList!!.size == 1) {- parentActivity.app = appList!![0]- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- RealmSelectionFragment.newInstance(- realmList = null,- showRealmTextInput = showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- }-- if (!appMap.isNullOrEmpty()) {- if (appMap!!.size == 1) {- parentActivity.app = appMap!!.keys.elementAt(0)- parentActivity.consoleProviders = appMap!!.values.elementAt(0).providers- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- RealmSelectionFragment.newInstance(- realmList = appMap!!.values.elementAt(0).realms,- showRealmTextInput = showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- }- }-- override fun onCreateView(- inflater: LayoutInflater, container: ViewGroup?,- savedInstanceState: Bundle?- ): View {- // Inflate the layout for this fragment- binding = FragmentAppSelectionBinding.inflate(inflater, container, false);- val view: View = binding.root-- if (showAppTextInput) {- binding.appInputLayout.visibility = View.VISIBLE- binding.appInput.doOnTextChanged { text, start, before, count ->- parentActivity.app = text.toString()- }- } else {- if (appList != null) {- appArrayAdapter = ArrayAdapter(- requireActivity(),- android.R.layout.simple_spinner_dropdown_item,- appList!!- )- binding.appSpinner.adapter = appArrayAdapter- binding.appSpinner.visibility = View.VISIBLE- }-- if (appMap != null) {- appArrayAdapter = ArrayAdapter(- requireActivity(),- android.R.layout.simple_spinner_dropdown_item,- appMap!!.keys.toList()- )- binding.appSpinner.adapter = appArrayAdapter- binding.appSpinner.visibility = View.VISIBLE- }-- binding.appSpinner.onItemSelectedListener =- object : AdapterView.OnItemSelectedListener {- override fun onItemSelected(- parent: AdapterView<*>?,- view: View?,- position: Int,- id: Long- ) {- parentActivity.app = appArrayAdapter.getItem(position)- parentActivity.consoleProviders =- appMap?.values?.elementAt(position)?.providers- }-- override fun onNothingSelected(p0: AdapterView<*>?) {- parentActivity.app = null- parentActivity.consoleProviders = null- }- }- }-- binding.backButton.setOnClickListener {- parentFragmentManager.popBackStack()- }-- binding.nextButton.setOnClickListener {- if (parentActivity.app != null) {- val appInfo = appMap?.get(parentActivity.app)- if (appInfo == null) {- parentActivity.apiManager.getAppInfos { statusCode, appInfoMap, error ->- parentActivity.binding.progressBar.visibility = View.INVISIBLE- when (statusCode) {- in 200..299 -> {- appInfoMap?.let {- val appInfo = it[parentActivity.app]- if (appInfo != null) {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- RealmSelectionFragment.newInstance(- realmList = appInfo.realms,- showRealmTextInput = showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- } else {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- RealmSelectionFragment.newInstance(- realmList = null,- showRealmTextInput = showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- }- }- 404 -> {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- RealmSelectionFragment.newInstance(- realmList = null,- showRealmTextInput = showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- else -> {- parentActivity.runOnUiThread {- binding.errorView.visibility = View.VISIBLE- binding.errorTextView.text =- getString(R.string.error_getting_app_info)- }- }- }- }- } else {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- RealmSelectionFragment.newInstance(- realmList = appInfo.realms,- showRealmTextInput = showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- } else {- parentActivity.runOnUiThread {- binding.errorView.visibility = View.VISIBLE- binding.errorTextView.text = getString(R.string.select_app_first)- }- }- }-- return view- }-- companion object {- /**- * Use this factory method to create a new instance of- * this fragment using the provided parameters.- *- * @return A new instance of fragment AppSelectionFragment.- */- @JvmStatic- fun newInstance(- appList: List<String>?,- appMap: Map<String, ORAppInfo>?,- showAppTextInput: Boolean = false,- showRealmTextInput: Boolean = false- ) =- AppSelectionFragment().apply {- arguments = Bundle().apply {- appList?.let {- putString(ARG_APP_LIST, mapper.writeValueAsString(it))- }- appMap?.let {- putString(ARG_APP_MAP, mapper.writeValueAsString(it))- }- putBoolean(ARG_SHOW_REALM_TEXT_INPUT, showRealmTextInput)- putBoolean(ARG_SHOW_APP_TEXT_INPUT, showAppTextInput)- }- }- }-}diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/HostSelectionFragment.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/HostSelectionFragment.ktdeleted file mode 100644index af8bb2eeb..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/HostSelectionFragment.kt+++ /dev/null@@ -1,271 +0,0 @@-package io.openremote.app.ui--import android.os.Bundle-import android.view.LayoutInflater-import android.view.View-import android.view.ViewGroup-import android.webkit.URLUtil-import androidx.fragment.app.Fragment-import io.openremote.app.R-import io.openremote.app.databinding.FragmentHostSelectionBinding-import io.openremote.app.model.ORAppInfo-import io.openremote.app.model.ORConsoleConfig-import io.openremote.app.network.ApiManager---/**- * A simple [Fragment] subclass.- * Use the [HostSelectionFragment.newInstance] factory method to- * create an instance of this fragment.- */-class HostSelectionFragment : Fragment() {- private lateinit var binding: FragmentHostSelectionBinding- private lateinit var parentActivity: ProjectWizardActivity-- override fun onCreateView(- inflater: LayoutInflater, container: ViewGroup?,- savedInstanceState: Bundle?- ): View {-- parentActivity = requireActivity() as ProjectWizardActivity-- // Inflate the layout for this fragment- binding = FragmentHostSelectionBinding.inflate(inflater, container, false);- val view: View = binding.root--- binding.connectButton.setOnClickListener {- if (!binding.hostInput.text.isNullOrBlank()) {- connectToHost(binding.hostInput.text.toString())- }- parentActivity.host = binding.hostInput.text.toString()- }-- binding.backButton.setOnClickListener {- activity?.finish()- }-- return view- }-- private fun connectToHost(host: String) {- parentActivity.binding.progressBar.visibility = View.VISIBLE- val url =- if (URLUtil.isValidUrl(host)) host.plus("/api/master") else "https://${host}.openremote.app/api/master"- parentActivity.apiManager = ApiManager(url)- parentActivity.apiManager.getConsoleConfig { statusCode, consoleConfig, error ->- when (statusCode) {- in 200..299 -> {- consoleConfig?.let { config ->- if (config.app != null) {- parentActivity.app = config.app- val appInfo = config.apps?.get(config.app)- if (appInfo != null) {- parentActivity.binding.progressBar.visibility = View.INVISIBLE- processAppInfo(config, appInfo)- } else {- parentActivity.apiManager.getAppInfos { statusCode, appInfoMap, error ->- parentActivity.binding.progressBar.visibility = View.INVISIBLE- when (statusCode) {- in 200..299 -> {- if (appInfoMap != null) {- val appInfo = appInfoMap[config.app!!]- if (appInfo != null) {- processAppInfo(config, appInfo)- } else {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = config.allowedApps,- appMap = config.apps,- showAppTextInput = config.showAppTextInput,- showRealmTextInput = config.showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- } else {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = config.allowedApps,- appMap = config.apps,- showAppTextInput = config.showAppTextInput,- showRealmTextInput = config.showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- }- 404 -> { //no appconfig- parentActivity.goToMainActivity(- parentActivity.app!!,- "master"- )- }- else -> {- binding.errorView.visibility = View.VISIBLE- parentActivity.runOnUiThread {- binding.errorView.visibility = View.VISIBLE- binding.errorTextView.text =- resources.getText(R.string.error_getting_app_info)- }- }- }- }- }- } else {- parentActivity.binding.progressBar.visibility = View.INVISIBLE- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = config.allowedApps,- appMap = config.apps,- showAppTextInput = config.showAppTextInput,- showRealmTextInput = config.showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- }- }- 404 -> { //no console_config.json- parentActivity.apiManager.getAppInfos { statusCode, appInfoMap, error ->- parentActivity.binding.progressBar.visibility = View.INVISIBLE- when (statusCode) {- in 200..299 -> {- if (appInfoMap?.isNotEmpty() == true) {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = null,- appMap = appInfoMap- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- } else {- parentActivity.apiManager.getApps { statusCode, apps, error ->- if (apps?.isNotEmpty() == true) {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = apps,- appMap = null- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- } else {- //TODO remove inserting manager app after all manager instances are updated with console_settings_improvement branch- val tempApps = arrayListOf("manager")- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = tempApps,- appMap = null,- showAppTextInput = true- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()--// parentActivity.runOnUiThread {-// binding.errorView.visibility = View.VISIBLE-// binding.errorTextView.text =-// getString(R.string.no_apps_found)-// }- }- }- }- }- else -> {- parentActivity.apiManager.getApps { statusCode, apps, error ->- if (apps?.isNotEmpty() == true) {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = apps,- appMap = null,- showAppTextInput = true- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- } else {- //TODO remove inserting manager app after all manager instances are updated with console_settings_improvement branch- val tempApps = arrayListOf("manager")- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- AppSelectionFragment.newInstance(- appList = tempApps,- appMap = null- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()-// parentActivity.runOnUiThread {-// binding.errorView.visibility = View.VISIBLE-// binding.errorTextView.text =-// getString(R.string.no_apps_found)-// }- }- }- }- }- }- }- else -> {- parentActivity.binding.progressBar.visibility = View.INVISIBLE- parentActivity.runOnUiThread {- binding.errorView.visibility = View.VISIBLE- binding.errorTextView.text =- resources.getText(R.string.could_not_connect_to_domain)- }- }- }- }- }-- private fun processAppInfo(config: ORConsoleConfig, appInfo: ORAppInfo) {- parentActivity.consoleProviders = appInfo.providers- if (appInfo.consoleAppIncompatible) {- parentActivity.runOnUiThread {- binding.errorView.visibility = View.VISIBLE- binding.errorTextView.text = getString(R.string.app_incompatible)- }- } else if (parentActivity.app != null) {- parentActivity.goToMainActivity(- parentActivity.app!!,- consoleProviders = appInfo.providers- )- } else {- parentFragmentManager.beginTransaction()- .replace(- R.id.fragmentContainer,- RealmSelectionFragment.newInstance(- realmList = appInfo.realms,- showRealmTextInput = config.showRealmTextInput- )- )- .addToBackStack(ProjectWizardActivity.TAG)- .commit()- }- }-- companion object {- @JvmStatic- fun newInstance() = HostSelectionFragment()- }-}diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectListActivity.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectListActivity.ktdeleted file mode 100644index b61509bfb..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectListActivity.kt+++ /dev/null@@ -1,132 +0,0 @@-package io.openremote.app.ui--import android.content.Intent-import android.graphics.Canvas-import android.graphics.Color-import android.graphics.PorterDuff-import android.graphics.drawable.ColorDrawable-import android.os.Bundle-import android.view.Menu-import android.view.MenuItem-import androidx.appcompat.app.AppCompatActivity-import androidx.appcompat.widget.Toolbar-import androidx.core.content.ContextCompat-import androidx.core.view.setPadding-import androidx.preference.PreferenceManager-import androidx.recyclerview.widget.ItemTouchHelper-import androidx.recyclerview.widget.LinearLayoutManager-import androidx.recyclerview.widget.RecyclerView-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.fasterxml.jackson.module.kotlin.readValue-import io.openremote.app.R-import io.openremote.app.databinding.ActivityProjectListBinding-import io.openremote.app.model.ProjectItem-import io.openremote.app.util.Constants-import io.openremote.orlib.ORConstants-import io.openremote.orlib.ui.OrMainActivity---class ProjectListActivity : AppCompatActivity() {- lateinit var binding: ActivityProjectListBinding- lateinit var projectListAdapter: ProjectListAdapter-- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)-- binding = ActivityProjectListBinding.inflate(layoutInflater)- val view = binding.root- setContentView(view)-- val toolbar: Toolbar = findViewById(R.id.settings_toolbar);- setSupportActionBar(toolbar)- supportActionBar?.setDisplayShowTitleEnabled(false)-- val projectItems = PreferenceManager.getDefaultSharedPreferences(this)- .getString(Constants.PROJECT_LIST, null)?.let {- jacksonObjectMapper().readValue<List<ProjectItem>>(it).toMutableList()- } ?: mutableListOf()-- projectListAdapter = ProjectListAdapter(projectItems.toMutableList().asReversed(), this::goToMainActivity)- binding.projectList.adapter = projectListAdapter- binding.projectList.layoutManager = LinearLayoutManager(this);-- val background = ColorDrawable(Color.parseColor("#bf1515"))- val xMark = ContextCompat.getDrawable(this, android.R.drawable.ic_menu_close_clear_cancel)?.apply {- setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP)- }- val xMarkMargin = 24-- val swipeHandler = object : ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT) {-- override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean {- return false- }-- override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) {- val projectItems = projectListAdapter.items.toMutableList().asReversed()- projectItems.removeAt(viewHolder.adapterPosition)- PreferenceManager.getDefaultSharedPreferences(this@ProjectListActivity)- .edit()- .putString(Constants.PROJECT_LIST, jacksonObjectMapper().writeValueAsString(projectItems))- .apply()- projectListAdapter.remove(viewHolder.adapterPosition)- }-- override fun onChildDraw(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {- if (viewHolder.adapterPosition < 0) return-- val itemView = viewHolder.itemView // the view being swiped-- // draw the red background, based on the offset of the swipe (dX)- background.apply {- setBounds(itemView.right + dX.toInt(), itemView.top, itemView.right, itemView.bottom)- draw(c)- }-- // draw the symbol- xMark?.apply {- val xt = itemView.top + (itemView.bottom - itemView.top - xMark.intrinsicHeight) / 2- setBounds(- itemView.right - xMarkMargin - xMark.intrinsicWidth,- xt,- itemView.right - xMarkMargin,- xt + xMark.intrinsicHeight- )- draw(c)- }- super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)- }- }- val touchHelper = ItemTouchHelper(swipeHandler)- touchHelper.attachToRecyclerView(binding.projectList)- }-- override fun onCreateOptionsMenu(menu: Menu?): Boolean {- menuInflater.inflate(R.menu.projects_menu, menu)- val menuItem = menu?.findItem(R.id.add);- menuItem?.actionView?.setOnClickListener {- this.onOptionsItemSelected(menuItem)- }- menuItem?.actionView?.setPadding(10)- return super.onCreateOptionsMenu(menu)- }-- override fun onOptionsItemSelected(item: MenuItem): Boolean {- when (item.itemId){- R.id.add -> {- val intent = Intent(this, ProjectWizardActivity::class.java)- startActivity(intent)- }- }- return super.onOptionsItemSelected(item)- }-- private fun goToMainActivity(url: String) {- val intent = Intent(this, OrMainActivity::class.java)- intent.putExtra(ORConstants.BASE_URL_KEY, url)- runOnUiThread {- startActivity(intent)- finish()- }- }-}diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectListAdapter.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectListAdapter.ktdeleted file mode 100644index bb7c7ebfe..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectListAdapter.kt+++ /dev/null@@ -1,61 +0,0 @@-package io.openremote.app.ui--import android.view.LayoutInflater-import android.view.View-import android.view.ViewGroup-import androidx.recyclerview.widget.RecyclerView-import io.openremote.app.databinding.RowProjectItemBinding-import io.openremote.app.model.ProjectItem--class ProjectListAdapter(val items: MutableList<ProjectItem>, private val goToMainActivity: (url: String) -> (Unit)) : RecyclerView.Adapter<ProjectListAdapter.ViewHolder>() {-- // create new views- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {- val inflater = LayoutInflater.from(parent.context)- val binding = RowProjectItemBinding.inflate(inflater, parent, false)- return ViewHolder(binding, goToMainActivity)- }-- // binds the list items to a view- override fun onBindViewHolder(holder: ViewHolder, position: Int) {- holder.bindProjectItem(items[position])- }-- // return the number of the items in the list- override fun getItemCount(): Int {- return items.size- }-- fun remove(position: Int) {- this.items.removeAt(position)- this.notifyDataSetChanged()- }-- // Holds the views for adding it to image and text- class ViewHolder(private val binding: RowProjectItemBinding, private val goToMainActivity: (url: String) -> (Unit)) : RecyclerView.ViewHolder(binding.root), View.OnClickListener {-- lateinit var url: String-- init {- binding.root.setOnClickListener(this)- }-- fun bindProjectItem(projectItem: ProjectItem) {- this.url = projectItem.url- binding.host.text = projectItem.host- projectItem.app.run {- binding.app.visibility = View.VISIBLE- binding.app.text = this- }- projectItem.realm?.run {- binding.realm.visibility = View.VISIBLE- binding.realm.text = this- }- }-- override fun onClick(view: View?) {- goToMainActivity(url)- }- }-}-diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectWizardActivity.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectWizardActivity.ktdeleted file mode 100644index 28397543e..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/ProjectWizardActivity.kt+++ /dev/null@@ -1,84 +0,0 @@-package io.openremote.app.ui--import android.content.Intent-import android.os.Bundle-import android.webkit.URLUtil-import androidx.fragment.app.FragmentActivity-import androidx.preference.PreferenceManager-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.fasterxml.jackson.module.kotlin.readValue-import io.openremote.app.R-import io.openremote.app.databinding.ActivityProjectWizardBinding-import io.openremote.app.model.ProjectItem-import io.openremote.app.network.ApiManager-import io.openremote.app.util.Constants-import io.openremote.orlib.ORConstants-import io.openremote.orlib.ui.OrMainActivity--class ProjectWizardActivity : FragmentActivity() {-- lateinit var binding: ActivityProjectWizardBinding- lateinit var apiManager: ApiManager-- var host: String? = null- var app: String? = null- var realm: String? = null- var consoleProviders: List<String>? = null-- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)-- binding = ActivityProjectWizardBinding.inflate(layoutInflater)- val view = binding.root- setContentView(view)-- supportFragmentManager.beginTransaction()- .add(R.id.fragmentContainer, HostSelectionFragment.newInstance())- .addToBackStack(TAG)- .commit()- }-- fun goToMainActivity(- appName: String = "manager",- realm: String? = null,- consoleProviders: List<String>? = null- ) {- val preferences = PreferenceManager.getDefaultSharedPreferences(this)- val projectItems = preferences.getString(Constants.PROJECT_LIST, null)?.let {- jacksonObjectMapper().readValue<List<ProjectItem>>(it).toMutableList()- } ?: mutableListOf()-- val intent = Intent(this, OrMainActivity::class.java)- var url = if (URLUtil.isValidUrl(host)) host else "https://${host}.openremote.app"- url = if (realm != null) "$url/${appName}/?realm=$realm" else "$url/$appName"- if (consoleProviders?.any() == true) {- url = if (url.contains("?")) url.plus("&") else url.plus("?")- url = url.plus("consoleProviders=${consoleProviders.joinToString(" ")}")- }-- projectItems.add(ProjectItem(host!!, appName, realm, url))- preferences- .edit()- .putString(Constants.PROJECT_LIST, jacksonObjectMapper().writeValueAsString(projectItems))- .apply()-- intent.putExtra(ORConstants.BASE_URL_KEY, url)- runOnUiThread {- startActivity(intent)- finish()- }- }-- companion object {- const val TAG = "ProjectWizardActivity"- }-- override fun onBackPressed() {- val f = supportFragmentManager.findFragmentById(R.id.fragmentContainer)- if (f is HostSelectionFragment) {- finish()- } else {- super.onBackPressed()- }- }-}diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/RealmSelectionFragment.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/RealmSelectionFragment.ktdeleted file mode 100644index a11cf7584..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/RealmSelectionFragment.kt+++ /dev/null@@ -1,147 +0,0 @@-package io.openremote.app.ui--import android.os.Bundle-import android.view.LayoutInflater-import android.view.View-import android.view.ViewGroup-import android.widget.AdapterView-import android.widget.ArrayAdapter-import androidx.core.widget.doOnTextChanged-import androidx.fragment.app.Fragment-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.fasterxml.jackson.module.kotlin.readValue-import io.openremote.app.R-import io.openremote.app.databinding.FragmentRealmSelectionBinding--private const val ARG_REALM_LIST = "realmList"-private const val ARG_SHOW_REALM_TEXT_INPUT = "showRealmTextInput"---/**- * A simple [Fragment] subclass.- * Use the [RealmSelectionFragment.newInstance] factory method to- * create an instance of this fragment.- */-class RealmSelectionFragment : Fragment() {- private lateinit var binding: FragmentRealmSelectionBinding- private lateinit var parentActivity: ProjectWizardActivity-- lateinit var realmArrayAdapter: ArrayAdapter<String>-- private var realmList: List<String>? = null- private var showRealmTextInput: Boolean = false-- private val mapper = jacksonObjectMapper()--- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)-- parentActivity = requireActivity() as ProjectWizardActivity-- arguments?.let {- it.getString(ARG_REALM_LIST)?.let {- realmList = mapper.readValue<List<String>>(it)- }- showRealmTextInput = it.getBoolean(ARG_SHOW_REALM_TEXT_INPUT, false)- }-- if (!realmList.isNullOrEmpty()) {- if (realmList!!.size == 1) {- parentActivity.realm = realmList!![0]- parentActivity.goToMainActivity(- parentActivity.app!!,- parentActivity.realm,- parentActivity.consoleProviders- )- }- }- }-- override fun onCreateView(- inflater: LayoutInflater, container: ViewGroup?,- savedInstanceState: Bundle?- ): View {- // Inflate the layout for this fragment- binding = FragmentRealmSelectionBinding.inflate(inflater, container, false);- val view: View = binding.root-- if (showRealmTextInput) {- binding.realmInputLayout.visibility = View.VISIBLE- binding.realmInput.doOnTextChanged { text, start, before, count ->- parentActivity.realm = text.toString()- }- } else {- if (realmList != null) {- realmArrayAdapter = ArrayAdapter(- requireActivity(),- android.R.layout.simple_spinner_dropdown_item,- realmList!!- )- binding.realmSpinner.adapter = realmArrayAdapter- binding.realmSpinner.visibility = View.VISIBLE-- binding.realmSpinner.onItemSelectedListener =- object : AdapterView.OnItemSelectedListener {- override fun onItemSelected(- parent: AdapterView<*>?,- view: View?,- position: Int,- id: Long- ) {- parentActivity.realm = realmArrayAdapter.getItem(position)- }-- override fun onNothingSelected(p0: AdapterView<*>?) {- parentActivity.realm = null- }- }- } else {- binding.realmInputLayout.visibility = View.VISIBLE- binding.realmInput.doOnTextChanged { text, start, before, count ->- parentActivity.realm = text.toString()- }- }- }-- binding.finishButton.setOnClickListener {- if (parentActivity.realm != null) {- parentActivity.goToMainActivity(- parentActivity.app!!,- parentActivity.realm,- parentActivity.consoleProviders- )- } else {- parentActivity.runOnUiThread {- binding.errorView.visibility = View.VISIBLE- binding.errorTextView.text = getString(R.string.select_realm_first)- }- }- }-- binding.backButton.setOnClickListener {- parentFragmentManager.popBackStack()- }-- return view- }-- companion object {- /**- * Use this factory method to create a new instance of- * this fragment using the provided parameters.- *- * @return A new instance of fragment RealmSelectionFragment.- */- @JvmStatic- fun newInstance(realmList: List<String>?, showRealmTextInput: Boolean = false) =- RealmSelectionFragment().apply {- arguments = Bundle().apply {- realmList?.let {- putString(ARG_REALM_LIST, mapper.writeValueAsString(it))- }- putBoolean(ARG_SHOW_REALM_TEXT_INPUT, showRealmTextInput)- }- }- }-}diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/SplashActivity.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/SplashActivity.ktdeleted file mode 100644index 860fbff42..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/ui/SplashActivity.kt+++ /dev/null@@ -1,90 +0,0 @@-package io.openremote.app.ui--import android.annotation.SuppressLint-import android.app.Activity-import android.content.Intent-import android.content.SharedPreferences-import android.os.Bundle-import androidx.preference.PreferenceManager-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.fasterxml.jackson.module.kotlin.readValue-import io.openremote.app.databinding.ActivitySplashBinding-import io.openremote.app.model.ProjectItem-import io.openremote.app.util.Constants-import io.openremote.orlib.ORConstants-import io.openremote.orlib.ui.OrMainActivity-import io.openremote.orlib.ui.OrPrivacyPolicyActivity--@SuppressLint("CustomSplashScreen")-class SplashActivity : Activity() {-- object SplashActivityConstants {- const val SHOW_CONDITIONS_REQUEST = 34563- }-- private lateinit var binding: ActivitySplashBinding- private lateinit var sharedPreferences: SharedPreferences- private lateinit var projectItems: MutableList<ProjectItem>-- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)- binding = ActivitySplashBinding.inflate(layoutInflater)- val view = binding.root- setContentView(view)-- sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)- projectItems = sharedPreferences.getString(Constants.PROJECT_LIST, null)?.let {- jacksonObjectMapper().readValue<List<ProjectItem>>(it).toMutableList()- } ?: mutableListOf()-- intent.extras?.apply {- this.getString(ORConstants.CLEAR_URL)?.apply {- projectItems.removeIf { it.url == this }- sharedPreferences- .edit()- .putString(Constants.PROJECT_LIST, jacksonObjectMapper().writeValueAsString(projectItems))- .apply()- }- }-- val privacyPolicyAccepted = sharedPreferences.getBoolean("privacyPolicyAccepted", false)-- if (!privacyPolicyAccepted) {- val intent = Intent(this@SplashActivity, OrPrivacyPolicyActivity::class.java)- startActivityForResult(intent, SplashActivityConstants.SHOW_CONDITIONS_REQUEST)- } else {- startNextActivity()- }- }-- private fun startNextActivity() {- when {- projectItems.size == 1 -> {- val intent = Intent(this, OrMainActivity::class.java)- intent.putExtra(ORConstants.BASE_URL_KEY, projectItems[0].url)- startActivity(intent)- finish()- }- projectItems.size > 1 -> {- startActivity(Intent(this@SplashActivity, ProjectListActivity::class.java))- finish()- }- else -> {- startActivity(Intent(this@SplashActivity, ProjectWizardActivity::class.java))- finish()- }- }- }-- override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {- if (requestCode == SplashActivityConstants.SHOW_CONDITIONS_REQUEST) {- if (resultCode == RESULT_OK) {- sharedPreferences.edit()- .putBoolean("privacyPolicyAccepted", true)- .apply()- startNextActivity()- }- }- super.onActivityResult(requestCode, resultCode, data)- }-}diff --git a/console/android/GenericApp/app/src/main/java/io/openremote/app/util/Constants.kt b/console/android/GenericApp/app/src/main/java/io/openremote/app/util/Constants.ktdeleted file mode 100644index bb302ee22..000000000--- a/console/android/GenericApp/app/src/main/java/io/openremote/app/util/Constants.kt+++ /dev/null@@ -1,5 +0,0 @@-package io.openremote.app.util--object Constants {- const val PROJECT_LIST = "PROJECT_LIST"-}diff --git a/console/android/GenericApp/app/src/main/res/drawable-hdpi/ic_notification.png b/console/android/GenericApp/app/src/main/res/drawable-hdpi/ic_notification.pngdeleted file mode 100644index 417e9cf46..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable-hdpi/ic_notification.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable-mdpi/ic_notification.png b/console/android/GenericApp/app/src/main/res/drawable-mdpi/ic_notification.pngdeleted file mode 100644index fd5a4282b..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable-mdpi/ic_notification.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable-xhdpi/ic_notification.png b/console/android/GenericApp/app/src/main/res/drawable-xhdpi/ic_notification.pngdeleted file mode 100644index 9a563a433..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable-xhdpi/ic_notification.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable-xxhdpi/ic_notification.png b/console/android/GenericApp/app/src/main/res/drawable-xxhdpi/ic_notification.pngdeleted file mode 100644index e9b08914a..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable-xxhdpi/ic_notification.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable-xxxhdpi/ic_notification.png b/console/android/GenericApp/app/src/main/res/drawable-xxxhdpi/ic_notification.pngdeleted file mode 100644index e0107cd52..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable-xxxhdpi/ic_notification.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable/action_item_border.xml b/console/android/GenericApp/app/src/main/res/drawable/action_item_border.xmldeleted file mode 100644index 55cb93418..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/action_item_border.xml+++ /dev/null@@ -1,6 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">- <corners android:radius="10dp"/>- <padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp"/>- <stroke android:width="1dp" android:color="#CCCCCC"/>-</shape>diff --git a/console/android/GenericApp/app/src/main/res/drawable/app_icon.xml b/console/android/GenericApp/app/src/main/res/drawable/app_icon.xmldeleted file mode 100644index 37d07f447..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/app_icon.xml+++ /dev/null@@ -1,4 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"- android:src="@drawable/ic_notification">-</bitmap>\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/res/drawable/cog.png b/console/android/GenericApp/app/src/main/res/drawable/cog.pngdeleted file mode 100644index 7d7d8c246..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable/cog.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable/ic_alert_circle.xml b/console/android/GenericApp/app/src/main/res/drawable/ic_alert_circle.xmldeleted file mode 100644index 36f59680c..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/ic_alert_circle.xml+++ /dev/null@@ -1,10 +0,0 @@-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="24dp"- android:height="24dp"- android:viewportWidth="24"- android:viewportHeight="24">- <path- android:pathData="M13,13L11,13L11,7L13,7M13,17L11,17L11,15L13,15M12,2C6.477,2 2,6.477 2,12C2,17.523 6.477,22 12,22C17.523,22 22,17.523 22,12C22,6.477 17.523,2 12,2Z"- android:fillColor="#a07171"- android:strokeColor="#00000000"/>-</vector>diff --git a/console/android/GenericApp/app/src/main/res/drawable/ic_launcher_background.xml b/console/android/GenericApp/app/src/main/res/drawable/ic_launcher_background.xmldeleted file mode 100644index 07d5da9cb..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/ic_launcher_background.xml+++ /dev/null@@ -1,170 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="108dp"- android:height="108dp"- android:viewportWidth="108"- android:viewportHeight="108">- <path- android:fillColor="#3DDC84"- android:pathData="M0,0h108v108h-108z" />- <path- android:fillColor="#00000000"- android:pathData="M9,0L9,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,0L19,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M29,0L29,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M39,0L39,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M49,0L49,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M59,0L59,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M69,0L69,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M79,0L79,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M89,0L89,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M99,0L99,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,9L108,9"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,19L108,19"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,29L108,29"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,39L108,39"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,49L108,49"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,59L108,59"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,69L108,69"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,79L108,79"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,89L108,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,99L108,99"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,29L89,29"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,39L89,39"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,49L89,49"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,59L89,59"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,69L89,69"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,79L89,79"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M29,19L29,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M39,19L39,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M49,19L49,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M59,19L59,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M69,19L69,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M79,19L79,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />-</vector>diff --git a/console/android/GenericApp/app/src/main/res/drawable/ic_launcher_foreground.xml b/console/android/GenericApp/app/src/main/res/drawable/ic_launcher_foreground.xmldeleted file mode 100644index 38953c956..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/ic_launcher_foreground.xml+++ /dev/null@@ -1,20 +0,0 @@-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="108dp"- android:height="108dp"- android:viewportWidth="108"- android:viewportHeight="108">- <group android:scaleX="0.11364796"- android:scaleY="0.11364796"- android:translateX="24.906122"- android:translateY="24.906122">- <path- android:pathData="M255.99,485.99c-126.81,0 -229.99,-103.16 -229.99,-229.99h48.17c0,100.27 81.57,181.84 181.83,181.84s181.84,-81.57 181.84,-181.84S356.26,74.17 255.99,74.17V26.01c126.82,0 230.01,103.18 230.01,229.99s-103.18,229.99 -230.01,229.99h0Z"- android:fillColor="#c2d500"/>- <path- android:pathData="M221.17,422.85c-44.55,-9.28 -82.85,-35.39 -107.79,-73.47 -24.94,-38.08 -33.56,-83.63 -24.25,-128.19 9.31,-44.58 35.41,-82.85 73.49,-107.79 38.1,-24.95 83.61,-33.57 128.2,-24.25 92.02,19.2 151.26,109.66 132.04,201.65l-47.14,-9.81c13.76,-66.02 -28.73,-130.92 -94.76,-144.7 -31.99,-6.68 -64.64,-0.5 -91.96,17.41 -27.33,17.88 -46.05,45.35 -52.74,77.34 -6.65,31.97 -0.49,64.63 17.42,91.96 17.88,27.33 45.34,46.06 77.34,52.72l-9.86,47.14h0Z"- android:fillColor="#4c9c2e"/>- <path- android:pathData="M256.14,366.5c-1.86,0 -3.72,-0.04 -5.61,-0.12 -29.46,-1.48 -56.61,-14.34 -76.43,-36.21 -19.82,-21.88 -29.94,-50.16 -28.46,-79.66l48.08,2.39c-0.82,16.64 4.88,32.6 16.07,44.95 11.17,12.35 26.52,19.6 43.13,20.42 16.57,0.75 32.6,-4.88 44.93,-16.06 12.35,-11.16 19.6,-26.49 20.43,-43.12 1.7,-34.34 -24.86,-63.67 -59.2,-65.37l2.4,-48.1c60.87,3.02 107.92,54.98 104.91,115.85 -1.47,29.48 -14.33,56.62 -36.2,76.44 -20.49,18.55 -46.6,28.59 -74.05,28.59h0Z"- android:fillColor="#1a5632"/>- </group>-</vector>diff --git a/console/android/GenericApp/app/src/main/res/drawable/ic_logo_full_no_text_colour.xml b/console/android/GenericApp/app/src/main/res/drawable/ic_logo_full_no_text_colour.xmldeleted file mode 100644index 1ea4d8cff..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/ic_logo_full_no_text_colour.xml+++ /dev/null@@ -1,48 +0,0 @@-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="347.69dp"- android:height="88.5dp"- android:viewportWidth="347.69"- android:viewportHeight="88.5">- <path- android:pathData="M92.34,32.64c7.3,0 12.94,6.18 12.94,12.94s-5.55,12.94 -12.94,12.94 -12.85,-6.09 -12.85,-12.76c0,-7.8 6.36,-13.12 12.85,-13.12ZM92.39,55.68c4.78,0 9.74,-3.79 9.74,-10.23s-5.5,-9.96 -9.74,-9.96c-4.51,0 -9.74,3.7 -9.74,10.23 0,5.73 4.64,9.96 9.74,9.96Z"- android:fillColor="#006225"/>- <path- android:pathData="M164.22,32.75h3.16v4.19h0.09c0.95,-1.49 3.38,-3.8 7.57,-3.8 3.02,0 5.55,0.77 7.8,3.03 1.85,1.81 3.07,4.66 3.07,8.73v13.62h-3.16v-13.62c0,-3.21 -0.99,-5.47 -2.35,-6.79 -1.71,-1.67 -3.97,-2.13 -5.37,-2.13s-3.65,0.45 -5.37,2.13c-1.35,1.31 -2.34,3.57 -2.3,6.79v13.62h-3.16v-25.78Z"- android:fillColor="#006225"/>- <path- android:pathData="M190.17,33.5h5.5v2.21h0.09c1.13,-1.62 2.25,-3.07 5.37,-3.07h0.5v5.82c-5.45,0.23 -5.45,4.51 -5.45,6v14.07h-6v-25.02Z"- android:fillColor="#49a942"/>- <path- android:pathData="M270.2,45.45c0,-7.58 6.18,-13.39 13.35,-13.39s13.26,5.64 13.26,13.3c0,8.21 -6.31,13.39 -13.26,13.39 -7.44,0 -13.35,-6.13 -13.35,-13.3ZM290.8,45.49c0,-4.55 -3.52,-7.94 -7.26,-7.94 -3.11,0 -7.35,2.66 -7.35,7.89 0,4.73 3.56,7.8 7.35,7.8 4.37,0 7.26,-3.79 7.26,-7.75Z"- android:fillColor="#49a942"/>- <path- android:pathData="M300.29,38.23h-3.5v-5.32h3.5v-8.34h6v8.34h3.61v5.32h-3.61v19.7h-6v-19.7Z"- android:fillColor="#49a942"/>- <path- android:pathData="M256.86,32.81c-3.05,0 -5.81,1.33 -7.8,3.47 -1.99,-2.14 -4.75,-3.47 -7.8,-3.47 -6.05,0 -10.97,5.22 -10.97,11.64v14.33h6.29v-14.33c0,-2.95 2.1,-5.34 4.67,-5.34s4.48,2.19 4.65,4.95c0,0.13 -0.02,0.26 -0.02,0.39v14.33h6.3v-0.04h0.04v-14.29c0,-0.13 -0.01,-0.26 -0.02,-0.39 0.18,-2.76 2.19,-4.95 4.65,-4.95s4.67,2.4 4.67,5.34v14.29h6.29v-14.29c0,-6.42 -4.92,-11.64 -10.97,-11.64Z"- android:fillColor="#49a942"/>- <path- android:pathData="M107.92,33.25h3.16v33.35h-3.16z"- android:fillColor="#006225"/>- <path- android:pathData="M120.79,32.64c-6.49,0 -12.85,5.3 -12.87,13.08h3.16c0,-6.54 5.24,-10.24 9.75,-10.24 4.25,0 9.75,3.47 9.75,9.96s-4.97,10.23 -9.75,10.23c-2.38,0 -4.65,-0.93 -6.4,-2.49v3.61c1.86,1.08 4.03,1.72 6.36,1.72 7.41,0 12.96,-6.22 12.96,-12.94s-5.65,-12.94 -12.96,-12.94Z"- android:fillColor="#006225"/>- <path- android:pathData="M159.6,38.95c-1.76,-3.07 -5.59,-6.27 -11,-6.31 -7.17,0.13 -12.8,6 -12.8,12.98s5.95,12.89 12.85,12.89c5.68,0 10.41,-3.74 12.13,-8.66h-3.34c-1.13,3.07 -4.33,5.73 -8.84,5.82 -4.82,0 -9.33,-4.1 -9.56,-8.93h0c-0.14,-1.31 -0.19,-3.28 0.47,-4.77h0c1.55,-4.46 5.7,-6.5 9.12,-6.5 3.92,0 8.66,2.62 9.65,8.43h-14.15v2.84h17.35c0.14,-2.39 -0.23,-5.14 -1.89,-7.8Z"- android:fillColor="#006225"/>- <path- android:pathData="M227.79,45.08c0,-6.31 -5,-13.16 -12.94,-13.16s-13.16,6.49 -13.16,13.57 5.77,13.26 13.21,13.26c5.86,0 10.64,-4.19 12.08,-8.7h-6.31c-1.13,2.07 -3.11,3.2 -5.77,3.2 -4.15,0 -6.47,-3.29 -6.86,-4.97 -0.36,-1.11 -0.72,-2.93 -0.21,-4.99h-0.01c0.03,-0.12 0.07,-0.23 0.1,-0.35 0.01,-0.04 0.02,-0.07 0.03,-0.11 1.26,-4.26 4.81,-5.41 6.95,-5.41 2.97,0 6.09,1.85 6.76,5.86h-10.53v4.82h16.3c0.18,-0.81 0.36,-1.85 0.36,-3.02Z"- android:fillColor="#49a942"/>- <path- android:pathData="M335.97,45.08c0,-6.31 -5,-13.16 -12.94,-13.16s-13.17,6.49 -13.17,13.57 5.77,13.26 13.21,13.26c5.86,0 10.64,-4.19 12.08,-8.7h-6.31c-1.13,2.07 -3.11,3.2 -5.77,3.2 -4.14,0 -6.47,-3.29 -6.86,-4.97 -0.36,-1.11 -0.72,-2.93 -0.21,-4.99h-0.01c0.03,-0.12 0.07,-0.23 0.1,-0.35 0.01,-0.04 0.02,-0.07 0.03,-0.11 1.26,-4.26 4.81,-5.41 6.95,-5.41 2.98,0 6.09,1.85 6.76,5.86h-10.91v4.82h16.68c0.18,-0.81 0.36,-1.85 0.36,-3.02Z"- android:fillColor="#49a942"/>- <path- android:pathData="M38.8,73.19c-17.32,0 -31.42,-14.09 -31.42,-31.42h6.58c0,13.7 11.14,24.84 24.84,24.84s24.84,-11.14 24.84,-24.84 -11.14,-24.84 -24.84,-24.84v-6.58c17.32,0 31.42,14.09 31.42,31.41s-14.09,31.42 -31.42,31.42h0Z"- android:fillColor="#c1d82f"/>- <path- android:pathData="M34.04,64.57c-6.09,-1.27 -11.32,-4.83 -14.72,-10.04 -3.41,-5.2 -4.58,-11.42 -3.31,-17.51 1.27,-6.09 4.84,-11.32 10.04,-14.72 5.2,-3.41 11.42,-4.58 17.51,-3.31 12.57,2.62 20.66,14.98 18.04,27.54l-6.44,-1.34c1.88,-9.02 -3.93,-17.88 -12.94,-19.77 -4.37,-0.91 -8.83,-0.07 -12.56,2.38 -3.73,2.44 -6.29,6.19 -7.2,10.56 -0.91,4.37 -0.07,8.83 2.38,12.56 2.44,3.73 6.19,6.29 10.56,7.2l-1.34,6.44h0Z"- android:fillColor="#49a942"/>- <path- android:pathData="M38.82,56.87c-0.25,0 -0.51,0 -0.77,-0.02 -4.02,-0.2 -7.73,-1.96 -10.44,-4.95 -2.71,-2.99 -4.09,-6.85 -3.89,-10.88l6.57,0.33c-0.11,2.27 0.67,4.45 2.2,6.14 1.53,1.69 3.62,2.68 5.89,2.79 2.26,0.1 4.45,-0.67 6.14,-2.19 1.69,-1.52 2.68,-3.62 2.79,-5.89 0.23,-4.69 -3.4,-8.7 -8.09,-8.93l0.33,-6.57c8.32,0.41 14.74,7.51 14.33,15.82 -0.2,4.03 -1.96,7.73 -4.95,10.44 -2.8,2.53 -6.37,3.91 -10.11,3.91h0Z"- android:fillColor="#006225"/>-</vector>diff --git a/console/android/GenericApp/app/src/main/res/drawable/ic_menu.xml b/console/android/GenericApp/app/src/main/res/drawable/ic_menu.xmldeleted file mode 100644index e1c8eb120..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/ic_menu.xml+++ /dev/null@@ -1,9 +0,0 @@-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="24dp"- android:height="24dp"- android:viewportHeight="24.0"- android:viewportWidth="24.0">- <path- android:fillColor="#ffffff"- android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z" />-</vector>\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/res/drawable/ic_plus_green.xml b/console/android/GenericApp/app/src/main/res/drawable/ic_plus_green.xmldeleted file mode 100644index a286070ba..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/ic_plus_green.xml+++ /dev/null@@ -1,10 +0,0 @@-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="24dp"- android:height="24dp"- android:viewportWidth="24"- android:viewportHeight="24">- <path- android:pathData="M19,13L13,13L13,19L11,19L11,13L5,13L5,11L11,11L11,5L13,5L13,11L19,11L19,13Z"- android:fillColor="#49a942"- android:strokeColor="#00000000"/>-</vector>diff --git a/console/android/GenericApp/app/src/main/res/drawable/notification_icon.xml b/console/android/GenericApp/app/src/main/res/drawable/notification_icon.xmldeleted file mode 100644index 37d07f447..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/notification_icon.xml+++ /dev/null@@ -1,4 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"- android:src="@drawable/ic_notification">-</bitmap>\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/res/drawable/or_app_icon.png b/console/android/GenericApp/app/src/main/res/drawable/or_app_icon.pngdeleted file mode 100644index 34fed749a..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable/or_app_icon.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable/or_logo.png b/console/android/GenericApp/app/src/main/res/drawable/or_logo.pngdeleted file mode 100644index d7154867e..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable/or_logo.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable/or_push_icon.png b/console/android/GenericApp/app/src/main/res/drawable/or_push_icon.pngdeleted file mode 100644index e1020884e..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable/or_push_icon.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable/or_splash.png b/console/android/GenericApp/app/src/main/res/drawable/or_splash.pngdeleted file mode 100644index 0464d21b3..000000000Binary files a/console/android/GenericApp/app/src/main/res/drawable/or_splash.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/drawable/rounded_corner.xml b/console/android/GenericApp/app/src/main/res/drawable/rounded_corner.xmldeleted file mode 100644index ba949aa93..000000000--- a/console/android/GenericApp/app/src/main/res/drawable/rounded_corner.xml+++ /dev/null@@ -1,5 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<shape xmlns:android="http://schemas.android.com/apk/res/android">- <corners android:radius="10dp"/>- <solid android:color="@color/medium_green"></solid>-</shape>diff --git a/console/android/GenericApp/app/src/main/res/layout/activity_main.xml b/console/android/GenericApp/app/src/main/res/layout/activity_main.xmldeleted file mode 100644index 15488598e..000000000--- a/console/android/GenericApp/app/src/main/res/layout/activity_main.xml+++ /dev/null@@ -1,32 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:tools="http://schemas.android.com/tools"- android:id="@+id/activity_web"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:clipChildren="false"- android:clipToPadding="false"- android:padding="0dp"- tools:context="io.openremote.orlib.ui.MainActivity">-- <WebView- android:id="@+id/webView"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_alignParentStart="true"- android:layout_alignParentEnd="true">- </WebView>-- <ProgressBar- android:id="@+id/webProgressBar"- style="?android:attr/progressBarStyleHorizontal"- android:layout_width="match_parent"- android:layout_height="wrap_content"- android:layout_alignParentTop="true"- android:layout_marginTop="-7dp"- android:background="@android:color/transparent"- android:indeterminate="false"- android:max="100"- android:progress="1"/>--</RelativeLayout>diff --git a/console/android/GenericApp/app/src/main/res/layout/activity_privacy_policy.xml b/console/android/GenericApp/app/src/main/res/layout/activity_privacy_policy.xmldeleted file mode 100644index 7378056e3..000000000--- a/console/android/GenericApp/app/src/main/res/layout/activity_privacy_policy.xml+++ /dev/null@@ -1,56 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- tools:context="io.openremote.orlib.ui.OrPrivacyPolicyActivity">-- <WebView- android:id="@+id/webView"- android:layout_width="match_parent"- android:layout_height="0dp"- app:layout_constraintBottom_toTopOf="@id/acceptView"- app:layout_constraintTop_toTopOf="parent" />-- <androidx.constraintlayout.widget.ConstraintLayout- android:id="@+id/acceptView"- android:layout_width="0dp"- android:layout_height="wrap_content"- android:orientation="horizontal"- android:layout_margin="10dp"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintLeft_toLeftOf="parent"- app:layout_constraintRight_toRightOf="parent"- app:layout_constraintTop_toBottomOf="@+id/webView"- >-- <CheckBox- android:id="@+id/checkbox"- android:layout_width="50dp"- android:layout_height="50dp"- android:button="@null"- android:textColor="@color/medium_green"- android:background="?android:attr/listChoiceIndicatorMultiple"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toStartOf="@+id/button_accept"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent" />-- <Button- android:id="@+id/button_accept"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_gravity="end"- android:background="@color/medium_green"- android:minWidth="300dp"- android:text="@string/button_accept"- android:textColor="@color/white"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintTop_toTopOf="parent"- android:enabled="false"/>-- </androidx.constraintlayout.widget.ConstraintLayout>--</androidx.constraintlayout.widget.ConstraintLayout>\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/res/layout/activity_project_list.xml b/console/android/GenericApp/app/src/main/res/layout/activity_project_list.xmldeleted file mode 100644index aa8184a8a..000000000--- a/console/android/GenericApp/app/src/main/res/layout/activity_project_list.xml+++ /dev/null@@ -1,38 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- tools:context=".ui.ProjectListActivity">-- <com.google.android.material.appbar.AppBarLayout- android:id="@+id/app_bar"- android:layout_width="0dp"- android:layout_height="wrap_content"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent">-- <androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"- android:id="@+id/settings_toolbar"- android:layout_width="match_parent"- android:layout_height="?actionBarSize"- android:background="@color/bright_grey">-- <ImageView- android:layout_width="180dp"- android:layout_height="36dp"- android:src="@drawable/ic_logo_full_no_text_colour" />-- </androidx.appcompat.widget.Toolbar>- </com.google.android.material.appbar.AppBarLayout>-- <androidx.recyclerview.widget.RecyclerView- android:id="@+id/projectList"- android:layout_width="match_parent"- android:layout_height="0dp"- app:layout_constraintTop_toBottomOf="@+id/app_bar"- tools:listitem="@layout/row_project_item" />--</androidx.constraintlayout.widget.ConstraintLayout>diff --git a/console/android/GenericApp/app/src/main/res/layout/activity_project_wizard.xml b/console/android/GenericApp/app/src/main/res/layout/activity_project_wizard.xmldeleted file mode 100644index 348aa69e1..000000000--- a/console/android/GenericApp/app/src/main/res/layout/activity_project_wizard.xml+++ /dev/null@@ -1,57 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:background="@color/bright_grey"- android:padding="@dimen/box_inset_layout_padding"- tools:context=".ui.ProjectWizardActivity"- tools:deviceIds="wear">-- <LinearLayout- android:id="@+id/imageView"- android:layout_width="match_parent"- android:layout_height="wrap_content"- android:paddingTop="24dp"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent">-- <ImageView- android:id="@+id/image"- android:layout_width="48dp"- android:layout_height="48dp"- android:layout_marginStart="24dp"- android:layout_marginEnd="24dp"- android:src="@drawable/or_splash" />-- <TextView- android:layout_width="wrap_content"- android:layout_height="match_parent"- android:text="@string/connect_to_app"- android:gravity="center_vertical"- android:textSize="24sp" />-- </LinearLayout>- <androidx.fragment.app.FragmentContainerView- android:id="@+id/fragmentContainer"- android:layout_width="match_parent"- android:layout_height="0dp"- android:layout_marginTop="24dp"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintTop_toBottomOf="@+id/imageView" />-- <ProgressBar- android:id="@+id/progressBar"- style="@style/Widget.AppCompat.ProgressBar"- android:layout_width="48dp"- android:layout_height="wrap_content"- android:layout_alignParentTop="true"- android:background="@android:color/transparent"- android:visibility="invisible"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent" />--</androidx.constraintlayout.widget.ConstraintLayout>diff --git a/console/android/GenericApp/app/src/main/res/layout/activity_splash.xml b/console/android/GenericApp/app/src/main/res/layout/activity_splash.xmldeleted file mode 100644index 846f5ac49..000000000--- a/console/android/GenericApp/app/src/main/res/layout/activity_splash.xml+++ /dev/null@@ -1,9 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:background="@color/white"- android:padding="@dimen/box_inset_layout_padding"- tools:context=".ui.SplashActivity"- tools:deviceIds="wear"/>\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/res/layout/fragment_app_selection.xml b/console/android/GenericApp/app/src/main/res/layout/fragment_app_selection.xmldeleted file mode 100644index 21ee459b2..000000000--- a/console/android/GenericApp/app/src/main/res/layout/fragment_app_selection.xml+++ /dev/null@@ -1,151 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- tools:context=".ui.HostSelectionFragment">-- <androidx.cardview.widget.CardView- android:id="@+id/card_view"- android:layout_width="match_parent"- android:layout_height="wrap_content"- android:layout_marginStart="24dp"- android:layout_marginEnd="24dp"- app:cardCornerRadius="8dp"- app:cardElevation="0dp"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent">-- <androidx.constraintlayout.widget.ConstraintLayout- android:layout_width="match_parent"- android:layout_height="match_parent">-- <TextView- android:id="@+id/input_title"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_marginStart="10dp"- android:layout_marginTop="10dp"- android:text="@string/select_an_app"- android:textStyle="bold"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent" />-- <androidx.cardview.widget.CardView- android:id="@+id/error_view"- android:layout_width="0dp"- android:layout_height="wrap_content"- android:layout_marginTop="7dp"- android:layout_marginBottom="7dp"- android:visibility="gone"- app:cardBackgroundColor="@color/error_red_background"- app:cardCornerRadius="8dp"- app:cardElevation="0dp"- app:layout_constraintBottom_toTopOf="@+id/input_barrier"- app:layout_constraintEnd_toEndOf="@id/next_button"- app:layout_constraintStart_toStartOf="@id/input_title"- app:layout_constraintTop_toBottomOf="@+id/input_title">-- <LinearLayout- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_gravity="center_vertical"- android:padding="14dp">-- <ImageView- android:layout_width="36dp"- android:layout_height="36dp"- android:layout_gravity="center_vertical"- android:src="@drawable/ic_alert_circle" />-- <TextView- android:id="@+id/error_text_view"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_marginStart="10dp"- android:gravity="center_vertical"- android:text="@string/could_not_connect_to_domain"- android:textColor="@color/error_red_text"- android:textSize="16sp"- android:textStyle="bold" />- </LinearLayout>-- </androidx.cardview.widget.CardView>-- <androidx.constraintlayout.widget.Barrier- android:id="@+id/input_barrier"- android:layout_width="0dp"- android:layout_height="0dp"- app:barrierDirection="bottom"- app:constraint_referenced_ids="app_spinner, app_input_layout"- app:layout_constraintEnd_toEndOf="@+id/next_button"- app:layout_constraintStart_toStartOf="@+id/input_title"- app:layout_constraintTop_toBottomOf="@id/error_view" />-- <Spinner- android:id="@+id/app_spinner"- android:layout_width="0dp"- android:layout_height="60dp"- android:layout_marginTop="14dp"- android:background="@color/bright_grey"- android:visibility="gone"- app:layout_constraintEnd_toEndOf="@+id/next_button"- app:layout_constraintStart_toStartOf="@+id/input_title"- app:layout_constraintTop_toBottomOf="@id/error_view" />-- <com.google.android.material.textfield.TextInputLayout- android:id="@+id/app_input_layout"- android:layout_width="0dp"- android:layout_height="wrap_content"- android:layout_marginTop="14dp"- android:background="@color/bright_grey"- android:hint="@string/app"- android:padding="5dp"- android:visibility="gone"- app:layout_constraintEnd_toEndOf="@id/next_button"- app:layout_constraintStart_toStartOf="@id/input_title"- app:layout_constraintTop_toBottomOf="@id/error_view">-- <com.google.android.material.textfield.TextInputEditText- android:id="@+id/app_input"- android:layout_width="match_parent"- android:layout_height="40dp"- android:singleLine="true" />- </com.google.android.material.textfield.TextInputLayout>-- <Button- android:id="@+id/next_button"- android:layout_width="100dp"- android:layout_height="wrap_content"- android:layout_marginTop="14dp"- android:layout_marginEnd="14dp"- android:layout_marginBottom="14dp"- android:background="@drawable/rounded_corner"- android:text="@string/next"- android:textColor="@color/white"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintTop_toBottomOf="@+id/input_barrier" />-- <Button- android:id="@+id/back_button"- style="?android:attr/borderlessButtonStyle"- android:layout_width="100dp"- android:layout_height="wrap_content"- android:layout_marginStart="14dp"- android:layout_marginTop="14dp"- android:layout_marginBottom="14dp"- android:background="@color/white"- android:text="@string/back"- android:textColor="@color/medium_grey"- android:textStyle="bold"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toBottomOf="@+id/input_barrier" />- </androidx.constraintlayout.widget.ConstraintLayout>- </androidx.cardview.widget.CardView>--</androidx.constraintlayout.widget.ConstraintLayout>-diff --git a/console/android/GenericApp/app/src/main/res/layout/fragment_host_selection.xml b/console/android/GenericApp/app/src/main/res/layout/fragment_host_selection.xmldeleted file mode 100644index f1e81bb36..000000000--- a/console/android/GenericApp/app/src/main/res/layout/fragment_host_selection.xml+++ /dev/null@@ -1,132 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- tools:context=".ui.HostSelectionFragment">-- <androidx.cardview.widget.CardView- android:id="@+id/card_view"- android:layout_width="match_parent"- android:layout_height="wrap_content"- android:layout_marginStart="24dp"- android:layout_marginEnd="24dp"- app:cardCornerRadius="8dp"- app:cardElevation="0dp"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent">-- <androidx.constraintlayout.widget.ConstraintLayout- android:layout_width="match_parent"- android:layout_height="match_parent">-- <TextView- android:id="@+id/input_title"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_marginStart="10dp"- android:layout_marginTop="10dp"- android:text="@string/enter_app_domain"- android:textStyle="bold"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent" />-- <androidx.cardview.widget.CardView- android:id="@+id/error_view"- android:layout_width="0dp"- android:layout_height="80dp"- android:layout_marginTop="7dp"- android:layout_marginBottom="7dp"- android:visibility="gone"- app:cardBackgroundColor="@color/error_red_background"- app:cardCornerRadius="8dp"- app:cardElevation="0dp"- app:layout_constraintBottom_toTopOf="@+id/project_input_layout"- app:layout_constraintEnd_toEndOf="@id/project_input_layout"- app:layout_constraintStart_toStartOf="@id/input_title"- app:layout_constraintTop_toBottomOf="@+id/input_title">-- <LinearLayout- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_gravity="center_vertical"- android:padding="14dp">-- <ImageView- android:layout_width="36dp"- android:layout_height="36dp"- android:layout_gravity="center_vertical"- android:src="@drawable/ic_alert_circle" />-- <TextView- android:id="@+id/error_text_view"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_marginStart="10dp"- android:gravity="center_vertical"- android:text="@string/could_not_connect_to_domain"- android:textColor="@color/error_red_text"- android:textSize="16sp"- android:textStyle="bold" />- </LinearLayout>-- </androidx.cardview.widget.CardView>-- <com.google.android.material.textfield.TextInputLayout- android:id="@+id/project_input_layout"- android:layout_width="0dp"- android:layout_height="wrap_content"- android:layout_marginTop="14dp"- android:background="@color/bright_grey"- android:hint="@string/domain"- android:padding="5dp"- app:boxCornerRadiusBottomEnd="8dp"- app:boxCornerRadiusBottomStart="8dp"- app:boxCornerRadiusTopEnd="8dp"- app:boxCornerRadiusTopStart="8dp"- app:layout_constraintEnd_toEndOf="@id/connect_button"- app:layout_constraintStart_toStartOf="@+id/input_title"- app:layout_constraintTop_toBottomOf="@id/error_view">-- <com.google.android.material.textfield.TextInputEditText- android:id="@+id/host_input"- android:layout_width="match_parent"- android:layout_height="40dp"- android:singleLine="true" />- </com.google.android.material.textfield.TextInputLayout>-- <Button- android:id="@+id/connect_button"- android:layout_width="100dp"- android:layout_height="wrap_content"- android:layout_marginTop="14dp"- android:layout_marginEnd="14dp"- android:layout_marginBottom="14dp"- android:background="@drawable/rounded_corner"- android:text="@string/next"- android:textColor="@color/white"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintTop_toBottomOf="@+id/project_input_layout" />-- <Button- android:id="@+id/back_button"- style="?android:attr/borderlessButtonStyle"- android:layout_width="100dp"- android:layout_height="wrap_content"- android:layout_marginStart="14dp"- android:layout_marginTop="14dp"- android:layout_marginBottom="14dp"- android:background="@color/white"- android:text="@string/back"- android:textColor="@color/medium_grey"- android:textStyle="bold"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toBottomOf="@+id/project_input_layout" />- </androidx.constraintlayout.widget.ConstraintLayout>- </androidx.cardview.widget.CardView>--</androidx.constraintlayout.widget.ConstraintLayout>diff --git a/console/android/GenericApp/app/src/main/res/layout/fragment_realm_selection.xml b/console/android/GenericApp/app/src/main/res/layout/fragment_realm_selection.xmldeleted file mode 100644index 453c99097..000000000--- a/console/android/GenericApp/app/src/main/res/layout/fragment_realm_selection.xml+++ /dev/null@@ -1,150 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- tools:context=".ui.HostSelectionFragment">-- <androidx.cardview.widget.CardView- android:id="@+id/card_view"- android:layout_width="match_parent"- android:layout_height="wrap_content"- android:layout_marginStart="24dp"- android:layout_marginEnd="24dp"- app:cardCornerRadius="8dp"- app:cardElevation="0dp"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent">-- <androidx.constraintlayout.widget.ConstraintLayout- android:layout_width="match_parent"- android:layout_height="match_parent">-- <TextView- android:id="@+id/input_title"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_marginStart="10dp"- android:layout_marginTop="10dp"- android:text="@string/select_the_realm"- android:textStyle="bold"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent" />-- <androidx.cardview.widget.CardView- android:id="@+id/error_view"- android:layout_width="0dp"- android:layout_height="80dp"- android:layout_marginTop="7dp"- android:layout_marginBottom="7dp"- android:visibility="gone"- app:cardBackgroundColor="@color/error_red_background"- app:cardCornerRadius="8dp"- app:cardElevation="0dp"- app:layout_constraintBottom_toTopOf="@+id/input_barrier"- app:layout_constraintEnd_toEndOf="@id/finish_button"- app:layout_constraintStart_toStartOf="@id/input_title"- app:layout_constraintTop_toBottomOf="@+id/input_title">-- <LinearLayout- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_gravity="center_vertical"- android:padding="14dp">-- <ImageView- android:layout_width="36dp"- android:layout_height="36dp"- android:layout_gravity="center_vertical"- android:src="@drawable/ic_alert_circle" />-- <TextView- android:id="@+id/error_text_view"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_marginStart="10dp"- android:gravity="center_vertical"- android:text="@string/could_not_connect_to_domain"- android:textColor="@color/error_red_text"- android:textSize="16sp"- android:textStyle="bold" />- </LinearLayout>-- </androidx.cardview.widget.CardView>-- <androidx.constraintlayout.widget.Barrier- android:id="@+id/input_barrier"- android:layout_width="0dp"- android:layout_height="0dp"- app:barrierDirection="bottom"- app:constraint_referenced_ids="realm_spinner, realm_input_layout"- app:layout_constraintEnd_toEndOf="@+id/finish_button"- app:layout_constraintStart_toStartOf="@+id/input_title"- app:layout_constraintTop_toBottomOf="@id/error_view" />-- <Spinner- android:id="@+id/realm_spinner"- android:layout_width="0dp"- android:layout_height="60dp"- android:layout_marginTop="14dp"- android:background="@color/bright_grey"- android:visibility="gone"- app:layout_constraintEnd_toEndOf="@+id/finish_button"- app:layout_constraintStart_toStartOf="@+id/input_title"- app:layout_constraintTop_toBottomOf="@id/error_view" />-- <com.google.android.material.textfield.TextInputLayout- android:id="@+id/realm_input_layout"- android:layout_width="0dp"- android:layout_height="wrap_content"- android:layout_marginTop="14dp"- android:background="@color/bright_grey"- android:hint="@string/realm"- android:padding="5dp"- android:visibility="gone"- app:layout_constraintEnd_toEndOf="@id/finish_button"- app:layout_constraintStart_toStartOf="@id/input_title"- app:layout_constraintTop_toBottomOf="@id/error_view">-- <com.google.android.material.textfield.TextInputEditText- android:id="@+id/realm_input"- android:layout_width="match_parent"- android:layout_height="40dp"- android:singleLine="true" />- </com.google.android.material.textfield.TextInputLayout>-- <Button- android:id="@+id/finish_button"- android:layout_width="100dp"- android:layout_height="wrap_content"- android:layout_marginTop="14dp"- android:layout_marginEnd="14dp"- android:layout_marginBottom="14dp"- android:background="@drawable/rounded_corner"- android:text="@string/finish"- android:textColor="@color/white"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintTop_toBottomOf="@+id/input_barrier" />-- <Button- android:id="@+id/back_button"- style="?android:attr/borderlessButtonStyle"- android:layout_width="100dp"- android:layout_height="wrap_content"- android:layout_marginStart="14dp"- android:layout_marginTop="14dp"- android:layout_marginBottom="14dp"- android:background="@color/white"- android:text="@string/back"- android:textColor="@color/medium_grey"- android:textStyle="bold"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toBottomOf="@+id/input_barrier" />- </androidx.constraintlayout.widget.ConstraintLayout>- </androidx.cardview.widget.CardView>--</androidx.constraintlayout.widget.ConstraintLayout>diff --git a/console/android/GenericApp/app/src/main/res/layout/menu_item.xml b/console/android/GenericApp/app/src/main/res/layout/menu_item.xmldeleted file mode 100644index 8043f1d91..000000000--- a/console/android/GenericApp/app/src/main/res/layout/menu_item.xml+++ /dev/null@@ -1,28 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:clickable="true">-- <LinearLayout- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:background="@drawable/action_item_border">-- <ImageView- android:id="@+id/imageViewEdit"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:src="@drawable/ic_plus_green" />-- <TextView- android:id="@+id/tvEdit"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_gravity="center_vertical"- android:layout_marginStart="5dp"- android:text="@string/add"- android:textColor="@color/medium_green"- android:textStyle="bold" />- </LinearLayout>-</LinearLayout>diff --git a/console/android/GenericApp/app/src/main/res/layout/row_project_item.xml b/console/android/GenericApp/app/src/main/res/layout/row_project_item.xmldeleted file mode 100644index 675eb909d..000000000--- a/console/android/GenericApp/app/src/main/res/layout/row_project_item.xml+++ /dev/null@@ -1,42 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- android:layout_width="match_parent"- android:layout_height="wrap_content"- app:cardElevation="3dp"- android:elevation="3dp">- <androidx.constraintlayout.widget.ConstraintLayout- android:layout_width="match_parent"- android:layout_height="wrap_content">- <TextView- android:id="@+id/host"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_marginTop="12dp"- android:layout_marginStart="12dp"- android:textStyle="bold"- android:text="host"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent" />-- <TextView- android:id="@+id/app"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_marginStart="12dp"- android:layout_marginBottom="12dp"- android:text="app"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toBottomOf="@id/host" />-- <TextView- android:id="@+id/realm"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_marginStart="12dp"- android:paddingBottom="12dp"- android:text="realm"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toBottomOf="@id/app" />- </androidx.constraintlayout.widget.ConstraintLayout>-</androidx.cardview.widget.CardView>diff --git a/console/android/GenericApp/app/src/main/res/menu/projects_menu.xml b/console/android/GenericApp/app/src/main/res/menu/projects_menu.xmldeleted file mode 100644index 007d0ddc6..000000000--- a/console/android/GenericApp/app/src/main/res/menu/projects_menu.xml+++ /dev/null@@ -1,13 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<menu xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto">-- <item- android:id="@+id/add"- app:actionLayout="@layout/menu_item"- android:title="@string/add"- app:showAsAction="always">- </item>-</menu>--diff --git a/console/android/GenericApp/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/console/android/GenericApp/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.pngdeleted file mode 100644index f4648418e..000000000Binary files a/console/android/GenericApp/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/console/android/GenericApp/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.pngdeleted file mode 100644index 34d62333b..000000000Binary files a/console/android/GenericApp/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/console/android/GenericApp/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.pngdeleted file mode 100644index eadf4e618..000000000Binary files a/console/android/GenericApp/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/console/android/GenericApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.pngdeleted file mode 100644index c4f34f813..000000000Binary files a/console/android/GenericApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/console/android/GenericApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.pngdeleted file mode 100644index d854c0f84..000000000Binary files a/console/android/GenericApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/console/android/GenericApp/app/src/main/res/values/colors.xml b/console/android/GenericApp/app/src/main/res/values/colors.xmldeleted file mode 100644index ab22ee284..000000000--- a/console/android/GenericApp/app/src/main/res/values/colors.xml+++ /dev/null@@ -1,22 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <item name="black" type="color">#ff000000</item>- <item name="white" type="color">#ffffffff</item>-- <item name="dark_grey" type="color">#ff455a64</item>- <item name="medium_grey" type="color">#ff919194</item>- <item name="light_grey" type="color">#ffcccccc</item>- <item name="bright_grey" type="color">#fff5f5f5</item>-- <item name="dark_green" type="color">#ff006224</item>- <item name="medium_green" type="color">#ff49a942</item>- <item name="light_green" type="color">#ffc1d72f</item>-- <item name="error_red_background" type="color">#FFE4E4</item>- <item name="error_red_text" type="color">#A07171</item>-- <item name="red" type="color">#ffe64a19</item>- <item name="yellow" type="color">#fffbc02d</item>- <item name="blue" type="color">#ff1976d2</item>- <item name="purple" type="color">#ff660092</item>-</resources>diff --git a/console/android/GenericApp/app/src/main/res/values/dimens.xml b/console/android/GenericApp/app/src/main/res/values/dimens.xmldeleted file mode 100644index 1a7ba4a1a..000000000--- a/console/android/GenericApp/app/src/main/res/values/dimens.xml+++ /dev/null@@ -1,15 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <!--- Because the window insets on round devices are larger than 15dp, this padding only applies- to square screens.- -->- <dimen name="box_inset_layout_padding">0dp</dimen>-- <!--- This padding applies to both square and round screens. The total padding between the buttons- and the window insets is box_inset_layout_padding (above variable) on square screens and- inner_frame_layout_padding (below variable) on round screens.- -->- <dimen name="inner_frame_layout_padding">5dp</dimen>-</resources>\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/res/values/ic_launcher_background.xml b/console/android/GenericApp/app/src/main/res/values/ic_launcher_background.xmldeleted file mode 100644index c5d5899fd..000000000--- a/console/android/GenericApp/app/src/main/res/values/ic_launcher_background.xml+++ /dev/null@@ -1,4 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <color name="ic_launcher_background">#FFFFFF</color>-</resources>\ No newline at end of filediff --git a/console/android/GenericApp/app/src/main/res/values/strings.xml b/console/android/GenericApp/app/src/main/res/values/strings.xmldeleted file mode 100644index 9bdc0fdf9..000000000--- a/console/android/GenericApp/app/src/main/res/values/strings.xml+++ /dev/null@@ -1,44 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <string name="app_name">OpenRemote</string>- <string name="title_activity_project">Project</string>- <string name="Project">Project</string>- <string name="Settings">Settings</string>- <string name="OR_CONSOLE_LOAD_ERROR_URL"></string>- <string name="OR_CONSOLE_LOAD_TIMEOUT">5000</string>- <string name="OR_CONSOLE_IGNORE_PAGE_ERRORS">true</string>- <string name="SHARED_PREF_REFRESH_TOKEN">REFRESH_TOKEN</string>- <string name="fatalError">Sorry, there is a problem.</string>- <string name="fatalErrorExplain">The service is not available, please try again later.</string>- <string name="httpError">Invalid response from service.</string>- <string name="httpErrorExplain">Can\'t connect to service.</string>- <string name="downloading_file">Downloading File</string>- <string name="downloading_enabled">Downloading enabled</string>- <string name="error_downloading">Error downloading file</string>- <string name="download_completed">Download completed</string>- <string name="background_location_alert_title">Background location needed</string>- <string name="background_location_alert_body">In order to receive these notifications when the app is running in the background, background location access is needed.\nNo location history is stored, only the latest location is saved.\nDo you want to enabled it in the settings?</string>- <string name="location_background_disabled_title">Background location disabled</string>- <string name="background_location_decline">No</string>- <string name="background_location_accept">Yes</string>- <string name="button_accept">Accept</string>- <string name="domain">Domain</string>- <string name="next">Next</string>- <string name="back">Back</string>- <string name="connect_to_app">Connect to your app</string>- <string name="enter_app_domain">ENTER THE APP DOMAIN</string>- <string name="could_not_connect_to_domain">Could not connect to domain.\nPlease verify address.</string>- <string name="select_an_app">SELECT AN APP</string>- <string name="app">App</string>- <string name="select_the_realm">SELECT THE REALM</string>- <string name="realm">Realm</string>- <string name="finish">Finish</string>- <!-- TODO: Remove or change this placeholder text -->- <string name="hello_blank_fragment">Hello blank fragment</string>- <string name="select_app_first">Select app first</string>- <string name="error_getting_app_info">Error getting app info</string>- <string name="select_realm_first">Select realm first</string>- <string name="app_incompatible">Console app isn\'t compatible with the Generic OR app</string>- <string name="no_apps_found">No apps found on this domain</string>- <string name="add">ADD</string>-</resources>diff --git a/console/android/GenericApp/app/src/main/res/values/styles.xml b/console/android/GenericApp/app/src/main/res/values/styles.xmldeleted file mode 100644index 1384d75d6..000000000--- a/console/android/GenericApp/app/src/main/res/values/styles.xml+++ /dev/null@@ -1,17 +0,0 @@-<resources>-- <style name="OpenRemoteTheme" parent="Theme.AppCompat.Light.NoActionBar">- <item name="android:actionMenuTextColor">@color/dark_grey</item>- <item name="colorPrimary">@color/medium_green</item>- <item name="colorPrimaryDark">@color/dark_green</item>- <item name="colorAccent">@color/light_green</item>- </style>-- <style name="OpenRemoteThemeWithBar" parent="Theme.AppCompat.Light">- <item name="android:actionMenuTextColor">@color/dark_grey</item>- <item name="colorPrimary">@color/medium_green</item>- <item name="colorPrimaryDark">@color/dark_green</item>- <item name="colorAccent">@color/light_green</item>- </style>--</resources>diff --git a/console/android/GenericApp/app/src/main/res/xml/shortcuts.xml b/console/android/GenericApp/app/src/main/res/xml/shortcuts.xmldeleted file mode 100644index e4c53f28a..000000000--- a/console/android/GenericApp/app/src/main/res/xml/shortcuts.xml+++ /dev/null@@ -1,15 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">-- <shortcut- android:enabled="true"- android:icon="@drawable/cog"- android:shortcutId="project"- android:shortcutShortLabel="@string/Settings">- <intent- android:action="android.intent.action.VIEW"- android:targetClass="io.openremote.app.ui.ProjectListActivity"- android:targetPackage="io.openremote.app" />- </shortcut>--</shortcuts>diff --git a/console/android/GenericApp/build.gradle b/console/android/GenericApp/build.gradledeleted file mode 100644index cb89810e5..000000000--- a/console/android/GenericApp/build.gradle+++ /dev/null@@ -1,26 +0,0 @@-// Top-level build file where you can add configuration options common to all sub-projects/modules.-buildscript {- ext.kotlin_version = "1.8.0"- repositories {- google()- jcenter()- }- dependencies {- classpath 'com.android.tools.build:gradle:8.1.1'- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"- classpath 'com.google.gms:google-services:4.3.15'- // NOTE: Do not place your application dependencies here; they belong- // in the individual module build.gradle files- }-}--allprojects {- repositories {- google()- jcenter()- }-}--task clean(type: Delete) {- delete rootProject.buildDir-}diff --git a/console/android/GenericApp/gradle.properties b/console/android/GenericApp/gradle.propertiesdeleted file mode 100644index ed9a04985..000000000--- a/console/android/GenericApp/gradle.properties+++ /dev/null@@ -1,24 +0,0 @@-# Project-wide Gradle settings.-# IDE (e.g. Android Studio) users:-# Gradle settings configured through the IDE *will override*-# any settings specified in this file.-# For more details on how to configure your build environment visit-# http://www.gradle.org/docs/current/userguide/build_environment.html-# Specifies the JVM arguments used for the daemon process.-# The setting is particularly useful for tweaking memory settings.-org.gradle.jvmargs=-Xmx2048m-# When configured, Gradle will run in incubating parallel mode.-# This option should only be used with decoupled projects. More details, visit-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects-# org.gradle.parallel=true-# AndroidX package structure to make it clearer which packages are bundled with the-# Android operating system, and which are packaged with your app"s APK-# https://developer.android.com/topic/libraries/support-library/androidx-rn-android.useAndroidX=true-# Automatically convert third-party libraries to use AndroidX-android.enableJetifier=true-# Kotlin code style for this project: "official" or "obsolete":-kotlin.code.style=official-android.defaults.buildfeatures.buildconfig=true-android.nonTransitiveRClass=false-android.nonFinalResIds=falsediff --git a/console/android/GenericApp/gradle/wrapper/gradle-wrapper.properties b/console/android/GenericApp/gradle/wrapper/gradle-wrapper.propertiesdeleted file mode 100644index 872747e41..000000000--- a/console/android/GenericApp/gradle/wrapper/gradle-wrapper.properties+++ /dev/null@@ -1,6 +0,0 @@-#Mon Jan 24 13:58:21 CET 2022-distributionBase=GRADLE_USER_HOME-distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip-distributionPath=wrapper/dists-zipStorePath=wrapper/dists-zipStoreBase=GRADLE_USER_HOMEdiff --git a/console/android/GenericApp/settings.gradle b/console/android/GenericApp/settings.gradledeleted file mode 100644index 030188e83..000000000--- a/console/android/GenericApp/settings.gradle+++ /dev/null@@ -1,4 +0,0 @@-include ':app'-rootProject.name = "GenericApp"-include ':ORLib'-project(':ORLib').projectDir = file('../ORLib')diff --git a/console/android/ORLib/.buildignore b/console/android/ORLib/.buildignoredeleted file mode 100644index 5322bb279..000000000--- a/console/android/ORLib/.buildignore+++ /dev/null@@ -1 +0,0 @@-# Ignore this project in composite/superproject build\ No newline at end of filediff --git a/console/android/ORLib/.gitignore b/console/android/ORLib/.gitignoredeleted file mode 100644index 42afabfd2..000000000--- a/console/android/ORLib/.gitignore+++ /dev/null@@ -1 +0,0 @@-/build\ No newline at end of filediff --git a/console/android/ORLib/build.gradle b/console/android/ORLib/build.gradledeleted file mode 100644index e0415f474..000000000--- a/console/android/ORLib/build.gradle+++ /dev/null@@ -1,55 +0,0 @@-plugins {- id 'com.android.library'- id 'kotlin-android'- id 'org.jetbrains.kotlin.android'-}--android {- namespace 'io.openremote.orlib'-- defaultConfig {- minSdkVersion 25- compileSdk 33- targetSdkVersion 33- versionCode 1- versionName "1.0"-- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"- consumerProguardFiles "consumer-rules.pro"- }-- buildTypes {- staging {- minifyEnabled false- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'- }- release {- minifyEnabled false- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'- }- }- buildFeatures {- viewBinding true- }- compileOptions {- sourceCompatibility JavaVersion.VERSION_17- targetCompatibility JavaVersion.VERSION_17- }- kotlinOptions {- jvmTarget = '17'- }-}--dependencies {-- implementation 'androidx.core:core-ktx:1.10.1'- implementation 'androidx.appcompat:appcompat:1.6.1'- implementation 'com.google.android.material:material:1.9.0'- implementation 'androidx.preference:preference-ktx:1.2.1'- implementation "com.google.android.gms:play-services-location:21.0.1"- implementation 'com.google.android.gms:play-services-vision:20.1.3'- implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1"- implementation platform('com.google.firebase:firebase-bom:32.2.0')- implementation 'com.google.firebase:firebase-messaging-ktx'- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'-}diff --git a/console/android/ORLib/consumer-rules.pro b/console/android/ORLib/consumer-rules.prodeleted file mode 100644index e69de29bb..000000000diff --git a/console/android/ORLib/proguard-rules.pro b/console/android/ORLib/proguard-rules.prodeleted file mode 100644index 481bb4348..000000000--- a/console/android/ORLib/proguard-rules.pro+++ /dev/null@@ -1,21 +0,0 @@-# Add project specific ProGuard rules here.-# You can control the set of applied configuration files using the-# proguardFiles setting in build.gradle.-#-# For more details, see-# http://developer.android.com/guide/developing/tools/proguard.html--# If your project uses WebView with JS, uncomment the following-# and specify the fully qualified class name to the JavaScript interface-# class:-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {-# public *;-#}--# Uncomment this to preserve the line number information for-# debugging stack traces.-#-keepattributes SourceFile,LineNumberTable--# If you keep the line number information, uncomment this to-# hide the original source file name.-#-renamesourcefileattribute SourceFile\ No newline at end of filediff --git a/console/android/ORLib/src/main/AndroidManifest.xml b/console/android/ORLib/src/main/AndroidManifest.xmldeleted file mode 100644index 7d159ce09..000000000--- a/console/android/ORLib/src/main/AndroidManifest.xml+++ /dev/null@@ -1,9 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<manifest xmlns:android="http://schemas.android.com/apk/res/android"- package="io.openremote.orlib">-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />- <uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS" />- <uses-permission android:name="android.permission.CAMERA" />-</manifest>diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/ORConstants.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/ORConstants.ktdeleted file mode 100644index eb0928f6a..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/ORConstants.kt+++ /dev/null@@ -1,15 +0,0 @@-package io.openremote.orlib--object ORConstants {- const val WRITE_PERMISSION_FOR_DOWNLOAD = 999- const val WRITE_PERMISSION_FOR_LOGGING = 1000- const val WEBVIEW_LOAD_TIMEOUT_DEFAULT = 5000- const val ACTION_BROADCAST = "ACTION_BROADCAST"- const val PUSH_PROVIDER_DISABLED_KEY = "PushProviderDisabled"- const val CONSOLE_ID_KEY = "consoleId"- const val BASE_URL_KEY = "BASE_URL_KEY"- const val HOST_KEY = "host"- const val REALM_KEY = "realm"- const val CLEAR_URL = "CLEAR_URL"- const val APP_CONFIG_KEY = "APP_CONFIG_KEY"-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAlertAction.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAlertAction.ktdeleted file mode 100644index 8a7c12289..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAlertAction.kt+++ /dev/null@@ -1,9 +0,0 @@-package io.openremote.orlib.models--data class ORAlertAction(- val url: String,- val httpMethod: String = "GET",- val data: Map<String, Any>?,- val silent: Boolean = false,- val openInBrowser: Boolean = false-)\ No newline at end of filediff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAlertButton.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAlertButton.ktdeleted file mode 100644index 6414e0d83..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAlertButton.kt+++ /dev/null@@ -1,6 +0,0 @@-package io.openremote.orlib.models--data class ORAlertButton(- val title: String,- val action: ORAlertAction?-)\ No newline at end of filediff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAppConfig.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAppConfig.ktdeleted file mode 100644index 0b26f336e..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORAppConfig.kt+++ /dev/null@@ -1,14 +0,0 @@-package io.openremote.orlib.models--data class ORAppConfig(- val id: Int,- val realm: String,- val initialUrl: String,- val url: String,- val menuEnabled: Boolean = false,- val menuPosition: String = "BOTTOM_LEFT",- val menuImage: String?,- val primaryColor: String?,- val secondaryColor: String?,- val links: List<ORLinkConfig>?-)\ No newline at end of filediff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORLinkConfig.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORLinkConfig.ktdeleted file mode 100644index 2ebe298c3..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/models/ORLinkConfig.kt+++ /dev/null@@ -1,6 +0,0 @@-package io.openremote.orlib.models--data class ORLinkConfig(- val displayText: String,- val pageLink: String-)\ No newline at end of filediff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/BleProvider.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/BleProvider.ktdeleted file mode 100644index 0a044c874..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/BleProvider.kt+++ /dev/null@@ -1,538 +0,0 @@-package io.openremote.orlib.service--import android.Manifest-import android.annotation.SuppressLint-import android.app.Activity-import android.bluetooth.*-import android.bluetooth.le.ScanCallback-import android.content.Context-import android.content.Intent-import android.content.pm.PackageManager-import android.os.Build-import android.os.Handler-import android.util.Log-import androidx.core.app.ActivityCompat-import io.openremote.orlib.R-import java.util.*--class BleProvider(val context: Context) {- interface BleCallback {- fun accept(responseData: Map<String, Any>)- }-- companion object {- private const val bleDisabledKey = "bleDisabled"- private const val version = "ble"-- // BLE UUIDs according to- // https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Assigned_Numbers/out/en/Assigned_Numbers.pdf?v=1706541022964-- private val SERVICE_GENERIC_ACCESS = UUID.fromString("00001800-0000-1000-8000-00805f9b34fb")- private val SERVICE_GENERIC_ATTRIBUTE =- UUID.fromString("00001801-0000-1000-8000-00805f9b34fb")- private val CHARACTERISTIC_SERVICE_CHANGED =- UUID.fromString("00002a05-0000-1000-8000-00805f9b34fb")- private val CHARACTERISTIC_DEVICE_NAME =- UUID.fromString("00002a00-0000-1000-8000-00805f9b34fb")- private val CHARACTERISTIC_APPEARANCE =- UUID.fromString("00002a01-0000-1000-8000-00805f9b34fb")- private val CHARACTERISTIC_CENTRAL_ADDRESS_RESOLUTION =- UUID.fromString("00002aa6-0000-1000-8000-00805f9b34fb")- private val CHARACTERISTIC_DATABASE_HASH =- UUID.fromString("00002b2a-0000-1000-8000-00805f9b34fb")-- // This is the max MTU size supported by Android- private const val GATT_MAX_MTU_SIZE = 517-- const val ENABLE_BLUETOOTH_REQUEST_CODE = 555- const val BLUETOOTH_PERMISSION_REQUEST_CODE = 556- }-- private val bluetoothAdapter: BluetoothAdapter by lazy {- val bluetoothManager =- context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager- bluetoothManager.adapter- }- private val scanPeriod: Long = 3000- private var scanning = false- private val handler = Handler(context.mainLooper)- private val devices = mutableSetOf<BluetoothDevice>()- private var currentGatt: BluetoothGatt? = null- private val deviceCharacteristics = mutableListOf<BleAttribute>()- private var readableDeviceIndex = 0- private val scanCallback = object : ScanCallback() {- @SuppressLint("MissingPermission")- override fun onScanResult(callbackType: Int, result: android.bluetooth.le.ScanResult) {- super.onScanResult(callbackType, result)- Log.d("BleProvider", "onScanResult: ${result.device.name} - ${result.device.address}")- if (result.device != null && result.device.name != null) {- devices.add(result.device)- }- }- }- private var sendToDeviceCallback: BleCallback? = null-- fun initialize(): Map<String, Any> {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)-- return hashMapOf(- "action" to "PROVIDER_INIT",- "provider" to "ble",- "version" to version,- "requiresPermission" to true,- "hasPermission" to hasPermission(),- "success" to true,- "enabled" to false,- "disabled" to sharedPreferences.contains(bleDisabledKey)- )- }-- @SuppressLint("MissingPermission")- fun enable(callback: BleCallback?) {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)-- sharedPreferences.edit()- .remove(bleDisabledKey)- .apply()-- callback?.accept(- hashMapOf(- "action" to "PROVIDER_ENABLE",- "provider" to "ble",- "hasPermission" to hasPermission(),- "success" to true,- "enabled" to true,- "disabled" to sharedPreferences.contains(bleDisabledKey)- )- )- }-- fun disable(): Map<String, Any> {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)- sharedPreferences.edit()- .putBoolean(bleDisabledKey, true)- .apply()-- return hashMapOf(- "action" to "PROVIDER_DISABLE",- "provider" to "ble"- )- }-- @SuppressLint("MissingPermission")- fun onRequestPermissionsResult(- activity: Activity,- requestCode: Int,- bleCallback: BleCallback- ) {- if (requestCode == BLUETOOTH_PERMISSION_REQUEST_CODE) {- val hasPermission = hasPermission()- if (hasPermission) {- if (!bluetoothAdapter.isEnabled) {- val enableBtIntent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)- activity.startActivityForResult(enableBtIntent, ENABLE_BLUETOOTH_REQUEST_CODE)- } else {- scanLeDevice(bleCallback)- }- }- } else if (requestCode == ENABLE_BLUETOOTH_REQUEST_CODE) {- if (bluetoothAdapter.isEnabled) {- scanLeDevice(bleCallback)- }- }- }-- @SuppressLint("MissingPermission")- fun startBLEScan(activity: Activity, bleCallback: BleCallback) {- if (!bluetoothAdapter.isEnabled) {- val enableBtIntent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)- activity.startActivityForResult(enableBtIntent, ENABLE_BLUETOOTH_REQUEST_CODE)- } else if (!hasPermission()) {- requestPermissions(activity)- } else {- scanLeDevice(bleCallback)- }- }-- @SuppressLint("MissingPermission")- fun connectToDevice(address: String, bleCallback: BleCallback) {- currentGatt?.disconnect()- devices.find { it.address == address }?.let { device ->- device.connectGatt(context, false, object : BluetoothGattCallback() {- override fun onConnectionStateChange(- gatt: BluetoothGatt,- status: Int,- newState: Int- ) {- val deviceAddress = gatt.device.address-- if (status == BluetoothGatt.GATT_SUCCESS) {- currentGatt = gatt- readableDeviceIndex = 0- deviceCharacteristics.clear()- if (newState == BluetoothProfile.STATE_CONNECTED) {- Log.d(- "BluetoothGattCallback",- "Successfully connected to $deviceAddress"- )- gatt.requestMtu(GATT_MAX_MTU_SIZE)- } else if (newState == BluetoothProfile.STATE_DISCONNECTED) {- Log.w(- "BluetoothGattCallback",- "Successfully disconnected from $deviceAddress"- )- gatt.close()- bleCallback.accept(- hashMapOf(- "action" to "CONNECT_TO_DEVICE",- "provider" to "ble",- "success" to false,- )- )- }- } else {- bleCallback.accept(- hashMapOf(- "action" to "CONNECT_TO_DEVICE",- "provider" to "ble",- "success" to false,- )- )- Log.w(- "BluetoothGattCallback",- "Error $status encountered for $deviceAddress! Disconnecting..."- )- gatt.close()- }- }-- override fun onServicesDiscovered(gatt: BluetoothGatt?, status: Int) {- with(gatt) {- this?.services?.forEach { service ->- Log.d("BluetoothGattCallback", "Service: ${service.uuid}")- service.characteristics.forEach { characteristic ->- Log.d(- "BluetoothGattCallback",- "Characteristic: ${characteristic.uuid}"- )- if (characteristic.isReadable()) {- deviceCharacteristics.add(- BleAttribute(- characteristic,- isReadable = true,- isWritable = false,- value = null- )- )- }-- if (characteristic.isWritable()) {- deviceCharacteristics.find { it.characteristic.uuid == characteristic.uuid }?.isWritable =- true- }- }- if (deviceCharacteristics.isNotEmpty()) {- readCharacteristic(deviceCharacteristics[readableDeviceIndex].characteristic)- }- }- }- }-- override fun onCharacteristicRead(- gatt: BluetoothGatt?,- characteristic: BluetoothGattCharacteristic?,- status: Int- ) {- characteristic?.let { readCharacteristic ->- handleCharacteristicStatus(gatt, readCharacteristic, status)- } ?: run {- Log.e("BluetoothGattCallback", "Characteristic was null!")- }- }-- override fun onCharacteristicRead(- gatt: BluetoothGatt,- characteristic: BluetoothGattCharacteristic,- value: ByteArray,- status: Int- ) {- handleCharacteristicStatus(gatt, characteristic, status, value)- }-- private fun handleCharacteristicStatus(- gatt: BluetoothGatt?,- readCharacteristic: BluetoothGattCharacteristic,- status: Int,- value: ByteArray? = null- ) {- when (status) {- BluetoothGatt.GATT_SUCCESS -> Log.d(- "BluetoothGattCallback",- "Characteristic read success for ${readCharacteristic.uuid}"- )-- BluetoothGatt.GATT_READ_NOT_PERMITTED -> Log.e(- "BluetoothGattCallback",- "Read not permitted for ${readCharacteristic.uuid}!"- )-- else -> Log.e(- "BluetoothGattCallback",- "Characteristic read failed for ${readCharacteristic.uuid}, error: $status"- )- }- val deviceCharacteristic =- deviceCharacteristics.find { it.characteristic.uuid == readCharacteristic.uuid }- deviceCharacteristic?.also { attribute ->- if (deviceCharacteristic.characteristic.uuid == CHARACTERISTIC_DATABASE_HASH) {- attribute.value = value?.toHexString()- } else {- (value ?: readCharacteristic.value)?.let {- attribute.value = String(it).substringBefore('\u0000')- }- }- }- Log.d(- "BluetoothGattCallback",- "Read characteristic ${readCharacteristic.uuid}:\n${- value?.let {- String(it)- } ?: "null"- }"- )- handleDeviceIndex(gatt)- }-- private fun handleDeviceIndex(gatt: BluetoothGatt?) {- if (readableDeviceIndex < deviceCharacteristics.size - 1) {- gatt?.readCharacteristic(deviceCharacteristics[++readableDeviceIndex].characteristic)- } else {- bleCallback.accept(- hashMapOf(- "action" to "CONNECT_TO_DEVICE",- "provider" to "ble",- "success" to true,- "data" to hashMapOf("attributes" to deviceCharacteristics.map {- createAttributeMap(- it- )- })- )- )- }- }-- private fun createAttributeMap(deviceCharacteristic: BleAttribute) =- hashMapOf(- "attributeId" to deviceCharacteristic.characteristic.uuid,- "isReadable" to deviceCharacteristic.isReadable,- "isWritable" to deviceCharacteristic.isWritable,- "value" to deviceCharacteristic.value- )-- override fun onCharacteristicWrite(- gatt: BluetoothGatt?,- characteristic: BluetoothGattCharacteristic?,- status: Int- ) {- super.onCharacteristicWrite(gatt, characteristic, status)- Log.d(- "BluetoothGattCallback",- "Write characteristic ${characteristic?.uuid}:\n${status}"- )- sendToDeviceCallback?.accept(- hashMapOf(- "action" to "SEND_TO_DEVICE",- "provider" to "ble",- "success" to (status == BluetoothGatt.GATT_SUCCESS)- )- )- }-- override fun onReliableWriteCompleted(gatt: BluetoothGatt?, status: Int) {- super.onReliableWriteCompleted(gatt, status)- }-- override fun onMtuChanged(gatt: BluetoothGatt?, mtu: Int, status: Int) {- Log.d(- "BluetoothGattCallback",- "ATT MTU changed to $mtu, success: ${status == BluetoothGatt.GATT_SUCCESS}"- )- gatt?.discoverServices()- }-- }, BluetoothDevice.TRANSPORT_LE)- }- }-- @SuppressLint("MissingPermission")- fun sendToDevice(characteristicID: String, value: Any, callback: BleCallback) {- val characteristic =- deviceCharacteristics.find { it.characteristic.uuid.toString() == characteristicID }?.characteristic- if (characteristic == null) {- callback.accept(- hashMapOf(- "action" to "SEND_TO_DEVICE",- "provider" to "ble",- "success" to false,- "error" to "Characteristic $characteristicID not found"- )- )- return- }- val writeType = when {- characteristic.isSignedWritable() -> BluetoothGattCharacteristic.WRITE_TYPE_SIGNED- characteristic.isWritable() -> BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT- characteristic.isWritableWithoutResponse() -> {- BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE- }-- else -> {- callback.accept(- hashMapOf(- "action" to "SEND_TO_DEVICE",- "provider" to "ble",- "success" to false,- "error" to "Characteristic $characteristicID not found"- )- )- return- }- }-- val jsonString = value.toString()- val payload = jsonString.toByteArray(Charsets.UTF_8)-- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {- currentGatt?.writeCharacteristic(characteristic, payload, writeType)- ?: error("Not connected to a BLE device!")- } else {- currentGatt?.let { gatt ->- characteristic.writeType = writeType- characteristic.value = payload- gatt.writeCharacteristic(characteristic)- } ?: error("Not connected to a BLE device!")- }- sendToDeviceCallback = callback- }-- private fun requestPermissions(activity: Activity) {- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {- ActivityCompat.requestPermissions(- activity,- arrayOf(- Manifest.permission.BLUETOOTH_SCAN,- Manifest.permission.BLUETOOTH_CONNECT- ),- BLUETOOTH_PERMISSION_REQUEST_CODE- )- } else {- ActivityCompat.requestPermissions(- activity,- arrayOf(Manifest.permission.ACCESS_FINE_LOCATION),- BLUETOOTH_PERMISSION_REQUEST_CODE- )- }- }-- private fun hasPermission() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {- context.checkSelfPermission(Manifest.permission.BLUETOOTH_SCAN) == PackageManager.PERMISSION_GRANTED &&- context.checkSelfPermission(Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED- } else {- context.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED- }-- @SuppressLint("MissingPermission")- private fun scanLeDevice(bleCallback: BleCallback) {- devices.clear()- bluetoothAdapter.bluetoothLeScanner?.let { bluetoothLeScanner ->- if (!scanning) { // Stops scanning after a pre-defined scan period.- handler.postDelayed({- scanning = false- bluetoothLeScanner.stopScan(scanCallback)- bleCallback.accept(- hashMapOf(- "action" to "SCAN_BLE_DEVICES",- "provider" to "ble",- "data" to hashMapOf("devices" to devices.map { device ->- hashMapOf(- "name" to device.name,- "address" to device.address- )- })- )- )- }, scanPeriod)- scanning = true- bluetoothLeScanner.startScan(scanCallback)- } else {- scanning = false- bluetoothLeScanner.stopScan(scanCallback)- bleCallback.accept(- hashMapOf(- "action" to "SCAN_BLE_DEVICES",- "provider" to "ble",- "data" to hashMapOf("devices" to devices.map { device ->- hashMapOf(- "name" to device.name,- "address" to device.address- )- })- )- )- }- }- }-- private data class BleAttribute(- var characteristic: BluetoothGattCharacteristic,- var isReadable: Boolean,- var isWritable: Boolean,- var value: String?,- ) {- override fun equals(other: Any?): Boolean {- if (this === other) return true- if (javaClass != other?.javaClass) return false-- other as BleAttribute-- if (characteristic != other.characteristic) return false- if (isReadable != other.isReadable) return false- if (isWritable != other.isWritable) return false- if (value?.equals(other.value) == false) return false-- return true- }-- override fun hashCode(): Int {- var result = characteristic.hashCode()- result = 31 * result + isReadable.hashCode()- result = 31 * result + isWritable.hashCode()- result = 31 * result + value.hashCode()- return result- }- }-}--fun BluetoothGattCharacteristic.isReadable(): Boolean =- containsProperty(BluetoothGattCharacteristic.PROPERTY_READ)--fun BluetoothGattCharacteristic.isWritable(): Boolean =- containsProperty(BluetoothGattCharacteristic.PROPERTY_WRITE)--fun BluetoothGattCharacteristic.isSignedWritable(): Boolean =- containsProperty(BluetoothGattCharacteristic.PROPERTY_SIGNED_WRITE)--fun BluetoothGattCharacteristic.isWritableWithoutResponse(): Boolean =- containsProperty(BluetoothGattCharacteristic.PROPERTY_WRITE_NO_RESPONSE)--fun BluetoothGattCharacteristic.containsProperty(property: Int): Boolean {- return properties and property != 0-}--fun ByteArray.toHexString(): String {- return joinToString("") { "%02x".format(it) }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceBootCompleteReceiver.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceBootCompleteReceiver.ktdeleted file mode 100644index 03579b893..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceBootCompleteReceiver.kt+++ /dev/null@@ -1,34 +0,0 @@-/*- * Copyright 2018, 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/>.- */--package io.openremote.orlib.service--import android.content.BroadcastReceiver-import android.content.Context-import android.content.Intent--class GeofenceBootCompleteReceiver : BroadcastReceiver() {-- override fun onReceive(context: Context?, intent: Intent?) {- if (context != null) {- GeofenceProvider.startGeofences(context)- }- }-}\ No newline at end of filediff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceProvider.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceProvider.ktdeleted file mode 100644index b74575021..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceProvider.kt+++ /dev/null@@ -1,471 +0,0 @@-package io.openremote.orlib.service--import android.Manifest.permission.*-import android.annotation.SuppressLint-import android.app.Activity-import android.app.PendingIntent-import android.content.Context-import android.content.Intent-import android.content.pm.PackageManager-import android.os.Looper-import androidx.appcompat.app.AlertDialog-import androidx.core.app.ActivityCompat-import com.fasterxml.jackson.databind.ObjectMapper-import com.google.android.gms.location.*-import io.openremote.orlib.ORConstants-import io.openremote.orlib.R-import java.net.URL-import java.util.*-import java.util.logging.Level-import java.util.logging.Logger-import kotlin.concurrent.schedule--class GeofenceProvider(val context: Context) {-- interface GeofenceCallback {- fun accept(responseData: Map<String, Any>)- }-- class GeofenceDefinition {- lateinit var id: String- var lat: Double = 0.0- var lng: Double = 0.0- var radius: Float = 0.0F- lateinit var httpMethod: String- lateinit var url: String-- override fun toString(): String {- return "GeofenceDefinition(id='$id', lat=$lat, lng=$lng, radius=$radius, httpMethod='$httpMethod', url='$url')"- }- }-- companion object {- const val locationPermissionAskedKey = "LocationPermissionAsked"- const val geofencesKey = "geofences"- const val geofenceDisabledKey = "geofenceDisabled"- const val locationResponseCode = 101-- val JSON = ObjectMapper()- val LOG = Logger.getLogger(GeofenceProvider::class.java.name)-- fun getGeofences(context: Context): Array<GeofenceDefinition> {- val sharedPreferences = context.getSharedPreferences(- context.getString(R.string.app_name),- Context.MODE_PRIVATE- )- val existingGeofencesJson = sharedPreferences.getString(geofencesKey, null)- var geofences: Array<GeofenceDefinition> = arrayOf()- if (existingGeofencesJson != null) {- geofences =- JSON.readValue(existingGeofencesJson, Array<GeofenceDefinition>::class.java)- }-- LOG.info("Found geofences=${geofences.size}")- return geofences- }-- fun startGeofences(context: Context) {-- LOG.info("Starting geofences")-- val geofences = getGeofences(context)- val baseUrl = getBaseUrl(context)- if (geofences.isEmpty() || baseUrl == null) {- return- }--- val intent = getGeofencePendingIntent(context, baseUrl)- val geofencingClient = LocationServices.getGeofencingClient(context)-- geofences.forEach {- addGeofence(geofencingClient, intent, it)- }- }-- @SuppressLint("MissingPermission")- private fun addGeofence(- geofencingClient: GeofencingClient,- geofencePendingIntent: PendingIntent,- geofenceDefinition: GeofenceDefinition- ) {-- LOG.info("Adding geofence: $geofenceDefinition")-- val geofence = Geofence.Builder()- .setRequestId(geofenceDefinition.id)- .setCircularRegion(- geofenceDefinition.lat,- geofenceDefinition.lng,- geofenceDefinition.radius- )- .setExpirationDuration(Geofence.NEVER_EXPIRE)- .setNotificationResponsiveness(5000)- .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER or Geofence.GEOFENCE_TRANSITION_EXIT)- .build()-- val geofencingRequest = GeofencingRequest.Builder()- .addGeofence(geofence)- .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)- .build()-- geofencingClient.addGeofences(geofencingRequest, geofencePendingIntent).run {- addOnSuccessListener {- LOG.info("Added geofence: ${geofenceDefinition.id}")- }-- addOnFailureListener { exception ->- LOG.log(- Level.SEVERE,- "Add geofence failed: ${geofenceDefinition.id}",- exception- )- }- }- }-- private fun getGeofencePendingIntent(context: Context, baseURL: String): PendingIntent {- val intent = Intent(context, GeofenceTransitionsIntentService::class.java)- intent.putExtra(ORConstants.BASE_URL_KEY, baseURL)- // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when calling- // addGeofences() and removeGeofences().- return PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT)- }-- private fun getBaseUrl(context: Context): String? {- val sharedPreferences = context.getSharedPreferences(- context.getString(R.string.app_name),- Context.MODE_PRIVATE- )- return sharedPreferences.getString(ORConstants.BASE_URL_KEY, null)- }-- private fun getConsoleId(context: Context): String? {- val sharedPreferences = context.getSharedPreferences(- context.getString(R.string.app_name),- Context.MODE_PRIVATE- )- return sharedPreferences.getString(ORConstants.CONSOLE_ID_KEY, null)- }- }-- val version = "ORConsole"- val geofenceFetchEndpoint = "rules/geofences/"-- private val geofencingClient: GeofencingClient by lazy {- LocationServices.getGeofencingClient(context)- }-- private val locationClient: FusedLocationProviderClient by lazy {- LocationServices.getFusedLocationProviderClient(context)- }-- private val locationUpdateCallback: LocationCallback by lazy {- object : LocationCallback() {- override fun onLocationResult(locationResult: LocationResult) {- locationResult.lastLocation?.let {- locationClient.removeLocationUpdates(this)- locationCallback?.accept(- hashMapOf(- "action" to "GET_LOCATION",- "provider" to "geofence",- "data" to hashMapOf(- "latitude" to it.latitude,- "longitude" to it.longitude- )- )- )- locationCallback = null- }- }- }- }-- private lateinit var locationRequest: LocationRequest-- private var enableCallback: GeofenceCallback? = null- private var locationCallback: GeofenceCallback? = null-- fun initialize(): Map<String, Any> {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)-- return hashMapOf(- "action" to "PROVIDER_INIT",- "provider" to "geofence",- "version" to version,- "requiresPermission" to true,- "hasPermission" to (- context.checkSelfPermission(- ACCESS_FINE_LOCATION- ) == PackageManager.PERMISSION_GRANTED),- "success" to true,- "enabled" to false, // Always require enabling to ensure geofences are refresh at startup- "disabled" to sharedPreferences.contains(geofenceDisabledKey)- )- }-- @SuppressLint("MissingPermission")- fun enable(activity: Activity, baseUrl: String, consoleId: String, callback: GeofenceCallback) {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)-- sharedPreferences.edit()- .putString(ORConstants.BASE_URL_KEY, baseUrl)- .putString(ORConstants.CONSOLE_ID_KEY, consoleId)- .remove(geofenceDisabledKey)- .apply()-- val hasPermission = when {- android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q -> {- context.checkSelfPermission(- ACCESS_BACKGROUND_LOCATION- ) == PackageManager.PERMISSION_GRANTED- }- else -> {- context.checkSelfPermission(- ACCESS_FINE_LOCATION- ) == PackageManager.PERMISSION_GRANTED- }- }-- if (!hasPermission && !sharedPreferences.getBoolean(- locationPermissionAskedKey, false- )- ) {- sharedPreferences.edit().putBoolean(locationPermissionAskedKey, true).apply()- enableCallback = callback- registerPermissions(activity)- return- }-- return onEnable(callback)- }-- fun disable() {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)-- removeGeofences(getGeofences(context))-- sharedPreferences.edit()- .remove(ORConstants.BASE_URL_KEY)- .remove(ORConstants.CONSOLE_ID_KEY)- .remove(geofencesKey)- .putBoolean(geofenceDisabledKey, true)- .apply()-- //context.stopService(Intent(context, LocationService::class.java))- }-- @SuppressLint("MissingPermission")- fun getLocation(activity: Activity, callback: GeofenceCallback?) {- locationCallback = callback--- val hasPermission = context.checkSelfPermission(- ACCESS_FINE_LOCATION- ) == PackageManager.PERMISSION_GRANTED-- if (hasPermission) {- locationRequest = LocationRequest.create()- locationRequest.priority = LocationRequest.PRIORITY_HIGH_ACCURACY- locationRequest.numUpdates = 1-- locationClient.requestLocationUpdates(locationRequest, locationUpdateCallback, Looper.getMainLooper())- } else {- registerPermissions(activity)- locationCallback?.accept(- hashMapOf(- "action" to "GET_LOCATION",- "provider" to "geofence",- "data" to hashMapOf<String, Any>()- )- )- locationCallback = null- }- }-- fun refreshGeofences() {- LOG.info("Refresh geofences")-- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)- val url = "${getBaseUrl(context)}/$geofenceFetchEndpoint${getConsoleId(context)}"- LOG.info("Fetching geofences from server: ${url}")-- try {- val geofencesJson = URL(url).readText()- val geofences = JSON.readValue(geofencesJson, Array<GeofenceDefinition>::class.java)-- LOG.info("Fetched geofences=${geofences.size}")-- // Remove previous fences that no longer exist- val oldFences = getGeofences(context)-- oldFences.forEach { oldFence ->- if (geofences.none { Objects.equals(it.id, oldFence.id) }) {- LOG.info("Geofence now obsolete: $oldFence")- removeGeofence(oldFence.id)- }- }-- geofences.forEach { geofence ->- addGeofence(- geofencingClient,- getGeofencePendingIntent(context, getBaseUrl(context).orEmpty()),- geofence- )- }-- sharedPreferences.edit()- .putString(geofencesKey, geofencesJson)- .apply()- } catch (e: Exception) {- LOG.log(Level.SEVERE, "Failed to refresh geofences", e)- }- }-- private fun onEnable(callback: GeofenceCallback?) {-- LOG.info("Enabling geofence provider")-- Thread {-- val hasPermission = when {- android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q -> {- context.checkSelfPermission(- ACCESS_BACKGROUND_LOCATION- ) == PackageManager.PERMISSION_GRANTED- }- else -> {- context.checkSelfPermission(- ACCESS_FINE_LOCATION- ) == PackageManager.PERMISSION_GRANTED- }- }-- callback?.accept(- hashMapOf(- "action" to "PROVIDER_ENABLE",- "provider" to "geofence",- "hasPermission" to hasPermission,- "success" to true- )- )-- if (hasPermission) {- LOG.info("Has permission so fetching geofences")-- if (getGeofences(context).isEmpty()) {- // Could be first time getting geofences so wait a few seconds for backend to catch up- Timer().schedule(10000) {- refreshGeofences()- }- } else {- refreshGeofences()- }- }- }.start()- }-- private fun registerPermissions(activity: Activity) {- LOG.info("Requesting geofence permissions")- if (context.checkSelfPermission(ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q) {- if (ActivityCompat.shouldShowRequestPermissionRationale(- activity,- ACCESS_BACKGROUND_LOCATION- )- ) {- AlertDialog.Builder(activity)- .setIcon(R.mipmap.ic_launcher)- .setTitle(R.string.location_background_disabled_title)- .setMessage(R.string.background_location_alert_body)- .setNegativeButton(R.string.no, null)- .setPositiveButton(R.string.yes) { dialog, which ->- activity.requestPermissions(- arrayOf(- ACCESS_BACKGROUND_LOCATION- ),- locationResponseCode- )- }- .show()- }- }- } else {- activity.requestPermissions(- arrayOf(ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION),- locationResponseCode- )- }- }-- fun onRequestPermissionsResult(activity: Activity) {- if (enableCallback != null) {- onEnable(enableCallback!!)- enableCallback = null- }- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q) {- if (context.checkSelfPermission(ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&- context.checkSelfPermission(ACCESS_BACKGROUND_LOCATION) != PackageManager.PERMISSION_GRANTED- ) {- if (ActivityCompat.shouldShowRequestPermissionRationale(- activity,- ACCESS_BACKGROUND_LOCATION- )- ) {- AlertDialog.Builder(activity)- .setIcon(R.mipmap.ic_launcher)- .setTitle(R.string.background_location_alert_title)- .setMessage(R.string.background_location_alert_body)- .setNegativeButton(R.string.no, null)- .setPositiveButton(R.string.yes) { dialog, which ->- activity.requestPermissions(- arrayOf(- ACCESS_BACKGROUND_LOCATION- ),- locationResponseCode- )- }- .show()- }- }- }- }-- private fun removeGeofence(id: String) {- geofencingClient.removeGeofences(listOf(id)).run {- addOnSuccessListener {- LOG.info("Removed geofence: $id")- }-- addOnFailureListener { exception ->- LOG.log(Level.SEVERE, "Failed to remove geofence: $id", exception)- }- }- }-- private fun removeGeofences(geofences: Array<GeofenceDefinition>) {- removeGeofences(geofences.map { it.id })- }-- private fun removeGeofences(ids: List<String>) {- if (ids.isEmpty()) {- return- }-- LOG.info("Removing existing geofences: $ids")-- geofencingClient.removeGeofences(ids).run {- addOnSuccessListener {- LOG.info("Geofences removed")- }-- addOnFailureListener { exception ->- LOG.log(Level.SEVERE, "Geofences remove failed", exception)- }- }- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceTransitionsIntentService.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceTransitionsIntentService.ktdeleted file mode 100644index b8a94c542..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/GeofenceTransitionsIntentService.kt+++ /dev/null@@ -1,172 +0,0 @@-package io.openremote.orlib.service--import android.content.BroadcastReceiver-import android.content.Context-import android.content.Intent-import android.util.Pair-import com.fasterxml.jackson.databind.ObjectMapper-import com.google.android.gms.location.Geofence-import com.google.android.gms.location.GeofencingEvent-import io.openremote.orlib.ORConstants-import java.net.HttpURLConnection-import java.net.URL-import java.util.*-import java.util.logging.Level-import java.util.logging.Logger-import kotlin.concurrent.schedule--class GeofenceTransitionsIntentService : BroadcastReceiver() {-- private val LOG = Logger.getLogger(GeofenceTransitionsIntentService::class.java.name)- private var exitedLocation : Pair<GeofenceProvider.GeofenceDefinition, String?>? = null- private var enteredLocation : Pair<GeofenceProvider.GeofenceDefinition, String?>? = null- private var locationTimer : Timer = Timer()- private var sendQueued = false-- override fun onReceive(context: Context?, intent: Intent?) {-- val geofencingEvent = GeofencingEvent.fromIntent(intent!!) ?: return-- if (geofencingEvent.hasError()) {- LOG.warning("Geofence event error : ${geofencingEvent.errorCode}")- return- }-- val geofenceDefinitions = GeofenceProvider.getGeofences(context!!)-- if (geofenceDefinitions.isEmpty()) {- LOG.fine("No stored geofence definitions so ignoring triggered geofence")- return- }-- val baseUrl = intent.getStringExtra(ORConstants.BASE_URL_KEY)- val geofenceTransition = geofencingEvent.geofenceTransition- val trans = if (geofenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER) "ENTER" else "EXIT"-- geofencingEvent.triggeringGeofences?.forEach { geofence ->- val geofenceDefinition = geofenceDefinitions.firstOrNull { it.id == geofence.requestId }-- if (geofenceDefinition != null) {-- LOG.info("Triggered geofence '$trans': $geofenceDefinition")-- geofenceDefinition.url = baseUrl + geofenceDefinition.url-- val locationJson = when (geofenceTransition) {- Geofence.GEOFENCE_TRANSITION_ENTER -> {- val location = hashMapOf(- "type" to "Point",- "coordinates" to arrayOf(geofenceDefinition.lng, geofenceDefinition.lat)- )- ObjectMapper().writeValueAsString(location)- }- else -> {- null- }- }-- // Android often triggers an exit on one fence at the same time as triggering an enter- // on another so we queue the sends to allow the server time to process the events- queueSendLocation(geofenceDefinition, locationJson)- } else {- LOG.info("Triggered geofence '$trans': unknown")- }- }- }-- @Synchronized- fun queueSendLocation(geofenceDefinition : GeofenceProvider.GeofenceDefinition, locationJson : String?) {-- if (locationJson == null) {- exitedLocation = Pair(geofenceDefinition, null)-- // If exit is for same geofence as queued enter then remove enter to avoid incorrectly setting location- if (enteredLocation != null && enteredLocation!!.first.id == geofenceDefinition.id) {- enteredLocation = null- }- } else {- enteredLocation = Pair(geofenceDefinition, locationJson)- }-- if (!sendQueued) {- sendQueued = true- LOG.info("Schedule send location")- locationTimer.schedule(2000) {- doSendLocation()- }- }- }-- @Synchronized- fun doSendLocation() {-- LOG.info("Do send location")- var success = false-- if (exitedLocation != null) {- if (sendLocation(exitedLocation!!.first, exitedLocation!!.second)) {- exitedLocation = null- success = true- }- } else if (enteredLocation != null) {- if (sendLocation(enteredLocation!!.first, enteredLocation!!.second)) {- enteredLocation = null- success = true- }- }-- if (exitedLocation != null || enteredLocation != null) {-- if (!success) {- LOG.info("Send failed so re-scheduling")- } else {- LOG.info("More locations to send so scheduling another run")- }-- // Schedule another send- val delay = if (success) 5000L else 10000L- locationTimer.schedule(delay) {- doSendLocation()- }- } else {- sendQueued = false- }- }-- @Synchronized- fun sendLocation(geofenceDefinition : GeofenceProvider.GeofenceDefinition, locationJson : String?): Boolean {- val url = URL(geofenceDefinition.url)- val connection = url.openConnection() as HttpURLConnection- var success = false-- try {- connection.setRequestProperty("Content-Type", "application/json")- connection.requestMethod = geofenceDefinition.httpMethod- connection.connectTimeout = 10000- connection.doInput = false- connection.doOutput = true- connection.setChunkedStreamingMode(0)-- if (locationJson == null) {- LOG.info("Sending location 'null' to server: HTTP ${geofenceDefinition.httpMethod} $url")- connection.outputStream.write("null".toByteArray(Charsets.UTF_8))- } else {- LOG.info("Sending location 'lat=${geofenceDefinition.lat}/lng=${geofenceDefinition.lng}' to server: HTTP ${geofenceDefinition.httpMethod} $url")- connection.outputStream.write(locationJson.toByteArray(Charsets.UTF_8))- }-- connection.outputStream.flush()- val responseCode = connection.responseCode- success = responseCode == 204- LOG.info("Send location success: response=$responseCode")-- } catch (exception: Exception) {- LOG.log(Level.SEVERE, "Send location failed", exception)- print(exception)- } finally {- connection.disconnect()- }-- return success- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/NotificationResource.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/NotificationResource.ktdeleted file mode 100644index e433a09bb..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/NotificationResource.kt+++ /dev/null@@ -1,101 +0,0 @@-package io.openremote.orlib.service--import android.content.Context-import android.content.SharedPreferences-import androidx.preference.PreferenceManager-import io.openremote.orlib.ORConstants-import java.net.HttpURLConnection-import java.net.URL-import java.util.concurrent.Executors-import java.util.logging.Logger--class NotificationResource(context: Context) {- private val sharedPreferences: SharedPreferences =- PreferenceManager.getDefaultSharedPreferences(context)-- fun executeRequest(httpMethod: String, appUrl: String, data: String?) {- Executors.newCachedThreadPool().execute {- URL(appUrl)- .openConnection()- .let {- it as HttpURLConnection- }.apply {- requestMethod = httpMethod- setRequestProperty("Accept", "application/json")-- if (!data.isNullOrBlank()) {- setRequestProperty("Content-Type", "application/json")- doOutput = true-- val outputWriter = outputStream.bufferedWriter()- outputWriter.write(data)- outputWriter.flush()- }- }- }- }-- fun notificationDelivered(notificationId: Long, fcmToken: String?) {- LOG.info("Notification status update 'delivered': $notificationId")-- val host = sharedPreferences.getString(ORConstants.HOST_KEY, null)- val realm = sharedPreferences.getString(ORConstants.REALM_KEY, null)-- if (!host.isNullOrBlank() && !realm.isNullOrBlank()) {- val url = host.plus("/api/${realm}")- Executors.newCachedThreadPool().execute {- URL("${url}/notification/${notificationId}/delivered?targetId=$fcmToken")- .openConnection()- .let {- it as HttpURLConnection- }.apply {- requestMethod = "PUT"- setRequestProperty("Accept", "application/json")--- setRequestProperty("Content-Type", "application/json")- doOutput = true- }- }- }- }-- fun notificationAcknowledged(- notificationId: Long,- fcmToken: String?,- acknowledgement: String?- ) {- val host = sharedPreferences.getString(ORConstants.HOST_KEY, null)- val realm = sharedPreferences.getString(ORConstants.REALM_KEY, null)-- if (!host.isNullOrBlank() && !realm.isNullOrBlank()) {- val url = host.plus("/api/${realm}")- Executors.newCachedThreadPool().execute {- URL("${url}/notification/${notificationId}/acknowledged?targetId=$fcmToken")- .openConnection()- .let {- it as HttpURLConnection- }.apply {- requestMethod = "PUT"- setRequestProperty("Accept", "application/json")--- setRequestProperty("Content-Type", "application/json")- doOutput = true-- val outputWriter = outputStream.bufferedWriter()- outputWriter.write(- "{\"acknowledgement\": \"${acknowledgement ?: ""}\"}"- )- outputWriter.flush()- }- }- }- }-- companion object {- private val LOG = Logger.getLogger(- NotificationResource::class.java.name- )- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/ORFirebaseMessagingService.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/ORFirebaseMessagingService.ktdeleted file mode 100644index db1d40652..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/ORFirebaseMessagingService.kt+++ /dev/null@@ -1,249 +0,0 @@-package io.openremote.orlib.service--import android.app.NotificationChannel-import android.app.NotificationManager-import android.app.PendingIntent-import android.content.BroadcastReceiver-import android.content.Context-import android.content.Intent-import android.media.RingtoneManager-import android.os.Build-import androidx.annotation.RequiresApi-import androidx.core.app.NotificationCompat-import com.fasterxml.jackson.databind.ObjectMapper-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.google.firebase.messaging.RemoteMessage-import io.openremote.orlib.ORConstants-import io.openremote.orlib.R-import io.openremote.orlib.models.ORAlertAction-import io.openremote.orlib.models.ORAlertButton-import io.openremote.orlib.ui.NotificationActivity-import io.openremote.orlib.ui.OrMainActivity-import java.util.logging.Level-import java.util.logging.Logger---class ORFirebaseMessagingService : com.google.firebase.messaging.FirebaseMessagingService() {-- private var notificationResource: NotificationResource? = null-- class MyBroadcastReceiver : BroadcastReceiver() {- override fun onReceive(context: Context, intent: Intent) {- LOG.info("TODO: Remove notification")- }- }-- override fun onCreate() {- super.onCreate()- notificationResource = NotificationResource(applicationContext)-- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {- createNotificationChannel()- }- }-- /**- * Called when message is received.- *- * @param remoteMessage Object representing the message received from Firebase Cloud Messaging.- */- // [START receive_message]- override fun onMessageReceived(remoteMessage: RemoteMessage) {- // [START_EXCLUDE]- // There are two types of messages data messages and notification messages. Data messages are handled- // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type- // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app- // is in the foreground. When the app is in the background an automatically generated notification is displayed.- // When the user taps on the notification they are returned to the app. Messages containing both notification- // and data payloads are treated as notification messages. The Firebase console always sends notification- // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options- // [END_EXCLUDE]-- // TODO(developer): Handle FCM messages here.- // Not getting messages here? See why this may be: https://goo.gl/39bRNJ- LOG.info("Received message from: " + remoteMessage.from)-- // If the message contains a notification then we assume it has been shown to the user- if (remoteMessage.notification != null) {- LOG.info(- "Message contains notification body: " + remoteMessage.notification!!.getBody()- )- } else if (remoteMessage.data.isNotEmpty()) {- val messageData: Map<String, String> = remoteMessage.data-- // Mark as delivered on the server- val notificationIdStr = messageData["notification-id"]- var notificationId: Long? = null- if (notificationIdStr != null && notificationIdStr.isNotEmpty()) {- notificationId = notificationIdStr.toLong()- val consoleId: String? = getSharedPreferences(- applicationContext.getString(R.string.app_name),- Context.MODE_PRIVATE- ).getString("consoleId", "")- if (!consoleId.isNullOrBlank()) {- notificationResource?.notificationDelivered(notificationId, consoleId)- }- }- val isSilent = !messageData.containsKey("or-title")- if (isSilent) {- when (val action: String? = remoteMessage.data.get("action")) {- "GEOFENCE_REFRESH" -> {- val geofenceProvider = GeofenceProvider(applicationContext)- geofenceProvider.refreshGeofences()- }- else -> {- val broadCastIntent = Intent(ORConstants.ACTION_BROADCAST)- broadCastIntent.putExtra("action", action)- sendBroadcast(broadCastIntent)- }- }- } else {- val title = messageData["or-title"]- val body = messageData["or-body"]- var buttonORS: Array<ORAlertButton>? = null- var actionOR: ORAlertAction? = null-- // Check for action (to be executed when notification is clicked)- if (messageData.containsKey("action")) {- val actionJson = messageData["action"]- if (actionJson != null && actionJson.isNotEmpty()) {- try {- actionOR = jacksonObjectMapper().readValue(- actionJson,- ORAlertAction::class.java- )- } catch (e: Exception) {- LOG.log(Level.SEVERE, "Failed to de-serialise alert action", e)- }- }- }-- // Check for buttons- if (messageData.containsKey("buttons")) {- val buttonsJson = messageData["buttons"]- if (buttonsJson != null && buttonsJson.isNotEmpty()) {- try {- buttonORS = jacksonObjectMapper().readValue(- buttonsJson,- Array<ORAlertButton>::class.java- )- } catch (e: Exception) {- LOG.log(Level.SEVERE, "Failed to de-serialise alert actions", e)- }- }- }- handleNotification(notificationId, title, body, actionOR, buttonORS)- }- }- }-- override fun onNewToken(token: String) {- super.onNewToken(token)- }-- @RequiresApi(Build.VERSION_CODES.O)- private fun createNotificationChannel() {- val channelName = "OR Message Service"- val channel = NotificationChannel(- getString(R.string.NOTIFICATION_CHANNEL_ID),- channelName, NotificationManager.IMPORTANCE_HIGH- )- val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)- channel.setShowBadge(false)- channel.setSound(defaultSoundUri, null)- channel.enableVibration(true)- channel.vibrationPattern = longArrayOf(100, 200, 300, 400, 500, 400, 300, 200, 400)- val service = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager- service.createNotificationChannel(channel)- }-- private fun handleNotification(- notificationId: Long?,- title: String?,- body: String?,- actionOR: ORAlertAction?,- buttonORS: Array<ORAlertButton>?- ) {- val pm = packageManager- val notificationIntent = pm.getLaunchIntentForPackage(packageName)- notificationIntent?.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)- val pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)-- val notificationBuilder = NotificationCompat.Builder(- this,- getString(R.string.NOTIFICATION_CHANNEL_ID)- )- .setContentTitle(title)- .setStyle(NotificationCompat.BigTextStyle().bigText(body))- .setContentText(body)- .setSmallIcon(R.drawable.ic_notification)- .setContentIntent(pendingIntent)- .setDeleteIntent(createActionIntent(notificationId, "\"CLOSED\"", null))- if (actionOR != null) {- notificationBuilder.setContentIntent(createActionIntent(notificationId, null, actionOR))- }- if (buttonORS != null) {- for (alertButton in buttonORS) {- notificationBuilder.addAction(- NotificationCompat.Action(- R.drawable.empty,- alertButton.title,- createActionIntent(- notificationId,- alertButton.title,- alertButton.action- )- )- )- }- }- LOG.info(- "Showing notification id=$notificationId, title=$title, body=$body, action=$actionOR, buttons=" + (buttonORS?.size- ?: 0)- )- val notificationManager =- getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager?- notificationManager?.notify(notificationId.hashCode(), notificationBuilder.build())- }-- private fun createActionIntent(- notificationId: Long?,- acknowledgement: String?,- ORAlertAction: ORAlertAction?- ): PendingIntent {- val actionIntent = when {- Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ->Intent(this, NotificationActivity::class.java)- else -> Intent(this, ORMessagingActionService::class.java)- }- actionIntent.putExtra("notificationId", notificationId)- actionIntent.putExtra("acknowledgement", acknowledgement)- actionIntent.action = System.currentTimeMillis().toString()- if (ORAlertAction?.url != null && ORAlertAction.url.isNotEmpty()) {- actionIntent.putExtra("appUrl", ORAlertAction.url)- actionIntent.putExtra("httpMethod", ORAlertAction.httpMethod)- actionIntent.putExtra("silent", ORAlertAction.silent)- actionIntent.putExtra("openInBrowser", ORAlertAction.openInBrowser)- actionIntent.putExtra("data", ObjectMapper().writeValueAsString(ORAlertAction.data))- }- return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {- PendingIntent.getActivity(- this,- 0,- actionIntent,- PendingIntent.FLAG_ONE_SHOT or PendingIntent.FLAG_IMMUTABLE)- } else {- PendingIntent.getService(- this,- 0,- actionIntent,- PendingIntent.FLAG_ONE_SHOT or PendingIntent.FLAG_IMMUTABLE- )- }- }-- companion object {- private val LOG = Logger.getLogger(- ORFirebaseMessagingService::class.java.name- )- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/ORMessagingActionService.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/ORMessagingActionService.ktdeleted file mode 100644index 1f5e186eb..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/ORMessagingActionService.kt+++ /dev/null@@ -1,75 +0,0 @@-package io.openremote.orlib.service--import android.app.IntentService-import android.app.NotificationManager-import android.content.Intent-import android.content.pm.PackageManager-import android.net.Uri-import android.os.Build-import android.text.TextUtils-import io.openremote.orlib.BuildConfig-import io.openremote.orlib.ORConstants-import io.openremote.orlib.R-import io.openremote.orlib.ui.OrMainActivity--class ORMessagingActionService : IntentService("org.openremote.android.ORMessagingActionService") {- private var notificationResource: NotificationResource? = null- override fun onCreate() {- super.onCreate()- notificationResource = NotificationResource(applicationContext)- }-- override fun onHandleIntent(intent: Intent?) {- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {- val it = Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)- this.sendBroadcast(it)- }- val notificationId = intent!!.getLongExtra("notificationId", 0L)- val acknowledgement = intent.getStringExtra("acknowledgement")- val manager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager- manager.cancel(java.lang.Long.hashCode(notificationId))- val consoleId = getSharedPreferences(- applicationContext.getString(R.string.app_name),- MODE_PRIVATE- ).getString(ORConstants.CONSOLE_ID_KEY, "")- if (!TextUtils.isEmpty(consoleId)) {- notificationResource!!.notificationAcknowledged(- notificationId,- consoleId,- acknowledgement- )- }- val appUrl = intent.getStringExtra("appUrl")- if (!appUrl.isNullOrBlank()) {- val openInBrowser = intent.getBooleanExtra("openInBrowser", false)- val silent = intent.getBooleanExtra("silent", false)- val data = intent.getStringExtra("data")- var httpMethod = intent.getStringExtra("httpMethod")- httpMethod = if (TextUtils.isEmpty(httpMethod)) "GET" else httpMethod-- when {- openInBrowser -> {- // Don't load the app just send straight to browser- val i = Intent(Intent.ACTION_VIEW)- i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)- i.data = Uri.parse(appUrl)- startActivity(i)- }- silent -> {- // Do silent HTTP request- notificationResource!!.executeRequest(httpMethod!!, appUrl, data)- }- else -> {- val pm: PackageManager = packageManager- val launchIntent: Intent = pm.getLaunchIntentForPackage(applicationContext.packageName) ?: Intent(applicationContext, OrMainActivity::class.java)- launchIntent.addFlags(- Intent.FLAG_ACTIVITY_NEW_TASK or- Intent.FLAG_ACTIVITY_SINGLE_TOP- )- launchIntent.putExtra("appUrl", appUrl)- startActivity(launchIntent)- }- }- }- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/service/QrScannerProvider.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/service/QrScannerProvider.ktdeleted file mode 100644index 2fce24a16..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/service/QrScannerProvider.kt+++ /dev/null@@ -1,90 +0,0 @@-package io.openremote.orlib.service--import android.Manifest-import android.app.Activity-import android.content.Context-import android.content.Intent-import android.content.pm.PackageManager-import io.openremote.orlib.R-import io.openremote.orlib.ui.QrScannerActivity--class QrScannerProvider(val context: Context) {- interface ScannerCallback {- fun accept(responseData: Map<String, Any>)- }-- companion object {- private const val cameraPermissionAskedKey = "CameraPermissionAsked"- private const val qrDisabledKey = "qrDisabled"- private const val version = "qr"- const val REQUEST_SCAN_QR = 222- }- fun initialize(): Map<String, Any> {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)-- return hashMapOf(- "action" to "PROVIDER_INIT",- "provider" to "qr",- "version" to version,- "requiresPermission" to true,- "hasPermission" to (- context.checkSelfPermission(- Manifest.permission.CAMERA- ) == PackageManager.PERMISSION_GRANTED),- "success" to true,- "enabled" to false, // Always require enabling to ensure geofences are refresh at startup- "disabled" to sharedPreferences.contains(qrDisabledKey)- )- }-- fun enable(callback: ScannerCallback?) {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)-- sharedPreferences.edit()- .remove(qrDisabledKey)- .apply()-- val hasPermission =- context.checkSelfPermission(- Manifest.permission.CAMERA- ) == PackageManager.PERMISSION_GRANTED-- callback?.accept(- hashMapOf(- "action" to "PROVIDER_ENABLE",- "provider" to "qr",- "hasPermission" to hasPermission,- "success" to true,- "enabled" to true,- "disabled" to sharedPreferences.contains(qrDisabledKey)- )- )- }-- fun disable(): Map<String, Any> {- val sharedPreferences =- context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE)- sharedPreferences.edit()- .putBoolean(cameraPermissionAskedKey, true)- .apply()-- return hashMapOf(- "action" to "PROVIDER_DISABLE",- "provider" to "qr"- )- }-- fun startScanner(activity: Activity, callback: ScannerCallback?) {- val intent = Intent(activity, QrScannerActivity::class.java)- activity.startActivityForResult(intent, REQUEST_SCAN_QR)- callback?.accept(- hashMapOf(- "action" to "SCAN_QR",- "provider" to "qr",- "success" to true- )- )- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/NotificationActivity.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/ui/NotificationActivity.ktdeleted file mode 100644index e890f43f8..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/NotificationActivity.kt+++ /dev/null@@ -1,84 +0,0 @@-package io.openremote.orlib.ui--import android.app.NotificationManager-import android.content.Intent-import android.content.pm.PackageManager-import android.net.Uri-import android.os.Build-import androidx.appcompat.app.AppCompatActivity-import android.os.Bundle-import android.text.TextUtils-import io.openremote.orlib.ORConstants-import io.openremote.orlib.R-import io.openremote.orlib.service.NotificationResource--class NotificationActivity : AppCompatActivity() {- private var notificationResource: NotificationResource? = null-- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)- setContentView(R.layout.activity_notification)- notificationResource = NotificationResource(applicationContext)- }-- override fun onResume() {- super.onResume()- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {- val it = Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)- this.sendBroadcast(it)- }- val notificationId = intent!!.getLongExtra("notificationId", 0L)- val acknowledgement = intent.getStringExtra("acknowledgement")- val manager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager- manager.cancel(java.lang.Long.hashCode(notificationId))- val consoleId = getSharedPreferences(- applicationContext.getString(R.string.app_name),- MODE_PRIVATE- ).getString(ORConstants.CONSOLE_ID_KEY, "")- if (!TextUtils.isEmpty(consoleId)) {- notificationResource!!.notificationAcknowledged(- notificationId,- consoleId,- acknowledgement- )- }- val appUrl = intent.getStringExtra("appUrl")- if (!appUrl.isNullOrBlank()) {- val openInBrowser = intent.getBooleanExtra("openInBrowser", false)- val silent = intent.getBooleanExtra("silent", false)- val data = intent.getStringExtra("data")- var httpMethod = intent.getStringExtra("httpMethod")- httpMethod = if (TextUtils.isEmpty(httpMethod)) "GET" else httpMethod-- when {- openInBrowser -> {- // Don't load the app just send straight to browser- val i = Intent(Intent.ACTION_VIEW)- i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)- i.data = Uri.parse(appUrl)- startActivity(i)- }-- silent -> {- // Do silent HTTP request- notificationResource!!.executeRequest(httpMethod!!, appUrl, data)- }-- else -> {- val pm: PackageManager = packageManager- val launchIntent: Intent =- pm.getLaunchIntentForPackage(applicationContext.packageName) ?: Intent(- applicationContext,- OrMainActivity::class.java- )- launchIntent.addFlags(- Intent.FLAG_ACTIVITY_NEW_TASK or- Intent.FLAG_ACTIVITY_SINGLE_TOP- )- launchIntent.putExtra("appUrl", appUrl)- startActivity(launchIntent)- }- }- }- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrMainActivity.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrMainActivity.ktdeleted file mode 100644index 3e8ca5f5e..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrMainActivity.kt+++ /dev/null@@ -1,982 +0,0 @@-package io.openremote.orlib.ui--import android.Manifest-import android.annotation.SuppressLint-import android.app.Activity-import android.app.DownloadManager-import android.app.NotificationManager-import android.content.*-import android.content.pm.ApplicationInfo-import android.content.pm.PackageManager-import android.graphics.Bitmap-import android.net.ConnectivityManager-import android.net.Uri-import android.os.*-import android.provider.Settings-import android.view.KeyEvent-import android.view.View-import android.webkit.*-import android.webkit.ConsoleMessage.MessageLevel-import android.webkit.WebView.WebViewTransport-import android.widget.ProgressBar-import android.widget.Toast-import androidx.annotation.RequiresApi-import androidx.appcompat.app.AlertDialog-import androidx.core.app.ActivityCompat-import androidx.core.content.ContextCompat-import androidx.preference.PreferenceManager-import com.fasterxml.jackson.core.JsonProcessingException-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper-import com.google.firebase.messaging.FirebaseMessaging-import io.openremote.orlib.ORConstants-import io.openremote.orlib.ORConstants.BASE_URL_KEY-import io.openremote.orlib.ORConstants.CLEAR_URL-import io.openremote.orlib.R-import io.openremote.orlib.databinding.ActivityOrMainBinding-import io.openremote.orlib.service.BleProvider-import io.openremote.orlib.service.GeofenceProvider-import io.openremote.orlib.service.QrScannerProvider-import org.json.JSONException-import org.json.JSONObject-import java.util.logging.Level-import java.util.logging.Logger---open class OrMainActivity : Activity() {-- private val LOG = Logger.getLogger(- OrMainActivity::class.java.name- )-- private val locationResponseCode = 555- private var locationCallback: GeolocationPermissions.Callback? = null;- private var locationOrigin: String? = null;-- private val pushResponseCode = 556-- private lateinit var binding: ActivityOrMainBinding- private lateinit var sharedPreferences: SharedPreferences--- private var mapper = jacksonObjectMapper()- private val connectivityChangeReceiver: ConnectivityChangeReceiver =- ConnectivityChangeReceiver()- private var timeOutHandler: Handler? = null- private var timeOutRunnable: Runnable? = null- private var progressBar: ProgressBar? = null- private var webViewTimeout = ORConstants.WEBVIEW_LOAD_TIMEOUT_DEFAULT- private var webViewLoaded = false- private var geofenceProvider: GeofenceProvider? = null- private var qrScannerProvider: QrScannerProvider? = null- private var bleProvider: BleProvider? = null- private var consoleId: String? = null- private var connectFailCount: Int = 0- private var connectFailResetHandler: Handler? = null- private var connectFailResetRunnable: Runnable? = null- private var baseUrl: String? = null- private var onDownloadCompleteReceiver: BroadcastReceiver = object : BroadcastReceiver() {- override fun onReceive(ctxt: Context, intent: Intent) {- val action = intent.action- if (DownloadManager.ACTION_DOWNLOAD_COMPLETE == action) {- Toast.makeText(applicationContext, R.string.download_completed, Toast.LENGTH_LONG)- .show()- }- }- }-- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)- binding = ActivityOrMainBinding.inflate(layoutInflater)- val view = binding.root- setContentView(view)-- sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)-- try {- val timeoutStr = getString(R.string.OR_CONSOLE_LOAD_TIMEOUT)- webViewTimeout = timeoutStr.toInt()- } catch (nfe: NumberFormatException) {- println("Could not parse console load timeout value: $nfe")- }-- // Enable remote debugging of WebView from Chrome Debugger tools- if (0 != applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE) {- LOG.info("Enabling remote debugging")- WebView.setWebContentsDebuggingEnabled(true)- }-- if (savedInstanceState != null) {- binding.webView.restoreState(savedInstanceState)- } else {- initializeWebView()- }-- progressBar = findViewById(R.id.webProgressBar)- progressBar?.max = 100- progressBar?.progress = 1-- if (intent.hasExtra(BASE_URL_KEY)) {- baseUrl = intent.getStringExtra(BASE_URL_KEY)- }-- sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)-- val host = sharedPreferences.getString(ORConstants.HOST_KEY, null)- val realm = sharedPreferences.getString(ORConstants.REALM_KEY, null)-- openIntentUrl(intent)- }--- override fun onNewIntent(intent: Intent) {- openIntentUrl(intent)- }-- private fun openIntentUrl(intent: Intent) {- when {- intent.hasExtra("appUrl") -> {- val url = intent.getStringExtra("appUrl")!!- LOG.fine("Loading web view: $url")- loadUrl(url)- }-- else -> {- var url = baseUrl- val intentUrl = intent.getStringExtra("appUrl")- if (intentUrl != null) {- url = if (intentUrl.startsWith("http") || intentUrl.startsWith("https")) {- intentUrl- } else {- url + intentUrl- }- }- LOG.fine("Loading web view: $url")- if (url != null) {- loadUrl(url)- }- }- }- }-- override fun onResume() {- super.onResume()- registerReceiver(- connectivityChangeReceiver,- IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)- )- registerReceiver(- onDownloadCompleteReceiver,- IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)- )- }-- override fun onPause() {- super.onPause()- unregisterReceiver(connectivityChangeReceiver)- unregisterReceiver(onDownloadCompleteReceiver)- }-- override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {- if (event.action == KeyEvent.ACTION_DOWN) {- when (keyCode) {- KeyEvent.KEYCODE_BACK -> {- if (binding.webView.canGoBack()) {- binding.webView.goBack()- } else {- finish()- }- return true- }- }- }- return super.onKeyDown(keyCode, event)- }-- override fun onSaveInstanceState(outState: Bundle) {- binding.webView.saveState(outState)- }-- private fun reloadWebView() {- var url = binding.webView.url- if ("about:blank" == url) {- url = baseUrl- LOG.fine("Reloading web view: $url")- loadUrl(url!!)- }- }--- @SuppressLint("SetJavaScriptEnabled")- fun initializeWebView() {- LOG.fine("Initializing web view")- val webAppInterface = WebAppInterface(this)- binding.webView.apply {- addJavascriptInterface(webAppInterface, "MobileInterface")- settings.javaScriptEnabled = true- settings.mixedContentMode = WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE- settings.cacheMode = WebSettings.LOAD_DEFAULT- settings.domStorageEnabled = true- settings.databaseEnabled = true- settings.setSupportMultipleWindows(true)- webViewClient = object : WebViewClient() {- override fun onReceivedHttpError(- view: WebView,- request: WebResourceRequest,- errorResponse: WebResourceResponse- ) {- //When initialising Keycloak with an invalid offline refresh token (e.g. wrong nonce because- // server was reinstalled), we detect the failure and then don't show an error view. We clear the stored- // invalid token. The web app will then start a new login.- if (request.url.lastPathSegment != null && request.url.lastPathSegment == "token" && request.method == "POST" && errorResponse.statusCode == 400) {- storeData(getString(R.string.SHARED_PREF_REFRESH_TOKEN), null)- return- }-- handleError(- errorResponse.statusCode,- errorResponse.reasonPhrase,- request.url.toString()- )- }-- override fun onReceivedError(- view: WebView,- request: WebResourceRequest,- error: WebResourceError- ) {- // Remote debugging session from Chrome wants to load about:blank and then fails with "ERROR_UNSUPPORTED_SCHEME", ignore- if ("net::ERR_CACHE_MISS".contentEquals(error.description)) {- return- }- if (request.url.toString() == "about:blank" && error.errorCode == ERROR_UNSUPPORTED_SCHEME) {- return- }- handleError(- error.errorCode,- error.description.toString(),- request.url.toString()- )- }-- override fun onPageStarted(view: WebView, url: String, favicon: Bitmap?) {- progressBar!!.visibility = View.VISIBLE- timeOutRunnable = Runnable {- if (!webViewLoaded) {- handleError(ERROR_TIMEOUT, "Connection timed out", url)- }- }- timeOutHandler = Looper.myLooper()?.let { Handler(it) }- timeOutHandler!!.postDelayed(timeOutRunnable!!, 5000)- }-- override fun onPageFinished(view: WebView, url: String) {- webViewLoaded = true- progressBar!!.visibility = View.GONE- timeOutRunnable?.let { timeOutHandler!!.removeCallbacks(it) }- }-- override fun shouldOverrideUrlLoading(- view: WebView,- request: WebResourceRequest- ): Boolean {- if (request.url.scheme.equals("webbrowser", ignoreCase = true)) {- val newUrl = request.url.buildUpon().scheme("https").build().toString()- val i = Intent(Intent.ACTION_VIEW)- i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)- i.data = Uri.parse(newUrl)- startActivity(i)- return true- }- if (!request.url.isAbsolute && baseUrl?.isNotEmpty()!!) {- view.loadUrl("${baseUrl}/${request.url}")- return true- }-- return super.shouldOverrideUrlLoading(view, request)- }-- @RequiresApi(Build.VERSION_CODES.O)- override fun onRenderProcessGone(- view: WebView?,- detail: RenderProcessGoneDetail?- ): Boolean {-- if (view == binding.webView && detail?.didCrash() == true) {- onCreate(null)- return true- }-- return super.onRenderProcessGone(view, detail)- }- }- webChromeClient = object : WebChromeClient() {- override fun onConsoleMessage(consoleMessage: ConsoleMessage): Boolean {- val msg =- "WebApp console (" + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber() + "): " + consoleMessage.message()- when (consoleMessage.messageLevel()) {- MessageLevel.DEBUG, MessageLevel.TIP -> LOG.fine(msg)- MessageLevel.LOG -> LOG.info(msg)- else -> LOG.severe(msg)- }- return true- }-- override fun onGeolocationPermissionsShowPrompt(- origin: String?,- callback: GeolocationPermissions.Callback?- ) {- if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {- callback?.invoke(origin, true, false)- } else {- locationCallback = callback- locationOrigin = origin- requestPermissions(- arrayOf(- Manifest.permission.ACCESS_FINE_LOCATION,- Manifest.permission.ACCESS_COARSE_LOCATION- ),- locationResponseCode- )- }- }-- override fun onProgressChanged(view: WebView, progress: Int) {- progressBar!!.progress = progress- }-- override fun onCreateWindow(- view: WebView,- dialog: Boolean,- userGesture: Boolean,- resultMsg: Message- ): Boolean {- val newWebView = WebView(this@OrMainActivity)- view.addView(newWebView)- val transport = resultMsg.obj as WebViewTransport- transport.webView = newWebView- resultMsg.sendToTarget()- newWebView.webViewClient = object : WebViewClient() {- override fun shouldOverrideUrlLoading(- view: WebView,- request: WebResourceRequest- ): Boolean {- val browserIntent = Intent(Intent.ACTION_VIEW)- browserIntent.data = request.url- startActivity(browserIntent)- return true- }- }- return true- }- }-- setDownloadListener { url, userAgent, contentDisposition, mimetype, contentLength ->- val writePermission = Manifest.permission.WRITE_EXTERNAL_STORAGE- if (ContextCompat.checkSelfPermission(- this@OrMainActivity,- writePermission- ) != PackageManager.PERMISSION_GRANTED- ) {- // Write permission has not been granted yet, request it.- requestPermissions(- arrayOf(writePermission),- ORConstants.WRITE_PERMISSION_FOR_DOWNLOAD- )- } else {- val request = DownloadManager.Request(Uri.parse(url))- request.setMimeType(mimetype)- //------------------------COOKIE!!------------------------- val cookies = CookieManager.getInstance().getCookie(url)- request.addRequestHeader("cookie", cookies)- //------------------------COOKIE!!------------------------- request.addRequestHeader("User-Agent", userAgent)- request.setDescription("Downloading file...")- request.setTitle(- URLUtil.guessFileName(- url,- contentDisposition,- mimetype- )- )- request.allowScanningByMediaScanner()- request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)- request.setDestinationInExternalPublicDir(- Environment.DIRECTORY_DOWNLOADS,- URLUtil.guessFileName(url, contentDisposition, mimetype)- )- val dm =- getSystemService(DOWNLOAD_SERVICE) as DownloadManager- Toast.makeText(applicationContext, R.string.downloading_file, Toast.LENGTH_LONG)- .show()- dm.enqueue(request)- }- }- }- }-- private fun handleError(- errorCode: Int,- description: String,- failingUrl: String?- ) {- LOG.warning("Error requesting '$failingUrl': $errorCode($description)")- //TODO should we always ignore image errors and locale json files?- if (failingUrl != null && (failingUrl.endsWith("png")- || failingUrl.endsWith("jpg")- || failingUrl.endsWith("ico")- || failingUrl.contains("locales")- || failingUrl.contains("consoleappconfig"))- ) {- LOG.info("Ignoring error loading image resource")- return- }- // This will be the URL loaded into the webview itself (false for images etc. of the main page)- // Check page load error URL- if (errorCode >= 500) {- if (baseUrl != null && baseUrl != failingUrl && connectFailCount < 10) {- loadUrl(baseUrl!!)- Toast.makeText(this, description, Toast.LENGTH_SHORT).show()- connectFailCount++- connectFailResetRunnable?.let { connectFailResetHandler!!.removeCallbacks(it) }- connectFailResetRunnable = Runnable {- connectFailCount = 0- }- connectFailResetHandler = Looper.myLooper()?.let { Handler(it) }- connectFailResetHandler!!.postDelayed(connectFailResetRunnable!!, 5000)- } else {- val launchIntent = packageManager.getLaunchIntentForPackage(packageName)- if (launchIntent != null) {- launchIntent.putExtra(CLEAR_URL, baseUrl)- launchIntent.flags =- Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK- startActivity(launchIntent)- finish()- }- Toast.makeText(- applicationContext,- "The main page couldn't be opened",- Toast.LENGTH_LONG- ).show()- }- }- }-- fun loadUrl(url: String) {- webViewLoaded = false- val encodedUrl = url.replace(" ", "%20")- binding.webView.loadUrl(encodedUrl)- }-- override fun onRequestPermissionsResult(- requestCode: Int,- permissions: Array<String>,- grantResults: IntArray- ) {- if (requestCode == ORConstants.WRITE_PERMISSION_FOR_DOWNLOAD) {- if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {- Toast.makeText(applicationContext, R.string.downloading_file, Toast.LENGTH_LONG)- .show()- }- } else if (requestCode == GeofenceProvider.locationResponseCode) {- geofenceProvider?.onRequestPermissionsResult(this)- } else if (requestCode == locationResponseCode) {- if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {- locationCallback?.invoke(locationOrigin, true, false)- }- } else if (requestCode == BleProvider.BLUETOOTH_PERMISSION_REQUEST_CODE || requestCode == BleProvider.ENABLE_BLUETOOTH_REQUEST_CODE) {- bleProvider?.onRequestPermissionsResult(- this,- requestCode,- object : BleProvider.BleCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- } else if (requestCode == pushResponseCode) {- if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {- notifyClient(hashMapOf(- "action" to "PROVIDER_ENABLE",- "provider" to "push",- "hasPermission" to true,- "success" to true- ))- }- } else {- super.onRequestPermissionsResult(requestCode, permissions, grantResults)- }- super.onRequestPermissionsResult(requestCode, permissions, grantResults)- }-- override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {- super.onActivityResult(requestCode, resultCode, data)- if (requestCode == QrScannerProvider.REQUEST_SCAN_QR) {- val response = when (resultCode) {- RESULT_OK -> {- val qrResult = data?.getStringExtra("result")-- hashMapOf(- "action" to "SCAN_RESULT",- "provider" to "qr",- "data" to hashMapOf("result" to qrResult)- )- }-- else -> hashMapOf(- "action" to "SCAN_RESULT",- "provider" to "qr",- "data" to hashMapOf("result" to "FAILED")- )- }- notifyClient(response)- }- }-- private inner class WebAppInterface(- private val activity: Activity- ) {- @JavascriptInterface- @Throws(JSONException::class)- public fun postMessage(jsonMessage: String) {- val reader = JSONObject(jsonMessage)- val messageType = reader.getString("type")- val data = reader.optJSONObject("data")- LOG.info("Received WebApp message: $data")-- when (messageType) {- "error" -> {- LOG.fine("Received WebApp message, error: " + data?.getString("error"))- Toast.makeText(- this@OrMainActivity,- "Error occurred ${data?.getString("error")}",- Toast.LENGTH_LONG- ).show()- }-- "provider" -> {- data?.let {- val action = it.getString("action")- if (!action.isNullOrEmpty()) {- val provider = it.getString("provider")- when {- provider.equals("geofence", ignoreCase = true) -> {- handleGeofenceProviderMessage(it)- }-- provider.equals("push", ignoreCase = true) -> {- handlePushProviderMessage(it)- }-- provider.equals("storage", ignoreCase = true) -> {- handleStorageProviderMessage(it)- }-- provider.equals("qr", ignoreCase = true) -> {- handleQrScannerProviderMessage(it)- }-- provider.equals("ble", ignoreCase = true) -> {- handleBleProviderMessage(it)- }- }- }- }- }- }- }-- @Throws(JSONException::class)- private fun handleGeofenceProviderMessage(data: JSONObject) {- val action = data.getString("action")- if (geofenceProvider == null) {- geofenceProvider = GeofenceProvider(activity)- }- when {- action.equals("PROVIDER_INIT", ignoreCase = true) -> {- val initData: Map<String, Any> = geofenceProvider!!.initialize()- notifyClient(initData)- }-- action.equals("PROVIDER_ENABLE", ignoreCase = true) -> {- val consoleId = data.getString("consoleId")- (activity as OrMainActivity).consoleId = consoleId- geofenceProvider?.enable(this@OrMainActivity, baseUrl ?: "",- consoleId, object : GeofenceProvider.GeofenceCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }-- action.equals("PROVIDER_DISABLE", ignoreCase = true) -> {- geofenceProvider?.disable()- val response: MutableMap<String, Any> = HashMap()- response["action"] = "PROVIDER_DISABLE"- response["provider"] = "geofence"- notifyClient(response)- }-- action.equals("GEOFENCE_REFRESH", ignoreCase = true) -> {- geofenceProvider?.refreshGeofences()- }-- action.equals("GET_LOCATION", ignoreCase = true) -> {- geofenceProvider?.getLocation(- this@OrMainActivity,- object : GeofenceProvider.GeofenceCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }- }- }-- @Throws(JSONException::class)- private fun handlePushProviderMessage(data: JSONObject) {- val action = data.getString("action")- when {- action.equals("PROVIDER_INIT", ignoreCase = true) -> {- // Push permission is covered by the INTERNET permission and is not a runtime permission- val response: MutableMap<String, Any> = HashMap()- response["action"] = "PROVIDER_INIT"- response["provider"] = "push"- response["version"] = "fcm"- response["enabled"] = false- response["disabled"] =- sharedPreferences.contains(ORConstants.PUSH_PROVIDER_DISABLED_KEY)- response["requiresPermission"] = false- response["hasPermission"] = true- response["success"] = true- notifyClient(response)- }-- action.equals("PROVIDER_ENABLE", ignoreCase = true) -> {- val consoleId = data.getString("consoleId")- sharedPreferences.edit()- .putString(ORConstants.CONSOLE_ID_KEY, consoleId)- .remove(ORConstants.PUSH_PROVIDER_DISABLED_KEY)- .apply()- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {- if (ContextCompat.checkSelfPermission(- this@OrMainActivity,- Manifest.permission.POST_NOTIFICATIONS- ) != PackageManager.PERMISSION_GRANTED- ) {- if (ActivityCompat.shouldShowRequestPermissionRationale(- this@OrMainActivity,- Manifest.permission.POST_NOTIFICATIONS- )- ) {- AlertDialog.Builder(this@OrMainActivity)- .setTitle(R.string.push_notification_alert_title)- .setMessage(R.string.push_notification_alert_message)- .setIcon(R.drawable.ic_notification)- .setCancelable(false)- .setPositiveButton(- R.string.yes- ) { dialog, which ->- requestPermissions(- arrayOf(Manifest.permission.POST_NOTIFICATIONS),- pushResponseCode- )- }- .setNegativeButton(- R.string.no- ) { dialog, which ->- sharedPreferences.edit()- .putBoolean(- ORConstants.PUSH_PROVIDER_DISABLED_KEY,- true- )- .apply()- notifyClient(- hashMapOf(- "action" to "PROVIDER_ENABLE",- "provider" to "push",- "hasPermission" to false,- "success" to true- )- )- }.show()- } else {- requestPermissions(- arrayOf(Manifest.permission.POST_NOTIFICATIONS),- pushResponseCode- )- }- } else {- val mgr =- [email protected](NOTIFICATION_SERVICE) as NotificationManager- if (!mgr.areNotificationsEnabled()) {- AlertDialog.Builder(this@OrMainActivity)- .setTitle(R.string.push_notification_alert_title)- .setMessage(R.string.push_notification_alert_message)- .setIcon(R.drawable.ic_notification)- .setCancelable(false)- .setPositiveButton(- R.string.yes- ) { dialog, which ->- val intent = Intent()- intent.action = Settings.ACTION_APP_NOTIFICATION_SETTINGS- intent.putExtra(- Settings.EXTRA_APP_PACKAGE,- )- startActivity(intent)- }- .setNegativeButton(- R.string.no- ) { dialog, which ->- sharedPreferences.edit()- .putBoolean(- ORConstants.PUSH_PROVIDER_DISABLED_KEY,- true- )- .apply()- notifyClient(- hashMapOf(- "action" to "PROVIDER_ENABLE",- "provider" to "push",- "hasPermission" to false,- "success" to true- )- )- }.show()- }- }- }- // TODO: Implement topic support- FirebaseMessaging.getInstance().token.addOnCompleteListener { task ->- val response: MutableMap<String, Any?> =- HashMap()- response["action"] = "PROVIDER_ENABLE"- response["provider"] = "push"- response["hasPermission"] = true- response["success"] = true- val responseData: MutableMap<String, Any> =- HashMap()- if (task.isSuccessful) {- responseData["token"] = task.result- }- response["data"] = responseData- notifyClient(response)- }- }-- action.equals("PROVIDER_DISABLE", ignoreCase = true) -> {- // Cannot disable push notifications- val response: MutableMap<String, Any?> = HashMap()- response["action"] = "PROVIDER_DISABLE"- response["provider"] = "push"- sharedPreferences.edit()- .putBoolean(ORConstants.PUSH_PROVIDER_DISABLED_KEY, true).apply()- notifyClient(response)- }- }- }-- @Throws(JSONException::class)- private fun handleStorageProviderMessage(data: JSONObject) {- val action = data.getString("action")- when {- action.equals("PROVIDER_INIT", ignoreCase = true) -> {- val response: MutableMap<String, Any> = HashMap()- response["action"] = "PROVIDER_INIT"- response["provider"] = "storage"- response["version"] = "1.0.0"- response["enabled"] = true- response["requiresPermission"] = false- response["hasPermission"] = true- response["success"] = true- notifyClient(response)- }-- action.equals("PROVIDER_ENABLE", ignoreCase = true) -> {- // Doesn't require enabling but just in case it gets called lets return a valid response- val response: MutableMap<String, Any> = HashMap()- response["action"] = "PROVIDER_ENABLE"- response["provider"] = "storage"- response["hasPermission"] = true- response["success"] = true- notifyClient(response)- }-- action.equals("STORE", ignoreCase = true) -> {- try {- val key = data.getString("key")- val valueJson = data.getString("value")- storeData(key, valueJson)- } catch (e: JSONException) {- LOG.log(Level.SEVERE, "Failed to store data", e)- }- }-- action.equals("RETRIEVE", ignoreCase = true) -> {- try {- val key = data.getString("key")- val dataJson = retrieveData(key)- val response: MutableMap<String, Any?> = HashMap()- response["action"] = "RETRIEVE"- response["provider"] = "storage"- response["key"] = key- response["value"] = dataJson- notifyClient(response)- } catch (e: JSONException) {- LOG.log(Level.SEVERE, "Failed to retrieve data", e)- }- }- }- }-- @Throws(JSONException::class)- private fun handleQrScannerProviderMessage(data: JSONObject) {- val action = data.getString("action")- if (qrScannerProvider == null) {- qrScannerProvider = QrScannerProvider(activity)- }- when {- action.equals("PROVIDER_INIT", ignoreCase = true) -> {- val initData: Map<String, Any> = qrScannerProvider!!.initialize()- notifyClient(initData)- }-- action.equals("PROVIDER_ENABLE", ignoreCase = true) -> {-- qrScannerProvider?.enable(object : QrScannerProvider.ScannerCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }-- action.equals("PROVIDER_DISABLE", ignoreCase = true) -> {- val response = qrScannerProvider?.disable()- notifyClient(response)- }-- action.equals("SCAN_QR", ignoreCase = true) -> {- qrScannerProvider?.startScanner(this@OrMainActivity, object :- QrScannerProvider.ScannerCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }- }- }-- @Throws(JSONException::class)- private fun handleBleProviderMessage(data: JSONObject) {- val action = data.getString("action")- if (bleProvider == null) {- bleProvider = BleProvider(activity)- }- when {- action.equals("PROVIDER_INIT", ignoreCase = true) -> {- val initData: Map<String, Any> = bleProvider!!.initialize()- notifyClient(initData)- }-- action.equals("PROVIDER_ENABLE", ignoreCase = true) -> {- bleProvider?.enable(object : BleProvider.BleCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }-- action.equals("PROVIDER_DISABLE", ignoreCase = true) -> {- val response = bleProvider?.disable()- notifyClient(response)- }-- action.equals("SCAN_BLE_DEVICES", ignoreCase = true) -> {- bleProvider?.startBLEScan(- this@OrMainActivity,- object : BleProvider.BleCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }-- action.equals("CONNECT_TO_DEVICE", ignoreCase = true) -> {- val address = data.getString("address")- bleProvider?.connectToDevice(address, object : BleProvider.BleCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }-- action.equals("SEND_TO_DEVICE", ignoreCase = true) -> {- val attributeId = data.getString("attributeId")- val value = data.get("value")- bleProvider?.sendToDevice(attributeId, value, object : BleProvider.BleCallback {- override fun accept(responseData: Map<String, Any>) {- notifyClient(responseData)- }- })- }- }- }- }-- private fun notifyClient(data: Map<String, Any?>?) {- try {- var jsonString = mapper.writeValueAsString(data)-- // Double escape quotes (this is needed for browsers to be able to parse the response)- jsonString = jsonString.replace("\\\"", "\\\\\"")-- LOG.info("notifyClient with message: $jsonString")- runOnUiThread {- binding.webView.evaluateJavascript(- String.format(- "OpenRemoteConsole._handleProviderResponse('%s')",- jsonString- ), null- )- }- } catch (e: JsonProcessingException) {- e.printStackTrace()- }- }-- private fun storeData(key: String?, data: String?) {- val editor = sharedPreferences.edit()- if (data == null) {- editor.remove(key)- } else {- editor.putString(key, data)- }- editor.apply()- }-- private fun retrieveData(key: String?): Any? {- val str = sharedPreferences.getString(key, null) ?: return null- // Parse data JSON- return try {- mapper.readTree(str)- } catch (e: JsonProcessingException) {- str- }- }-- private fun onConnectivityChanged(connectivity: Boolean) {- LOG.info("Connectivity changed: $connectivity")- if (connectivity) {- reloadWebView()- } else {- Toast.makeText(this, "Check your connection", Toast.LENGTH_LONG).show()- }- }-- private inner class ConnectivityChangeReceiver : BroadcastReceiver() {- override fun onReceive(context: Context, intent: Intent) {- val cm = getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager- val activeNetwork = cm.activeNetworkInfo- onConnectivityChanged(activeNetwork != null && activeNetwork.isConnectedOrConnecting)- }- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrPrivacyPolicyActivity.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrPrivacyPolicyActivity.ktdeleted file mode 100644index 87eb3e224..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrPrivacyPolicyActivity.kt+++ /dev/null@@ -1,37 +0,0 @@-package io.openremote.orlib.ui--import android.content.Intent-import android.os.Bundle-import android.view.View-import androidx.appcompat.app.AppCompatActivity-import io.openremote.orlib.databinding.ActivityOrPrivacyPolicyBinding--class OrPrivacyPolicyActivity : AppCompatActivity() {-- private lateinit var binding: ActivityOrPrivacyPolicyBinding- private var isAccepted = false--- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)- binding = ActivityOrPrivacyPolicyBinding.inflate(layoutInflater)- val view = binding.root- setContentView(view)-- binding.webView.loadUrl("https://openremote.io/privacy-policy/")-- binding.buttonAccept.setOnClickListener {- if (isAccepted) {- val intent = Intent()- setResult(RESULT_OK, intent)- finish()- }- }-- binding.checkbox.setOnClickListener(View.OnClickListener { v: View? ->- isAccepted = !isAccepted-- binding.buttonAccept.setEnabled(isAccepted)- })- }-}\ No newline at end of filediff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/QrScannerActivity.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/ui/QrScannerActivity.ktdeleted file mode 100644index dd1c1f42e..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/QrScannerActivity.kt+++ /dev/null@@ -1,157 +0,0 @@-package io.openremote.orlib.ui--import android.Manifest-import android.annotation.SuppressLint-import android.content.Intent-import android.content.pm.PackageManager-import android.os.Bundle-import android.view.SurfaceHolder-import android.view.SurfaceView-import androidx.activity.OnBackPressedCallback-import androidx.appcompat.app.AlertDialog-import androidx.appcompat.app.AppCompatActivity-import androidx.core.app.ActivityCompat-import com.google.android.gms.vision.CameraSource-import com.google.android.gms.vision.Detector-import com.google.android.gms.vision.Detector.Detections-import com.google.android.gms.vision.barcode.Barcode-import com.google.android.gms.vision.barcode.BarcodeDetector-import io.openremote.orlib.R-import io.openremote.orlib.databinding.ActivityOrQrScannerBinding-import java.io.IOException--class QrScannerActivity : AppCompatActivity() {- private var binding: ActivityOrQrScannerBinding? = null- private var surfaceView: SurfaceView? = null- private var barcodeDetector: BarcodeDetector? = null- private var cameraSource: CameraSource? = null-- override fun onCreate(savedInstanceState: Bundle?) {- super.onCreate(savedInstanceState)- binding = ActivityOrQrScannerBinding.inflate(layoutInflater)- val view = binding!!.root-- setContentView(view)- supportActionBar!!.title = "Scan QR Code"- initViews()- initialiseDetectorsAndSources()-- onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {- override fun handleOnBackPressed() {- val data = Intent()- data.putExtra("result", "CANCELED")- setResult(RESULT_OK, data)- finish()- }- })- }-- private fun initViews() {- surfaceView = findViewById(R.id.surfaceView)- }-- private fun initialiseDetectorsAndSources() {- barcodeDetector = BarcodeDetector.Builder(this)- .setBarcodeFormats(Barcode.QR_CODE)- .build()- cameraSource = CameraSource.Builder(this, barcodeDetector)- .setAutoFocusEnabled(true) //you should add this feature- .setFacing(CameraSource.CAMERA_FACING_BACK)- .build()- surfaceView!!.holder.addCallback(object : SurfaceHolder.Callback {- override fun surfaceCreated(holder: SurfaceHolder) {- try {- if (ActivityCompat.checkSelfPermission(- this@QrScannerActivity,- Manifest.permission.CAMERA- ) == PackageManager.PERMISSION_GRANTED- ) {- cameraSource!!.start(surfaceView!!.holder)- } else {- ActivityCompat.requestPermissions(- this@QrScannerActivity,- arrayOf(Manifest.permission.CAMERA),- REQUEST_CAMERA_PERMISSION- )- }- } catch (e: IOException) {- e.printStackTrace()- }- }-- override fun surfaceChanged(- holder: SurfaceHolder,- format: Int,- width: Int,- height: Int- ) {- }-- override fun surfaceDestroyed(holder: SurfaceHolder) {- cameraSource!!.stop()- }- })- barcodeDetector!!.setProcessor(object : Detector.Processor<Barcode> {- override fun release() {- }-- override fun receiveDetections(detections: Detections<Barcode>) {- val barcodes = detections.detectedItems- if (barcodes.size() != 0) {- val data = Intent()- data.putExtra("result", barcodes.valueAt(0).displayValue)- setResult(RESULT_OK, data)- finish()- }- }- })- }-- @SuppressLint("MissingPermission")- override fun onRequestPermissionsResult(- requestCode: Int,- permissions: Array<String>,- grantResults: IntArray- ) {- super.onRequestPermissionsResult(requestCode, permissions, grantResults)- if (requestCode == REQUEST_CAMERA_PERMISSION && grantResults[0] == PackageManager.PERMISSION_GRANTED) {- try {- cameraSource!!.start(surfaceView!!.holder)- } catch (e: IOException) {- e.printStackTrace()- }- } else {- AlertDialog.Builder(this)- .setIcon(R.mipmap.ic_launcher)- .setTitle(R.string.camera_needed_alert_title)- .setMessage(R.string.camera_needed_alert_body)- .setNegativeButton(R.string.no, null)- .setPositiveButton(R.string.yes) { dialog, which ->- ActivityCompat.requestPermissions(- this,- arrayOf(Manifest.permission.CAMERA),- REQUEST_CAMERA_PERMISSION- )- }- .show()- }- }-- override fun onDestroy() {- if (barcodeDetector != null) {- barcodeDetector!!.release()- barcodeDetector = null- }-- if (cameraSource != null) {- cameraSource!!.stop()- cameraSource!!.release()- cameraSource = null- }- super.onDestroy()- }-- companion object {- private const val REQUEST_CAMERA_PERMISSION = 201- }-}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/QrScannerView.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/ui/QrScannerView.ktdeleted file mode 100644index 1204d49e4..000000000--- a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/QrScannerView.kt+++ /dev/null@@ -1,83 +0,0 @@-package io.openremote.orlib.ui--import android.content.Context-import android.graphics.Canvas-import android.graphics.Color-import android.graphics.Paint-import android.graphics.Point-import android.os.Build-import android.util.AttributeSet-import android.view.View-import androidx.annotation.RequiresApi-import androidx.core.content.ContextCompat-import io.openremote.orlib.R--class QrScannerView : View {- private var mPaint: Paint? = null- private var mStrokePaint: Paint? = null- private val pTopLeft = Point()- private val pBotRight = Point()-- constructor(context: Context?) : super(context) {- initPaints()- }-- constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {- initPaints()- }-- constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(- context,- attrs,- defStyleAttr- ) {- initPaints()- }-- private fun initPaints() {- mPaint = Paint()- mPaint!!.color = Color.parseColor("#A6000000")- mStrokePaint = Paint()- mStrokePaint!!.color = Color.YELLOW- mStrokePaint!!.strokeWidth = 4f- mStrokePaint!!.style = Paint.Style.STROKE- }-- override fun onDraw(canvas: Canvas) {- super.onDraw(canvas)- pTopLeft.x = width / 13 + 10- pTopLeft.y = height / 4 + 20- pBotRight.x = width - pTopLeft.x - 10- pBotRight.y = height - pTopLeft.y - 20- mPaint!!.color = Color.parseColor("#77000000")-- //Top Rect- canvas.drawRect(0f, 0f, width.toFloat(), pTopLeft.y.toFloat(), mPaint!!)-- //Left Rect- canvas.drawRect(- 0f,- pTopLeft.y.toFloat(),- pTopLeft.x.toFloat(),- pBotRight.y.toFloat(),- mPaint!!- )-- //Right Rect- canvas.drawRect(- pBotRight.x.toFloat(),- pTopLeft.y.toFloat(),- width.toFloat(),- pBotRight.y.toFloat(),- mPaint!!- )-- //Bottom rect- canvas.drawRect(0f, pBotRight.y.toFloat(), width.toFloat(), height.toFloat(), mPaint!!)-- //Draw Outer Line drawable- val d = ContextCompat.getDrawable(context, R.drawable.scanner_outline)- d?.setBounds(pTopLeft.x, pTopLeft.y, pBotRight.x, pBotRight.y)- d?.draw(canvas)- }-}diff --git a/console/android/ORLib/src/main/res/drawable-hdpi/ic_notification.png b/console/android/ORLib/src/main/res/drawable-hdpi/ic_notification.pngdeleted file mode 100644index 417e9cf46..000000000Binary files a/console/android/ORLib/src/main/res/drawable-hdpi/ic_notification.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/drawable-mdpi/ic_notification.png b/console/android/ORLib/src/main/res/drawable-mdpi/ic_notification.pngdeleted file mode 100644index fd5a4282b..000000000Binary files a/console/android/ORLib/src/main/res/drawable-mdpi/ic_notification.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/drawable-v24/ic_launcher_foreground.xml b/console/android/ORLib/src/main/res/drawable-v24/ic_launcher_foreground.xmldeleted file mode 100644index 2b068d114..000000000--- a/console/android/ORLib/src/main/res/drawable-v24/ic_launcher_foreground.xml+++ /dev/null@@ -1,30 +0,0 @@-<vector xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:aapt="http://schemas.android.com/aapt"- android:width="108dp"- android:height="108dp"- android:viewportWidth="108"- android:viewportHeight="108">- <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">- <aapt:attr name="android:fillColor">- <gradient- android:endX="85.84757"- android:endY="92.4963"- android:startX="42.9492"- android:startY="49.59793"- android:type="linear">- <item- android:color="#44000000"- android:offset="0.0" />- <item- android:color="#00000000"- android:offset="1.0" />- </gradient>- </aapt:attr>- </path>- <path- android:fillColor="#FFFFFF"- android:fillType="nonZero"- android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"- android:strokeWidth="1"- android:strokeColor="#00000000" />-</vector>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/drawable-xhdpi/ic_notification.png b/console/android/ORLib/src/main/res/drawable-xhdpi/ic_notification.pngdeleted file mode 100644index 9a563a433..000000000Binary files a/console/android/ORLib/src/main/res/drawable-xhdpi/ic_notification.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/drawable-xxhdpi/ic_notification.png b/console/android/ORLib/src/main/res/drawable-xxhdpi/ic_notification.pngdeleted file mode 100644index e9b08914a..000000000Binary files a/console/android/ORLib/src/main/res/drawable-xxhdpi/ic_notification.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/drawable-xxxhdpi/ic_notification.png b/console/android/ORLib/src/main/res/drawable-xxxhdpi/ic_notification.pngdeleted file mode 100644index e0107cd52..000000000Binary files a/console/android/ORLib/src/main/res/drawable-xxxhdpi/ic_notification.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/drawable/cog.png b/console/android/ORLib/src/main/res/drawable/cog.pngdeleted file mode 100644index 7d7d8c246..000000000Binary files a/console/android/ORLib/src/main/res/drawable/cog.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/drawable/empty.xml b/console/android/ORLib/src/main/res/drawable/empty.xmldeleted file mode 100644index a8b409b1d..000000000--- a/console/android/ORLib/src/main/res/drawable/empty.xml+++ /dev/null@@ -1,4 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<selector xmlns:android="http://schemas.android.com/apk/res/android">--</selector>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/drawable/ic_launcher_background.xml b/console/android/ORLib/src/main/res/drawable/ic_launcher_background.xmldeleted file mode 100644index 07d5da9cb..000000000--- a/console/android/ORLib/src/main/res/drawable/ic_launcher_background.xml+++ /dev/null@@ -1,170 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="108dp"- android:height="108dp"- android:viewportWidth="108"- android:viewportHeight="108">- <path- android:fillColor="#3DDC84"- android:pathData="M0,0h108v108h-108z" />- <path- android:fillColor="#00000000"- android:pathData="M9,0L9,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,0L19,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M29,0L29,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M39,0L39,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M49,0L49,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M59,0L59,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M69,0L69,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M79,0L79,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M89,0L89,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M99,0L99,108"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,9L108,9"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,19L108,19"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,29L108,29"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,39L108,39"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,49L108,49"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,59L108,59"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,69L108,69"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,79L108,79"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,89L108,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M0,99L108,99"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,29L89,29"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,39L89,39"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,49L89,49"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,59L89,59"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,69L89,69"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M19,79L89,79"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M29,19L29,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M39,19L39,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M49,19L49,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M59,19L59,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M69,19L69,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />- <path- android:fillColor="#00000000"- android:pathData="M79,19L79,89"- android:strokeWidth="0.8"- android:strokeColor="#33FFFFFF" />-</vector>diff --git a/console/android/ORLib/src/main/res/drawable/ic_menu.xml b/console/android/ORLib/src/main/res/drawable/ic_menu.xmldeleted file mode 100644index e1c8eb120..000000000--- a/console/android/ORLib/src/main/res/drawable/ic_menu.xml+++ /dev/null@@ -1,9 +0,0 @@-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="24dp"- android:height="24dp"- android:viewportHeight="24.0"- android:viewportWidth="24.0">- <path- android:fillColor="#ffffff"- android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z" />-</vector>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/drawable/notification_icon.xml b/console/android/ORLib/src/main/res/drawable/notification_icon.xmldeleted file mode 100644index 37d07f447..000000000--- a/console/android/ORLib/src/main/res/drawable/notification_icon.xml+++ /dev/null@@ -1,4 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"- android:src="@drawable/ic_notification">-</bitmap>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/drawable/scanner_outline.xml b/console/android/ORLib/src/main/res/drawable/scanner_outline.xmldeleted file mode 100644index 3453e035a..000000000--- a/console/android/ORLib/src/main/res/drawable/scanner_outline.xml+++ /dev/null@@ -1,16 +0,0 @@-<vector- xmlns:android="http://schemas.android.com/apk/res/android"- android:width="220dp" android:height="220dp" android:viewportHeight="230.0" android:viewportWidth="230.0">- <path android:fillColor="#00000000" android:fillType="evenOdd"- android:pathData="M165,5C178.2,5 198.2,5 225,5L225,30.79L225,65"- android:strokeColor="@color/qr_code_reader_square" android:strokeWidth="10"/>- <path android:fillColor="#00000000" android:fillType="evenOdd"- android:pathData="M5,65C5,51.8 5,31.8 5,5L30.79,5L65,5"- android:strokeColor="@color/qr_code_reader_square" android:strokeWidth="10"/>- <path android:fillColor="#00000000" android:fillType="evenOdd"- android:pathData="M165,225C178.2,225 198.2,225 225,225L225,199.21L225,165"- android:strokeColor="@color/qr_code_reader_square" android:strokeWidth="10"/>- <path android:fillColor="#00000000" android:fillType="evenOdd"- android:pathData="M5,165C5,178.2 5,198.2 5,225L30.79,225L65,225"- android:strokeColor="@color/qr_code_reader_square" android:strokeWidth="10"/>-</vector>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/layout/activity_notification.xml b/console/android/ORLib/src/main/res/layout/activity_notification.xmldeleted file mode 100644index fc7a8d19f..000000000--- a/console/android/ORLib/src/main/res/layout/activity_notification.xml+++ /dev/null@@ -1,8 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- tools:context=".ui.NotificationActivity">--</androidx.constraintlayout.widget.ConstraintLayout>diff --git a/console/android/ORLib/src/main/res/layout/activity_or_main.xml b/console/android/ORLib/src/main/res/layout/activity_or_main.xmldeleted file mode 100644index 99446ed15..000000000--- a/console/android/ORLib/src/main/res/layout/activity_or_main.xml+++ /dev/null@@ -1,32 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:tools="http://schemas.android.com/tools"- android:id="@+id/activity_web"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:clipChildren="false"- android:clipToPadding="false"- android:padding="0dp"- tools:context=".ui.OrMainActivity">-- <WebView- android:id="@+id/webView"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_alignParentStart="true"- android:layout_alignParentEnd="true">- </WebView>-- <ProgressBar- android:id="@+id/webProgressBar"- style="?android:attr/progressBarStyleHorizontal"- android:layout_width="match_parent"- android:layout_height="wrap_content"- android:layout_alignParentTop="true"- android:layout_marginTop="-7dp"- android:background="@android:color/transparent"- android:indeterminate="false"- android:max="100"- android:progress="1"/>--</RelativeLayout>diff --git a/console/android/ORLib/src/main/res/layout/activity_or_privacy_policy.xml b/console/android/ORLib/src/main/res/layout/activity_or_privacy_policy.xmldeleted file mode 100644index a16cd5dda..000000000--- a/console/android/ORLib/src/main/res/layout/activity_or_privacy_policy.xml+++ /dev/null@@ -1,56 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"- xmlns:app="http://schemas.android.com/apk/res-auto"- xmlns:tools="http://schemas.android.com/tools"- android:layout_width="match_parent"- android:layout_height="match_parent"- tools:context=".ui.OrPrivacyPolicyActivity">-- <WebView- android:id="@+id/webView"- android:layout_width="match_parent"- android:layout_height="0dp"- app:layout_constraintBottom_toTopOf="@id/acceptView"- app:layout_constraintTop_toTopOf="parent" />-- <androidx.constraintlayout.widget.ConstraintLayout- android:id="@+id/acceptView"- android:layout_width="0dp"- android:layout_height="wrap_content"- android:orientation="horizontal"- android:layout_margin="10dp"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintLeft_toLeftOf="parent"- app:layout_constraintRight_toRightOf="parent"- app:layout_constraintTop_toBottomOf="@+id/webView"- >-- <CheckBox- android:id="@+id/checkbox"- android:layout_width="50dp"- android:layout_height="50dp"- android:button="@null"- android:textColor="@color/medium_green"- android:background="?android:attr/listChoiceIndicatorMultiple"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toStartOf="@+id/button_accept"- app:layout_constraintStart_toStartOf="parent"- app:layout_constraintTop_toTopOf="parent" />-- <Button- android:id="@+id/button_accept"- android:layout_width="wrap_content"- android:layout_height="wrap_content"- android:layout_gravity="end"- android:background="@color/medium_green"- android:minWidth="300dp"- android:text="@string/button_accept"- android:textColor="@color/white"- app:layout_constraintBottom_toBottomOf="parent"- app:layout_constraintEnd_toEndOf="parent"- app:layout_constraintTop_toTopOf="parent"- android:enabled="false"/>-- </androidx.constraintlayout.widget.ConstraintLayout>--</androidx.constraintlayout.widget.ConstraintLayout>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/layout/activity_or_qr_scanner.xml b/console/android/ORLib/src/main/res/layout/activity_or_qr_scanner.xmldeleted file mode 100644index 4252061c1..000000000--- a/console/android/ORLib/src/main/res/layout/activity_or_qr_scanner.xml+++ /dev/null@@ -1,20 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"- android:layout_width="match_parent"- android:layout_height="match_parent"- xmlns:tools="http://schemas.android.com/tools"- tools:context=".ui.QrScannerActivity">-- <SurfaceView- android:id="@+id/surfaceView"- android:layout_width="match_parent"- android:layout_height="match_parent"- android:layout_alignParentStart="true"- android:layout_alignParentLeft="true"- android:layout_centerVertical="true" />-- <io.openremote.orlib.ui.QrScannerView- android:layout_width="match_parent"- android:layout_height="match_parent"/>--</RelativeLayout>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/mipmap-hdpi/ic_launcher.png b/console/android/ORLib/src/main/res/mipmap-hdpi/ic_launcher.pngdeleted file mode 100644index 54cd86b46..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-hdpi/ic_launcher_round.png b/console/android/ORLib/src/main/res/mipmap-hdpi/ic_launcher_round.pngdeleted file mode 100644index 396d1025a..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-mdpi/ic_launcher.png b/console/android/ORLib/src/main/res/mipmap-mdpi/ic_launcher.pngdeleted file mode 100644index 70392d057..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-mdpi/ic_launcher_round.png b/console/android/ORLib/src/main/res/mipmap-mdpi/ic_launcher_round.pngdeleted file mode 100644index 3a0e7a10b..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-xhdpi/ic_launcher.png b/console/android/ORLib/src/main/res/mipmap-xhdpi/ic_launcher.pngdeleted file mode 100644index 7f04802ee..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/console/android/ORLib/src/main/res/mipmap-xhdpi/ic_launcher_round.pngdeleted file mode 100644index 89b0e6c8f..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-xxhdpi/ic_launcher.png b/console/android/ORLib/src/main/res/mipmap-xxhdpi/ic_launcher.pngdeleted file mode 100644index 57bc10b00..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/console/android/ORLib/src/main/res/mipmap-xxhdpi/ic_launcher_round.pngdeleted file mode 100644index 86e48768d..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/console/android/ORLib/src/main/res/mipmap-xxxhdpi/ic_launcher.pngdeleted file mode 100644index 0dfb6a489..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/console/android/ORLib/src/main/res/mipmap-xxxhdpi/ic_launcher_round.pngdeleted file mode 100644index eac166b6e..000000000Binary files a/console/android/ORLib/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differdiff --git a/console/android/ORLib/src/main/res/values/colors.xml b/console/android/ORLib/src/main/res/values/colors.xmldeleted file mode 100644index 99835a70f..000000000--- a/console/android/ORLib/src/main/res/values/colors.xml+++ /dev/null@@ -1,22 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <item name="black" type="color">#ff000000</item>- <item name="white" type="color">#ffffffff</item>-- <item name="dark_grey" type="color">#ff455a64</item>- <item name="medium_grey" type="color">#ff919194</item>- <item name="light_grey" type="color">#ffcccccc</item>- <item name="bright_grey" type="color">#fff5f5f5</item>-- <item name="dark_green" type="color">#ff006224</item>- <item name="medium_green" type="color">#ff49a942</item>- <item name="light_green" type="color">#ffc1d72f</item>-- <item name="red" type="color">#ffe64a19</item>- <item name="yellow" type="color">#fffbc02d</item>- <item name="blue" type="color">#ff1976d2</item>- <item name="purple" type="color">#ff660092</item>-- <color name="qr_code_reader_square">#FFFFFFFF</color>- <color name="transparent">#00000000</color>-</resources>diff --git a/console/android/ORLib/src/main/res/values/dimens.xml b/console/android/ORLib/src/main/res/values/dimens.xmldeleted file mode 100644index 1a7ba4a1a..000000000--- a/console/android/ORLib/src/main/res/values/dimens.xml+++ /dev/null@@ -1,15 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <!--- Because the window insets on round devices are larger than 15dp, this padding only applies- to square screens.- -->- <dimen name="box_inset_layout_padding">0dp</dimen>-- <!--- This padding applies to both square and round screens. The total padding between the buttons- and the window insets is box_inset_layout_padding (above variable) on square screens and- inner_frame_layout_padding (below variable) on round screens.- -->- <dimen name="inner_frame_layout_padding">5dp</dimen>-</resources>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/values/ic_launcher_background.xml b/console/android/ORLib/src/main/res/values/ic_launcher_background.xmldeleted file mode 100644index c5d5899fd..000000000--- a/console/android/ORLib/src/main/res/values/ic_launcher_background.xml+++ /dev/null@@ -1,4 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <color name="ic_launcher_background">#FFFFFF</color>-</resources>\ No newline at end of filediff --git a/console/android/ORLib/src/main/res/values/strings.xml b/console/android/ORLib/src/main/res/values/strings.xmldeleted file mode 100644index a33ca52ef..000000000--- a/console/android/ORLib/src/main/res/values/strings.xml+++ /dev/null@@ -1,29 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <string name="app_name">OpenRemote</string>- <string name="title_activity_project">Project</string>- <string name="Project">Project</string>- <string name="OR_CONSOLE_LOAD_ERROR_URL"></string>- <string name="OR_CONSOLE_LOAD_TIMEOUT">5000</string>- <string name="OR_CONSOLE_IGNORE_PAGE_ERRORS">true</string>- <string name="SHARED_PREF_REFRESH_TOKEN">REFRESH_TOKEN</string>- <string name="fatalError">Sorry, there is a problem.</string>- <string name="fatalErrorExplain">The service is not available, please try again later.</string>- <string name="httpError">Invalid response from service.</string>- <string name="httpErrorExplain">Can\'t connect to service.</string>- <string name="downloading_file">Downloading File</string>- <string name="downloading_enabled">Downloading enabled</string>- <string name="error_downloading">Error downloading file</string>- <string name="download_completed">Download completed</string>- <string name="background_location_alert_title">Background location needed</string>- <string name="background_location_alert_body">In order to receive these notifications when the app is running in the background, background location access is needed.\nNo location history is stored, only the latest location is saved.\nDo you want to enabled it in the settings?</string>- <string name="push_notification_alert_title">Push notifications needed</string>- <string name="push_notification_alert_message">In order to receive these notifications, push notifications need to be enabled.\nDo you want to enabled it in the settings?</string>- <string name="camera_needed_alert_title">Camera access needed</string>- <string name="camera_needed_alert_body">In order to scan QR codes, access to the devices camera is needed.</string>- <string name="location_background_disabled_title">Background location disabled</string>- <string name="no">No</string>- <string name="yes">Yes</string>- <string name="button_accept">Accept</string>- <string name="NOTIFICATION_CHANNEL_ID">OR</string>-</resources>diff --git a/console/android/ORLib/src/main/res/values/styles.xml b/console/android/ORLib/src/main/res/values/styles.xmldeleted file mode 100644index 9015c6abe..000000000--- a/console/android/ORLib/src/main/res/values/styles.xml+++ /dev/null@@ -1,19 +0,0 @@-<resources>-- <style name="OpenRemoteTheme" parent="Theme.AppCompat.Light.NoActionBar">- <item name="android:actionMenuTextColor">@color/dark_grey</item>- <item name="colorPrimary">@color/medium_green</item>- <item name="colorPrimaryDark">@color/dark_green</item>- <item name="colorAccent">@color/light_green</item>- </style>-- <style name="Theme.Transparent" parent="Theme.AppCompat">- <item name="android:windowIsTranslucent">true</item>- <item name="android:windowBackground">@android:color/transparent</item>- <item name="android:windowContentOverlay">@null</item>- <item name="android:windowNoTitle">true</item>- <item name="android:windowIsFloating">true</item>- <item name="android:backgroundDimEnabled">false</item>- </style>--</resources>diff --git a/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj b/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxprojdeleted file mode 100644index 66f53d15e..000000000--- a/console/iOS/GenericApp/GenericApp.xcodeproj/project.pbxproj+++ /dev/null@@ -1,721 +0,0 @@-// !$*UTF8*$!-{- archiveVersion = 1;- classes = {- };- objectVersion = 51;- objects = {--/* Begin PBXBuildFile section */- 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 */; };- 4CF3439127A13F2200EB5A0E /* String+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF3439027A13F2200EB5A0E /* String+Utils.swift */; };- 5952998DA2B50AFF73DDCAE1 /* Pods_NotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B5A477F4AA747A62A45EF /* Pods_NotificationService.framework */; };- 756FA8BF24545CB0CC18CA6E /* Pods_GenericApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E012F268F107177E6B242E8 /* Pods_GenericApp.framework */; };- 878D2D0D249A490300011484 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 878D2D0C249A490300011484 /* AppDelegate.swift */; };- 878D2D13249A490400011484 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 878D2D12249A490400011484 /* Assets.xcassets */; };- 878D2D16249A490400011484 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 878D2D15249A490400011484 /* Preview Assets.xcassets */; };- 878D2D19249A490400011484 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 878D2D17249A490400011484 /* LaunchScreen.storyboard */; };- 878D2D27249A498900011484 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 878D2D26249A498900011484 /* NotificationService.swift */; };- 878D2D2B249A498900011484 /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 878D2D24249A498900011484 /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };- 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 */--/* Begin PBXContainerItemProxy section */- 878D2D29249A498900011484 /* PBXContainerItemProxy */ = {- isa = PBXContainerItemProxy;- containerPortal = 878D2D01249A490300011484 /* Project object */;- proxyType = 1;- remoteGlobalIDString = 878D2D23249A498900011484;- remoteInfo = NotificationService;- };-/* End PBXContainerItemProxy section */--/* Begin PBXCopyFilesBuildPhase section */- 4CBDF2BC2AE2862A00C7D94C /* Embed Frameworks */ = {- isa = PBXCopyFilesBuildPhase;- buildActionMask = 2147483647;- dstPath = "";- dstSubfolderSpec = 10;- files = (- 4CBDF2BB2AE2862A00C7D94C /* ORLib.framework in Embed Frameworks */,- );- name = "Embed Frameworks";- runOnlyForDeploymentPostprocessing = 0;- };- 878D2D2C249A498900011484 /* Embed App Extensions */ = {- isa = PBXCopyFilesBuildPhase;- buildActionMask = 2147483647;- dstPath = "";- dstSubfolderSpec = 13;- files = (- 878D2D2B249A498900011484 /* NotificationService.appex in Embed App Extensions */,- );- name = "Embed App Extensions";- runOnlyForDeploymentPostprocessing = 0;- };-/* End PBXCopyFilesBuildPhase section */--/* Begin PBXFileReference section */- 3B0E05618605D241D5A82AA3 /* Pods-NotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.debug.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.debug.xcconfig"; sourceTree = "<group>"; };- 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>"; };- 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>"; };- 4CF3439027A13F2200EB5A0E /* String+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Utils.swift"; sourceTree = "<group>"; };- 4E012F268F107177E6B242E8 /* Pods_GenericApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GenericApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };- 570B5A477F4AA747A62A45EF /* Pods_NotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; };- 878D2D09249A490300011484 /* OpenRemote.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenRemote.app; sourceTree = BUILT_PRODUCTS_DIR; };- 878D2D0C249A490300011484 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };- 878D2D12249A490400011484 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };- 878D2D15249A490400011484 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };- 878D2D18249A490400011484 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };- 878D2D1A249A490400011484 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };- 878D2D24249A498900011484 /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; };- 878D2D26249A498900011484 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };- 878D2D28249A498900011484 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };- 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>"; };- D61E1E0434CC1446EAF20BA0 /* Pods-GenericApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GenericApp.release.xcconfig"; path = "Target Support Files/Pods-GenericApp/Pods-GenericApp.release.xcconfig"; sourceTree = "<group>"; };-/* End PBXFileReference section */--/* Begin PBXFrameworksBuildPhase section */- 878D2D06249A490300011484 /* Frameworks */ = {- isa = PBXFrameworksBuildPhase;- buildActionMask = 2147483647;- files = (- 756FA8BF24545CB0CC18CA6E /* Pods_GenericApp.framework in Frameworks */,- 4CBDF2BA2AE2862A00C7D94C /* ORLib.framework in Frameworks */,- );- runOnlyForDeploymentPostprocessing = 0;- };- 878D2D21249A498900011484 /* Frameworks */ = {- isa = PBXFrameworksBuildPhase;- buildActionMask = 2147483647;- files = (- 5952998DA2B50AFF73DDCAE1 /* Pods_NotificationService.framework in Frameworks */,- 4CBDF2B62AE2862500C7D94C /* ORLib.framework in Frameworks */,- );- runOnlyForDeploymentPostprocessing = 0;- };-/* End PBXFrameworksBuildPhase section */--/* Begin PBXGroup section */- 4CF3438F27A13F0400EB5A0E /* Utils */ = {- isa = PBXGroup;- children = (- 4CF3439027A13F2200EB5A0E /* String+Utils.swift */,- );- path = Utils;- sourceTree = "<group>";- };- 6E621588C821060939F236DC /* Pods */ = {- isa = PBXGroup;- children = (- A994B3D3E3853BA4D16AA5A8 /* Pods-GenericApp.debug.xcconfig */,- D61E1E0434CC1446EAF20BA0 /* Pods-GenericApp.release.xcconfig */,- 3B0E05618605D241D5A82AA3 /* Pods-NotificationService.debug.xcconfig */,- 46FD90D41833A0E2C4C7DDA6 /* Pods-NotificationService.release.xcconfig */,- );- path = Pods;- sourceTree = "<group>";- };- 878D2D00249A490300011484 = {- isa = PBXGroup;- children = (- 91658F8F28897BC0000FF05C /* README.md */,- 878D2D0B249A490300011484 /* GenericApp */,- 878D2D25249A498900011484 /* NotificationService */,- 878D2D0A249A490300011484 /* Products */,- 6E621588C821060939F236DC /* Pods */,- E76367874E329A8C268BC128 /* Frameworks */,- );- sourceTree = "<group>";- };- 878D2D0A249A490300011484 /* Products */ = {- isa = PBXGroup;- children = (- 878D2D09249A490300011484 /* OpenRemote.app */,- 878D2D24249A498900011484 /* NotificationService.appex */,- );- name = Products;- sourceTree = "<group>";- };- 878D2D0B249A490300011484 /* GenericApp */ = {- isa = PBXGroup;- children = (- 4C38E9C02548089A00E381C6 /* OpenRemote.entitlements */,- 4CEDA25C25405B1E00C47E3B /* GoogleService-Info.plist */,- 878D2D34249A50E500011484 /* UI */,- 4CF3438F27A13F0400EB5A0E /* Utils */,- 878D2D0C249A490300011484 /* AppDelegate.swift */,- 878D2D12249A490400011484 /* Assets.xcassets */,- 878D2D17249A490400011484 /* LaunchScreen.storyboard */,- 4CEDA2A6254074D100C47E3B /* Storyboard.storyboard */,- 878D2D1A249A490400011484 /* Info.plist */,- 878D2D14249A490400011484 /* Preview Content */,- );- path = GenericApp;- sourceTree = "<group>";- };- 878D2D14249A490400011484 /* Preview Content */ = {- isa = PBXGroup;- children = (- 878D2D15249A490400011484 /* Preview Assets.xcassets */,- );- path = "Preview Content";- sourceTree = "<group>";- };- 878D2D25249A498900011484 /* NotificationService */ = {- isa = PBXGroup;- children = (- 878D2D26249A498900011484 /* NotificationService.swift */,- 878D2D28249A498900011484 /* Info.plist */,- 4C38E9C12548090200E381C6 /* NotificationService.entitlements */,- );- path = NotificationService;- sourceTree = "<group>";- };- 878D2D34249A50E500011484 /* UI */ = {- isa = PBXGroup;- children = (- 4CEDA2CD254075D400C47E3B /* SplashViewController.swift */,- 9108939F285DB30D00D4ABA7 /* WizardAppViewController.swift */,- 910893A1285DB37C00D4ABA7 /* WizardDomainViewController.swift */,- 91658F942889C15D000FF05C /* WizardRealmViewController.swift */,- 91543FDD293FA2F20009016E /* SettingsViewController.swift */,- 915BFDFB29685A7200A4FD67 /* ProjectTableViewCell.swift */,- );- path = UI;- sourceTree = "<group>";- };- E76367874E329A8C268BC128 /* Frameworks */ = {- isa = PBXGroup;- children = (- 4CBDF2B92AE2862A00C7D94C /* ORLib.framework */,- 4CBDF2B52AE2862500C7D94C /* ORLib.framework */,- 4E012F268F107177E6B242E8 /* Pods_GenericApp.framework */,- 570B5A477F4AA747A62A45EF /* Pods_NotificationService.framework */,- );- name = Frameworks;- sourceTree = "<group>";- };-/* End PBXGroup section */--/* Begin PBXNativeTarget section */- 878D2D08249A490300011484 /* GenericApp */ = {- isa = PBXNativeTarget;- buildConfigurationList = 878D2D1D249A490400011484 /* Build configuration list for PBXNativeTarget "GenericApp" */;- buildPhases = (- 7F1699925EFEE1D36D8896ED /* [CP] Check Pods Manifest.lock */,- 878D2D05249A490300011484 /* Sources */,- 878D2D06249A490300011484 /* Frameworks */,- 878D2D07249A490300011484 /* Resources */,- 878D2D2C249A498900011484 /* Embed App Extensions */,- 1916A4B7304981F2A7B97168 /* [CP] Embed Pods Frameworks */,- 4CBDF2BC2AE2862A00C7D94C /* Embed Frameworks */,- );- buildRules = (- );- dependencies = (- 878D2D2A249A498900011484 /* PBXTargetDependency */,- );- name = GenericApp;- productName = GenericApp;- productReference = 878D2D09249A490300011484 /* OpenRemote.app */;- productType = "com.apple.product-type.application";- };- 878D2D23249A498900011484 /* NotificationService */ = {- isa = PBXNativeTarget;- buildConfigurationList = 878D2D2F249A498900011484 /* Build configuration list for PBXNativeTarget "NotificationService" */;- buildPhases = (- F53E589BC4E8F287867199F0 /* [CP] Check Pods Manifest.lock */,- 878D2D20249A498900011484 /* Sources */,- 878D2D21249A498900011484 /* Frameworks */,- 878D2D22249A498900011484 /* Resources */,- );- buildRules = (- );- dependencies = (- );- name = NotificationService;- productName = NotificationService;- productReference = 878D2D24249A498900011484 /* NotificationService.appex */;- productType = "com.apple.product-type.app-extension";- };-/* End PBXNativeTarget section */--/* Begin PBXProject section */- 878D2D01249A490300011484 /* Project object */ = {- isa = PBXProject;- attributes = {- LastSwiftUpdateCheck = 1140;- LastUpgradeCheck = 1200;- ORGANIZATIONNAME = OpenRemote;- TargetAttributes = {- 878D2D08249A490300011484 = {- CreatedOnToolsVersion = 11.4;- };- 878D2D23249A498900011484 = {- CreatedOnToolsVersion = 11.4;- };- };- };- buildConfigurationList = 878D2D04249A490300011484 /* Build configuration list for PBXProject "GenericApp" */;- compatibilityVersion = "Xcode 10.0";- developmentRegion = en;- hasScannedForEncodings = 0;- knownRegions = (- en,- Base,- );- mainGroup = 878D2D00249A490300011484;- productRefGroup = 878D2D0A249A490300011484 /* Products */;- projectDirPath = "";- projectRoot = "";- targets = (- 878D2D08249A490300011484 /* GenericApp */,- 878D2D23249A498900011484 /* NotificationService */,- );- };-/* End PBXProject section */--/* Begin PBXResourcesBuildPhase section */- 878D2D07249A490300011484 /* Resources */ = {- isa = PBXResourcesBuildPhase;- buildActionMask = 2147483647;- files = (- 878D2D19249A490400011484 /* LaunchScreen.storyboard in Resources */,- 4CEDA25D25405B1E00C47E3B /* GoogleService-Info.plist in Resources */,- 878D2D16249A490400011484 /* Preview Assets.xcassets in Resources */,- 878D2D13249A490400011484 /* Assets.xcassets in Resources */,- 4CEDA2A7254074D100C47E3B /* Storyboard.storyboard in Resources */,- );- runOnlyForDeploymentPostprocessing = 0;- };- 878D2D22249A498900011484 /* Resources */ = {- isa = PBXResourcesBuildPhase;- buildActionMask = 2147483647;- files = (- );- runOnlyForDeploymentPostprocessing = 0;- };-/* End PBXResourcesBuildPhase section */--/* Begin PBXShellScriptBuildPhase section */- 1916A4B7304981F2A7B97168 /* [CP] Embed Pods Frameworks */ = {- isa = PBXShellScriptBuildPhase;- buildActionMask = 2147483647;- files = (- );- inputFileListPaths = (- "${PODS_ROOT}/Target Support Files/Pods-GenericApp/Pods-GenericApp-frameworks-${CONFIGURATION}-input-files.xcfilelist",- );- name = "[CP] Embed Pods Frameworks";- outputFileListPaths = (- "${PODS_ROOT}/Target Support Files/Pods-GenericApp/Pods-GenericApp-frameworks-${CONFIGURATION}-output-files.xcfilelist",- );- runOnlyForDeploymentPostprocessing = 0;- shellPath = /bin/sh;- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GenericApp/Pods-GenericApp-frameworks.sh\"\n";- showEnvVarsInLog = 0;- };- 7F1699925EFEE1D36D8896ED /* [CP] Check Pods Manifest.lock */ = {- isa = PBXShellScriptBuildPhase;- buildActionMask = 2147483647;- files = (- );- inputFileListPaths = (- );- inputPaths = (- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",- "${PODS_ROOT}/Manifest.lock",- );- name = "[CP] Check Pods Manifest.lock";- outputFileListPaths = (- );- outputPaths = (- "$(DERIVED_FILE_DIR)/Pods-GenericApp-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;- };- F53E589BC4E8F287867199F0 /* [CP] Check Pods Manifest.lock */ = {- isa = PBXShellScriptBuildPhase;- buildActionMask = 2147483647;- files = (- );- inputFileListPaths = (- );- inputPaths = (- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",- "${PODS_ROOT}/Manifest.lock",- );- name = "[CP] Check Pods Manifest.lock";- outputFileListPaths = (- );- outputPaths = (- "$(DERIVED_FILE_DIR)/Pods-NotificationService-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;- };-/* End PBXShellScriptBuildPhase section */--/* Begin PBXSourcesBuildPhase section */- 878D2D05249A490300011484 /* Sources */ = {- isa = PBXSourcesBuildPhase;- buildActionMask = 2147483647;- files = (- 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 */,- 4CEDA2CE254075D400C47E3B /* SplashViewController.swift in Sources */,- );- runOnlyForDeploymentPostprocessing = 0;- };- 878D2D20249A498900011484 /* Sources */ = {- isa = PBXSourcesBuildPhase;- buildActionMask = 2147483647;- files = (- 878D2D27249A498900011484 /* NotificationService.swift in Sources */,- );- runOnlyForDeploymentPostprocessing = 0;- };-/* End PBXSourcesBuildPhase section */--/* Begin PBXTargetDependency section */- 878D2D2A249A498900011484 /* PBXTargetDependency */ = {- isa = PBXTargetDependency;- target = 878D2D23249A498900011484 /* NotificationService */;- targetProxy = 878D2D29249A498900011484 /* PBXContainerItemProxy */;- };-/* End PBXTargetDependency section */--/* Begin PBXVariantGroup section */- 878D2D17249A490400011484 /* LaunchScreen.storyboard */ = {- isa = PBXVariantGroup;- children = (- 878D2D18249A490400011484 /* Base */,- );- name = LaunchScreen.storyboard;- sourceTree = "<group>";- };-/* End PBXVariantGroup section */--/* Begin XCBuildConfiguration section */- 878D2D1B249A490400011484 /* 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_ENABLE_OBJC_WEAK = YES;- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;- CLANG_WARN_BOOL_CONVERSION = YES;- CLANG_WARN_COMMA = YES;- CLANG_WARN_CONSTANT_CONVERSION = YES;- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES;- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;- 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;- COPY_PHASE_STRIP = NO;- 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 = 13.4;- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;- MTL_FAST_MATH = YES;- ONLY_ACTIVE_ARCH = YES;- SDKROOT = iphoneos;- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;- SWIFT_OPTIMIZATION_LEVEL = "-Onone";- };- name = Debug;- };- 878D2D1C249A490400011484 /* 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_ENABLE_OBJC_WEAK = YES;- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;- CLANG_WARN_BOOL_CONVERSION = YES;- CLANG_WARN_COMMA = YES;- CLANG_WARN_CONSTANT_CONVERSION = YES;- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES;- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;- 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;- COPY_PHASE_STRIP = NO;- 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 = 13.4;- MTL_ENABLE_DEBUG_INFO = NO;- MTL_FAST_MATH = YES;- SDKROOT = iphoneos;- SWIFT_COMPILATION_MODE = wholemodule;- SWIFT_OPTIMIZATION_LEVEL = "-O";- VALIDATE_PRODUCT = YES;- };- name = Release;- };- 878D2D1E249A490400011484 /* Debug */ = {- isa = XCBuildConfiguration;- baseConfigurationReference = A994B3D3E3853BA4D16AA5A8 /* Pods-GenericApp.debug.xcconfig */;- buildSettings = {- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;- CODE_SIGN_ENTITLEMENTS = GenericApp/OpenRemote.entitlements;- CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 44;- DEVELOPMENT_ASSET_PATHS = "";- DEVELOPMENT_TEAM = 4AC88KZHJZ;- ENABLE_PREVIEWS = YES;- INFOPLIST_FILE = GenericApp/Info.plist;- IPHONEOS_DEPLOYMENT_TARGET = 14.0;- LD_RUNPATH_SEARCH_PATHS = (- "$(inherited)",- "@executable_path/Frameworks",- );- MARKETING_VERSION = 1.0.10;- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.app;- PRODUCT_NAME = OpenRemote;- SWIFT_VERSION = 5.0;- TARGETED_DEVICE_FAMILY = 1;- };- name = Debug;- };- 878D2D1F249A490400011484 /* Release */ = {- isa = XCBuildConfiguration;- baseConfigurationReference = D61E1E0434CC1446EAF20BA0 /* Pods-GenericApp.release.xcconfig */;- buildSettings = {- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;- CODE_SIGN_ENTITLEMENTS = GenericApp/OpenRemote.entitlements;- CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 44;- DEVELOPMENT_ASSET_PATHS = "";- DEVELOPMENT_TEAM = 4AC88KZHJZ;- ENABLE_PREVIEWS = YES;- INFOPLIST_FILE = GenericApp/Info.plist;- IPHONEOS_DEPLOYMENT_TARGET = 14.0;- LD_RUNPATH_SEARCH_PATHS = (- "$(inherited)",- "@executable_path/Frameworks",- );- MARKETING_VERSION = 1.0.10;- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.app;- PRODUCT_NAME = OpenRemote;- SWIFT_VERSION = 5.0;- TARGETED_DEVICE_FAMILY = 1;- };- name = Release;- };- 878D2D2D249A498900011484 /* Debug */ = {- isa = XCBuildConfiguration;- baseConfigurationReference = 3B0E05618605D241D5A82AA3 /* Pods-NotificationService.debug.xcconfig */;- buildSettings = {- APPLICATION_EXTENSION_API_ONLY = YES;- CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;- CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 34;- DEVELOPMENT_TEAM = 4AC88KZHJZ;- FRAMEWORK_SEARCH_PATHS = (- "$(inherited)",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreDiagnostics\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCrashlytics\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstanceID\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseMessaging\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb\"",- "\"${PODS_ROOT}/FirebaseAnalytics/Frameworks\"",- "\"${PODS_ROOT}/GoogleAppMeasurement/Frameworks\"",- "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/FirebaseAnalytics\"",- "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAppMeasurement\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/Popover\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/MaterialComponents\"",- );- INFOPLIST_FILE = NotificationService/Info.plist;- IPHONEOS_DEPLOYMENT_TARGET = 14.0;- LD_RUNPATH_SEARCH_PATHS = (- "$(inherited)",- "@executable_path/Frameworks",- "@executable_path/../../Frameworks",- );- MARKETING_VERSION = 1.0.7;- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.app.NotificationService;- PRODUCT_NAME = "$(TARGET_NAME)";- SKIP_INSTALL = YES;- SWIFT_VERSION = 5.0;- TARGETED_DEVICE_FAMILY = 1;- };- name = Debug;- };- 878D2D2E249A498900011484 /* Release */ = {- isa = XCBuildConfiguration;- baseConfigurationReference = 46FD90D41833A0E2C4C7DDA6 /* Pods-NotificationService.release.xcconfig */;- buildSettings = {- APPLICATION_EXTENSION_API_ONLY = YES;- CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;- CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 34;- DEVELOPMENT_TEAM = 4AC88KZHJZ;- FRAMEWORK_SEARCH_PATHS = (- "$(inherited)",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreDiagnostics\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCrashlytics\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstanceID\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseMessaging\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb\"",- "\"${PODS_ROOT}/FirebaseAnalytics/Frameworks\"",- "\"${PODS_ROOT}/GoogleAppMeasurement/Frameworks\"",- "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/FirebaseAnalytics\"",- "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAppMeasurement\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/Popover\"",- "\"${PODS_CONFIGURATION_BUILD_DIR}/MaterialComponents\"",- );- INFOPLIST_FILE = NotificationService/Info.plist;- IPHONEOS_DEPLOYMENT_TARGET = 14.0;- LD_RUNPATH_SEARCH_PATHS = (- "$(inherited)",- "@executable_path/Frameworks",- "@executable_path/../../Frameworks",- );- MARKETING_VERSION = 1.0.7;- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.app.NotificationService;- PRODUCT_NAME = "$(TARGET_NAME)";- SKIP_INSTALL = YES;- SWIFT_VERSION = 5.0;- TARGETED_DEVICE_FAMILY = 1;- };- name = Release;- };-/* End XCBuildConfiguration section */--/* Begin XCConfigurationList section */- 878D2D04249A490300011484 /* Build configuration list for PBXProject "GenericApp" */ = {- isa = XCConfigurationList;- buildConfigurations = (- 878D2D1B249A490400011484 /* Debug */,- 878D2D1C249A490400011484 /* Release */,- );- defaultConfigurationIsVisible = 0;- defaultConfigurationName = Release;- };- 878D2D1D249A490400011484 /* Build configuration list for PBXNativeTarget "GenericApp" */ = {- isa = XCConfigurationList;- buildConfigurations = (- 878D2D1E249A490400011484 /* Debug */,- 878D2D1F249A490400011484 /* Release */,- );- defaultConfigurationIsVisible = 0;- defaultConfigurationName = Release;- };- 878D2D2F249A498900011484 /* Build configuration list for PBXNativeTarget "NotificationService" */ = {- isa = XCConfigurationList;- buildConfigurations = (- 878D2D2D249A498900011484 /* Debug */,- 878D2D2E249A498900011484 /* Release */,- );- defaultConfigurationIsVisible = 0;- defaultConfigurationName = Release;- };-/* End XCConfigurationList section */- };- rootObject = 878D2D01249A490300011484 /* Project object */;-}diff --git a/console/iOS/GenericApp/GenericApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/console/iOS/GenericApp/GenericApp.xcodeproj/project.xcworkspace/contents.xcworkspacedatadeleted file mode 100644index 55f955058..000000000--- a/console/iOS/GenericApp/GenericApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata+++ /dev/null@@ -1,7 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<Workspace- version = "1.0">- <FileRef- location = "self:GenericApp.xcodeproj">- </FileRef>-</Workspace>diff --git a/console/iOS/GenericApp/GenericApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/console/iOS/GenericApp/GenericApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistdeleted file mode 100644index 18d981003..000000000--- a/console/iOS/GenericApp/GenericApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist+++ /dev/null@@ -1,8 +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>IDEDidComputeMac32BitWarning</key>- <true/>-</dict>-</plist>diff --git a/console/iOS/GenericApp/GenericApp/AppDelegate.swift b/console/iOS/GenericApp/GenericApp/AppDelegate.swiftdeleted file mode 100644index bdc1515d6..000000000--- a/console/iOS/GenericApp/GenericApp/AppDelegate.swift+++ /dev/null@@ -1,356 +0,0 @@-//-// AppDelegate.swift-// GenericApp-//-// Created by Michael Rademaker on 17/06/2020.-// Copyright © 2020 Remote. All rights reserved.-//--import UIKit-import Firebase-import CoreLocation-import IQKeyboardManagerSwift-import ORLib--@UIApplicationMain-class AppDelegate: UIResponder, UIApplicationDelegate, URLSessionDelegate {-- var window: UIWindow?- let gcmMessageIDKey = "gcm.message_id"- var reachabilityAlert : UIAlertController?- var reachabilityAlertShown = false- let internetReachability = Reachability()-- var geofenceProvider : GeofenceProvider?- 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- // if the app was launched because of geofencing-- let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)- let documentsDirectory = paths[0]- let fileName = "\(Date()).log"- let logFilePath = (documentsDirectory as NSString).appendingPathComponent(fileName)- freopen(logFilePath.cString(using: String.Encoding.ascii)!, "a+", stderr)-- if launchOptions?[UIApplication.LaunchOptionsKey.location] != nil {- NSLog("%@", "App started from location update")- // create new GeofenceProvider which creates a CLLocationManager that will receive the location update- geofenceProvider = GeofenceProvider()- if CLLocationManager.authorizationStatus() == .authorizedAlways {- geofenceProvider?.startMonitoringSignificantLocationChanges()- }- } else if let remoteNotifcation = launchOptions?[UIApplication.LaunchOptionsKey.remoteNotification] as? [AnyHashable: Any] {- NSLog("%@", "App started from remote notification")- if let action = remoteNotifcation[DefaultsKey.actionKey] as? String {- if action == Actions.geofenceRefresh {- geofenceProvider = GeofenceProvider()- geofenceProvider?.refreshGeofences()- if CLLocationManager.authorizationStatus() == .authorizedAlways {- geofenceProvider?.startMonitoringSignificantLocationChanges()- }- }- }- } else {- FirebaseApp.configure()- Messaging.messaging().delegate = self-- NotificationCenter.default.addObserver(self,- selector: #selector(self.reachabilityChanged(note:)),- name: NSNotification.Name.reachabilityChanged,- object: internetReachability)- do {- try internetReachability?.startNotifier()- self.updateReachabilityStatus(reachability: internetReachability!)- } catch {- NSLog("%@", "Unable to start notifier")- }- }- return true- }-- 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.realmKey)- (self.window?.rootViewController as? SplashViewController)?.displaySettings = true- self.window?.rootViewController?.dismiss(animated: false)- }- }-- 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)- reachabilityAlertShown = false- internetReachability?.stopNotifier()- }-- 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)- reachabilityAlertShown = false- internetReachability?.stopNotifier()- }-- 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) {- do {- try self.internetReachability?.startNotifier()- self.updateReachabilityStatus(reachability: self.internetReachability!)- } catch {- NSLog("%@", "Unable to start notifier")- }- }- }-- 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) {- do {- try self.internetReachability?.startNotifier()- self.updateReachabilityStatus(reachability: self.internetReachability!)- } catch {- NSLog("%@", "Unable to start notifier")- }- }- }-- 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) {- Messaging.messaging().apnsToken = deviceToken- }-- func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {- if let action = userInfo[DefaultsKey.actionKey] as? String {- if action == Actions.geofenceRefresh {- if let controllerGeofenceProvider = (self.window?.topController as? ORViewcontroller)?.geofenceProvider {-- controllerGeofenceProvider.refreshGeofences()- } else if let delegateGeofenceProvider = geofenceProvider {- delegateGeofenceProvider.refreshGeofences()- } else {- geofenceProvider = GeofenceProvider()- geofenceProvider!.refreshGeofences()- }- } else if action == Actions.store {- if let data = userInfo[DefaultsKey.dataKey] as? [String: String] {- if let key = data["key"] {- if let storageProvider = (self.window?.topController as? ORViewcontroller)?.storageProvider {- storageProvider.store(key: key, data: data["value"])- } else {- let storageProvider = StorageProvider()- storageProvider.store(key: key, data: data["value"])- }- }- }- }- }-- if let notificationIdString = userInfo[ActionType.notificationId] as? String, let notificationId = Int64(notificationIdString) {- if let defaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement), let consoleId = defaults.string(forKey: GeofenceProvider.consoleIdKey) {- ORNotificationResource.sharedInstance.notificationDelivered(notificationId: notificationId, targetId: consoleId)- }- }- completionHandler(UIBackgroundFetchResult.newData)- }-- @objc func reachabilityChanged(note: NSNotification) {- if let reachability = note.object as? Reachability {- updateReachabilityStatus(reachability: reachability)- }- }-- private func updateReachabilityStatus(reachability: Reachability) {- if reachability.connection == .none {- if (!reachabilityAlertShown) {- let topWindow = UIWindow(frame: UIScreen.main.bounds)- topWindow.rootViewController = UIViewController()- topWindow.windowLevel = UIWindow.Level.alert + 1-- reachabilityAlert = UIAlertController(title: "Network Error", message: "Your device seems to be offline", preferredStyle: .alert)- let reachabilityRetryAction = UIAlertAction(title: "Retry", style: .default, handler: { (action) in- self.reachabilityAlertShown = false- self.updateReachabilityStatus(reachability: self.internetReachability!)- topWindow.isHidden = true- })- let reachabilityCancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: { (action) in- self.reachabilityAlertShown = false- self.reachabilityAlert?.dismiss(animated: true, completion: nil)- topWindow.isHidden = true- })- reachabilityAlert?.addAction(reachabilityRetryAction)- reachabilityAlert?.addAction(reachabilityCancelAction)- topWindow.makeKeyAndVisible()- topWindow.rootViewController?.present(reachabilityAlert!, animated: true, completion: nil)- reachabilityAlertShown = true- }- } else {- if (reachabilityAlertShown) {- reachabilityAlert?.dismiss(animated: true, completion: nil)- reachabilityAlertShown = false- }- }- }-- func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {- if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {- completionHandler(.performDefaultHandling, nil)- }- }-}--extension AppDelegate : UNUserNotificationCenterDelegate {-- func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {- let userInfo = notification.request.content.userInfo- var notificationId : Int64? = nil-- if let notificationIdString = userInfo[ActionType.notificationId] as? String{- notificationId = Int64(notificationIdString)- }- if let notiId = notificationId, let defaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement), let consoleId = defaults.string(forKey: GeofenceProvider.consoleIdKey) {- ORNotificationResource.sharedInstance.notificationDelivered(notificationId: notiId, targetId: consoleId)- }-- completionHandler([.alert, .sound])- }-- func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {-- let userInfo = response.notification.request.content.userInfo- var notificationId : Int64? = nil- var consoleId : 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) // 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)")-- switch response.actionIdentifier {- case UNNotificationDefaultActionIdentifier:- if let urlTo = userInfo[ActionType.appUrl] as? String, !urlTo.isEmpty {- var urlRequest: URL?- if urlTo.hasPrefix("http") || urlTo.hasPrefix("https") {- urlRequest = URL(string:urlTo)- } else {- if let url = project?.baseURL {- urlRequest = URL(string: "\(url)/console/\(urlTo)")- }- }- if let url = urlRequest{- if let InBrowser = userInfo[ActionType.openInBrowser] as? Bool, InBrowser {- NSLog("%@", " in browser: \(url)")- UIApplication.shared.open(url)- } else {- NSLog("%@", " in app: \(url)")- (self.window?.topController as? ORViewcontroller)?.loadURL(url:url)- }- }- }- case UNNotificationDismissActionIdentifier,- "declineAction":- if let notiId = notificationId, let conId = consoleId {- ORNotificationResource.sharedInstance.notificationAcknowledged(notificationId: notiId, targetId: conId, acknowledgement: response.actionIdentifier)- }- default :- if let notiId = notificationId, let conId = consoleId {- ORNotificationResource.sharedInstance.notificationAcknowledged(notificationId: notiId, targetId: conId, acknowledgement: response.actionIdentifier)- }- if let buttonsString = userInfo[DefaultsKey.buttonsKey] as? String {- if let buttonsData = buttonsString.data(using: .utf8) {- if let buttons = try? JSONDecoder().decode([ORPushNotificationButton].self, from: buttonsData) {- for button in buttons {- if button.title == response.actionIdentifier {- if let action = button.action {- var urlRequest: URL?- if action.url.hasPrefix("http") || action.url.hasPrefix("https") {- urlRequest = URL(string:action.url)- } else {- if let url = project?.baseURL {- urlRequest = URL(string: "\(url)/console/\(action.url)")- }- }- if let url = urlRequest {- if action.silent {- let request = NSMutableURLRequest(url: url)- request.httpMethod = action.httpMethod ?? "GET"- if let body = action.data {- request.httpBody = body.data(using: .utf8)- request.addValue("application/json", forHTTPHeaderField: "Content-Type")- }- let session = URLSession(configuration: URLSessionConfiguration.default, delegate: nil, delegateQueue : nil)- let reqDataTask = session.dataTask(with: request as URLRequest, completionHandler:{ data, response, error in- if (error != nil) {- NSLog("error %@", (error! as NSError).localizedDescription)- }- })- reqDataTask.resume()- } else if action.openInBrowser {- NSLog("%@", " in browser: \(url)")- UIApplication.shared.open(url)- } else {- NSLog("%@", " in app: \(url)")- (self.window?.topController as? ORViewcontroller)?.loadURL(url:url)- }- }- }- break- }- }- }- }- }- }- completionHandler()- }-}--extension AppDelegate : MessagingDelegate {- func messaging(_ messaging: Messaging, didRefreshRegistrationToken fcmToken: String) {- print("Firebase registration token: \(fcmToken)")- if let defaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement){- defaults.set(fcmToken, forKey: DefaultsKey.fcmTokenKey)- defaults.synchronize()- }- }-- func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {- if let token = fcmToken {- print("Firebase registration token: \(token)")- if let defaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement) {- defaults.set(token, forKey: DefaultsKey.fcmTokenKey)- defaults.synchronize()- }- } else {- print("No fcm token")- }- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/Contents.jsondeleted file mode 100644index 19f7ff69a..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/Contents.json+++ /dev/null@@ -1,116 +0,0 @@-{- "images" : [- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "2x",- "size" : "20x20"- },- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "3x",- "size" : "20x20"- },- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "2x",- "size" : "29x29"- },- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "3x",- "size" : "29x29"- },- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "2x",- "size" : "40x40"- },- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "3x",- "size" : "40x40"- },- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "2x",- "size" : "60x60"- },- {- "filename" : "[email protected]",- "idiom" : "iphone",- "scale" : "3x",- "size" : "60x60"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "1x",- "size" : "20x20"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "2x",- "size" : "20x20"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "1x",- "size" : "29x29"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "2x",- "size" : "29x29"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "1x",- "size" : "40x40"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "2x",- "size" : "40x40"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "1x",- "size" : "76x76"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "2x",- "size" : "76x76"- },- {- "filename" : "[email protected]",- "idiom" : "ipad",- "scale" : "2x",- "size" : "83.5x83.5"- },- {- "filename" : "[email protected]",- "idiom" : "ios-marketing",- "scale" : "1x",- "size" : "1024x1024"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index ad43546ff..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 6e3e1c94f..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 399abf5a0..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 399abf5a0..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 22c6080af..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 98be8ad89..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 297f1f1f8..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 297f1f1f8..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index e382dff07..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 399abf5a0..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 9b51cabd3..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 9b51cabd3..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 1bf66a183..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 1bf66a183..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 692c9eecf..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 14bb13149..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index a7526578e..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] b/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected]deleted file mode 100644index 34cbe60d0..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/Contents.jsondeleted file mode 100644index 73c00596a..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/Contents.json+++ /dev/null@@ -1,6 +0,0 @@-{- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_settings.imageset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_settings.imageset/Contents.jsondeleted file mode 100644index 679782945..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_settings.imageset/Contents.json+++ /dev/null@@ -1,21 +0,0 @@-{- "images" : [- {- "idiom" : "universal",- "scale" : "1x"- },- {- "idiom" : "universal",- "scale" : "2x"- },- {- "filename" : "cog.png",- "idiom" : "universal",- "scale" : "3x"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_settings.imageset/cog.png b/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_settings.imageset/cog.pngdeleted file mode 100644index 7d7d8c246..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/ic_settings.imageset/cog.png and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_app_icon.imageset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_app_icon.imageset/Contents.jsondeleted file mode 100644index 2cf7a5dd9..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_app_icon.imageset/Contents.json+++ /dev/null@@ -1,21 +0,0 @@-{- "images" : [- {- "filename" : "or_app_icon.png",- "idiom" : "universal",- "scale" : "1x"- },- {- "idiom" : "universal",- "scale" : "2x"- },- {- "idiom" : "universal",- "scale" : "3x"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_app_icon.imageset/or_app_icon.png b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_app_icon.imageset/or_app_icon.pngdeleted file mode 100644index 34fed749a..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_app_icon.imageset/or_app_icon.png and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_green.colorset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_green.colorset/Contents.jsondeleted file mode 100644index ae9e650d3..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_green.colorset/Contents.json+++ /dev/null@@ -1,38 +0,0 @@-{- "colors" : [- {- "color" : {- "color-space" : "srgb",- "components" : {- "alpha" : "1.000",- "blue" : "0x2C",- "green" : "0x9C",- "red" : "0x49"- }- },- "idiom" : "universal"- },- {- "appearances" : [- {- "appearance" : "luminosity",- "value" : "dark"- }- ],- "color" : {- "color-space" : "srgb",- "components" : {- "alpha" : "1.000",- "blue" : "0x2A",- "green" : "0x9D",- "red" : "0x4D"- }- },- "idiom" : "universal"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- }-}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.jsondeleted file mode 100644index 95954f7f4..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_grey_background.colorset/Contents.json+++ /dev/null@@ -1,38 +0,0 @@-{- "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/Assets.xcassets/or_logo.imageset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_logo.imageset/Contents.jsondeleted file mode 100644index 1f438e1ed..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_logo.imageset/Contents.json+++ /dev/null@@ -1,21 +0,0 @@-{- "images" : [- {- "idiom" : "universal",- "scale" : "1x"- },- {- "idiom" : "universal",- "scale" : "2x"- },- {- "filename" : "or_logo.png",- "idiom" : "universal",- "scale" : "3x"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_logo.imageset/or_logo.png b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_logo.imageset/or_logo.pngdeleted file mode 100644index d7154867e..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_logo.imageset/or_logo.png and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_push_icon.imageset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_push_icon.imageset/Contents.jsondeleted file mode 100644index 48b1cc11b..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_push_icon.imageset/Contents.json+++ /dev/null@@ -1,21 +0,0 @@-{- "images" : [- {- "idiom" : "universal",- "scale" : "1x"- },- {- "idiom" : "universal",- "scale" : "2x"- },- {- "filename" : "or_push_icon.png",- "idiom" : "universal",- "scale" : "3x"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_push_icon.imageset/or_push_icon.png b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_push_icon.imageset/or_push_icon.pngdeleted file mode 100644index e1020884e..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_push_icon.imageset/or_push_icon.png and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_splash.imageset/Contents.json b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_splash.imageset/Contents.jsondeleted file mode 100644index 3f4263d72..000000000--- a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_splash.imageset/Contents.json+++ /dev/null@@ -1,21 +0,0 @@-{- "images" : [- {- "idiom" : "universal",- "scale" : "1x"- },- {- "idiom" : "universal",- "scale" : "2x"- },- {- "filename" : "or_splash.png",- "idiom" : "universal",- "scale" : "3x"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_splash.imageset/or_splash.png b/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_splash.imageset/or_splash.pngdeleted file mode 100644index 0464d21b3..000000000Binary files a/console/iOS/GenericApp/GenericApp/Assets.xcassets/or_splash.imageset/or_splash.png and /dev/null differdiff --git a/console/iOS/GenericApp/GenericApp/Base.lproj/LaunchScreen.storyboard b/console/iOS/GenericApp/GenericApp/Base.lproj/LaunchScreen.storyboarddeleted file mode 100644index 93fa46f89..000000000--- a/console/iOS/GenericApp/GenericApp/Base.lproj/LaunchScreen.storyboard+++ /dev/null@@ -1,33 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">- <device id="retina6_1" orientation="portrait" appearance="light"/>- <dependencies>- <deployment identifier="iOS"/>- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>- <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>- <!--View Controller-->- <scene sceneID="EHf-IW-A2E">- <objects>- <viewController id="01J-lp-oVM" sceneMemberID="viewController">- <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">- <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>- <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- </view>- </viewController>- <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>- </objects>- <point key="canvasLocation" x="53" y="375"/>- </scene>- </scenes>- <resources>- <systemColor name="systemBackgroundColor">- <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>- </systemColor>- </resources>-</document>diff --git a/console/iOS/GenericApp/GenericApp/GoogleService-Info.plist b/console/iOS/GenericApp/GenericApp/GoogleService-Info.plistdeleted file mode 100644index bbc96593f..000000000--- a/console/iOS/GenericApp/GenericApp/GoogleService-Info.plist+++ /dev/null@@ -1,36 +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>CLIENT_ID</key>- <string>667022545910-9fee9uvb8iguprjtimmq8uea6cqt2p5i.apps.googleusercontent.com</string>- <key>REVERSED_CLIENT_ID</key>- <string>com.googleusercontent.apps.667022545910-9fee9uvb8iguprjtimmq8uea6cqt2p5i</string>- <key>API_KEY</key>- <string>AIzaSyB9T09jK4r0Cvc8Yy_D2cMo96GZQZr3qBI</string>- <key>GCM_SENDER_ID</key>- <string>667022545910</string>- <key>PLIST_VERSION</key>- <string>1</string>- <key>BUNDLE_ID</key>- <string>io.openremote.app</string>- <key>PROJECT_ID</key>- <string>openremoteapp-a6a60</string>- <key>STORAGE_BUCKET</key>- <string>openremoteapp-a6a60.appspot.com</string>- <key>IS_ADS_ENABLED</key>- <false></false>- <key>IS_ANALYTICS_ENABLED</key>- <false></false>- <key>IS_APPINVITE_ENABLED</key>- <true></true>- <key>IS_GCM_ENABLED</key>- <true></true>- <key>IS_SIGNIN_ENABLED</key>- <true></true>- <key>GOOGLE_APP_ID</key>- <string>1:667022545910:ios:d757be33609bc318a5add7</string>- <key>DATABASE_URL</key>- <string>https://openremoteapp-a6a60.firebaseio.com</string>-</dict>-</plist>\ No newline at end of filediff --git a/console/iOS/GenericApp/GenericApp/Info.plist b/console/iOS/GenericApp/GenericApp/Info.plistdeleted file mode 100644index 6efd12995..000000000--- a/console/iOS/GenericApp/GenericApp/Info.plist+++ /dev/null@@ -1,77 +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>NSBluetoothAlwaysUsageDescription</key>- <string>Bluetooth is needed in order to connect to local devices</string>- <key>CFBundleDevelopmentRegion</key>- <string>$(DEVELOPMENT_LANGUAGE)</string>- <key>CFBundleDisplayName</key>- <string></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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>- <key>CFBundleShortVersionString</key>- <string>$(MARKETING_VERSION)</string>- <key>CFBundleVersion</key>- <string>$(CURRENT_PROJECT_VERSION)</string>- <key>ITSAppUsesNonExemptEncryption</key>- <false/>- <key>LSApplicationCategoryType</key>- <string></string>- <key>LSRequiresIPhoneOS</key>- <true/>- <key>NSCameraUsageDescription</key>- <string>The camera is needed in order to send area information</string>- <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>- <string>Location is needed in order to get notifications based on your location</string>- <key>NSLocationAlwaysUsageDescription</key>- <string>Location is needed in order to get notifications based on your location</string>- <key>NSLocationUsageDescription</key>- <string>Location is needed in order to get notifications based on your location</string>- <key>NSLocationWhenInUseUsageDescription</key>- <string>Location is needed in order to get notifications based on your location</string>- <key>UIApplicationShortcutItems</key>- <array>- <dict>- <key>UIApplicationShortcutItemIconFile</key>- <string>ic_settings</string>- <key>UIApplicationShortcutItemTitle</key>- <string>Settings</string>- <key>UIApplicationShortcutItemType</key>- <string>settings</string>- </dict>- </array>- <key>UIBackgroundModes</key>- <array>- <string>location</string>- <string>remote-notification</string>- </array>- <key>UILaunchStoryboardName</key>- <string>LaunchScreen</string>- <key>UIMainStoryboardFile</key>- <string>Storyboard</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/GenericApp/GenericApp/OpenRemote.entitlements b/console/iOS/GenericApp/GenericApp/OpenRemote.entitlementsdeleted file mode 100644index dd1421e31..000000000--- a/console/iOS/GenericApp/GenericApp/OpenRemote.entitlements+++ /dev/null@@ -1,12 +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.io.openremote.app</string>- </array>-</dict>-</plist>diff --git a/console/iOS/GenericApp/GenericApp/Preview Content/Preview Assets.xcassets/Contents.json b/console/iOS/GenericApp/GenericApp/Preview Content/Preview Assets.xcassets/Contents.jsondeleted file mode 100644index 73c00596a..000000000--- a/console/iOS/GenericApp/GenericApp/Preview Content/Preview Assets.xcassets/Contents.json+++ /dev/null@@ -1,6 +0,0 @@-{- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/GenericApp/GenericApp/Storyboard.storyboard b/console/iOS/GenericApp/GenericApp/Storyboard.storyboarddeleted file mode 100644index 3c6874ecc..000000000--- a/console/iOS/GenericApp/GenericApp/Storyboard.storyboard+++ /dev/null@@ -1,460 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="oDU-zF-Uvs">- <device id="retina6_1" orientation="portrait" appearance="light"/>- <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>- <viewController id="oDU-zF-Uvs" customClass="SplashViewController" customModule="OpenRemote" customModuleProvider="target" sceneMemberID="viewController">- <view key="view" contentMode="scaleToFill" id="bwX-tc-a4T">- <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>- <viewLayoutGuide key="safeArea" id="y8x-w5-OSh"/>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- </view>- <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="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"/>- </objects>- <point key="canvasLocation" x="-13220" y="-1923"/>- </scene>- <!--Viewcontroller-->- <scene sceneID="liA-xA-sIe">- <objects>- <viewController id="HSA-l5-YFF" customClass="ORViewcontroller" customModule="ORLib" sceneMemberID="viewController">- <view key="view" contentMode="scaleToFill" id="iMh-t6-rOs">- <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>- <viewLayoutGuide key="safeArea" id="eSh-1f-zrb"/>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- </view>- <navigationItem key="navigationItem" id="kjP-Jz-yAy"/>- </viewController>- <placeholder placeholderIdentifier="IBFirstResponder" id="06P-nW-O1T" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>- </objects>- <point key="canvasLocation" x="-10752" y="-856"/>- </scene>- <!--Domain-->- <scene sceneID="eX8-PG-EUH">- <objects>- <viewController id="Pi7-Rw-ZSt" customClass="WizardDomainViewController" customModule="OpenRemote" customModuleProvider="target" sceneMemberID="viewController">- <view key="view" contentMode="scaleToFill" id="IR5-tW-Kgn">- <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>- <subviews>- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Connect to your app" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WNe-Oj-DbK">- <rect key="frame" x="30" y="112" width="354" height="21"/>- <fontDescription key="fontDescription" type="system" pointSize="17"/>- <nil key="textColor"/>- <nil key="highlightedColor"/>- </label>- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RWD-5Z-rop">- <rect key="frame" x="30" y="153" width="354" height="200"/>- <subviews>- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter the App Domain" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1O0-Xo-WpU">- <rect key="frame" x="10" y="10" width="167" height="21"/>- <fontDescription key="fontDescription" type="system" pointSize="17"/>- <nil key="textColor"/>- <nil key="highlightedColor"/>- </label>- <button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uoR-Y9-80o" customClass="MDCRaisedButton">- <rect key="frame" x="312" y="160" width="32" height="30"/>- <state key="normal" title="Next"/>- <connections>- <action selector="nextButtonpressed:" destination="Pi7-Rw-ZSt" eventType="touchUpInside" id="Ykc-Au-0dS"/>- </connections>- </button>- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LdF-6W-ii0" customClass="ORTextInput" customModule="ORLib">- <rect key="frame" x="10" y="41" width="334" height="40"/>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- <constraints>- <constraint firstAttribute="height" constant="40" id="WDD-md-5ng"/>- </constraints>- <userDefinedRuntimeAttributes>- <userDefinedRuntimeAttribute type="string" keyPath="setPlaceholderText" value="Project domain"/>- </userDefinedRuntimeAttributes>- </view>- </subviews>- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>- <constraints>- <constraint firstAttribute="trailing" secondItem="LdF-6W-ii0" secondAttribute="trailing" constant="10" id="7HI-7a-FY9"/>- <constraint firstItem="1O0-Xo-WpU" firstAttribute="leading" secondItem="RWD-5Z-rop" secondAttribute="leading" constant="10" id="Gk0-LY-3Zh"/>- <constraint firstItem="LdF-6W-ii0" firstAttribute="top" secondItem="1O0-Xo-WpU" secondAttribute="bottom" constant="10" id="U4F-ua-FAz"/>- <constraint firstAttribute="trailing" secondItem="uoR-Y9-80o" secondAttribute="trailing" constant="10" id="ZU9-2z-kX8"/>- <constraint firstItem="LdF-6W-ii0" firstAttribute="leading" secondItem="1O0-Xo-WpU" secondAttribute="leading" id="bP0-p9-L1H"/>- <constraint firstAttribute="height" constant="200" id="clp-eC-67U"/>- <constraint firstAttribute="bottom" secondItem="uoR-Y9-80o" secondAttribute="bottom" constant="10" id="e6c-aG-29Q"/>- <constraint firstItem="1O0-Xo-WpU" firstAttribute="top" secondItem="RWD-5Z-rop" secondAttribute="top" constant="10" id="xYE-g9-yPv"/>- </constraints>- </view>- <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="or_push_icon" translatesAutoresizingMaskIntoConstraints="NO" id="SQD-g8-nGt">- <rect key="frame" x="30" y="114.5" width="16" height="16"/>- </imageView>- </subviews>- <viewLayoutGuide key="safeArea" id="El4-H3-bSM"/>- <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"/>- <constraint firstItem="El4-H3-bSM" firstAttribute="trailing" secondItem="WNe-Oj-DbK" secondAttribute="trailing" constant="30" id="FuU-yE-Y7H"/>- <constraint firstItem="WNe-Oj-DbK" firstAttribute="centerY" secondItem="SQD-g8-nGt" secondAttribute="centerY" id="NwQ-mM-iaz"/>- <constraint firstItem="SQD-g8-nGt" firstAttribute="leading" secondItem="El4-H3-bSM" secondAttribute="leading" constant="30" id="Rr3-wI-WgK"/>- <constraint firstItem="WNe-Oj-DbK" firstAttribute="leading" secondItem="El4-H3-bSM" secondAttribute="leading" constant="30" id="uDA-D1-Xe9"/>- <constraint firstItem="RWD-5Z-rop" firstAttribute="width" secondItem="WNe-Oj-DbK" secondAttribute="width" id="xWZ-ez-CNg"/>- <constraint firstItem="RWD-5Z-rop" firstAttribute="top" secondItem="WNe-Oj-DbK" secondAttribute="bottom" constant="20" id="ywL-uw-ANf"/>- </constraints>- </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"/>- <segue destination="P3v-2u-Uf5" kind="show" identifier="goToWizardRealmView" id="9ZZ-gO-4Go"/>- </connections>- </viewController>- <placeholder placeholderIdentifier="IBFirstResponder" id="Me9-Tm-nKE" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>- </objects>- <point key="canvasLocation" x="-11252" y="-1922"/>- </scene>- <!--Realm-->- <scene sceneID="Hij-HG-Sfv">- <objects>- <viewController id="P3v-2u-Uf5" customClass="WizardRealmViewController" customModule="OpenRemote" customModuleProvider="target" sceneMemberID="viewController">- <view key="view" contentMode="scaleToFill" id="AsW-xQ-7Do">- <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>- <subviews>- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Connect to your app" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GVA-jq-dIF">- <rect key="frame" x="30" y="112" width="354" height="21"/>- <fontDescription key="fontDescription" type="system" pointSize="17"/>- <nil key="textColor"/>- <nil key="highlightedColor"/>- </label>- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rds-tC-Xfi">- <rect key="frame" x="30" y="153" width="354" height="200"/>- <subviews>- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter the Realm" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8fN-pT-WOs">- <rect key="frame" x="10" y="10" width="121" height="21"/>- <fontDescription key="fontDescription" type="system" pointSize="17"/>- <nil key="textColor"/>- <nil key="highlightedColor"/>- </label>- <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QCb-6J-rL4" customClass="ORTextInput" customModule="ORLib">- <rect key="frame" x="10" y="41" width="334" height="40"/>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- <constraints>- <constraint firstAttribute="height" constant="40" id="PuT-Sr-Cz0"/>- <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="aHH-R0-itm"/>- </constraints>- <userDefinedRuntimeAttributes>- <userDefinedRuntimeAttribute type="string" keyPath="setPlaceholderText" value="Realm"/>- </userDefinedRuntimeAttributes>- </view>- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jn1-hW-fFq" customClass="MDCRaisedButton">- <rect key="frame" x="312" y="160" width="32" height="30"/>- <state key="normal" title="Next"/>- <connections>- <action selector="nextButtonpressed:" destination="Pi7-Rw-ZSt" eventType="touchUpInside" id="lfM-HB-8D1"/>- <action selector="nextButtonpressed:" destination="P3v-2u-Uf5" eventType="touchUpInside" id="vMq-g8-g0j"/>- </connections>- </button>- <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pE2-qw-0Zp" userLabel="Realms Selection Button">- <rect key="frame" x="10" y="41" width="334" height="40"/>- <constraints>- <constraint firstAttribute="height" constant="40" id="yHY-R2-PoI"/>- </constraints>- <state key="normal" title="Button"/>- <buttonConfiguration key="configuration" style="plain" title="Select realm"/>- <connections>- <action selector="selectRealm:" destination="P3v-2u-Uf5" eventType="touchUpInside" id="68N-gt-zek"/>- </connections>- </button>- </subviews>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- <constraints>- <constraint firstAttribute="trailing" secondItem="pE2-qw-0Zp" secondAttribute="trailing" constant="10" id="402-bI-Cp5"/>- <constraint firstAttribute="trailing" secondItem="QCb-6J-rL4" secondAttribute="trailing" constant="10" id="F9E-3R-zdq"/>- <constraint firstItem="8fN-pT-WOs" firstAttribute="top" secondItem="rds-tC-Xfi" secondAttribute="top" constant="10" id="G7k-sz-LaP"/>- <constraint firstItem="QCb-6J-rL4" firstAttribute="top" secondItem="8fN-pT-WOs" secondAttribute="bottom" constant="10" id="Nam-Bq-MQj"/>- <constraint firstItem="pE2-qw-0Zp" firstAttribute="top" secondItem="8fN-pT-WOs" secondAttribute="bottom" constant="10" id="Q6R-zK-AuV"/>- <constraint firstAttribute="bottom" secondItem="Jn1-hW-fFq" secondAttribute="bottom" constant="10" id="Us2-Xt-PU7"/>- <constraint firstItem="pE2-qw-0Zp" firstAttribute="leading" secondItem="8fN-pT-WOs" secondAttribute="leading" id="b55-lA-k2m"/>- <constraint firstItem="8fN-pT-WOs" firstAttribute="leading" secondItem="rds-tC-Xfi" secondAttribute="leading" constant="10" id="bZm-mE-U8J"/>- <constraint firstAttribute="height" constant="200" id="jNQ-3m-Dix"/>- <constraint firstAttribute="trailing" secondItem="Jn1-hW-fFq" secondAttribute="trailing" constant="10" id="te1-Rj-IYd"/>- <constraint firstItem="QCb-6J-rL4" firstAttribute="leading" secondItem="8fN-pT-WOs" secondAttribute="leading" id="vde-a8-AsY"/>- </constraints>- </view>- </subviews>- <viewLayoutGuide key="safeArea" id="C0m-OJ-atI"/>- <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"/>- <constraint firstItem="GVA-jq-dIF" firstAttribute="top" secondItem="C0m-OJ-atI" secondAttribute="top" constant="20" id="dIk-aD-g8U"/>- <constraint firstItem="rds-tC-Xfi" firstAttribute="leading" secondItem="C0m-OJ-atI" secondAttribute="leading" constant="30" id="gGk-Nt-f5f"/>- <constraint firstItem="rds-tC-Xfi" firstAttribute="width" secondItem="GVA-jq-dIF" secondAttribute="width" id="inn-zQ-fac"/>- <constraint firstItem="C0m-OJ-atI" firstAttribute="trailing" secondItem="GVA-jq-dIF" secondAttribute="trailing" constant="30" id="wjt-sI-o02"/>- </constraints>- </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"/>- <segue destination="HSA-l5-YFF" kind="presentation" identifier="goToWebView" modalPresentationStyle="fullScreen" id="4Aa-7e-CLQ"/>- </connections>- </viewController>- <placeholder placeholderIdentifier="IBFirstResponder" id="2bO-ip-ceU" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>- </objects>- <point key="canvasLocation" x="-9019" y="-1922"/>- </scene>- <!--App-->- <scene sceneID="gwn-Tt-d11">- <objects>- <viewController id="ccW-7o-aWn" customClass="WizardAppViewController" customModule="OpenRemote" customModuleProvider="target" sceneMemberID="viewController">- <view key="view" contentMode="scaleToFill" id="R9V-9S-UMe">- <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>- <subviews>- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Connect to your app" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a8w-Ut-lvr">- <rect key="frame" x="30" y="112" width="354" height="20.5"/>- <fontDescription key="fontDescription" type="system" pointSize="17"/>- <nil key="textColor"/>- <nil key="highlightedColor"/>- </label>- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bYT-CK-7We">- <rect key="frame" x="30" y="152.5" width="354" height="200"/>- <subviews>- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Select an app" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q03-kj-Zcn">- <rect key="frame" x="10" y="10" width="104" height="21"/>- <fontDescription key="fontDescription" type="system" pointSize="17"/>- <nil key="textColor"/>- <nil key="highlightedColor"/>- </label>- <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z5X-eO-DYi" customClass="ORTextInput" customModule="ORLib">- <rect key="frame" x="0.0" y="44" width="344" height="40"/>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- <constraints>- <constraint firstAttribute="height" constant="40" id="KH4-Oo-vvf"/>- <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="brF-yc-nEE"/>- </constraints>- <userDefinedRuntimeAttributes>- <userDefinedRuntimeAttribute type="string" keyPath="setPlaceholderText" value="App name"/>- </userDefinedRuntimeAttributes>- </view>- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LOC-Pp-fDB" customClass="MDCRaisedButton">- <rect key="frame" x="312" y="160" width="32" height="30"/>- <state key="normal" title="Next"/>- <connections>- <action selector="nextButtonpressed:" destination="ccW-7o-aWn" eventType="touchUpInside" id="W6c-eh-5Rb"/>- </connections>- </button>- <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gvc-Wg-7aG">- <rect key="frame" x="10" y="41" width="334" height="40"/>- <constraints>- <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="Eoz-4h-bOg"/>- <constraint firstAttribute="height" constant="40" id="fyT-kh-Gto"/>- </constraints>- <state key="normal" title="Button"/>- <buttonConfiguration key="configuration" style="plain" title="Select app"/>- <connections>- <action selector="selectApp:" destination="ccW-7o-aWn" eventType="touchUpInside" id="9jx-7m-Qj3"/>- </connections>- </button>- </subviews>- <color key="backgroundColor" systemColor="systemBackgroundColor"/>- <constraints>- <constraint firstItem="Gvc-Wg-7aG" firstAttribute="leading" secondItem="Q03-kj-Zcn" secondAttribute="leading" id="3a5-GP-fEM"/>- <constraint firstAttribute="trailing" secondItem="Z5X-eO-DYi" secondAttribute="trailing" constant="10" id="4oB-L4-CDY"/>- <constraint firstItem="Q03-kj-Zcn" firstAttribute="leading" secondItem="bYT-CK-7We" secondAttribute="leading" constant="10" id="60c-fU-fN8"/>- <constraint firstAttribute="trailing" secondItem="Gvc-Wg-7aG" secondAttribute="trailing" constant="10" id="6aA-D8-XCS"/>- <constraint firstAttribute="bottom" secondItem="LOC-Pp-fDB" secondAttribute="bottom" constant="10" id="8kh-gu-ZQN"/>- <constraint firstAttribute="height" constant="200" id="9oe-Vr-tPl"/>- <constraint firstItem="Z5X-eO-DYi" firstAttribute="top" secondItem="Q03-kj-Zcn" secondAttribute="bottom" constant="13" id="Ilv-sc-MBD"/>- <constraint firstAttribute="trailing" secondItem="LOC-Pp-fDB" secondAttribute="trailing" constant="10" id="LTl-ff-1k8"/>- <constraint firstItem="Q03-kj-Zcn" firstAttribute="top" secondItem="bYT-CK-7We" secondAttribute="top" constant="10" id="Nc0-Aa-MDr"/>- <constraint firstItem="Z5X-eO-DYi" firstAttribute="leading" secondItem="Q03-kj-Zcn" secondAttribute="leading" constant="-10" id="ZWs-Mv-85p"/>- <constraint firstItem="Gvc-Wg-7aG" firstAttribute="top" secondItem="Q03-kj-Zcn" secondAttribute="bottom" constant="10" id="mNL-Dh-4GR"/>- </constraints>- </view>- </subviews>- <viewLayoutGuide key="safeArea" id="JdK-us-UvR"/>- <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"/>- <constraint firstItem="bYT-CK-7We" firstAttribute="width" secondItem="a8w-Ut-lvr" secondAttribute="width" id="OlO-sQ-k6C"/>- <constraint firstItem="a8w-Ut-lvr" firstAttribute="leading" secondItem="JdK-us-UvR" secondAttribute="leading" constant="30" id="Th5-US-mB9"/>- <constraint firstItem="a8w-Ut-lvr" firstAttribute="top" secondItem="JdK-us-UvR" secondAttribute="top" constant="20" id="cpx-du-Fd6"/>- <constraint firstItem="bYT-CK-7We" firstAttribute="top" secondItem="a8w-Ut-lvr" secondAttribute="bottom" constant="20" id="hbA-NU-sL8"/>- </constraints>- </view>- <navigationItem key="navigationItem" title="App" id="tRh-VI-Btk"/>- <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>- </viewController>- <placeholder placeholderIdentifier="IBFirstResponder" id="XDI-fx-2Io" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>- </objects>- <point key="canvasLocation" x="-10274" y="-1922"/>- </scene>- <!--Navigation Controller-->- <scene sceneID="0L2-qW-jp0">- <objects>- <navigationController automaticallyAdjustsScrollViewInsets="NO" id="7TF-fh-Sa5" sceneMemberID="viewController">- <toolbarItems/>- <navigationBar key="navigationBar" contentMode="scaleToFill" id="iZ9-Dg-hIL">- <rect key="frame" x="0.0" y="48" width="414" height="44"/>- <autoresizingMask key="autoresizingMask"/>- </navigationBar>- <nil name="viewControllers"/>- <connections>- <segue destination="Pi7-Rw-ZSt" kind="relationship" relationship="rootViewController" id="HVQ-FV-Tm2"/>- </connections>- </navigationController>- <placeholder placeholderIdentifier="IBFirstResponder" id="Uzl-KH-s22" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>- </objects>- <point key="canvasLocation" x="-12200" y="-1922"/>- </scene>- <!--Settings View Controller-->- <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="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" 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="374" height="102"/>- <autoresizingMask key="autoresizingMask"/>- <subviews>- <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>- <sections/>- <connections>- <outlet property="dataSource" destination="uoK-29-uZr" id="r2Z-RZ-Pgh"/>- <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="-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>- </resources>-</document>diff --git a/console/iOS/GenericApp/GenericApp/UI/ProjectTableViewCell.swift b/console/iOS/GenericApp/GenericApp/UI/ProjectTableViewCell.swiftdeleted file mode 100644index 6b516471b..000000000--- a/console/iOS/GenericApp/GenericApp/UI/ProjectTableViewCell.swift+++ /dev/null@@ -1,27 +0,0 @@-//-// 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.swiftdeleted file mode 100644index 6b1f72a44..000000000--- a/console/iOS/GenericApp/GenericApp/UI/SettingsViewController.swift+++ /dev/null@@ -1,128 +0,0 @@-//-// SettingsViewController.swift-// GenericApp-//-// Created by Eric Bariaux on 06/12/2022.-// Copyright © 2022 OpenRemote. All rights reserved.-//--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 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 {- 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.swiftdeleted file mode 100644index 5f5c25746..000000000--- a/console/iOS/GenericApp/GenericApp/UI/SplashViewController.swift+++ /dev/null@@ -1,61 +0,0 @@-//-// SplashController.swift-// GenericApp-//-// Created by Michael Rademaker on 21/10/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import UIKit-import ORLib--class SplashViewController: UIViewController {-- var host: String?- var project: ProjectConfig?-- var displaySettings = false-- override func viewDidAppear(_ animated: Bool) {- super.viewDidAppear(animated)-- if (displaySettings) {- self.performSegue(withIdentifier: Segues.goToSettingsView, sender: self)- displaySettings = false- return- }- if let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement),- let projectsData = userDefaults.data(forKey: DefaultsKey.projectsConfigurationKey),- let selectedProjectId = userDefaults.string(forKey: DefaultsKey.projectKey) {-- let projects = try? JSONDecoder().decode([ProjectConfig].self, from: projectsData)-- if let projects = projects {- print("Known projects \(projects)")- print("Selected project \(selectedProjectId)")-- if let selectedProject = projects.first(where: { $0.id == selectedProjectId } ) {- project = selectedProject- self.performSegue(withIdentifier: Segues.goToWebView, sender: self)- return- }- }- }- self.performSegue(withIdentifier: Segues.goToWizardDomainView, sender: self)- }-- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {- if segue.identifier == Segues.goToWebView {- let orViewController = segue.destination as! ORViewcontroller-- if let project = project {-- // TODO: replace with proper URL creation- orViewController.targetUrl = project.targetUrl--// orViewController.baseUrl = host- }- }- }--}diff --git a/console/iOS/GenericApp/GenericApp/UI/WizardAppViewController.swift b/console/iOS/GenericApp/GenericApp/UI/WizardAppViewController.swiftdeleted file mode 100644index 30a0cfc37..000000000--- a/console/iOS/GenericApp/GenericApp/UI/WizardAppViewController.swift+++ /dev/null@@ -1,145 +0,0 @@-//-// WizardAppViewController.swift-// GenericApp-//-// Created by Eric Bariaux on 18/06/2022.-// Copyright © 2022 OpenRemote. All rights reserved.-//--import UIKit-import MaterialComponents.MaterialTextFields-import ORLib-import DropDown--class WizardAppViewController: UIViewController {-- var configManager: ConfigManager?-- var apps: [String]?-- var appName: String?-- @IBOutlet weak var appTextInput: ORTextInput!- @IBOutlet weak var nextButton: MDCRaisedButton!- @IBOutlet weak var boxView: UIView!-- @IBOutlet weak var appsSelectionButton: UIButton!- var dropDown = DropDown()-- override func viewDidLoad() {- super.viewDidLoad()-- let orGreenColor = UIColor(named: "or_green")-- nextButton.backgroundColor = orGreenColor- nextButton.tintColor = UIColor.white-- boxView.layer.cornerRadius = 10- }-- override func viewDidAppear(_ animated: Bool) {- super.viewDidAppear(animated)-- appTextInput.textField?.delegate = self- appTextInput.textField?.autocorrectionType = .no- appTextInput.textField?.autocapitalizationType = .none- appTextInput.textField?.returnKeyType = .next-- if let apps = apps {- dropDown.anchorView = appsSelectionButton- // The list of items to display. Can be changed dynamically- dropDown.dataSource = apps-- dropDown.selectionAction = { [weak self] (index, item) in- self?.appsSelectionButton.setTitle(item, for: .normal)- }-- appsSelectionButton.isHidden = false- appTextInput.isHidden = true- } else {- appsSelectionButton.isHidden = true- appTextInput.isHidden = false- }- }-- @IBAction func selectApp(_ sender: AnyObject) {- dropDown.show()- }-- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {- if segue.identifier == Segues.goToWizardRealmView {- switch configManager!.state {- case .selectRealm(_, _, let realms):- let realmViewController = segue.destination as! WizardRealmViewController- realmViewController.realms = realms- realmViewController.configManager = self.configManager- default:- fatalError("Invalid state for segue")- }- } else if segue.identifier == Segues.goToWebView {- let orViewController = segue.destination as! ORViewcontroller-- switch configManager!.state {- case .complete(let project):- orViewController.targetUrl = project.targetUrl- default:- fatalError("Invalid state for segue")- }- }- }-- @IBAction func nextButtonpressed(_ sender: UIButton) {- selectApp()- }-- private func selectApp() {- let selectedApp: String?- if apps != nil {- selectedApp = dropDown.selectedItem- } else {- selectedApp = appName- }-- if let selectedApp = selectedApp {- print("Selected app >\(selectedApp)<")- _ = try? configManager!.setApp(app: selectedApp)---- // TODO: check state, can we go to some other screen ?--- self.performSegue(withIdentifier: Segues.goToWizardRealmView, sender: self)- } else {- let alertView = UIAlertController(title: "Error", message: "Please \(apps != nil ? "select" : "enter") an application", preferredStyle: .alert)- alertView.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))-- self.present(alertView, animated: true, completion: nil)- }- }-}--extension WizardAppViewController: UITextFieldDelegate {-- func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {- if textField == appTextInput.textField {- if let s = appTextInput.textField?.text {- appName = s.replacingCharacters(in: Range(range, in: s)!, with: string).trimmingCharacters(in: .whitespacesAndNewlines)- }- }- return true- }-- func textFieldShouldReturn(_ textField: UITextField) -> Bool {- guard let input = textField.text, !input.isEmpty else {- return false- }-- if textField == appTextInput.textField {- appTextInput.textField?.resignFirstResponder()- selectApp()- }-- return true- }-}diff --git a/console/iOS/GenericApp/GenericApp/UI/WizardDomainViewController.swift b/console/iOS/GenericApp/GenericApp/UI/WizardDomainViewController.swiftdeleted file mode 100644index a6b3fc2d3..000000000--- a/console/iOS/GenericApp/GenericApp/UI/WizardDomainViewController.swift+++ /dev/null@@ -1,137 +0,0 @@-//-// WizardDomainViewController.swift-// GenericApp-//-// Created by Eric Bariaux on 18/06/2022.-// Copyright © 2022 OpenRemote. All rights reserved.-//--import UIKit-import MaterialComponents.MaterialTextFields-import ORLib--class WizardDomainViewController: UIViewController {-- var configManager: ConfigManager?-- var domainName: String?-- @IBOutlet weak var domainTextInput: ORTextInput!- @IBOutlet weak var nextButton: MDCRaisedButton!- @IBOutlet var boxView: UIView!-- override func viewDidLoad() {- super.viewDidLoad()-- let orGreenColor = UIColor(named: "or_green")-- nextButton.backgroundColor = orGreenColor- nextButton.tintColor = UIColor.white- boxView.layer.cornerRadius = 10- }-- override func viewDidAppear(_ animated: Bool) {- super.viewDidAppear(animated)-- domainTextInput.textField?.delegate = self- domainTextInput.textField?.autocorrectionType = .no- domainTextInput.textField?.autocapitalizationType = .none- domainTextInput.textField?.returnKeyType = .next- }-- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {- if segue.identifier == Segues.goToWizardAppView {- switch configManager!.state {- case .selectApp(_, let apps):- let appViewController = segue.destination as! WizardAppViewController- appViewController.apps = apps- appViewController.configManager = self.configManager- default:- fatalError("Invalid state for segue")- }- } else if segue.identifier == Segues.goToWizardRealmView {- switch configManager!.state {- case .selectRealm(_, _, let realms):- let realmViewController = segue.destination as! WizardRealmViewController- realmViewController.realms = realms- realmViewController.configManager = self.configManager- default:- fatalError("Invalid state for segue")- }- } else if segue.identifier == Segues.goToWebView {- let orViewController = segue.destination as! ORViewcontroller-- switch configManager!.state {- case .complete(let project):- orViewController.targetUrl = project.targetUrl- default:- fatalError("Invalid state for segue")- }- }- }-- @IBAction func nextButtonpressed(_ sender: UIButton) {- if let domain = domainName {- requestAppConfig(domain)- }- }-}--extension WizardDomainViewController: UITextFieldDelegate {-- func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {- if textField == domainTextInput.textField {- if let s = domainTextInput.textField?.text {- domainName = s.replacingCharacters(in: Range(range, in: s)!, with: string).trimmingCharacters(in: .whitespacesAndNewlines)- nextButton.isEnabled = !(domainName?.isEmpty ?? true)- } else {- nextButton.isEnabled = false- }- }- return true- }-- fileprivate func requestAppConfig(_ domain: String) {- configManager = ConfigManager(apiManagerFactory: { url in- HttpApiManager(baseUrl: url)- })-- async {- do {- let state = try await configManager!.setDomain(domain: domain)- print("State \(state)")- switch state {- case .selectDomain:- // Something wrong, we just set the domain- let alertView = UIAlertController(title: "Error", message: "Error occurred getting app config. Check your input and try again", preferredStyle: .alert)- alertView.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))-- self.present(alertView, animated: true, completion: nil)- case .selectApp:- self.performSegue(withIdentifier: Segues.goToWizardAppView, sender: self)- case .selectRealm:- self.performSegue(withIdentifier: Segues.goToWizardRealmView, sender: self)- case.complete:- self.performSegue(withIdentifier: Segues.goToWebView, sender: self)- }- } catch {- let alertView = UIAlertController(title: "Error", message: "Error occurred getting app config. Check your input and try again", preferredStyle: .alert)- alertView.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))- self.present(alertView, animated: true, completion: nil)- }- }- }-- func textFieldShouldReturn(_ textField: UITextField) -> Bool {- guard let input = textField.text, !input.isEmpty else {- return false- }-- if textField == domainTextInput.textField, let domain = domainName {- domainTextInput.textField?.resignFirstResponder()- requestAppConfig(domain)- }-- return true- }-}diff --git a/console/iOS/GenericApp/GenericApp/UI/WizardRealmViewController.swift b/console/iOS/GenericApp/GenericApp/UI/WizardRealmViewController.swiftdeleted file mode 100644index 518be35fe..000000000--- a/console/iOS/GenericApp/GenericApp/UI/WizardRealmViewController.swift+++ /dev/null@@ -1,187 +0,0 @@-//-// WizardRealmViewController.swift-// GenericApp-//-// Created by Eric Bariaux on 21/07/2022.-// Copyright © 2022 OpenRemote. All rights reserved.-//--import UIKit-import MaterialComponents.MaterialTextFields-import ORLib-import DropDown---class WizardRealmViewController: UIViewController {-- var configManager: ConfigManager?-- var realms: [String]?-- var realmName: String?-- @IBOutlet weak var realmTextInput: ORTextInput!- @IBOutlet weak var nextButton: MDCRaisedButton!- @IBOutlet weak var boxView: UIView!-- @IBOutlet weak var realmsSelectionButton: UIButton!- var dropDown = DropDown()-- override func viewDidLoad() {- super.viewDidLoad()-- let orGreenColor = UIColor(named: "or_green")-- nextButton.backgroundColor = orGreenColor- nextButton.tintColor = UIColor.white-- boxView.layer.cornerRadius = 10- }-- override func viewDidAppear(_ animated: Bool) {- super.viewDidAppear(animated)-- realmTextInput.textField?.delegate = self- realmTextInput.textField?.autocorrectionType = .no- realmTextInput.textField?.autocapitalizationType = .none- realmTextInput.textField?.returnKeyType = .next-- if let realms = realms {- dropDown.anchorView = realmsSelectionButton- // The list of items to display. Can be changed dynamically- dropDown.dataSource = realms-- dropDown.selectionAction = { [weak self] (index, item) in- self?.realmsSelectionButton.setTitle(item, for: .normal)- }-- realmsSelectionButton.isHidden = false- realmTextInput.isHidden = true- } else {- realmsSelectionButton.isHidden = true- realmTextInput.isHidden = false- }-- }-- @IBAction func selectRealm(_ sender: AnyObject) {- dropDown.show()- }-- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {- if segue.identifier == Segues.goToWebView {- let orViewController = segue.destination as! ORViewcontroller-- switch configManager!.state {- case .complete(let project):- orViewController.targetUrl = project.targetUrl- default:- fatalError("We should never come to this screen in that state")- }--- // TODO: based on configManager?.appInfos retrieve providers -> this is done by selectRealm on ConfigMgr----// orViewController.targetUrl = "https://demo.openremote.io/manager/?realm=smartcity&consoleProviders=geofence push storage&consoleAutoEnable=true#!geofences"- }- }-- @IBAction func nextButtonpressed(_ sender: UIButton) {-- // TODO: handle errors and have a proper error message--- // TODO: handle the case realm is selected from menu--- let state = try? configManager!.setRealm(realm: realmName)- switch state {- case let .complete(project):- if let userDefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement) {- do {- 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)- } catch {- break // Fall through to error message- }- }- default:- break // Fall through to error message- }--- // If we reached here, an error occured--- // TODO: proper error message- let alertView = UIAlertController(title: "Error", message: "TODO", preferredStyle: .alert)- alertView.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))- self.present(alertView, animated: true, completion: nil)-- }-}--extension WizardRealmViewController: UITextFieldDelegate {-- func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {- if textField == realmTextInput.textField {- if let s = realmTextInput.textField?.text {- realmName = s.replacingCharacters(in: Range(range, in: s)!, with: string).trimmingCharacters(in: .whitespacesAndNewlines)- }- }-- return true- }-- /*- fileprivate func requestAppConfig(_ domain: String) {- configManager = ConfigManager(apiManagerFactory: { url in- HttpApiManager(baseUrl: url)- })-- async {- let state = try await configManager!.setDomain(domain: domain)- print("State \(state)")- switch state {- case .selectDomain:- // Something wrong, we just set the domain- let alertView = UIAlertController(title: "Error", message: "Error occurred getting app config. Check your input and try again", preferredStyle: .alert)- alertView.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))-- self.present(alertView, animated: true, completion: nil)- case .selectApp(_, let apps):- self.apps = apps- self.performSegue(withIdentifier: "goToWizardAppView", sender: self)- case .selectRealm(let baseURL, let realms):- self.performSegue(withIdentifier: "goToWizardRealmView", sender: self)- case.complete(let baseURL, let app, let realm):- self.performSegue(withIdentifier: "goToWebView", sender: self)- }- }- }- */-- func textFieldShouldReturn(_ textField: UITextField) -> Bool {- guard let input = textField.text, !input.isEmpty else {- return false- }-- if textField == realmTextInput.textField, let realm = realmName {- realmTextInput.textField?.resignFirstResponder()-// requestAppConfig(domain)- }-- return true- }-}diff --git a/console/iOS/GenericApp/GenericApp/Utils/String+Utils.swift b/console/iOS/GenericApp/GenericApp/Utils/String+Utils.swiftdeleted file mode 100644index 99aac32f1..000000000--- a/console/iOS/GenericApp/GenericApp/Utils/String+Utils.swift+++ /dev/null@@ -1,19 +0,0 @@-//-// String+Utils.swift-// GenericApp-//-// Created by Michael Rademaker on 26/01/2022.-// Copyright © 2022 OpenRemote. All rights reserved.-//--import Foundation-import UIKit--extension String {- func isUrl () -> Bool {- if let url = NSURL(string: self) {- return UIApplication.shared.canOpenURL(url as URL)- }- return false- }-}diff --git a/console/iOS/GenericApp/NotificationService/Info.plist b/console/iOS/GenericApp/NotificationService/Info.plistdeleted file mode 100644index e28de53ce..000000000--- a/console/iOS/GenericApp/NotificationService/Info.plist+++ /dev/null@@ -1,31 +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>$(DEVELOPMENT_LANGUAGE)</string>- <key>CFBundleDisplayName</key>- <string>NotificationService</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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>- <key>CFBundleShortVersionString</key>- <string>$(MARKETING_VERSION)</string>- <key>CFBundleVersion</key>- <string>$(CURRENT_PROJECT_VERSION)</string>- <key>NSExtension</key>- <dict>- <key>NSExtensionPointIdentifier</key>- <string>com.apple.usernotifications.service</string>- <key>NSExtensionPrincipalClass</key>- <string>$(PRODUCT_MODULE_NAME).NotificationService</string>- </dict>-</dict>-</plist>diff --git a/console/iOS/GenericApp/NotificationService/NotificationService.entitlements b/console/iOS/GenericApp/NotificationService/NotificationService.entitlementsdeleted file mode 100644index f40752220..000000000--- a/console/iOS/GenericApp/NotificationService/NotificationService.entitlements+++ /dev/null@@ -1,10 +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>com.apple.security.application-groups</key>- <array>- <string>group.io.openremote.app</string>- </array>-</dict>-</plist>diff --git a/console/iOS/GenericApp/NotificationService/NotificationService.swift b/console/iOS/GenericApp/NotificationService/NotificationService.swiftdeleted file mode 100644index c1a05b29c..000000000--- a/console/iOS/GenericApp/NotificationService/NotificationService.swift+++ /dev/null@@ -1,93 +0,0 @@-//-// NotificationService.swift-// NotificationService-//-// Created by nuc on 17/06/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import UserNotifications-import ORLib--class NotificationService: UNNotificationServiceExtension {-- 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)-- if let bestAttemptContent = bestAttemptContent {-- let categoryName = "openremoteNotification"- bestAttemptContent.categoryIdentifier = categoryName-- //Buttons- if let buttonsString = bestAttemptContent.userInfo[DefaultsKey.buttonsKey] as? String {- if let buttonsData = buttonsString.data(using: .utf8) {- if let buttons = try? JSONDecoder().decode([ORPushNotificationButton].self, from: buttonsData) {-- var notificationActions = [UNNotificationAction]()-- for button in buttons {- if button.action != nil {- notificationActions.append(UNNotificationAction(identifier: button.title, title: button.title, options: UNNotificationActionOptions.foreground))- } else {- notificationActions.append(UNNotificationAction(identifier: "declineAction", title: button.title, options: UNNotificationActionOptions.destructive))- }- }-- let category = UNNotificationCategory(identifier: categoryName, actions: notificationActions, intentIdentifiers: [], options: [])- let categories : Set = [category]- UNUserNotificationCenter.current().setNotificationCategories(categories)- }- }- }- //Actions- if let actionString = bestAttemptContent.userInfo[DefaultsKey.actionKey] as? String {- if let actionsData = actionString.data(using: .utf8){- if let action = try? JSONDecoder().decode(ORPushNotificationAction.self, from: actionsData) {-- bestAttemptContent.userInfo[ActionType.appUrl] = action.url- bestAttemptContent.userInfo[ActionType.silent] = action.silent- bestAttemptContent.userInfo[ActionType.openInBrowser] = action.openInBrowser- bestAttemptContent.userInfo[ActionType.httpMethod] = action.httpMethod ?? "GET"- bestAttemptContent.userInfo[DefaultsKey.dataKey] = action.data ?? "null"- }- }- }-- if let notificationIdString = bestAttemptContent.userInfo[ActionType.notificationId] as? String, let notificationId = Int64(notificationIdString) {- if let defaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement), let consoleId = defaults.string(forKey: GeofenceProvider.consoleIdKey) {- ORNotificationResource.sharedInstance.notificationDelivered(notificationId: notificationId, targetId: consoleId)- }- }-- contentHandler(bestAttemptContent.copy() as! UNNotificationContent)- }- }--- 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")- if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {- //Actions- if let actionString = bestAttemptContent.userInfo[DefaultsKey.actionKey] as? String {- if let actionsData = actionString.data(using: .utf8){- if let action = try? JSONDecoder().decode(ORPushNotificationAction.self, from: actionsData) {-- bestAttemptContent.userInfo[ActionType.appUrl] = action.url- bestAttemptContent.userInfo[ActionType.silent] = action.silent- bestAttemptContent.userInfo[ActionType.openInBrowser] = action.openInBrowser- bestAttemptContent.userInfo[ActionType.httpMethod] = action.httpMethod ?? "GET"- bestAttemptContent.userInfo[DefaultsKey.dataKey] = action.data ?? "null"- }- }- }- contentHandler(bestAttemptContent)- }- }-}diff --git a/console/iOS/GenericApp/Podfile b/console/iOS/GenericApp/Podfiledeleted file mode 100644index fc8dbd571..000000000--- a/console/iOS/GenericApp/Podfile+++ /dev/null@@ -1,43 +0,0 @@-workspace 'GenericApp'-platform :ios, '14.0'--use_frameworks!--def shared_pods- pod 'MaterialComponents/TextFields'- pod 'MaterialComponents/Buttons'-end---target 'GenericApp' do- project 'GenericApp'- shared_pods- pod 'Firebase/Messaging'- pod 'Firebase/Crashlytics'- pod 'Firebase/Analytics'- pod 'IQKeyboardManagerSwift'- pod 'DropDown'-end--target 'NotificationService' do- project 'GenericApp'- shared_pods- pod 'Firebase/Messaging'- pod 'Firebase/Crashlytics'- pod 'Firebase/Analytics'-end--target 'ORLib' do- shared_pods- project '../ORLib/ORLib'-end--post_install do |installer|- installer.generated_projects.each do |project|- project.targets.each do |target|- target.build_configurations.each do |config|- config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'- end- end- end-end\ No newline at end of filediff --git a/console/iOS/GenericApp/Podfile.lock b/console/iOS/GenericApp/Podfile.lockdeleted file mode 100644index da1e711fc..000000000--- a/console/iOS/GenericApp/Podfile.lock+++ /dev/null@@ -1,224 +0,0 @@-PODS:- - DropDown (2.3.13)- - Firebase/Analytics (8.11.0):- - Firebase/Core- - Firebase/Core (8.11.0):- - Firebase/CoreOnly- - FirebaseAnalytics (~> 8.11.0)- - Firebase/CoreOnly (8.11.0):- - FirebaseCore (= 8.11.0)- - Firebase/Crashlytics (8.11.0):- - Firebase/CoreOnly- - FirebaseCrashlytics (~> 8.11.0)- - Firebase/Messaging (8.11.0):- - Firebase/CoreOnly- - FirebaseMessaging (~> 8.11.0)- - FirebaseAnalytics (8.11.0):- - FirebaseAnalytics/AdIdSupport (= 8.11.0)- - FirebaseCore (~> 8.0)- - FirebaseInstallations (~> 8.0)- - GoogleUtilities/AppDelegateSwizzler (~> 7.7)- - GoogleUtilities/MethodSwizzler (~> 7.7)- - GoogleUtilities/Network (~> 7.7)- - "GoogleUtilities/NSData+zlib (~> 7.7)"- - nanopb (~> 2.30908.0)- - FirebaseAnalytics/AdIdSupport (8.11.0):- - FirebaseCore (~> 8.0)- - FirebaseInstallations (~> 8.0)- - GoogleAppMeasurement (= 8.11.0)- - GoogleUtilities/AppDelegateSwizzler (~> 7.7)- - GoogleUtilities/MethodSwizzler (~> 7.7)- - GoogleUtilities/Network (~> 7.7)- - "GoogleUtilities/NSData+zlib (~> 7.7)"- - nanopb (~> 2.30908.0)- - FirebaseCore (8.11.0):- - FirebaseCoreDiagnostics (~> 8.0)- - GoogleUtilities/Environment (~> 7.7)- - GoogleUtilities/Logger (~> 7.7)- - FirebaseCoreDiagnostics (8.11.0):- - GoogleDataTransport (~> 9.1)- - GoogleUtilities/Environment (~> 7.7)- - GoogleUtilities/Logger (~> 7.7)- - nanopb (~> 2.30908.0)- - FirebaseCrashlytics (8.11.0):- - FirebaseCore (~> 8.0)- - FirebaseInstallations (~> 8.0)- - GoogleDataTransport (~> 9.1)- - GoogleUtilities/Environment (~> 7.7)- - nanopb (~> 2.30908.0)- - PromisesObjC (< 3.0, >= 1.2)- - FirebaseInstallations (8.11.0):- - FirebaseCore (~> 8.0)- - GoogleUtilities/Environment (~> 7.7)- - GoogleUtilities/UserDefaults (~> 7.7)- - PromisesObjC (< 3.0, >= 1.2)- - FirebaseMessaging (8.11.0):- - FirebaseCore (~> 8.0)- - FirebaseInstallations (~> 8.0)- - GoogleDataTransport (~> 9.1)- - GoogleUtilities/AppDelegateSwizzler (~> 7.7)- - GoogleUtilities/Environment (~> 7.7)- - GoogleUtilities/Reachability (~> 7.7)- - GoogleUtilities/UserDefaults (~> 7.7)- - nanopb (~> 2.30908.0)- - GoogleAppMeasurement (8.11.0):- - GoogleAppMeasurement/AdIdSupport (= 8.11.0)- - GoogleUtilities/AppDelegateSwizzler (~> 7.7)- - GoogleUtilities/MethodSwizzler (~> 7.7)- - GoogleUtilities/Network (~> 7.7)- - "GoogleUtilities/NSData+zlib (~> 7.7)"- - nanopb (~> 2.30908.0)- - GoogleAppMeasurement/AdIdSupport (8.11.0):- - GoogleAppMeasurement/WithoutAdIdSupport (= 8.11.0)- - GoogleUtilities/AppDelegateSwizzler (~> 7.7)- - GoogleUtilities/MethodSwizzler (~> 7.7)- - GoogleUtilities/Network (~> 7.7)- - "GoogleUtilities/NSData+zlib (~> 7.7)"- - nanopb (~> 2.30908.0)- - GoogleAppMeasurement/WithoutAdIdSupport (8.11.0):- - GoogleUtilities/AppDelegateSwizzler (~> 7.7)- - GoogleUtilities/MethodSwizzler (~> 7.7)- - GoogleUtilities/Network (~> 7.7)- - "GoogleUtilities/NSData+zlib (~> 7.7)"- - nanopb (~> 2.30908.0)- - GoogleDataTransport (9.1.2):- - GoogleUtilities/Environment (~> 7.2)- - nanopb (~> 2.30908.0)- - PromisesObjC (< 3.0, >= 1.2)- - GoogleUtilities/AppDelegateSwizzler (7.7.0):- - GoogleUtilities/Environment- - GoogleUtilities/Logger- - GoogleUtilities/Network- - GoogleUtilities/Environment (7.7.0):- - PromisesObjC (< 3.0, >= 1.2)- - GoogleUtilities/Logger (7.7.0):- - GoogleUtilities/Environment- - GoogleUtilities/MethodSwizzler (7.7.0):- - GoogleUtilities/Logger- - GoogleUtilities/Network (7.7.0):- - GoogleUtilities/Logger- - "GoogleUtilities/NSData+zlib"- - GoogleUtilities/Reachability- - "GoogleUtilities/NSData+zlib (7.7.0)"- - GoogleUtilities/Reachability (7.7.0):- - GoogleUtilities/Logger- - GoogleUtilities/UserDefaults (7.7.0):- - GoogleUtilities/Logger- - IQKeyboardManagerSwift (6.5.9)- - MaterialComponents/AnimationTiming (124.2.0)- - MaterialComponents/Availability (124.2.0)- - MaterialComponents/Buttons (124.2.0):- - MaterialComponents/Elevation- - MaterialComponents/Ink- - MaterialComponents/private/Math- - MaterialComponents/Ripple- - MaterialComponents/Shadow- - MaterialComponents/ShadowElevations- - MaterialComponents/ShadowLayer- - MaterialComponents/ShapeLibrary- - MaterialComponents/Shapes- - MaterialComponents/Typography- - MDFInternationalization- - MDFTextAccessibility- - MaterialComponents/Elevation (124.2.0):- - MaterialComponents/Availability- - MaterialComponents/private/Color- - MaterialComponents/private/Math- - MaterialComponents/Ink (124.2.0):- - MaterialComponents/Availability- - MaterialComponents/private/Color- - MaterialComponents/private/Math- - MaterialComponents/Palettes (124.2.0)- - MaterialComponents/private/Application (124.2.0)- - MaterialComponents/private/Color (124.2.0):- - MaterialComponents/Availability- - MaterialComponents/private/Math (124.2.0)- - MaterialComponents/Ripple (124.2.0):- - MaterialComponents/AnimationTiming- - MaterialComponents/Availability- - MaterialComponents/private/Color- - MaterialComponents/private/Math- - MaterialComponents/Shadow (124.2.0):- - MaterialComponents/Availability- - MaterialComponents/ShadowElevations (124.2.0)- - MaterialComponents/ShadowLayer (124.2.0):- - MaterialComponents/ShadowElevations- - MaterialComponents/ShapeLibrary (124.2.0):- - MaterialComponents/private/Math- - MaterialComponents/Shapes- - MaterialComponents/Shapes (124.2.0):- - MaterialComponents/private/Color- - MaterialComponents/private/Math- - MaterialComponents/ShadowLayer- - MaterialComponents/TextFields (124.2.0):- - MaterialComponents/AnimationTiming- - MaterialComponents/Buttons- - MaterialComponents/Elevation- - MaterialComponents/Palettes- - MaterialComponents/private/Math- - MaterialComponents/Typography- - MDFInternationalization- - MaterialComponents/Typography (124.2.0):- - MaterialComponents/private/Application- - MaterialComponents/private/Math- - MDFTextAccessibility- - MDFInternationalization (3.0.0)- - MDFTextAccessibility (2.0.1)- - nanopb (2.30908.0):- - nanopb/decode (= 2.30908.0)- - nanopb/encode (= 2.30908.0)- - nanopb/decode (2.30908.0)- - nanopb/encode (2.30908.0)- - PromisesObjC (2.0.0)--DEPENDENCIES:- - DropDown- - Firebase/Analytics- - Firebase/Crashlytics- - Firebase/Messaging- - IQKeyboardManagerSwift- - MaterialComponents/Buttons- - MaterialComponents/TextFields--SPEC REPOS:- trunk:- - DropDown- - Firebase- - FirebaseAnalytics- - FirebaseCore- - FirebaseCoreDiagnostics- - FirebaseCrashlytics- - FirebaseInstallations- - FirebaseMessaging- - GoogleAppMeasurement- - GoogleDataTransport- - GoogleUtilities- - IQKeyboardManagerSwift- - MaterialComponents- - MDFInternationalization- - MDFTextAccessibility- - nanopb- - PromisesObjC--SPEC CHECKSUMS:- DropDown: 8a2116376c1981888557f72ec2ffc9a5e0e456ec- Firebase: 44dd9724c84df18b486639e874f31436eaa9a20c- FirebaseAnalytics: 4e4b13031034e6561ed3bd1d47b6fdabbd6487c6- FirebaseCore: 2f4f85b453cc8fea4bb2b37e370007d2bcafe3f0- FirebaseCoreDiagnostics: 64d9709d804a6c25bd77841371c1fcfd909d5601- FirebaseCrashlytics: 62268addefae79601057818156e8bc69d71fee41- FirebaseInstallations: 044eede8a049bce71c4541ee68d6e4364fcbe774- FirebaseMessaging: 02e248e8997f71fa8cc9d78e9d49ec1a701ba14a- GoogleAppMeasurement: aa3cb422fab2b05d2efac543a5720d1a85b9dea5- GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940- GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1- IQKeyboardManagerSwift: 6e839c575c4aa1078d58a596e41244e77abe918f- MaterialComponents: 1a9b2d9d45b1601ae544de85089adc4c464306d4- MDFInternationalization: d697c55307816222a55685c4ccb1044ffb030c12- MDFTextAccessibility: f4bb4cc2194286651b59a215fdeaa0e05dc90ba5- nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96- PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58--PODFILE CHECKSUM: ce3e35c0d35c3cddf8cb7fbafdb7026472107994--COCOAPODS: 1.13.0diff --git a/console/iOS/GenericApp/README.md b/console/iOS/GenericApp/README.mddeleted file mode 100644index 7fed27d21..000000000--- a/console/iOS/GenericApp/README.md+++ /dev/null@@ -1,31 +0,0 @@-# <#Title#>--WizardDomainViewController--> user enters URL or domain- -> if only domain, URL is https://<domain>.openremote.app- -> GET <base URL>/api/master/apps/consoleConfig- -> see https://github.com/openremote/openremote/issues/642- -> if 404, use defaults- -> if 200, read info- showAppTextInput: Boolean -> default false- showRealmTextInput: Boolean -> default false- app: String? -> default nil- allowedApps: List<String>? -> default nil/empty- apps: Map<String, ORAppInfo>? -> default nil/empty-- -> if allowedApps empty -> GET <base URL>/api/master/apps- -> if 200, e.g. ["console_loader","manager"]- -> if non 200 -> ???---In the end, we want to have a config with all information:-- URL-- app-- realm-and maybe a name--We can pass this object around in the different wizard screens + information each screen need to render-We can store this object as the configuration---https://test1.openremote.app/<app>/info.jsondiff --git a/console/iOS/ORLib/Media.xcassets/Contents.json b/console/iOS/ORLib/Media.xcassets/Contents.jsondeleted file mode 100644index 73c00596a..000000000--- a/console/iOS/ORLib/Media.xcassets/Contents.json+++ /dev/null@@ -1,6 +0,0 @@-{- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/ORLib/Media.xcassets/ic_menu.imageset/Contents.json b/console/iOS/ORLib/Media.xcassets/ic_menu.imageset/Contents.jsondeleted file mode 100644index dd9acdc55..000000000--- a/console/iOS/ORLib/Media.xcassets/ic_menu.imageset/Contents.json+++ /dev/null@@ -1,24 +0,0 @@-{- "images" : [- {- "idiom" : "universal",- "scale" : "1x"- },- {- "idiom" : "universal",- "scale" : "2x"- },- {- "filename" : "menu.png",- "idiom" : "universal",- "scale" : "3x"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- },- "properties" : {- "template-rendering-intent" : "template"- }-}diff --git a/console/iOS/ORLib/Media.xcassets/ic_menu.imageset/menu.png b/console/iOS/ORLib/Media.xcassets/ic_menu.imageset/menu.pngdeleted file mode 100644index 401015ea7..000000000Binary files a/console/iOS/ORLib/Media.xcassets/ic_menu.imageset/menu.png and /dev/null differdiff --git a/console/iOS/ORLib/ORLib.xcodeproj/project.pbxproj b/console/iOS/ORLib/ORLib.xcodeproj/project.pbxprojdeleted file mode 100644index 24e9dc17d..000000000--- a/console/iOS/ORLib/ORLib.xcodeproj/project.pbxproj+++ /dev/null@@ -1,755 +0,0 @@-// !$*UTF8*$!-{- archiveVersion = 1;- classes = {- };- objectVersion = 50;- objects = {--/* Begin PBXBuildFile section */- 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 */; };- 4CDE11E02B286275005A4170 /* WKWebView+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CDE11DF2B286275005A4170 /* WKWebView+Utils.swift */; };- 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 */; };- 91932F9628C6715C00BABBA3 /* test2.json in Resources */ = {isa = PBXBuildFile; fileRef = 91932F9528C6715C00BABBA3 /* test2.json */; };- 91932F9828C6738A00BABBA3 /* test3.json in Resources */ = {isa = PBXBuildFile; fileRef = 91932F9728C6738A00BABBA3 /* test3.json */; };- 91932F9B28C673DC00BABBA3 /* test5.json in Resources */ = {isa = PBXBuildFile; fileRef = 91932F9928C673DC00BABBA3 /* test5.json */; };- 91932F9C28C673DC00BABBA3 /* test4.json in Resources */ = {isa = PBXBuildFile; fileRef = 91932F9A28C673DC00BABBA3 /* test4.json */; };- 91932F9E28C6752C00BABBA3 /* test6.json in Resources */ = {isa = PBXBuildFile; fileRef = 91932F9D28C6752C00BABBA3 /* test6.json */; };- 91A9A8F328BF6A3300DF8928 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A9A8F228BF6A3300DF8928 /* Tests.swift */; };- 91A9A8FB28BF6A4900DF8928 /* ConfigManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A9A8FA28BF6A4900DF8928 /* ConfigManagerTest.swift */; };- 91A9A90128BF6EA000DF8928 /* FileApiManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A9A90028BF6EA000DF8928 /* FileApiManager.swift */; };- 91AA79F328D628E9005B9913 /* Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AA79F228D628E9005B9913 /* Fixture.swift */; };- 91D2D11828E973BF0030E2FB /* test7.json in Resources */ = {isa = PBXBuildFile; fileRef = 91D2D11728E973BF0030E2FB /* test7.json */; };- 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 */; };- 91DF424E299FA79600DFF85E /* test13.json in Resources */ = {isa = PBXBuildFile; fileRef = 91DF424D299FA79600DFF85E /* test13.json */; };-/* End PBXBuildFile section */--/* Begin PBXFileReference section */- 4C0E4A0F274BDCE0008CB352 /* ScannerOverlayPreviewLayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScannerOverlayPreviewLayer.swift; sourceTree = "<group>"; };- 4C0E4A11274BE411008CB352 /* QrScannerProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrScannerProvider.swift; sourceTree = "<group>"; };- 4C2CE793274BB48500416B1A /* QrScannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrScannerViewController.swift; sourceTree = "<group>"; };- 4C537EDF299D3BA0006EFB94 /* ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };- 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>"; };- 4CDE11DF2B286275005A4170 /* WKWebView+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WKWebView+Utils.swift"; 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>"; };- 4CF5D05327143F1F00D705BE /* GeofenceProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeofenceProvider.swift; sourceTree = "<group>"; };- 4CF5D05427143F1F00D705BE /* PushNotificationProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PushNotificationProvider.swift; sourceTree = "<group>"; };- 4CF5D05727143F1F00D705BE /* ORTextInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORTextInput.swift; sourceTree = "<group>"; };- 4CF5D05827143F1F00D705BE /* ORViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORViewController.swift; sourceTree = "<group>"; };- 4CF5D05A27143F1F00D705BE /* ErrorManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorManager.swift; sourceTree = "<group>"; };- 4CF5D05C27143F1F00D705BE /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };- 4CF5D05D27143F1F00D705BE /* Window+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Window+Utils.swift"; sourceTree = "<group>"; };- 4CF5D05E27143F1F00D705BE /* UIColor+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Utils.swift"; sourceTree = "<group>"; };- 4CF5D05F27143F1F00D705BE /* Reachability.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Reachability.swift; sourceTree = "<group>"; };- 4CF5D06027143F1F00D705BE /* String+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Utils.swift"; sourceTree = "<group>"; };- 4CF5D06327143F1F00D705BE /* ORLinkConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORLinkConfig.swift; sourceTree = "<group>"; };- 4CF5D06427143F1F00D705BE /* ORPushNotificationButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORPushNotificationButton.swift; sourceTree = "<group>"; };- 4CF5D06527143F1F00D705BE /* ORPushNotificationAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORPushNotificationAction.swift; sourceTree = "<group>"; };- 4CF5D06727143F1F00D705BE /* ORNotificationResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ORNotificationResource.swift; sourceTree = "<group>"; };- 4CF5D06827143F1F00D705BE /* HttpApiManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpApiManager.swift; sourceTree = "<group>"; };- 6D810B7A4C47B5174F44A8CE /* Pods-ORLib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ORLib.debug.xcconfig"; path = "../../../../../console/iOS/K2/Pods/Target Support Files/Pods-ORLib/Pods-ORLib.debug.xcconfig"; sourceTree = "<group>"; };- 850D0E4EC689CD46245628A2 /* Pods_ORLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ORLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };- 914F7D4329215D3500655A22 /* test12.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test12.json; sourceTree = "<group>"; };- 9156512928FC6D6700062E16 /* test9.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test9.json; sourceTree = "<group>"; };- 91658F9028897E55000FF05C /* ORConsoleConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ORConsoleConfig.swift; sourceTree = "<group>"; };- 91658F9228897EDD000FF05C /* ORAppInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ORAppInfo.swift; sourceTree = "<group>"; };- 91932F9228C66A3C00BABBA3 /* test1.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test1.json; sourceTree = "<group>"; };- 91932F9428C670D800BABBA3 /* Tests.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Tests.md; sourceTree = "<group>"; };- 91932F9528C6715C00BABBA3 /* test2.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test2.json; sourceTree = "<group>"; };- 91932F9728C6738A00BABBA3 /* test3.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test3.json; sourceTree = "<group>"; };- 91932F9928C673DC00BABBA3 /* test5.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test5.json; sourceTree = "<group>"; };- 91932F9A28C673DC00BABBA3 /* test4.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test4.json; sourceTree = "<group>"; };- 91932F9D28C6752C00BABBA3 /* test6.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = test6.json; sourceTree = "<group>"; };- 91A9A8F028BF6A3300DF8928 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };- 91A9A8F228BF6A3300DF8928 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };- 91A9A8FA28BF6A4900DF8928 /* ConfigManagerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigManagerTest.swift; sourceTree = "<group>"; };- 91A9A8FC28BF6A9900DF8928 /* ConfigManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigManager.swift; sourceTree = "<group>"; };- 91A9A8FE28BF6C4C00DF8928 /* ApiManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiManager.swift; sourceTree = "<group>"; };- 91A9A90028BF6EA000DF8928 /* FileApiManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileApiManager.swift; sourceTree = "<group>"; };- 91AA79F028D4D525005B9913 /* ProjectConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProjectConfig.swift; sourceTree = "<group>"; };- 91AA79F228D628E9005B9913 /* Fixture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fixture.swift; sourceTree = "<group>"; };- 91D2D11728E973BF0030E2FB /* test7.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test7.json; sourceTree = "<group>"; };- 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 = "../../../../../console/iOS/K2/Pods/Target Support Files/Pods-ORLib/Pods-ORLib.release.xcconfig"; sourceTree = "<group>"; };-/* End PBXFileReference section */--/* Begin PBXFrameworksBuildPhase section */- 4CBDF2A72AE285E400C7D94C /* Frameworks */ = {- isa = PBXFrameworksBuildPhase;- buildActionMask = 2147483647;- files = (- 321D41E7A29ED29205BD441C /* Pods_ORLib.framework in Frameworks */,- );- runOnlyForDeploymentPostprocessing = 0;- };- 91A9A8ED28BF6A3300DF8928 /* Frameworks */ = {- isa = PBXFrameworksBuildPhase;- buildActionMask = 2147483647;- files = (- );- runOnlyForDeploymentPostprocessing = 0;- };-/* 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 */,- );- sourceTree = "<group>";- };- 4CF5D04827143EEC00D705BE /* Products */ = {- isa = PBXGroup;- children = (- 91A9A8F028BF6A3300DF8928 /* Tests.xctest */,- 4C537EDF299D3BA0006EFB94 /* ORLib.framework */,- 4CBDF2AA2AE285E400C7D94C /* ORLib.framework */,- );- name = Products;- sourceTree = "<group>";- };- 4CF5D04927143EEC00D705BE /* ORLib */ = {- isa = PBXGroup;- children = (- 4CF5D05127143F1F00D705BE /* ConsoleProviders */,- 4CF5D06127143F1F00D705BE /* Models */,- 4CF5D06627143F1F00D705BE /* Network */,- 4CF5D05527143F1F00D705BE /* UI */,- 4CF5D05B27143F1F00D705BE /* Utils */,- 4CF5D04A27143EEC00D705BE /* ORLib.swift */,- 4C537EE1299D3BA0006EFB94 /* ORLib.h */,- 91A9A8FC28BF6A9900DF8928 /* ConfigManager.swift */,- );- path = ORLib;- sourceTree = "<group>";- };- 4CF5D05127143F1F00D705BE /* ConsoleProviders */ = {- isa = PBXGroup;- children = (- 4CF5D05227143F1F00D705BE /* StorageProvider.swift */,- 4CF5D05327143F1F00D705BE /* GeofenceProvider.swift */,- 4CF5D05427143F1F00D705BE /* PushNotificationProvider.swift */,- 4C0E4A11274BE411008CB352 /* QrScannerProvider.swift */,- 4C649E6729C251A300FFBEA4 /* BleProvider.swift */,- );- path = ConsoleProviders;- sourceTree = "<group>";- };- 4CF5D05527143F1F00D705BE /* UI */ = {- isa = PBXGroup;- children = (- 4CF5D05727143F1F00D705BE /* ORTextInput.swift */,- 4CF5D05827143F1F00D705BE /* ORViewController.swift */,- 4CF5D05A27143F1F00D705BE /* ErrorManager.swift */,- 4C2CE793274BB48500416B1A /* QrScannerViewController.swift */,- 4C0E4A0F274BDCE0008CB352 /* ScannerOverlayPreviewLayer.swift */,- );- path = UI;- sourceTree = "<group>";- };- 4CF5D05B27143F1F00D705BE /* Utils */ = {- isa = PBXGroup;- children = (- 4CF5D05C27143F1F00D705BE /* Constants.swift */,- 4CF5D05D27143F1F00D705BE /* Window+Utils.swift */,- 4CF5D05E27143F1F00D705BE /* UIColor+Utils.swift */,- 4CF5D05F27143F1F00D705BE /* Reachability.swift */,- 4CF5D06027143F1F00D705BE /* String+Utils.swift */,- 4CDE11DF2B286275005A4170 /* WKWebView+Utils.swift */,- );- path = Utils;- sourceTree = "<group>";- };- 4CF5D06127143F1F00D705BE /* Models */ = {- isa = PBXGroup;- children = (- 4CF5D06327143F1F00D705BE /* ORLinkConfig.swift */,- 4CF5D06427143F1F00D705BE /* ORPushNotificationButton.swift */,- 4CF5D06527143F1F00D705BE /* ORPushNotificationAction.swift */,- 91658F9028897E55000FF05C /* ORConsoleConfig.swift */,- 91658F9228897EDD000FF05C /* ORAppInfo.swift */,- 91AA79F028D4D525005B9913 /* ProjectConfig.swift */,- );- path = Models;- sourceTree = "<group>";- };- 4CF5D06627143F1F00D705BE /* Network */ = {- isa = PBXGroup;- children = (- 4CF5D06727143F1F00D705BE /* ORNotificationResource.swift */,- 4CF5D06827143F1F00D705BE /* HttpApiManager.swift */,- 91A9A8FE28BF6C4C00DF8928 /* ApiManager.swift */,- );- path = Network;- sourceTree = "<group>";- };- 717C35290053DAF6024CFEA7 /* Frameworks */ = {- isa = PBXGroup;- children = (- 4C649E6929C2554F00FFBEA4 /* CoreBluetooth.framework */,- 850D0E4EC689CD46245628A2 /* Pods_ORLib.framework */,- );- name = Frameworks;- sourceTree = "<group>";- };- 91932F9128C66A0400BABBA3 /* Fixtures */ = {- isa = PBXGroup;- children = (- 91932F9428C670D800BABBA3 /* Tests.md */,- 91932F9228C66A3C00BABBA3 /* test1.json */,- 91932F9528C6715C00BABBA3 /* test2.json */,- 91932F9728C6738A00BABBA3 /* test3.json */,- 91932F9A28C673DC00BABBA3 /* test4.json */,- 91932F9928C673DC00BABBA3 /* test5.json */,- 91932F9D28C6752C00BABBA3 /* test6.json */,- 91D2D11728E973BF0030E2FB /* test7.json */,- 91D2D11928E988B10030E2FB /* test8.json */,- 9156512928FC6D6700062E16 /* test9.json */,- 91DD9FED2910280900912F79 /* test10.json */,- 91DD9FEF29102A8B00912F79 /* test11.json */,- 914F7D4329215D3500655A22 /* test12.json */,- 91DF424D299FA79600DFF85E /* test13.json */,- );- path = Fixtures;- sourceTree = "<group>";- };- 91A9A8F128BF6A3300DF8928 /* Tests */ = {- isa = PBXGroup;- children = (- 91932F9128C66A0400BABBA3 /* Fixtures */,- 91A9A8FA28BF6A4900DF8928 /* ConfigManagerTest.swift */,- 91A9A8F228BF6A3300DF8928 /* Tests.swift */,- 91A9A90028BF6EA000DF8928 /* FileApiManager.swift */,- 91AA79F228D628E9005B9913 /* Fixture.swift */,- );- path = Tests;- sourceTree = "<group>";- };- CE88590B0599667DB0A16FEE /* Pods */ = {- isa = PBXGroup;- children = (- 6D810B7A4C47B5174F44A8CE /* Pods-ORLib.debug.xcconfig */,- F756B4974BD868B38AAE7D31 /* Pods-ORLib.release.xcconfig */,- );- name = Pods;- path = ../GenericApp/Pods;- sourceTree = "<group>";- };-/* End PBXGroup section */--/* Begin PBXHeadersBuildPhase section */- 4CBDF2A52AE285E400C7D94C /* Headers */ = {- isa = PBXHeadersBuildPhase;- buildActionMask = 2147483647;- files = (- 4CBDF2AD2AE285E400C7D94C /* ORLib.h in Headers */,- );- runOnlyForDeploymentPostprocessing = 0;- };-/* End PBXHeadersBuildPhase section */--/* Begin PBXNativeTarget section */- 4CBDF2A92AE285E400C7D94C /* ORLib */ = {- isa = PBXNativeTarget;- buildConfigurationList = 4CBDF2B02AE285E400C7D94C /* Build configuration list for PBXNativeTarget "ORLib" */;- buildPhases = (- 822E907AABDEA9DF9A849F71 /* [CP] Check Pods Manifest.lock */,- 4CBDF2A52AE285E400C7D94C /* Headers */,- 4CBDF2A62AE285E400C7D94C /* Sources */,- 4CBDF2A72AE285E400C7D94C /* Frameworks */,- 4CBDF2A82AE285E400C7D94C /* Resources */,- );- buildRules = (- );- dependencies = (- );- name = ORLib;- productName = ORLib;- productReference = 4CBDF2AA2AE285E400C7D94C /* ORLib.framework */;- productType = "com.apple.product-type.framework";- };- 91A9A8EF28BF6A3300DF8928 /* Tests */ = {- isa = PBXNativeTarget;- buildConfigurationList = 91A9A8F728BF6A3300DF8928 /* Build configuration list for PBXNativeTarget "Tests" */;- buildPhases = (- 91A9A8EC28BF6A3300DF8928 /* Sources */,- 91A9A8ED28BF6A3300DF8928 /* Frameworks */,- 91A9A8EE28BF6A3300DF8928 /* Resources */,- );- buildRules = (- );- dependencies = (- );- name = Tests;- productName = Tests;- productReference = 91A9A8F028BF6A3300DF8928 /* Tests.xctest */;- productType = "com.apple.product-type.bundle.unit-test";- };-/* End PBXNativeTarget section */--/* Begin PBXProject section */- 4CF5D03F27143EEC00D705BE /* Project object */ = {- isa = PBXProject;- attributes = {- LastSwiftUpdateCheck = 1340;- LastUpgradeCheck = 1250;- TargetAttributes = {- 4CBDF2A92AE285E400C7D94C = {- CreatedOnToolsVersion = 15.0;- };- 91A9A8EF28BF6A3300DF8928 = {- CreatedOnToolsVersion = 13.4.1;- };- };- };- buildConfigurationList = 4CF5D04227143EEC00D705BE /* Build configuration list for PBXProject "ORLib" */;- compatibilityVersion = "Xcode 9.3";- developmentRegion = en;- hasScannedForEncodings = 0;- knownRegions = (- en,- Base,- );- mainGroup = 4CF5D03E27143EEB00D705BE;- productRefGroup = 4CF5D04827143EEC00D705BE /* Products */;- projectDirPath = "";- projectRoot = "";- targets = (- 91A9A8EF28BF6A3300DF8928 /* Tests */,- 4CBDF2A92AE285E400C7D94C /* ORLib */,- );- };-/* End PBXProject section */--/* Begin PBXResourcesBuildPhase section */- 4CBDF2A82AE285E400C7D94C /* Resources */ = {- isa = PBXResourcesBuildPhase;- buildActionMask = 2147483647;- files = (- );- runOnlyForDeploymentPostprocessing = 0;- };- 91A9A8EE28BF6A3300DF8928 /* Resources */ = {- isa = PBXResourcesBuildPhase;- buildActionMask = 2147483647;- files = (- 91DD9FF029102A8B00912F79 /* test11.json in Resources */,- 91932F9328C66A3C00BABBA3 /* test1.json in Resources */,- 9156512A28FC6D6700062E16 /* test9.json in Resources */,- 91D2D11828E973BF0030E2FB /* test7.json in Resources */,- 91D2D11A28E988B10030E2FB /* test8.json in Resources */,- 91DD9FEE29102A5800912F79 /* test10.json in Resources */,- 91932F9628C6715C00BABBA3 /* test2.json in Resources */,- 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 */,- );- runOnlyForDeploymentPostprocessing = 0;- };-/* End PBXResourcesBuildPhase section */--/* Begin PBXShellScriptBuildPhase section */- 822E907AABDEA9DF9A849F71 /* [CP] Check Pods Manifest.lock */ = {- isa = PBXShellScriptBuildPhase;- buildActionMask = 2147483647;- files = (- );- inputFileListPaths = (- );- inputPaths = (- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",- "${PODS_ROOT}/Manifest.lock",- );- name = "[CP] Check Pods Manifest.lock";- outputFileListPaths = (- );- 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;- };-/* End PBXShellScriptBuildPhase section */--/* Begin PBXSourcesBuildPhase section */- 4CBDF2A62AE285E400C7D94C /* Sources */ = {- isa = PBXSourcesBuildPhase;- buildActionMask = 2147483647;- files = (- 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 */,- 4CDE11E02B286275005A4170 /* WKWebView+Utils.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;- };- 91A9A8EC28BF6A3300DF8928 /* Sources */ = {- isa = PBXSourcesBuildPhase;- buildActionMask = 2147483647;- files = (- 91A9A90128BF6EA000DF8928 /* FileApiManager.swift in Sources */,- 91A9A8F328BF6A3300DF8928 /* Tests.swift in Sources */,- 91A9A8FB28BF6A4900DF8928 /* ConfigManagerTest.swift in Sources */,- 91AA79F328D628E9005B9913 /* Fixture.swift in Sources */,- );- runOnlyForDeploymentPostprocessing = 0;- };-/* End PBXSourcesBuildPhase section */--/* Begin XCBuildConfiguration section */- 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;- DEFINES_MODULE = YES;- DEVELOPMENT_TEAM = 4AC88KZHJZ;- 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";- IPHONEOS_DEPLOYMENT_TARGET = 14.0;- LD_RUNPATH_SEARCH_PATHS = (- "$(inherited)",- "@executable_path/Frameworks",- "@loader_path/Frameworks",- );- LOCALIZATION_PREFERS_STRING_CATALOGS = YES;- MARKETING_VERSION = 1.0;- 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";- VERSIONING_SYSTEM = "apple-generic";- VERSION_INFO_PREFIX = "";- };- name = Debug;- };- 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;- DEFINES_MODULE = YES;- DEVELOPMENT_TEAM = 4AC88KZHJZ;- 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";- IPHONEOS_DEPLOYMENT_TARGET = 14.0;- LD_RUNPATH_SEARCH_PATHS = (- "$(inherited)",- "@executable_path/Frameworks",- "@loader_path/Frameworks",- );- LOCALIZATION_PREFERS_STRING_CATALOGS = YES;- MARKETING_VERSION = 1.0;- 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;- SWIFT_VERSION = 5.0;- TARGETED_DEVICE_FAMILY = "1,2";- VERSIONING_SYSTEM = "apple-generic";- VERSION_INFO_PREFIX = "";- };- name = Release;- };- 4CF5D04C27143EEC00D705BE /* 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_ENABLE_OBJC_WEAK = YES;- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;- CLANG_WARN_BOOL_CONVERSION = YES;- CLANG_WARN_COMMA = YES;- CLANG_WARN_CONSTANT_CONVERSION = YES;- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES;- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;- 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;- COPY_PHASE_STRIP = NO;- 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 = 14.0;- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;- MTL_FAST_MATH = YES;- ONLY_ACTIVE_ARCH = YES;- OTHER_LDFLAGS = "$(inherited)";- SDKROOT = iphoneos;- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;- SWIFT_OPTIMIZATION_LEVEL = "-Onone";- };- name = Debug;- };- 4CF5D04D27143EEC00D705BE /* 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_ENABLE_OBJC_WEAK = YES;- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;- CLANG_WARN_BOOL_CONVERSION = YES;- CLANG_WARN_COMMA = YES;- CLANG_WARN_CONSTANT_CONVERSION = YES;- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES;- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;- 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;- COPY_PHASE_STRIP = NO;- 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 = 14.0;- MTL_ENABLE_DEBUG_INFO = NO;- MTL_FAST_MATH = YES;- OTHER_LDFLAGS = "$(inherited)";- SDKROOT = iphoneos;- SWIFT_COMPILATION_MODE = wholemodule;- SWIFT_OPTIMIZATION_LEVEL = "-O";- VALIDATE_PRODUCT = YES;- };- name = Release;- };- 91A9A8F828BF6A3300DF8928 /* Debug */ = {- isa = XCBuildConfiguration;- buildSettings = {- CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";- CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 1;- DEVELOPMENT_TEAM = 4AC88KZHJZ;- GENERATE_INFOPLIST_FILE = YES;- IPHONEOS_DEPLOYMENT_TARGET = 15.5;- MARKETING_VERSION = 1.0;- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.Tests;- PRODUCT_NAME = "$(TARGET_NAME)";- SWIFT_EMIT_LOC_STRINGS = NO;- SWIFT_VERSION = 5.0;- TARGETED_DEVICE_FAMILY = "1,2";- };- name = Debug;- };- 91A9A8F928BF6A3300DF8928 /* Release */ = {- isa = XCBuildConfiguration;- buildSettings = {- CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";- CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 1;- DEVELOPMENT_TEAM = 4AC88KZHJZ;- GENERATE_INFOPLIST_FILE = YES;- IPHONEOS_DEPLOYMENT_TARGET = 15.5;- MARKETING_VERSION = 1.0;- PRODUCT_BUNDLE_IDENTIFIER = io.openremote.Tests;- PRODUCT_NAME = "$(TARGET_NAME)";- SWIFT_EMIT_LOC_STRINGS = NO;- SWIFT_VERSION = 5.0;- TARGETED_DEVICE_FAMILY = "1,2";- };- name = Release;- };-/* End XCBuildConfiguration section */--/* Begin XCConfigurationList section */- 4CBDF2B02AE285E400C7D94C /* Build configuration list for PBXNativeTarget "ORLib" */ = {- isa = XCConfigurationList;- buildConfigurations = (- 4CBDF2AE2AE285E400C7D94C /* Debug */,- 4CBDF2AF2AE285E400C7D94C /* Release */,- );- defaultConfigurationIsVisible = 0;- defaultConfigurationName = Release;- };- 4CF5D04227143EEC00D705BE /* Build configuration list for PBXProject "ORLib" */ = {- isa = XCConfigurationList;- buildConfigurations = (- 4CF5D04C27143EEC00D705BE /* Debug */,- 4CF5D04D27143EEC00D705BE /* Release */,- );- defaultConfigurationIsVisible = 0;- defaultConfigurationName = Release;- };- 91A9A8F728BF6A3300DF8928 /* Build configuration list for PBXNativeTarget "Tests" */ = {- isa = XCConfigurationList;- buildConfigurations = (- 91A9A8F828BF6A3300DF8928 /* Debug */,- 91A9A8F928BF6A3300DF8928 /* Release */,- );- defaultConfigurationIsVisible = 0;- defaultConfigurationName = Release;- };-/* End XCConfigurationList section */- };- rootObject = 4CF5D03F27143EEC00D705BE /* Project object */;-}diff --git a/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/contents.xcworkspacedatadeleted file mode 100644index 919434a62..000000000--- a/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata+++ /dev/null@@ -1,7 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<Workspace- version = "1.0">- <FileRef- location = "self:">- </FileRef>-</Workspace>diff --git a/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistdeleted file mode 100644index 18d981003..000000000--- a/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist+++ /dev/null@@ -1,8 +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>IDEDidComputeMac32BitWarning</key>- <true/>-</dict>-</plist>diff --git a/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/xcuserdata/michael.xcuserdatad/UserInterfaceState.xcuserstate b/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/xcuserdata/michael.xcuserdatad/UserInterfaceState.xcuserstatedeleted file mode 100644index babac43c8..000000000Binary files a/console/iOS/ORLib/ORLib.xcodeproj/project.xcworkspace/xcuserdata/michael.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differdiff --git a/console/iOS/ORLib/ORLib/ConfigManager.swift b/console/iOS/ORLib/ORLib/ConfigManager.swiftdeleted file mode 100644index 4a7c8d5b8..000000000--- a/console/iOS/ORLib/ORLib/ConfigManager.swift+++ /dev/null@@ -1,192 +0,0 @@-//-// ConfigManager.swift-// ORLib-//-// Created by Eric Bariaux on 31/08/2022.-//--import Foundation--public enum ConfigManagerState: Equatable {- case selectDomain- case selectApp(String, [String]?) // baseURL, list of apps to choose from- case selectRealm(String, String, [String]?) // baseURL, app, list of realms to choose from- case complete(ProjectConfig)-}--public enum ConfigManagerError: Error {- case invalidState- case communicationError- case couldNotLoadAppConfig-}--public typealias ApiManagerFactory = (String) -> ApiManager---public class ConfigManager {-- private var apiManagerFactory: ((String) -> ApiManager)- private var apiManager: ApiManager?-- public private(set) var globalAppInfos : [String:ORAppInfo] = [:] // app infos from the top level consoleConfig information- public private(set) var appInfos : [String:ORAppInfo] = [:] // app infos from each specific app info.json-- public private(set) var state = ConfigManagerState.selectDomain-- public init(apiManagerFactory: @escaping ApiManagerFactory) {- self.apiManagerFactory = apiManagerFactory- }-- public func setDomain(domain: String) async throws -> ConfigManagerState {- switch state {- case .selectDomain:- let baseUrl = domain.isValidURL ? domain : "https://\(domain).openremote.app"- let url = baseUrl.appending("/api/master")-- apiManager = apiManagerFactory(url)-- guard let api = apiManager else {- throw ConfigManagerError.communicationError- }-- do {- let cc: ORConsoleConfig- do {- cc = try await api.getConsoleConfig() ?? ORConsoleConfig()- if let apps = cc.apps {- globalAppInfos = apps- }- } catch ApiManagerError.communicationError(let httpStatusCode) {- if httpStatusCode == 404 || httpStatusCode == 403 {- // 403 is for backwards compatibility of older manager- cc = ORConsoleConfig()- } else {- throw ApiManagerError.communicationError(httpStatusCode)- }- }-- if let selectedApp = cc.app {-- // TODO: we should potentially set the realms, either from console config or from specific app config--- state = .selectRealm(baseUrl, selectedApp, nil)- return state- }-- if cc.showAppTextInput {- state = .selectApp(baseUrl, nil)- return state- }-- // allowedApps == nil -> get list of apps- if cc.allowedApps == nil || cc.allowedApps!.isEmpty {- do {- let apps = try await api.getApps()- 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 {- state = .selectRealm(baseUrl, "manager", nil)- } else {- state = .complete(ProjectConfig(domain: baseUrl, app: "manager", realm: nil))- }- }- }- } else {- 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 {- print("SetDomain -> error: \(error)")- throw ConfigManagerError.couldNotLoadAppConfig- }- case .selectApp,- .selectRealm,- .complete:- throw ConfigManagerError.invalidState- }-- }-- private func filterPotentialApps(apiManager: ApiManager, potentialApps: [String]?) async -> [String]? {- var filteredApps : [String]?- if let appNames = potentialApps {- filteredApps = []- for appName in appNames {- if let appInfo = globalAppInfos[appName] {- if !appInfo.consoleAppIncompatible {- filteredApps!.append(appName)- }- } else {- do {- if let appInfo = try await apiManager.getAppInfo(appName: appName) {- if !appInfo.consoleAppIncompatible {- appInfos[appName] = appInfo- filteredApps!.append(appName)- }- } else {- filteredApps!.append(appName)- }- } catch {- // We couldn't fetch app info, just include app in list- filteredApps!.append(appName)- }- }- }- }- return filteredApps- }-- public func setApp(app: String) throws -> ConfigManagerState {- switch state {- case .selectDomain,- .selectRealm,- .complete:- throw ConfigManagerError.invalidState- case .selectApp(let baseURL, _):- if let appInfo = globalAppInfos[app] {- self.state = .selectRealm(baseURL, app, appInfo.realms)- } else if let appInfo = appInfos[app] {- self.state = .selectRealm(baseURL, app, appInfo.realms)- } else if let appInfo = globalAppInfos["default"] {- self.state = .selectRealm(baseURL, app, appInfo.realms)- } else {- self.state = .selectRealm(baseURL, app, nil)- }- return state- }- }-- public func setRealm(realm: String?) throws -> ConfigManagerState {- switch state {- case .selectDomain,- .selectApp:- throw ConfigManagerError.invalidState- case .complete(let project):-- // TODO: should set the providers on the project config-- self.state = .complete(ProjectConfig(domain: project.baseURL, app: project.app, realm: realm))- case .selectRealm(let baseURL, let app, _):-- // TODO: should set the providers on the project config--- self.state = .complete(ProjectConfig(domain: baseURL, app: app, realm: realm))- }- return state- }--}diff --git a/console/iOS/ORLib/ORLib/ConsoleProviders/BleProvider.swift b/console/iOS/ORLib/ORLib/ConsoleProviders/BleProvider.swiftdeleted file mode 100644index 2461ea36e..000000000--- a/console/iOS/ORLib/ORLib/ConsoleProviders/BleProvider.swift+++ /dev/null@@ -1,298 +0,0 @@-//-// BleProvider.swift-// ORLib-//-// Created by Michael Rademaker on 15/03/2023.-//--import UIKit-import CoreBluetooth--public class BleProvider: NSObject {- public static let bluetoothDisabledKey = "bluetoothDisabled"-- let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement)- let version = "ble"-- private var centralManager: CBCentralManager?- private var devices: Set<CBPeripheral> = []- private var scanDevicesCallback: (([String: Any]) -> (Void))?- private var connectToDeviceCallback: (([String: Any]) -> (Void))?- private var sendToDeviceCallback: (([String: Any]) -> (Void))?- private var scanTimer: Timer?- private var connectedDevice: CBPeripheral?- private var selectedCharacteristic: CBCharacteristic?- private var deviceServices: [CBService] = []- private var deviceCharacteristics: [CBCharacteristic] = []- private var dataToSend: Data?- private var sendDataIndex = 0- private var maxDataLength = 182 // according to documentation-- var alertBluetoothCallback : (() -> (Void))?-- public override init() {- super.init()- }-- public func initialize() -> [String: Any] {- return [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.ble,- DefaultsKey.versionKey: version,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.hasPermissionKey: CBCentralManager.authorization == .allowedAlways,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: userdefaults?.bool(forKey: BleProvider.bluetoothDisabledKey) ?? false- ]- }-- public func enable(callback:@escaping ([String: Any]) -> (Void)) {- userdefaults?.removeObject(forKey: BleProvider.bluetoothDisabledKey)- userdefaults?.synchronize()- callback([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.ble,- DefaultsKey.hasPermissionKey: CBCentralManager.authorization == .allowedAlways,- DefaultsKey.successKey: true- ])- }-- public func disable() -> [String: Any] {- if ((self.centralManager?.isScanning) != nil) {- self.centralManager?.stopScan()- }- scanTimer?.invalidate()- userdefaults?.set(true, forKey: BleProvider.bluetoothDisabledKey)- userdefaults?.synchronize()- return [- DefaultsKey.actionKey: Actions.providerDisable,- DefaultsKey.providerKey: Providers.ble- ]- }-- public func scanForDevices(callback:@escaping ([String: Any]) -> (Void)) {- if centralManager == nil {- centralManager = CBCentralManager()- centralManager!.delegate = self- }- self.devices.removeAll()- scanDevicesCallback = callback-- if self.centralManager?.state == .poweredOn {- self.startScan()- }- else if self.centralManager!.state == .poweredOff || self.centralManager!.state == .unauthorized {- alertBluetoothCallback?()- }- }-- public func connectoToDevice(deviceId: String, callback:@escaping ([String: Any]) -> (Void)) {- connectToDeviceCallback = callback- deviceServices.removeAll()- deviceCharacteristics.removeAll()- if let device = devices.first(where: {$0.identifier.uuidString == deviceId}) {- centralManager?.connect(device)- }- }-- public func sendToDevice(attributeId: String, value: Data, callback:@escaping ([String: Any]) -> (Void)) {- if let device = self.connectedDevice {- sendToDeviceCallback = callback- if let characteristic = deviceCharacteristics.first(where: {$0.uuid.uuidString == attributeId}) {- self.maxDataLength = self.connectedDevice!.maximumWriteValueLength(for: characteristic.properties.contains(.writeWithoutResponse) ? .withoutResponse : .withResponse)- selectedCharacteristic = characteristic- dataToSend = value- sendDataIndex = 0- sendData(characteristic: characteristic)- }- } else {- callback([DefaultsKey.actionKey: "SEND_TO_DEVICE", DefaultsKey.providerKey: "ble", DefaultsKey.successKey: false])- }- }-- private func startScan() {- self.centralManager!.scanForPeripherals(withServices: nil, options: [CBCentralManagerScanOptionAllowDuplicatesKey: true])- scanTimer = Timer.scheduledTimer(withTimeInterval: 3, repeats: false, block: { timer in- self.centralManager?.stopScan()- self.scanDevicesCallback?([- DefaultsKey.actionKey : Actions.scanBleDevices,- DefaultsKey.providerKey : Providers.ble,- DefaultsKey.dataKey : ["devices" : self.devices.map {- [- "name" : $0.name ?? "Unknown",- "address" : $0.identifier.uuidString- ]- }]- ])- })- }-}--extension BleProvider : CBCentralManagerDelegate {-- public func centralManagerDidUpdateState(_ central: CBCentralManager) {- switch central.state {- case .poweredOn:- self.startScan()- break- case .poweredOff:- if central.isScanning {- central.stopScan()- }- alertBluetoothCallback?()- break- // Alert user : turn on Bluetooth- case .resetting:- break- // Wait for next state update and consider logging interruption of Bluetooth service- case .unauthorized:- alertBluetoothCallback?()- break- // Alert user : enable Bluetooth permission in app Settings- case .unsupported:- break- // Alert user their device does not support Bluetooth and app will not work as expected- case .unknown:- break- // Wait for next state update- @unknown default:- break- }- }-- public func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {- devices.insert(peripheral)- }-- public func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {- self.connectedDevice = peripheral- peripheral.delegate = self- peripheral.discoverServices(nil)- }-- public func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {- connectToDeviceCallback?([- DefaultsKey.actionKey : Actions.connectToBleDevice,- DefaultsKey.providerKey : Providers.ble,- DefaultsKey.successKey : false- ])- }-- public func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) {- self.connectedDevice = nil- }-}--extension BleProvider: CBPeripheralDelegate {-- public func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) {- guard let services = peripheral.services else {- return- }- deviceServices.append(contentsOf: services)- for service in services {- peripheral.discoverCharacteristics(nil, for: service)- }- }-- public func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {- guard let characteristics = service.characteristics else {- return- }- if let index = deviceServices.firstIndex(of: service) {- deviceServices.remove(at: index)- }- deviceCharacteristics.append(contentsOf: characteristics)-- for characteristic in characteristics.filter({ $0.properties.contains(.read)}) {- self.connectedDevice?.readValue(for: characteristic)- }- }-- public func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) {- if deviceServices.isEmpty {- connectToDeviceCallback?([- DefaultsKey.actionKey : Actions.connectToBleDevice,- DefaultsKey.providerKey : Providers.ble,- DefaultsKey.successKey : true,- DefaultsKey.dataKey: [- "attributes" : deviceCharacteristics.map { characteristic in- [- "attributeId": characteristic.uuid.uuidString,- "isReadable": characteristic.properties.contains(.read),- "isWritable": characteristic.properties.contains(.write) || characteristic.properties.contains(.writeWithoutResponse),- "value": characteristic.value != nil ? decodeValue(from: characteristic.value!) : nil- ] as [String : Any?]- }- ]- ])- }- }-- public func peripheralIsReady(toSendWriteWithoutResponse peripheral: CBPeripheral) {- if let characteristic = selectedCharacteristic {- if let data = dataToSend {- if sendDataIndex < data.count {- sendData(characteristic: characteristic)- }- }- }- }-- public func peripheral(_ peripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) {- if let err = error {- sendToDeviceCallback?([DefaultsKey.actionKey: "SEND_TO_DEVICE", DefaultsKey.providerKey: "ble", DefaultsKey.successKey: false])- } else {- if let data = dataToSend {- if sendDataIndex >= data.count {- sendToDeviceCallback?([DefaultsKey.actionKey: "SEND_TO_DEVICE", DefaultsKey.providerKey: "ble", DefaultsKey.successKey: true])- } else {- sendData(characteristic: characteristic)- }- }- }- }-- func sendData(characteristic: CBCharacteristic) {- if let data = dataToSend {- if sendDataIndex >= data.count {- // All data has been sent- return- }-- var sending = true-- while sending {- var amountToSend = data.count - sendDataIndex-- if amountToSend > maxDataLength {- amountToSend = maxDataLength- }-- let chunk = data.subdata(in: sendDataIndex..<sendDataIndex+amountToSend)- self.connectedDevice?.writeValue(chunk, for: characteristic, type: characteristic.properties.contains(.writeWithoutResponse) ? .withoutResponse : .withResponse)-- sendDataIndex += amountToSend-- if sendDataIndex >= data.count {- // All data has been sent- sending = false- }- }- }- }-- func decodeValue(from data: Data) -> Any {-- if let string = String(data: data, encoding: .utf8) {- let escapedJsonString = string.replacingOccurrences(of: "\\", with: "\\\\")- .replacingOccurrences(of: "\"", with: "\\\"")-- return escapedJsonString- } else {- return data- }-- }-}diff --git a/console/iOS/ORLib/ORLib/ConsoleProviders/GeofenceProvider.swift b/console/iOS/ORLib/ORLib/ConsoleProviders/GeofenceProvider.swiftdeleted file mode 100644index 1a72794cd..000000000--- a/console/iOS/ORLib/ORLib/ConsoleProviders/GeofenceProvider.swift+++ /dev/null@@ -1,318 +0,0 @@-import UIKit-import CoreLocation--public class GeofenceProvider: NSObject, URLSessionDelegate {-- public static let baseUrlKey = "baseUrl"- public static let consoleIdKey = "consoleId"- public static let geoPostUrlsKey = "geoPostUrls"- public static let geoDisabledKey = "geoDisabled"-- let version = "ORConsole"- let geofenceFetchEndpoint = "rules/geofences/"- let locationManager = CLLocationManager()- let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement)- var geoPostUrls = [String:[String]]()- var enableCallback : (([String: Any]) -> (Void))?-- public var baseURL: String = ""- public var consoleId: String? = nil-- private var enteredLocation: (String, [String : Any]?)? = nil- private var exitedLocation: (String, [String : Any]?)? = nil- private var sendQueued = false-- public override init() {- super.init()- locationManager.delegate = self- locationManager.allowsBackgroundLocationUpdates = true- locationManager.pausesLocationUpdatesAutomatically = false- locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters- self.baseURL = userdefaults?.string(forKey: GeofenceProvider.baseUrlKey) ?? ""- self.consoleId = userdefaults?.string(forKey: GeofenceProvider.consoleIdKey) ?? ""- self.geoPostUrls = userdefaults?.value(forKey: GeofenceProvider.geoPostUrlsKey) as? [String:[String]] ?? [String:[String]]()- }-- public func initialize() -> [String: Any] {- return [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.geofence,- DefaultsKey.versionKey: version,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.hasPermissionKey: checkPermission(),- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: userdefaults?.bool(forKey: GeofenceProvider.geoDisabledKey) ?? false- ]- }-- private func checkPermission() -> Bool {- if CLLocationManager.locationServicesEnabled() {- if locationManager.authorizationStatus == .authorizedAlways {- return true- }- }- return false- }-- private func registerPermissions() {- locationManager.requestAlwaysAuthorization()- }-- public func addGeofence(geofence: GeofenceDefinition) {- let region = CLCircularRegion(center: CLLocationCoordinate2DMake(geofence.lat, geofence.lng), radius: geofence.radius, identifier:geofence.id)- locationManager.startMonitoring(for: region)- geoPostUrls[geofence.id] = [geofence.httpMethod, geofence.url]- userdefaults?.set(geoPostUrls, forKey: GeofenceProvider.geoPostUrlsKey)- userdefaults?.synchronize()- }-- public func removeGeofence(id: String) {- for region in locationManager.monitoredRegions {- guard let circularRegion = region as? CLCircularRegion, circularRegion.identifier == id else {continue}- locationManager.stopMonitoring(for: circularRegion)- geoPostUrls.removeValue(forKey: circularRegion.identifier)- userdefaults?.set(geoPostUrls, forKey: GeofenceProvider.geoPostUrlsKey)- userdefaults?.synchronize()- break- }- }-- public func clearAllRegions() {- for region in locationManager.monitoredRegions {- locationManager.stopMonitoring(for: region)- }- geoPostUrls = [String:[String]]()- userdefaults?.set(geoPostUrls, forKey: GeofenceProvider.geoPostUrlsKey)- userdefaults?.synchronize()- }-- public func enable(baseUrl: String, consoleId: String?, callback:@escaping ([String: Any]) ->(Void)) {- self.baseURL = baseUrl- self.consoleId = consoleId- userdefaults?.set(self.baseURL, forKey: GeofenceProvider.baseUrlKey)- userdefaults?.set(self.consoleId, forKey: GeofenceProvider.consoleIdKey)- userdefaults?.removeObject(forKey: GeofenceProvider.geoDisabledKey)- userdefaults?.synchronize()- enableCallback = callback- if checkPermission() {- self.locationManager.startMonitoringSignificantLocationChanges()- enableCallback?([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.geofence,- DefaultsKey.hasPermissionKey: checkPermission(),- DefaultsKey.successKey: true- ])- } else {- if locationManager.authorizationStatus == .notDetermined {- registerPermissions()- } else {- enableCallback?([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.geofence,- DefaultsKey.hasPermissionKey: false,- DefaultsKey.successKey: true- ])- }- }- }-- public func disable()-> [String: Any] {- locationManager.stopMonitoringSignificantLocationChanges()- userdefaults?.set(true, forKey: GeofenceProvider.geoDisabledKey)- userdefaults?.removeObject(forKey: GeofenceProvider.baseUrlKey)- userdefaults?.removeObject(forKey: GeofenceProvider.consoleIdKey)- userdefaults?.synchronize()- return [- DefaultsKey.actionKey: Actions.providerDisable,- DefaultsKey.providerKey: Providers.geofence- ]- }-- public func refreshGeofences() {- fetchGeofences()- }-- func fetchGeofences(callback: (([GeofenceDefinition]) -> ())? = nil) {- if let tkurlRequest = URL(string: "\(baseURL)/\(geofenceFetchEndpoint)\(consoleId ?? "")") {- let tkRequest = NSMutableURLRequest(url: tkurlRequest)- tkRequest.httpMethod = "GET"- let sessionConfiguration = URLSessionConfiguration.default- let session = URLSession(configuration: sessionConfiguration, delegate: self, delegateQueue: nil)- let req = session.dataTask(with: tkRequest as URLRequest, completionHandler: { (data, response, error) in- if (data != nil){- guard let geofences = try? JSONDecoder().decode([GeofenceDefinition].self, from: data!) else {- callback?([])- return- }- self.clearAllRegions()- NSLog("%@", "Geofences count: \(geofences.count)")- print("Geofences count: \(geofences.count)")- for geofence in geofences {- self.addGeofence(geofence: geofence)- }- callback?(geofences)- } else {- NSLog("error %@", (error! as NSError).localizedDescription)- let error = NSError(domain: "", code: 0, userInfo: [- NSLocalizedDescriptionKey : NSLocalizedString("NoDataReceived", value: "Did not receive any data", comment: "")- ])- NSLog("%@", error)- callback?([])- }- })- req.resume()- } else {- callback?([])- }- }-- private func queueSendLocation(geofenceId: String, data:[String: Any]?) {- synced(lock: self) {- if let locationData = data {- enteredLocation = (geofenceId, locationData)- } else {- exitedLocation = (geofenceId, nil)-- if enteredLocation?.0 == geofenceId {- enteredLocation = nil- }- }-- if !sendQueued {- sendQueued = true- DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(2)) {- self.doSendLocation()- }- }- }- }-- private func doSendLocation() {- synced(lock: self) {- var success = false-- if exitedLocation != nil {- if sendLocation(geofenceId: exitedLocation!.0, data: exitedLocation!.1) {- exitedLocation = nil- success = true- }- } else if enteredLocation != nil {- if sendLocation(geofenceId: enteredLocation!.0, data: enteredLocation!.1) {- enteredLocation = nil- success = true- }- }-- if exitedLocation != nil || enteredLocation != nil {- // Schedule another send- let delay = success ? 5 : 10- DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(delay)) {- self.doSendLocation()- }- } else {- sendQueued = false- }- }- }-- private func sendLocation(geofenceId: String, data: [String : Any]?)-> Bool {- return synced(lock: self) {- var succes = false-- guard let urlData = geoPostUrls[geofenceId] else {- return succes- }- guard let url = URL(string: "\(baseURL)\(urlData[1])") else { return succes}-- let request = NSMutableURLRequest(url: url)- request.addValue("application/json", forHTTPHeaderField:"Content-Type");- request.httpMethod = urlData[0]-- if (data != nil) {- if let postBody = try? JSONSerialization.data(withJSONObject: data!, options: []) {- request.httpBody = postBody- }- } else {- request.httpBody = "null".data(using: .utf8)- }-- let semaphore = DispatchSemaphore(value: 0)- let sessionConfiguration = URLSessionConfiguration.default- let session = URLSession(configuration: sessionConfiguration, delegate: self, delegateQueue: nil)- let req = session.dataTask(with: request as URLRequest, completionHandler: { (responseData, response, error) in- if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 204 {- NSLog("%@", "sendLocation succeded with data: \(String(describing: data))")- succes = true- } else {- NSLog("%@", "sendLocation failed")- if let err = error as NSError? {- NSLog("%@", err)- }- }- semaphore.signal()- })- req.resume()- semaphore.wait()- return succes- }- }-- private func synced<T>(lock: Any, closure: () throws -> T) rethrows -> T {- objc_sync_enter(lock)- defer {- objc_sync_exit(lock)- }-- return try closure()- }-- public class GeofenceDefinition: NSObject, Decodable {- public var id: String = ""- public var lat: Double = 0.0- public var lng: Double = 0.0- public var radius: Double = 0.0- public var httpMethod: String = ""- public var url: String = ""- }-}--extension GeofenceProvider: CLLocationManagerDelegate {- public func locationManager(_ manager: CLLocationManager, didEnterRegion region: CLRegion) {- NSLog("%@", "Entered geofence with id: \(region.identifier)")-- guard let circularRegion = region as? CLCircularRegion else {return}-- let postData = [- "type": "Point",- "coordinates": [circularRegion.center.longitude, circularRegion.center.latitude]- ] as [String : Any]-- queueSendLocation(geofenceId: circularRegion.identifier, data: postData)- }-- public func locationManager(_ manager: CLLocationManager, didExitRegion region: CLRegion) {- NSLog("%@", "Exited geofence with id: \(region.identifier)")-- guard let circularRegion = region as? CLCircularRegion else {return}-- queueSendLocation(geofenceId: circularRegion.identifier, data: nil)- }-- public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {- if status != .notDetermined {- enableCallback?([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.geofence,- DefaultsKey.hasPermissionKey: checkPermission(),- DefaultsKey.successKey: true- ])- } else if status == .authorizedAlways {- self.locationManager.startMonitoringSignificantLocationChanges()- }- }-- public func startMonitoringSignificantLocationChanges() {- locationManager.startMonitoringSignificantLocationChanges()- }-}diff --git a/console/iOS/ORLib/ORLib/ConsoleProviders/PushNotificationProvider.swift b/console/iOS/ORLib/ORLib/ConsoleProviders/PushNotificationProvider.swiftdeleted file mode 100644index 866683ddd..000000000--- a/console/iOS/ORLib/ORLib/ConsoleProviders/PushNotificationProvider.swift+++ /dev/null@@ -1,128 +0,0 @@-//-// PushNotificationProvider.swift-// Eindhoven-//-// Created by Michael Rademaker on 25/05/2018.-// Copyright © 2018 OpenRemote Inc. All rights reserved.-//--import UIKit-import UserNotifications--public class PushNotificationProvider: NSObject {-- let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement)- let version = "fcm"- public var consoleId: String? = nil- public static let pushDisabledKey = "pushDisabled"-- public override init() {- super.init()- }-- public func initialize(callback:@escaping ([String: Any?]) ->(Void)) {- UNUserNotificationCenter.current().getNotificationSettings { (settings) in- switch settings.authorizationStatus {-- case .authorized, .provisional:- callback( [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.push,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: true,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: PushNotificationProvider.pushDisabledKey) ?? false- ])-- case .denied:- callback( [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.push,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: false,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: PushNotificationProvider.pushDisabledKey) ?? false- ])-- default:- callback( [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.push,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: nil,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: PushNotificationProvider.pushDisabledKey) ?? false- ])- }- }- }-- public func enable(consoleId: String?, callback:@escaping ([String: Any]) ->(Void)) {- self.consoleId = consoleId- if (self.consoleId != nil) {- userdefaults?.set(self.consoleId!, forKey: GeofenceProvider.consoleIdKey)- userdefaults?.removeObject(forKey: PushNotificationProvider.pushDisabledKey)- userdefaults?.synchronize()- }- UNUserNotificationCenter.current().getNotificationSettings { (settings) in-- switch settings.authorizationStatus {- case .authorized, .provisional:- DispatchQueue.main.async {- UIApplication.shared.registerForRemoteNotifications()- }- callback([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.push,- DefaultsKey.hasPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.dataKey: ["token": self.userdefaults?.string(forKey: DefaultsKey.fcmTokenKey)]- ])-- case .denied:- callback([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.push,- DefaultsKey.hasPermissionKey: false,- DefaultsKey.successKey: true,- DefaultsKey.dataKey: ["token": self.userdefaults?.string(forKey: DefaultsKey.fcmTokenKey)]- ])-- default:- UNUserNotificationCenter.current().requestAuthorization(- options: [.alert, .badge, .sound],- completionHandler: {granted, _ in- if granted {- DispatchQueue.main.async {- UIApplication.shared.registerForRemoteNotifications()- }- }-- callback([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.push,- DefaultsKey.hasPermissionKey: granted,- DefaultsKey.successKey: true,- DefaultsKey.dataKey: ["token": self.userdefaults?.string(forKey: DefaultsKey.fcmTokenKey)]- ])- })-- }- }- }-- public func disable()-> [String: Any] {- userdefaults?.set(true, forKey: PushNotificationProvider.pushDisabledKey)- userdefaults?.synchronize()- return [- DefaultsKey.actionKey: Actions.providerDisable,- DefaultsKey.providerKey: Providers.push- ]- }-}diff --git a/console/iOS/ORLib/ORLib/ConsoleProviders/QrScannerProvider.swift b/console/iOS/ORLib/ORLib/ConsoleProviders/QrScannerProvider.swiftdeleted file mode 100644index ec306b6c3..000000000--- a/console/iOS/ORLib/ORLib/ConsoleProviders/QrScannerProvider.swift+++ /dev/null@@ -1,193 +0,0 @@-//-// QrScannerProver.swift-// ORLib-//-// Created by Michael Rademaker on 22/11/2021.-//--import UIKit-import AVFoundation--public class QrScannerProvider: NSObject {-- public static let cameraDisabledKey = "cameraDisabled"-- let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement)- let version = "qr"-- var scannedCallback : (([String: Any]) -> (Void))?- var scanner: QrScannerViewController?-- public func initialize(callback:@escaping ([String: Any?]) ->(Void)) {- let cameraAuthorizationStatus = AVCaptureDevice.authorizationStatus(for: .video)-- switch cameraAuthorizationStatus {- case .authorized:- callback( [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: true,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: QrScannerProvider.cameraDisabledKey) ?? false- ])-- case .denied:- callback( [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: false,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: QrScannerProvider.cameraDisabledKey) ?? false- ])-- default:- callback( [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: nil,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: false,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: QrScannerProvider.cameraDisabledKey) ?? false- ])- }- }-- public func enable(callback:@escaping ([String: Any]) ->(Void)) {- userdefaults?.removeObject(forKey: QrScannerProvider.cameraDisabledKey)- userdefaults?.synchronize()- let cameraAuthorizationStatus = AVCaptureDevice.authorizationStatus(for: .video)-- switch cameraAuthorizationStatus {- case .authorized:- callback([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: true,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: true,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: QrScannerProvider.cameraDisabledKey) ?? false- ])-- case .denied:- callback([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: false,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: true,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: QrScannerProvider.cameraDisabledKey) ?? false- ])-- default:- callback([- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.versionKey: self.version,- DefaultsKey.hasPermissionKey: nil,- DefaultsKey.requiresPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: true,- DefaultsKey.disabledKey: self.userdefaults?.bool(forKey: QrScannerProvider.cameraDisabledKey) ?? true- ])- }- }-- public func disable() -> [String: Any] {- userdefaults?.set(true, forKey: QrScannerProvider.cameraDisabledKey)- userdefaults?.synchronize()- return [- DefaultsKey.actionKey: Actions.providerDisable,- DefaultsKey.providerKey: Providers.qr- ]- }-- public func startScanner(currentViewController: UIViewController, startScanCallback:@escaping ([String: Any]) -> Void, scannedCallback:@escaping ([String: Any]) -> Void) {- let cameraAuthorizationStatus = AVCaptureDevice.authorizationStatus(for: .video)-- switch cameraAuthorizationStatus {- case .authorized:- scanner = QrScannerViewController()- scanner!.delegate = self- self.scanner?.modalPresentationStyle = .fullScreen- currentViewController.present(scanner!, animated: true, completion: nil)- self.scannedCallback = scannedCallback- startScanCallback(- [- DefaultsKey.actionKey: Actions.scanQr,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.successKey: true,- ]- )- default:- AVCaptureDevice.requestAccess(for: .video, completionHandler: { granted in- if granted {- DispatchQueue.main.async {- self.scanner = QrScannerViewController()- self.scanner!.delegate = self- self.scanner?.modalPresentationStyle = .fullScreen- currentViewController.present(self.scanner!, animated: true, completion: nil)- self.scannedCallback = scannedCallback- startScanCallback(- [- DefaultsKey.actionKey: Actions.scanQr,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.successKey: true,- ]- )- }- } else {- startScanCallback(- [- DefaultsKey.actionKey: Actions.scanQr,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.successKey: false,- ]- )- let alertController = UIAlertController(title: "Camera permission needed", message: "In order to scan QR codes, access to the camera is needed. Would you like to enable it now?", preferredStyle: .alert)- alertController.addAction(UIAlertAction(title: "Yes", style: .default, handler: {alertAction in- guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {- return- }-- if UIApplication.shared.canOpenURL(settingsUrl) {- UIApplication.shared.open(settingsUrl, completionHandler: nil)- }- }))- alertController.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil))- DispatchQueue.main.async {- currentViewController.present(alertController, animated: true, completion: nil)- }- }- })- }- }-}--extension QrScannerProvider: QrScannerDelegate {-- public func codeScanned(_ codeContents: String?) {- scanner?.dismiss(animated: true) {- self.scannedCallback?(- [- DefaultsKey.actionKey: Actions.scanResult,- DefaultsKey.providerKey: Providers.qr,- DefaultsKey.dataKey: ["result": codeContents ?? "CANCELED"]- ]- )- self.scannedCallback = nil- }- scanner = nil- }-}diff --git a/console/iOS/ORLib/ORLib/ConsoleProviders/StorageProvider.swift b/console/iOS/ORLib/ORLib/ConsoleProviders/StorageProvider.swiftdeleted file mode 100644index 2ccc41546..000000000--- a/console/iOS/ORLib/ORLib/ConsoleProviders/StorageProvider.swift+++ /dev/null@@ -1,59 +0,0 @@-//-// StorageProvider.swift-// GoogleToolboxForMac-//-// Created by Michael Rademaker on 05/02/2019.-//--import UIKit--public class StorageProvider: NSObject {-- let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement)-- public func initialize() -> [String: Any] {- return [- DefaultsKey.actionKey: Actions.providerInit,- DefaultsKey.providerKey: Providers.storage,- DefaultsKey.versionKey: "1.0.0",- DefaultsKey.requiresPermissionKey: false,- DefaultsKey.hasPermissionKey: true,- DefaultsKey.successKey: true,- DefaultsKey.enabledKey: true- ]- }-- public func enable() -> [String: Any] {- return [- DefaultsKey.actionKey: Actions.providerEnable,- DefaultsKey.providerKey: Providers.storage,- DefaultsKey.hasPermissionKey: true,- DefaultsKey.successKey: true,- ]- }-- public func store(key: String, data: String?) {- if let dataToStore = data {- userdefaults?.set(dataToStore, forKey: key)- } else {- userdefaults?.removeObject(forKey: key)- }- userdefaults?.synchronize()- }-- public func retrieve(key: String) -> [String: Any] {- return [- DefaultsKey.actionKey: Actions.retrieve,- DefaultsKey.providerKey: Providers.storage,- "key": key,- "value": userdefaults?.string(forKey:key) ?? "null"- ]- }-- public func disable()-> [String: Any] {- return [- DefaultsKey.actionKey: Actions.providerDisable,- DefaultsKey.providerKey: Providers.storage- ]- }-}diff --git a/console/iOS/ORLib/ORLib/Media.xcassets/Contents.json b/console/iOS/ORLib/ORLib/Media.xcassets/Contents.jsondeleted file mode 100644index 73c00596a..000000000--- a/console/iOS/ORLib/ORLib/Media.xcassets/Contents.json+++ /dev/null@@ -1,6 +0,0 @@-{- "info" : {- "author" : "xcode",- "version" : 1- }-}diff --git a/console/iOS/ORLib/ORLib/Media.xcassets/ic_menu.imageset/Contents.json b/console/iOS/ORLib/ORLib/Media.xcassets/ic_menu.imageset/Contents.jsondeleted file mode 100644index dd9acdc55..000000000--- a/console/iOS/ORLib/ORLib/Media.xcassets/ic_menu.imageset/Contents.json+++ /dev/null@@ -1,24 +0,0 @@-{- "images" : [- {- "idiom" : "universal",- "scale" : "1x"- },- {- "idiom" : "universal",- "scale" : "2x"- },- {- "filename" : "menu.png",- "idiom" : "universal",- "scale" : "3x"- }- ],- "info" : {- "author" : "xcode",- "version" : 1- },- "properties" : {- "template-rendering-intent" : "template"- }-}diff --git a/console/iOS/ORLib/ORLib/Media.xcassets/ic_menu.imageset/menu.png b/console/iOS/ORLib/ORLib/Media.xcassets/ic_menu.imageset/menu.pngdeleted file mode 100644index 401015ea7..000000000Binary files a/console/iOS/ORLib/ORLib/Media.xcassets/ic_menu.imageset/menu.png and /dev/null differdiff --git a/console/iOS/ORLib/ORLib/Models/ORAppInfo.swift b/console/iOS/ORLib/ORLib/Models/ORAppInfo.swiftdeleted file mode 100644index 682b9cf26..000000000--- a/console/iOS/ORLib/ORLib/Models/ORAppInfo.swift+++ /dev/null@@ -1,15 +0,0 @@-//-// ORAppInfo.swift-// ORLib-//-// Created by Eric Bariaux on 21/07/2022.-//--import Foundation--public struct ORAppInfo: Codable {- public var consoleAppIncompatible: Bool- public var realms: [String]?- public var providers: [String]?- public var description: String?-}diff --git a/console/iOS/ORLib/ORLib/Models/ORConsoleConfig.swift b/console/iOS/ORLib/ORLib/Models/ORConsoleConfig.swiftdeleted file mode 100644index 0f1739ade..000000000--- a/console/iOS/ORLib/ORLib/Models/ORConsoleConfig.swift+++ /dev/null@@ -1,20 +0,0 @@-//-// ORConsoleConfig.swift-// ORLib-//-// Created by Eric Bariaux on 21/07/2022.-//--import Foundation--public struct ORConsoleConfig: Codable {-- public init() {- }-- public var showAppTextInput = false- public var showRealmTextInput = true- public var app: String?- public var allowedApps: [String]?- public var apps: [String:ORAppInfo]?-}diff --git a/console/iOS/ORLib/ORLib/Models/ORLinkConfig.swift b/console/iOS/ORLib/ORLib/Models/ORLinkConfig.swiftdeleted file mode 100644index 7d9141a7b..000000000--- a/console/iOS/ORLib/ORLib/Models/ORLinkConfig.swift+++ /dev/null@@ -1,14 +0,0 @@-//-// ORLinkConfig.swift-// GenericApp-//-// Created by Michael Rademaker on 21/10/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import UIKit--public struct ORLinkConfig: Codable {- let displayText: String- let pageLink: String-}diff --git a/console/iOS/ORLib/ORLib/Models/ORPushNotificationAction.swift b/console/iOS/ORLib/ORLib/Models/ORPushNotificationAction.swiftdeleted file mode 100644index 9b727f230..000000000--- a/console/iOS/ORLib/ORLib/Models/ORPushNotificationAction.swift+++ /dev/null@@ -1,16 +0,0 @@-//-// ORPushNotificationAction.swift-// ORLib-//-// Created by Michael Rademaker on 01/08/2018.-//--import UIKit--public struct ORPushNotificationAction: Codable {- public let url: String- public let httpMethod: String?- public let data: String?- public let silent: Bool- public let openInBrowser: Bool-}diff --git a/console/iOS/ORLib/ORLib/Models/ORPushNotificationButton.swift b/console/iOS/ORLib/ORLib/Models/ORPushNotificationButton.swiftdeleted file mode 100644index 30d50f8a6..000000000--- a/console/iOS/ORLib/ORLib/Models/ORPushNotificationButton.swift+++ /dev/null@@ -1,13 +0,0 @@-//-// ORPushNotificationButton.swift-// ORLib-//-// Created by Michael Rademaker on 07/08/2018.-//--import UIKit--public struct ORPushNotificationButton: Codable {- public let title: String- public let action: ORPushNotificationAction?-}diff --git a/console/iOS/ORLib/ORLib/Models/ProjectConfig.swift b/console/iOS/ORLib/ORLib/Models/ProjectConfig.swiftdeleted file mode 100644index 5895a8553..000000000--- a/console/iOS/ORLib/ORLib/Models/ProjectConfig.swift+++ /dev/null@@ -1,53 +0,0 @@-//-// ProjectConfig.swift-// ORLib-//-// Created by Eric Bariaux on 16/09/2022.-//--import Foundation--public struct ProjectConfig: Codable, Equatable {- public var id: String- var projectName = "TODO"-- public var domain: String- public var app: String- public var realm: String?-- public var providers: [String]?-- public var baseURL: String {- return domain- }-- public var targetUrl: String {- let consoleProviders = self.providers?.joined(separator: " ") ?? "geofence push storage"- if let realm = realm {- return "\(baseURL)/\(app)/?realm=\(realm)&consoleProviders=\(consoleProviders)&consoleAutoEnable=true#!geofences"- } else {- return "\(baseURL)/\(app)/?consoleProviders=\(consoleProviders)&consoleAutoEnable=true#!geofences"- }-- // TODO: what's that &consoleAutoEnable=true#!geofences part of the URL for ?- }--- public init() {- id = UUID().uuidString- domain = "demo" // TODO: How to manage this ? Should we have a default init ?- app = "manager"- }-- public init(domain: String, app: String, realm: String?) {- id = UUID().uuidString- self.domain = domain- self.app = app- self.realm = realm- }-- public static func ==(lhs: ProjectConfig, rhs: ProjectConfig) -> Bool {- return lhs.domain == rhs.domain && lhs.app == rhs.app && lhs.realm == rhs.realm && lhs.providers == rhs.providers- }--}diff --git a/console/iOS/ORLib/ORLib/Network/ApiManager.swift b/console/iOS/ORLib/ORLib/Network/ApiManager.swiftdeleted file mode 100644index 09bca83fd..000000000--- a/console/iOS/ORLib/ORLib/Network/ApiManager.swift+++ /dev/null@@ -1,30 +0,0 @@-//-// ApiManager.swift-// ORLib-//-// Created by Eric Bariaux on 31/08/2022.-//--import Foundation--public typealias ResponseBlock<T: Codable> = (_ statusCode: Int, _ object: T?, _ error: Error?) -> ()--public enum ApiManagerError: Error {- case notFound- case communicationError(Int)- case parsingError(Int)-}--public protocol ApiManager {-- func getConsoleConfig(callback: ResponseBlock<ORConsoleConfig>?)-- func getConsoleConfig() async throws -> ORConsoleConfig?-- func getApps(callback: ResponseBlock<[String]>?)-- func getApps() async throws -> [String]?-- func getAppInfo(appName: String) async throws -> ORAppInfo?--}diff --git a/console/iOS/ORLib/ORLib/Network/HttpApiManager.swift b/console/iOS/ORLib/ORLib/Network/HttpApiManager.swiftdeleted file mode 100644index 75d2b0fa2..000000000--- a/console/iOS/ORLib/ORLib/Network/HttpApiManager.swift+++ /dev/null@@ -1,288 +0,0 @@-//-// ApiManager.swift-// GenericApp-//-// Created by nuc on 17/06/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import UIKit--enum HttpMethod: String {- case get = "GET"- case post = "POST"- case put = "PUT"- case delete = "DELETE"- case batch = "BATCH"-}--public class HttpApiManager: NSObject, ApiManager {-- private let baseUrl: URL;-- public init(baseUrl: String) {- self.baseUrl = URL(string: baseUrl)!- super.init()- }-- public static var accessToken: String?-- let session: URLSession = {- let config = URLSessionConfiguration.default- config.httpAdditionalHeaders = ["Content-Type": "application/json", "Accept": "application/json"]- return URLSession(configuration: config)- }()-- let encoder: JSONEncoder = {- let encoder = JSONEncoder()- encoder.keyEncodingStrategy = .convertToSnakeCase- return encoder- }()-- let decoder: JSONDecoder = {- let decoder = JSONDecoder()- decoder.keyDecodingStrategy = .convertFromSnakeCase- return decoder- }()-- public func getConsoleConfig(callback: ResponseBlock<ORConsoleConfig>?) {- var urlRequest = URLRequest(url: self.baseUrl.appendingPathComponent("apps").appendingPathComponent("consoleConfig"))- urlRequest.httpMethod = HttpMethod.get.rawValue-- session.dataTask(with: urlRequest, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- guard let responseData = responseData else {- callback?(httpStatusCode, nil, error);- return- }-- guard let responseModel = try? self.decoder.decode(ORConsoleConfig.self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- callback?(httpStatusCode, nil, error);- return;- }-- callback?(httpStatusCode, responseModel, nil)- }).resume()- }-- public func getConsoleConfig() async throws -> ORConsoleConfig? {- var urlRequest = URLRequest(url: self.baseUrl.appendingPathComponent("apps").appendingPathComponent("consoleConfig"))- urlRequest.httpMethod = HttpMethod.get.rawValue-- return try await withCheckedThrowingContinuation { continuation in- session.dataTask(with: urlRequest, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- if httpStatusCode != 200 {- continuation.resume(throwing: ApiManagerError.communicationError(httpStatusCode))- return- }-- guard let responseData = responseData else {- continuation.resume(throwing: ApiManagerError.communicationError(httpStatusCode))- return- }-- guard let responseModel = try? self.decoder.decode(ORConsoleConfig.self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- continuation.resume(throwing: ApiManagerError.parsingError(httpStatusCode))- return- }-- continuation.resume(returning: responseModel)- }).resume()- }- }-- public func getApps(callback: ResponseBlock<[String]>?) {- var urlRequest = URLRequest(url: self.baseUrl.appendingPathComponent("apps"))- urlRequest.httpMethod = HttpMethod.get.rawValue-- session.dataTask(with: urlRequest, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- guard let responseData = responseData else {- callback?(httpStatusCode, nil, error);- return- }-- guard let responseModel = try? self.decoder.decode([String].self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- callback?(httpStatusCode, nil, error);- return;- }-- callback?(httpStatusCode, responseModel, nil)- }).resume()- }-- public func getApps() async throws -> [String]? {- var urlRequest = URLRequest(url: self.baseUrl.appendingPathComponent("apps"))- urlRequest.httpMethod = HttpMethod.get.rawValue-- return try await withCheckedThrowingContinuation { continuation in- session.dataTask(with: urlRequest, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- if httpStatusCode == 404 {- continuation.resume(throwing: ApiManagerError.notFound)- return- }-- if httpStatusCode != 200 {- continuation.resume(throwing: ApiManagerError.communicationError(httpStatusCode))- return- }-- guard let responseData = responseData else {- continuation.resume(throwing: ApiManagerError.communicationError(httpStatusCode))- return- }-- guard let responseModel = try? self.decoder.decode([String].self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- continuation.resume(throwing: ApiManagerError.parsingError(httpStatusCode))- return- }-- continuation.resume(returning: responseModel)- }).resume()- }- }--- public func getAppInfo(appName: String) async throws -> ORAppInfo? {- var urlRequest = URLRequest(url: self.baseUrl.appendingPathComponent("apps").appendingPathComponent(appName).appendingPathComponent("info.json"))- urlRequest.httpMethod = HttpMethod.get.rawValue-- return try await withCheckedThrowingContinuation { continuation in- session.dataTask(with: urlRequest, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- if httpStatusCode == 404 {- continuation.resume(throwing: ApiManagerError.notFound)- return- }-- if httpStatusCode != 200 {- continuation.resume(throwing: ApiManagerError.communicationError(httpStatusCode))- return- }-- guard let responseData = responseData else {- continuation.resume(throwing: ApiManagerError.communicationError(httpStatusCode))- return- }-- guard let responseModel = try? self.decoder.decode(ORAppInfo.self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- continuation.resume(throwing: ApiManagerError.parsingError(httpStatusCode))- return- }-- continuation.resume(returning: responseModel)- }).resume()- }- }-- //REST METHODS- private func createRequest(method: HttpMethod, pathComponents:[String], queryParameters: [String: Any]? = nil) -> URLRequest {- var url: URL- if let urlParameters = queryParameters, var components = URLComponents(url: baseUrl, resolvingAgainstBaseURL: false) {- components.queryItems = urlParameters.map {- URLQueryItem(name: $0, value: String(describing: $1))- }- url = components.url!- } else {- url = baseUrl- }-- for pathComponent in pathComponents {- url = url.appendingPathComponent(pathComponent)- }-- var urlRequest = URLRequest(url: url)- urlRequest.httpMethod = method.rawValue-- if let accessToken = HttpApiManager.accessToken {- urlRequest.addValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")- }-- return urlRequest- }-- private func get<T: Decodable>(pathComponents: [String], queryParameters: [String: Any]? = nil, callback: ResponseBlock<T>?) {- let urlRequest = self.createRequest(method: .get, pathComponents: pathComponents, queryParameters: queryParameters)-- session.dataTask(with: urlRequest, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- guard let responseData = responseData else {- callback?(httpStatusCode, nil, error);- return- }-- guard let responseModel = try? self.decoder.decode(T.self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- callback?(httpStatusCode, nil, error);- return;- }-- callback?(httpStatusCode, responseModel, nil)- }).resume()- }-- private func put<T : Encodable, R : Decodable> (pathComponents:[String], item:T, callback: ResponseBlock<R>?) {- let urlRequest = createRequest(method: .put, pathComponents: pathComponents)-- guard let data = try? encoder.encode(item) else {- callback?(500, nil , nil)- return- }-- session.uploadTask(with: urlRequest, from: data, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- guard let responseData = responseData else {- callback?(httpStatusCode, nil, error);- return- }-- guard let responseModel = try? self.decoder.decode(R.self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- callback?(httpStatusCode, nil, error);- return;- }-- callback?(httpStatusCode, responseModel, nil)- }).resume()- }-- private func post<T : Encodable, R : Decodable> (pathComponents:[String], item:T, callback: ResponseBlock<R>?) {- let urlRequest = createRequest(method: .post, pathComponents: pathComponents)-- guard let data = try? encoder.encode(item) else {- callback?(500, nil , nil)- return- }-- session.uploadTask(with: urlRequest, from: data, completionHandler: { responseData, response, error in- let httpStatusCode = (response as? HTTPURLResponse)?.statusCode ?? 500-- guard let responseData = responseData else {- callback?(httpStatusCode, nil, error);- return- }-- guard let responseModel = try? self.decoder.decode(R.self, from: responseData) else {- print("Couldn't parse response: \(String(data: responseData, encoding: .utf8)!)")- callback?(httpStatusCode, nil, error);- return;- }-- callback?(httpStatusCode, responseModel, nil)- }).resume()- }-}diff --git a/console/iOS/ORLib/ORLib/Network/ORNotificationResource.swift b/console/iOS/ORLib/ORLib/Network/ORNotificationResource.swiftdeleted file mode 100644index cee1fd58d..000000000--- a/console/iOS/ORLib/ORLib/Network/ORNotificationResource.swift+++ /dev/null@@ -1,72 +0,0 @@-//-// ORNotificationResource.swift-// ORLib-//-// Created by Michael Rademaker on 08/08/2018.-//--import UIKit--public class ORNotificationResource: NSObject, URLSessionDelegate {-- public static let sharedInstance = ORNotificationResource()-- private override init() {- super.init()- }-- public func notificationDelivered(notificationId : Int64, targetId : String) {- if let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement),- let host = userdefaults.string(forKey: DefaultsKey.hostKey),- let realm = userdefaults.string(forKey: DefaultsKey.realmKey) {- let url = host.appending("/api/\(realm)")- guard let urlRequest = URL(string: "\(url)/notification/\(notificationId)/delivered?targetId=\(targetId)") else { return }- let request = NSMutableURLRequest(url: urlRequest)- request.httpMethod = "PUT"- let sessionConfiguration = URLSessionConfiguration.default- let session = URLSession(configuration: sessionConfiguration, delegate: self, delegateQueue : nil)- let reqDataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) in- DispatchQueue.main.async {- if (error != nil) {- NSLog("error %@", (error! as NSError).localizedDescription)- let error = NSError(domain: "", code: 0, userInfo: [- NSLocalizedDescriptionKey : NSLocalizedString("ErrorCallingAPI", value: "Could not get data", comment: "")- ])- print(error)- }- }- })- reqDataTask.resume()- }- }-- public func notificationAcknowledged(notificationId : Int64, targetId : String, acknowledgement: String) {- if let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement),- let host = userdefaults.string(forKey: DefaultsKey.hostKey),- let realm = userdefaults.string(forKey: DefaultsKey.realmKey) {- let url = host.appending("/api/\(realm)")- guard let urlRequest = URL(string: "\(url)/notification/\(notificationId)/acknowledged?targetId=\(targetId)") else { return }- let request = NSMutableURLRequest(url: urlRequest)- request.httpMethod = "PUT"-- if let json = try? JSONSerialization.data(withJSONObject: ["acknowledgement": acknowledgement], options: []) {- request.addValue("application/json", forHTTPHeaderField: "Content-Type")- request.httpBody = json- }- let sessionConfiguration = URLSessionConfiguration.default- let session = URLSession(configuration: sessionConfiguration, delegate: self, delegateQueue : nil)- let reqDataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) in- DispatchQueue.main.async {- if (error != nil) {- NSLog("error %@", (error! as NSError).localizedDescription)- let error = NSError(domain: "", code: 0, userInfo: [- NSLocalizedDescriptionKey : NSLocalizedString("ErrorCallingAPI", value: "Could not get data", comment: "")- ])- print(error)- }- }- })- reqDataTask.resume()- }- }-}diff --git a/console/iOS/ORLib/ORLib/ORLib.h b/console/iOS/ORLib/ORLib/ORLib.hdeleted file mode 100644index b6d26b9a7..000000000--- a/console/iOS/ORLib/ORLib/ORLib.h+++ /dev/null@@ -1,18 +0,0 @@-//-// ORLib.h-// ORLib-//-// Created by Michael Rademaker on 20/10/2023.-//--#import <Foundation/Foundation.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/ORLib/ORLib/ORLib.swift b/console/iOS/ORLib/ORLib/ORLib.swiftdeleted file mode 100644index 0e78f7827..000000000--- a/console/iOS/ORLib/ORLib/ORLib.swift+++ /dev/null@@ -1,10 +0,0 @@-//-// ORLib.swift-// ORLib-//-// Created by Michael Rademaker on 11/10/2021.-//--class ORLib {--}diff --git a/console/iOS/ORLib/ORLib/UI/ErrorManager.swift b/console/iOS/ORLib/ORLib/UI/ErrorManager.swiftdeleted file mode 100644index 64cedbf13..000000000--- a/console/iOS/ORLib/ORLib/UI/ErrorManager.swift+++ /dev/null@@ -1,45 +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-import UIKit--public class ErrorManager : NSObject {-- static func showError(error : Error) {- DispatchQueue.main.async {- NSLog("showing error %@",error as NSError)- let topWindow = UIWindow(frame: UIScreen.main.bounds)- topWindow.rootViewController = UIViewController()- topWindow.windowLevel = UIWindow.Level.alert + 1- let alertVC = UIAlertController(title: "Error", message: error.localizedDescription, preferredStyle: UIAlertController.Style.alert)- let alertAction = UIAlertAction(title: "Done", style: .cancel) { (action) in- topWindow.rootViewController?.presentedViewController?.dismiss(animated: true, completion: nil)- topWindow.isHidden = true- }-- alertVC.addAction(alertAction)- DispatchQueue.main.async {- topWindow.makeKeyAndVisible()- topWindow.rootViewController?.present(alertVC, animated: true, completion: nil)- }- }- }-}diff --git a/console/iOS/ORLib/ORLib/UI/ORTextInput.swift b/console/iOS/ORLib/ORLib/UI/ORTextInput.swiftdeleted file mode 100644index ec29aebf0..000000000--- a/console/iOS/ORLib/ORLib/UI/ORTextInput.swift+++ /dev/null@@ -1,67 +0,0 @@-//-// ORTextInput.swift-// GenericApp-//-// Created by Michael Rademaker on 26/10/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import UIKit-import MaterialComponents.MaterialTextFields--@IBDesignable // Lets you change a UIView instance in storyboard to this class, so you can visualize it and add constraints to it-public class ORTextInput: UIView {-- private var textInput: MDCTextField!- private var controller: MDCTextInputControllerFilled!- private let textColor = UIColor(named: "or_green")-- private var placeholderText = ""-- @IBInspectable var setPlaceholderText: String {- get {- return placeholderText- }- set(str) {- placeholderText = str- }- }-- public var textField: UITextField? {- get {- return textInput- }- }-- public override func layoutSubviews() {- setupInputView()- setupContoller()- }-- private func setupInputView(){- if let _ = self.viewWithTag(1){return}-- textInput = MDCTextField()- textInput.tag = 1- textInput.translatesAutoresizingMaskIntoConstraints = false- textInput.placeholder = placeholderText- textInput.clearButtonMode = .never-- self.addSubview(textInput)-- NSLayoutConstraint.activate([- (textInput.topAnchor.constraint(equalTo: self.topAnchor)),- (textInput.bottomAnchor.constraint(equalTo: self.bottomAnchor)),- (textInput.leadingAnchor.constraint(equalTo: self.leadingAnchor)),- (textInput.trailingAnchor.constraint(equalTo: self.trailingAnchor))- ])- }-- private func setupContoller(){- controller = MDCTextInputControllerFilled(textInput: textInput)-- controller.activeColor = textColor- controller.floatingPlaceholderActiveColor = textColor-- }-}diff --git a/console/iOS/ORLib/ORLib/UI/ORViewController.swift b/console/iOS/ORLib/ORLib/UI/ORViewController.swiftdeleted file mode 100644index 809284bc5..000000000--- a/console/iOS/ORLib/ORLib/UI/ORViewController.swift+++ /dev/null@@ -1,458 +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-import UIKit-import WebKit-import MaterialComponents.MaterialButtons--open class ORViewcontroller : UIViewController {-- var data : Data?- var myWebView : WKWebView?- var webProgressBar: UIProgressView?- var defaults : UserDefaults?- var webCfg : WKWebViewConfiguration?- public var geofenceProvider: GeofenceProvider?- public var pushProvider: PushNotificationProvider?- public var storageProvider: StorageProvider?- public var qrProvider: QrScannerProvider?- public var bleProvider: BleProvider?-- public var baseUrl: String?-- public var targetUrl: String?-- open override func viewDidLoad() {- super.viewDidLoad()- view.backgroundColor = UIColor.white- self.configureAccess()- }-- open override func viewDidAppear(_ animated: Bool) {- super.viewDidAppear(animated)-- if let targetUrl = targetUrl {- if let urlString = targetUrl.stringByURLEncoding() {- if let url = URL(string: urlString) {- loadURL(url: url)- }- }- }- }-- func sendData(data: [String: Any?]) {- if let theJSONData = try? JSONSerialization.data(- withJSONObject: data,- options: []) {- if let theJSONText = String(data: theJSONData,- encoding: .utf8) {- print("notifyClient with message: \(theJSONText)")- let returnMessage = "OpenRemoteConsole._handleProviderResponse('\(theJSONText)')"- DispatchQueue.main.async {- self.myWebView?.evaluateJavaScript("\(returnMessage)", completionHandler: { (any, error) in- if let err = error {- print(err)- }- })- }- }- }- }-- func configureAccess() {- let webCfg:WKWebViewConfiguration = WKWebViewConfiguration()- let userController:WKUserContentController = WKUserContentController()-- userController.add(self, name: "int")-- let exec_template : String? = ""- let userScript:WKUserScript = WKUserScript(source: exec_template!, injectionTime: .atDocumentStart, forMainFrameOnly: true)- userController.addUserScript(userScript)-- webCfg.userContentController = userController;- let sbHeight: CGFloat- if #available(iOS 11.0, *) {- sbHeight = UIApplication.shared.keyWindow?.safeAreaInsets.top ?? UIApplication.shared.statusBarFrame.height- } else {- sbHeight = UIApplication.shared.statusBarFrame.height- }-- webCfg.allowsInlineMediaPlayback = true- let webFrame = CGRect(x: 0, y: sbHeight, width: view.frame.size.width, height: view.frame.size.height - sbHeight)- myWebView = WKWebView(frame: webFrame, configuration: webCfg)- myWebView?.autoresizingMask = [.flexibleWidth, .flexibleHeight];- myWebView?.navigationDelegate = self;- //add observer to get estimated progress value- myWebView?.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil);- myWebView?.allowsBackForwardNavigationGestures = true-- webProgressBar = UIProgressView(progressViewStyle: .bar)- webProgressBar?.progressTintColor = UIColor(named: "or_green")-- if #available(macOS 13.3, iOS 16.4, tvOS 16.4, *) {- myWebView?.isInspectable = true- }-- view.addSubview(myWebView!)- view.addSubview(webProgressBar!)- view.bringSubviewToFront(webProgressBar!)-- webProgressBar?.translatesAutoresizingMaskIntoConstraints = false- webProgressBar?.leadingAnchor.constraint(equalTo: myWebView!.leadingAnchor).isActive = true- webProgressBar?.trailingAnchor.constraint(equalTo: myWebView!.trailingAnchor).isActive = true- webProgressBar?.topAnchor.constraint(equalTo: myWebView!.topAnchor, constant: -2).isActive = true- webProgressBar?.heightAnchor.constraint(equalToConstant: 2).isActive = true- }-- public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {- if keyPath == "estimatedProgress" {- if let webView = myWebView {- webProgressBar?.progress = Float(webView.estimatedProgress);- }- }- }-- func showProgressView() {- if let progressBar = webProgressBar {- UIView.animate(withDuration: 0.5, delay: 0, options: .curveEaseInOut, animations: {- progressBar.alpha = 1- }, completion: nil)- }- }-- func hideProgressView() {- if let progressBar = webProgressBar {- UIView.animate(withDuration: 0.5, delay: 0, options: .curveEaseInOut, animations: {- progressBar.alpha = 0- }, completion: nil)- }- }-- public func loadURL(url : URL) {- _ = self.myWebView?.load(URLRequest(url:url))- }-- internal func handleError(errorCode: Int, description: String, failingUrl: String, isForMainFrame: Bool) {- print("Error requesting '\(failingUrl)': \(errorCode) (\(description))")-- let alertView = UIAlertController(title: "Error", message: "Error requesting '\(failingUrl)': \(errorCode) (\(description))", preferredStyle: .alert)-- if self.presentingViewController != nil {- alertView.addAction(UIAlertAction(title: "OK", style: .default, handler: { _ in self.dismiss(animated: true)} ))- } else {- alertView.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))- }- self.present(alertView, animated: true, completion: nil)-- /*- if (false) {- //TODO need to have case to return to home url of config or go back to wizard to setup project enviroment- // self.myWebView?.load(URLRequest(url: URL(string: url.stringByURLEncoding()!)!))- } else {- if self.presentingViewController != nil {- self.dismiss(animated: true) {-- // TODO: this original code is causing error- // self.presentingViewController!.present(alertView, animated: true, completion: nil)- }- } else {- self.present(alertView, animated: true, completion: nil)- }- }- */- }-}--extension ORViewcontroller: WKScriptMessageHandler {- public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {- print("Received WebApp message \(message.body)")- let jsonDictionnary = message.body as? [String : Any]- if let type = jsonDictionnary?["type"] as? String {- switch (type) {- case "provider":- if let postMessageDict = jsonDictionnary?[DefaultsKey.dataKey] as? [String: Any] {- if let action = postMessageDict[DefaultsKey.actionKey] as? String {- if let provider = postMessageDict[DefaultsKey.providerKey] as? String {- switch (provider) {- case Providers.push:- switch(action) {- case Actions.providerInit:- pushProvider = PushNotificationProvider()- pushProvider!.initialize(callback: { initalizeData in- self.sendData(data: initalizeData)- })- case Actions.providerEnable:- let consoleId = postMessageDict[GeofenceProvider.consoleIdKey] as? String- pushProvider?.enable(consoleId: consoleId, callback: { enableData in- self.sendData(data: enableData)- })-- case Actions.providerDisable:- if let disableData = pushProvider?.disable() {- sendData(data: disableData)- }- default:- print("Wrong action \(action) for \(provider)")- }- case Providers.geofence:- switch(action) {- case Actions.providerInit:- geofenceProvider = GeofenceProvider()- let initializeData = geofenceProvider!.initialize()- sendData(data: initializeData)- case Actions.providerEnable:- let consoleId = postMessageDict[GeofenceProvider.consoleIdKey] as? String- if let userdefaults = UserDefaults(suiteName: DefaultsKey.groupEntitlement){- let host = userdefaults.string(forKey: DefaultsKey.hostKey) ?? ""- let realm = userdefaults.string(forKey: DefaultsKey.realmKey) ?? ""- let baseUrl = host.isEmpty ? "" : host.appending("/api/\(realm)")- geofenceProvider?.enable(baseUrl: baseUrl, consoleId: consoleId, callback: { enableData in- self.sendData(data: enableData)- DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(5)) {- self.geofenceProvider?.fetchGeofences()- }- })- }-- case Actions.providerDisable:- if let disableData = geofenceProvider?.disable() {- sendData(data: disableData)- }- case Actions.geofenceRefresh:- geofenceProvider?.refreshGeofences()- default:- print("Wrong action \(action) for \(provider)")- }- case Providers.storage:- switch(action) {- case Actions.providerInit:- storageProvider = StorageProvider()- let initializeData = storageProvider!.initialize()- sendData(data: initializeData)- case Actions.providerEnable:- if let enableData = storageProvider?.enable() {- sendData(data: enableData)- }- case Actions.providerDisable:- if let disableData = storageProvider?.disable() {- sendData(data: disableData)- }- case Actions.store:- if let key = postMessageDict["key"] as? String {- storageProvider?.store(key: key, data: postMessageDict["value"] as? String)- }- case Actions.retrieve:- if let key = postMessageDict["key"] as? String {- if let retrieveData = storageProvider?.retrieve(key: key) {- sendData(data: retrieveData)- }- }- default:- print("Wrong action \(action) for \(provider)")- }- case Providers.qr:- switch (action) {- case Actions.providerInit:- qrProvider = QrScannerProvider()- qrProvider!.initialize(callback: { initializeData in- self.sendData(data: initializeData)- })- case Actions.providerEnable:- qrProvider?.enable(callback: { enableData in- self.sendData(data: enableData)- })- case Actions.providerDisable:- if let disableData = qrProvider?.disable() {- sendData(data: disableData)- }- case Actions.scanQr:- qrProvider?.startScanner(currentViewController: self, startScanCallback: { startScanData in- self.sendData(data: startScanData)- }, scannedCallback:- { scannedData in- self.sendData(data: scannedData)- })- default:- print("Wrong action \(action) for \(provider)")- }- case Providers.ble:- switch (action) {- case Actions.providerInit:- bleProvider = BleProvider()- bleProvider!.alertBluetoothCallback = {- let alertController = UIAlertController(title: "Bluetooth disabled", message: "Please turn on bluetooth to scan for devices", preferredStyle: .alert)- alertController.addAction(UIAlertAction(title: "OK", style: .default) { alertAction in- let url = URL(string: UIApplication.openSettingsURLString)- let app = UIApplication.shared- app.open(url!, options: [:])- })- alertController.addAction(UIAlertAction(title: "Not now", style: .cancel))- self.present(alertController, animated: true)- }- self.sendData(data: bleProvider!.initialize())- case Actions.providerEnable:- bleProvider?.enable(callback: { enableData in- self.sendData(data: enableData)- })- case Actions.providerDisable:- if let disableData = bleProvider?.disable() {- sendData(data: disableData)- }- case Actions.scanBleDevices:- bleProvider?.scanForDevices { scanData in- self.sendData(data: scanData)- }- case Actions.connectToBleDevice:- if let deviceId = postMessageDict["address"] as? String {- bleProvider?.connectoToDevice(deviceId: deviceId) { connectData in- self.sendData(data: connectData)- }- }- case Actions.sendToBleDevice:- if let attributeId = postMessageDict["attributeId"] as? String, let value = postMessageDict["value"] {- if let data = try? JSONSerialization.data(- withJSONObject: value,- options: []) {- bleProvider?.sendToDevice(attributeId: attributeId, value: data) { sendData in- self.sendData(data: sendData)- }- }- }- default:- print("Wrong action \(action) for \(provider)")- }- default:- print("Unknown provider type: \(provider )")- }- }- }- }- default:- print("Unknown message type: \(type )")- }- }- }-}--extension ORViewcontroller: WKNavigationDelegate {-- public func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {- showProgressView()- }-- public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {- if (navigationAction.request.url?.absoluteString.starts(with: "webbrowser"))! {- if let url = navigationAction.request.url, var components = URLComponents(url: url, resolvingAgainstBaseURL: false) {- components.scheme = "https"- if let newUrl = components.url {- UIApplication.shared.open(newUrl)- }- }- decisionHandler(.cancel)- } else {- let app = UIApplication.shared- if navigationAction.targetFrame == nil, let url = navigationAction.request.url{- if app.canOpenURL(url) {- app.open(url, options: convertToUIApplicationOpenExternalURLOptionsKeyDictionary([:]), completionHandler: nil)- decisionHandler(.cancel)- }- } else {- if let baseUrl = self.baseUrl {- webView.loadCookiesFromStorage(for: baseUrl) {- decisionHandler(.allow)- }- } else {- decisionHandler(.allow)- }- }- }- }-- public 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)-- if 400...499 ~= response.statusCode {- if let baseUrl = self.baseUrl {- webView.clearCookies(for: baseUrl, completion: nil)- }- }-- handleError(errorCode: response.statusCode, description: "Error in request", failingUrl: response.url?.absoluteString ?? "", isForMainFrame: true)- return- }- }- if let baseUrl = self.baseUrl {- webView.writeCookiesToStorage(for: baseUrl) {- decisionHandler(.allow)- }- } else {- decisionHandler(.allow)- }- }-- public func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {- NSLog("error %@", error.localizedDescription)- if let err = error as? URLError {-- let httpCode: Int- switch(err.code) {- case .cannotFindHost:- httpCode = 404- default:- httpCode = 500- }-- handleError(errorCode: httpCode, description: err.localizedDescription, failingUrl: err.failureURLString ?? "", isForMainFrame: true)- } else {- handleError(errorCode: 0, description: error.localizedDescription, failingUrl: webView.url?.absoluteString ?? "", isForMainFrame: true)- }- }-- public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {- hideProgressView()- }-- public func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {- NSLog("error %@", error.localizedDescription)- if let err = error as? URLError {-- let httpCode: Int- switch(err.code) {- case .cannotFindHost:- httpCode = 404- default:- httpCode = 500- }-- handleError(errorCode: httpCode, description: err.localizedDescription, failingUrl: err.failureURLString ?? "", isForMainFrame: true)- } else {- handleError(errorCode: 0, description: error.localizedDescription, failingUrl: webView.url?.absoluteString ?? "", isForMainFrame: true)- }- hideProgressView()- }-}--// Helper function inserted by Swift 4.2 migrator.-fileprivate func convertToUIApplicationOpenExternalURLOptionsKeyDictionary(_ input: [String: Any]) -> [UIApplication.OpenExternalURLOptionsKey: Any] {- return Dictionary(uniqueKeysWithValues: input.map { key, value in (UIApplication.OpenExternalURLOptionsKey(rawValue: key), value)})-}diff --git a/console/iOS/ORLib/ORLib/UI/QrScannerViewController.swift b/console/iOS/ORLib/ORLib/UI/QrScannerViewController.swiftdeleted file mode 100644index 24c4c49d1..000000000--- a/console/iOS/ORLib/ORLib/UI/QrScannerViewController.swift+++ /dev/null@@ -1,130 +0,0 @@-//-// QrScannerViewController.swift-// ORLib-//-// Created by Michael Rademaker on 22/11/2021.-//--import AVFoundation-import UIKit--public protocol QrScannerDelegate: AnyObject {- func codeScanned(_ codeContents:String?)-}--public class QrScannerViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate {- var captureSession: AVCaptureSession!- var previewLayer: ScannerOverlayPreviewLayer!- public var delegate: QrScannerDelegate?-- override public func viewDidLoad() {- super.viewDidLoad()-- view.backgroundColor = UIColor.black- captureSession = AVCaptureSession()-- guard let videoCaptureDevice = AVCaptureDevice.default(for: .video) else { return }- let videoInput: AVCaptureDeviceInput-- do {- videoInput = try AVCaptureDeviceInput(device: videoCaptureDevice)- } catch {- return- }-- if (captureSession.canAddInput(videoInput)) {- captureSession.addInput(videoInput)- } else {- failed()- return- }-- let metadataOutput = AVCaptureMetadataOutput()-- if (captureSession.canAddOutput(metadataOutput)) {- captureSession.addOutput(metadataOutput)-- metadataOutput.setMetadataObjectsDelegate(self, queue: DispatchQueue.main)- metadataOutput.metadataObjectTypes = [.qr]- } else {- failed()- return- }-- previewLayer = ScannerOverlayPreviewLayer(session: captureSession)- previewLayer.frame = view.layer.bounds- previewLayer.videoGravity = .resizeAspectFill- previewLayer.backgroundColor = UIColor.black.withAlphaComponent(0.7).cgColor- previewLayer.cornerRadius = 5- metadataOutput.rectOfInterest = previewLayer.rectOfInterest-- let subView = UIView(frame: view.frame)-- subView.layer.addSublayer(previewLayer)- view.addSubview(subView)-- DispatchQueue.global(qos: .background).async {- self.captureSession.startRunning()- }-- let cancelButton = UIButton(type: .close)- cancelButton.layer.cornerRadius = 25- cancelButton.backgroundColor = .white.withAlphaComponent(0.7)- cancelButton.setTitleColor(.black, for: [.normal, .highlighted, .selected])- cancelButton.addTarget(self, action: #selector(cancelButtonTapped), for: .touchUpInside)- cancelButton.frame = CGRect(x: 20, y: 20, width: 48, height: 48)- view.addSubview(cancelButton)- }-- @objc func cancelButtonTapped() {- if (delegate != nil) {- delegate?.codeScanned(nil)- } else {- self.dismiss(animated: true, completion: nil)- }- }-- func failed() {- let ac = UIAlertController(title: "Scanning not supported", message: "Your device does not support scanning a code from an item. Please use a device with a camera.", preferredStyle: .alert)- ac.addAction(UIAlertAction(title: "OK", style: .default))- present(ac, animated: true)- captureSession = nil- }-- override public func viewWillAppear(_ animated: Bool) {- super.viewWillAppear(animated)-- if (captureSession?.isRunning == false) {- DispatchQueue.global(qos: .background).async {- self.captureSession.startRunning()- }- }- }-- override public func viewWillDisappear(_ animated: Bool) {- super.viewWillDisappear(animated)-- if (captureSession?.isRunning == true) {- captureSession.stopRunning()- }- }-- public func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) {- captureSession.stopRunning()-- if let metadataObject = metadataObjects.first {- guard let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject else { return }- guard let stringValue = readableObject.stringValue else { return }- AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate))- delegate?.codeScanned(stringValue)- }- }-- override public var prefersStatusBarHidden: Bool {- return true- }-- override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {- return .portrait- }-}diff --git a/console/iOS/ORLib/ORLib/UI/ScannerOverlayPreviewLayer.swift b/console/iOS/ORLib/ORLib/UI/ScannerOverlayPreviewLayer.swiftdeleted file mode 100644index 53c523c1d..000000000--- a/console/iOS/ORLib/ORLib/UI/ScannerOverlayPreviewLayer.swift+++ /dev/null@@ -1,108 +0,0 @@-//-// ScannerOverlayPreviewLayer.swift-// ORLib-//-// Created by Michael Rademaker on 22/11/2021.-//--import AVFoundation-import UIKit--public class ScannerOverlayPreviewLayer: AVCaptureVideoPreviewLayer {-- public var cornerLength: CGFloat = 30-- public var lineWidth: CGFloat = 6- public var lineColor: UIColor = .white- public var lineCap: CAShapeLayerLineCap = .round-- public var maskSize: CGSize = CGSize(width: 250, height: 250)-- public var rectOfInterest: CGRect {- metadataOutputRectConverted(fromLayerRect: maskContainer)- }-- public override var frame: CGRect {- didSet {- setNeedsDisplay()- }- }-- private var maskContainer: CGRect {- CGRect(x: (bounds.width / 2) - (maskSize.width / 2),- y: (bounds.height / 2) - (maskSize.height / 2),- width: maskSize.width, height: maskSize.height)- }-- public override func draw(in ctx: CGContext) {- super.draw(in: ctx)-- let path = CGMutablePath()- path.addRect(bounds)- path.addRoundedRect(in: maskContainer, cornerWidth: cornerRadius, cornerHeight: cornerRadius)-- let maskLayer = CAShapeLayer()- maskLayer.path = path- maskLayer.fillColor = backgroundColor- maskLayer.fillRule = .evenOdd-- addSublayer(maskLayer)-- if cornerRadius > cornerLength { cornerRadius = cornerLength }- if cornerLength > maskContainer.width / 2 { cornerLength = maskContainer.width / 2 }-- let upperLeftPoint = CGPoint(x: maskContainer.minX, y: maskContainer.minY)- let upperRightPoint = CGPoint(x: maskContainer.maxX, y: maskContainer.minY)- let lowerRightPoint = CGPoint(x: maskContainer.maxX, y: maskContainer.maxY)- let lowerLeftPoint = CGPoint(x: maskContainer.minX, y: maskContainer.maxY)-- let upperLeftCorner = UIBezierPath()- upperLeftCorner.move(to: upperLeftPoint.offsetBy(dx: 0, dy: cornerLength))- upperLeftCorner.addArc(withCenter: upperLeftPoint.offsetBy(dx: cornerRadius, dy: cornerRadius),- radius: cornerRadius, startAngle: .pi, endAngle: 3 * .pi / 2, clockwise: true)- upperLeftCorner.addLine(to: upperLeftPoint.offsetBy(dx: cornerLength, dy: 0))-- let upperRightCorner = UIBezierPath()- upperRightCorner.move(to: upperRightPoint.offsetBy(dx: -cornerLength, dy: 0))- upperRightCorner.addArc(withCenter: upperRightPoint.offsetBy(dx: -cornerRadius, dy: cornerRadius),- radius: cornerRadius, startAngle: 3 * .pi / 2, endAngle: 0, clockwise: true)- upperRightCorner.addLine(to: upperRightPoint.offsetBy(dx: 0, dy: cornerLength))-- let lowerRightCorner = UIBezierPath()- lowerRightCorner.move(to: lowerRightPoint.offsetBy(dx: 0, dy: -cornerLength))- lowerRightCorner.addArc(withCenter: lowerRightPoint.offsetBy(dx: -cornerRadius, dy: -cornerRadius),- radius: cornerRadius, startAngle: 0, endAngle: .pi / 2, clockwise: true)- lowerRightCorner.addLine(to: lowerRightPoint.offsetBy(dx: -cornerLength, dy: 0))-- let bottomLeftCorner = UIBezierPath()- bottomLeftCorner.move(to: lowerLeftPoint.offsetBy(dx: cornerLength, dy: 0))- bottomLeftCorner.addArc(withCenter: lowerLeftPoint.offsetBy(dx: cornerRadius, dy: -cornerRadius),- radius: cornerRadius, startAngle: .pi / 2, endAngle: .pi, clockwise: true)- bottomLeftCorner.addLine(to: lowerLeftPoint.offsetBy(dx: 0, dy: -cornerLength))-- let combinedPath = CGMutablePath()- combinedPath.addPath(upperLeftCorner.cgPath)- combinedPath.addPath(upperRightCorner.cgPath)- combinedPath.addPath(lowerRightCorner.cgPath)- combinedPath.addPath(bottomLeftCorner.cgPath)-- let shapeLayer = CAShapeLayer()- shapeLayer.path = combinedPath- shapeLayer.strokeColor = lineColor.cgColor- shapeLayer.fillColor = UIColor.clear.cgColor- shapeLayer.lineWidth = lineWidth- shapeLayer.lineCap = lineCap-- addSublayer(shapeLayer)- }-}--internal extension CGPoint {-- func offsetBy(dx: CGFloat, dy: CGFloat) -> CGPoint {- var point = self- point.x += dx- point.y += dy- return point- }-}diff --git a/console/iOS/ORLib/ORLib/Utils/Constants.swift b/console/iOS/ORLib/ORLib/Utils/Constants.swiftdeleted file mode 100644index 50d500ca1..000000000--- a/console/iOS/ORLib/ORLib/Utils/Constants.swift+++ /dev/null@@ -1,102 +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-import UIKit--public enum Segues {- public static var goToSettingsView = "goToSettingsView"- public static var goToWizardDomainView = "goToWizardDomainView"- public static var goToWizardAppView = "goToWizardAppView"- public static var goToWizardRealmView = "goToWizardRealmView"- public static var goToWebView = "goToWebView"- public static var addProject = "addProject"-}--public enum DefaultsKey {- public static var groupEntitlement = "group.io.openremote.app"- public static let selectedProjectKey = "SELECTED_PROJECT"- public static let projectsConfigurationKey = "PROJECTS_CONFIGURATION"- public static let projectKey = "PROJECT"- public static let hostKey = "HOST"- public static let realmKey = "REALM"- public static let refreshTokenKey = "REFRESH_TOKEN"- public static let fcmTokenKey = "FCM_TOKEN_KEY"- public static let fcmDeviceIdKey = "FCM_DEVICE_ID_KEY"- public static let actionKey = "action"- public static let buttonsKey = "buttons"- public static let providerKey = "provider"- public static let versionKey = "version"- public static let requiresPermissionKey = "requiresPermission"- public static let hasPermissionKey = "hasPermission"- public static let successKey = "success"- public static let dataKey = "data"- public static let enabledKey = "enabled"- public static let disabledKey = "disabled"-}--public enum Actions {- public static let providerInit = "PROVIDER_INIT"- public static let providerEnable = "PROVIDER_ENABLE"- public static let providerDisable = "PROVIDER_DISABLE"- public static let geofenceRefresh = "GEOFENCE_REFRESH"- public static let store = "STORE"- public static let retrieve = "RETRIEVE"- public static let scanQr = "SCAN_QR"- public static let scanResult = "SCAN_RESULT"- public static let scanBleDevices = "SCAN_BLE_DEVICES"- public static let connectToBleDevice = "CONNECT_TO_DEVICE"- public static let sendToBleDevice = "SEND_TO_DEVICE"-}--public enum Providers {- public static let push = "push"- public static let geofence = "geofence"- public static let storage = "storage"- public static let qr = "qr"- public static let ble = "ble"-}--public enum NotificationsNames {- public static let isAuthenticated = "isAuthenticated"- public static let isdeviceIdSent = "isdeviceIdSent"-}--public enum Notifications {- public static let needsReachabilityCheck = Notification.Name("NeedsReachabilityCheck")- public static let fullScreenShown = Notification.Name("fullScreenShown")- public static let fullScreenHidden = Notification.Name("fullScreenHidden")- public static let idleTimerFired = Notification.Name("idleTimerFired")-}--public enum ActionType {- public static let actions = "actions"- public static let aps = "aps"- public static let alert = "alert"- public static let title = "title"- public static let type = "type"- public static let appUrl = "appUrl"- public static let silent = "silent"- public static let httpMethod = "httpMethod"- public static let openInBrowser = "openInBrowser"- public static let notificationId = "notification-id"- public static let ACTION_DEEP_LINK = "LINK"- public static let ACTION_ACTUATOR = "ACTUATOR"-}diff --git a/console/iOS/ORLib/ORLib/Utils/Reachability.swift b/console/iOS/ORLib/ORLib/Utils/Reachability.swiftdeleted file mode 100644index 8022c8371..000000000--- a/console/iOS/ORLib/ORLib/Utils/Reachability.swift+++ /dev/null@@ -1,327 +0,0 @@-/*- 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 targetEnvironment(simulator)- 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/ORLib/ORLib/Utils/String+Utils.swift b/console/iOS/ORLib/ORLib/Utils/String+Utils.swiftdeleted file mode 100644index b9ea1bf7c..000000000--- a/console/iOS/ORLib/ORLib/Utils/String+Utils.swift+++ /dev/null@@ -1,34 +0,0 @@-//-// String+Utils.swift-// GenericApp-//-// Created by Michael Rademaker on 26/10/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import Foundation--extension String {-- func stringByURLEncoding() -> String? {-- let characters = CharacterSet.urlQueryAllowed.union(CharacterSet(charactersIn: "#"))-- guard let encodedString = self.addingPercentEncoding(withAllowedCharacters: characters) else {- return nil- }-- return encodedString- }-- var isValidURL: Bool {- let detector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue)- if let match = detector.firstMatch(in: self, options: [], range: NSRange(location: 0, length: self.utf16.count)) {- // it is a link, if the match covers the whole string- return match.range.length == self.utf16.count- } else {- return false- }- }--}diff --git a/console/iOS/ORLib/ORLib/Utils/UIColor+Utils.swift b/console/iOS/ORLib/ORLib/Utils/UIColor+Utils.swiftdeleted file mode 100644index 395a66aca..000000000--- a/console/iOS/ORLib/ORLib/Utils/UIColor+Utils.swift+++ /dev/null@@ -1,53 +0,0 @@-//-// UIColor+Utils.swift-// GenericApp-//-// Created by Michael Rademaker on 26/10/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import Foundation-import UIKit--extension UIColor {- convenience init?(hexaRGB: String, alpha: CGFloat = 1) {- var chars = Array(hexaRGB.hasPrefix("#") ? hexaRGB.dropFirst() : hexaRGB[...])- switch chars.count {- case 3: chars = chars.flatMap { [$0, $0] }- case 6: break- default: return nil- }- self.init(red: .init(strtoul(String(chars[0...1]), nil, 16)) / 255,- green: .init(strtoul(String(chars[2...3]), nil, 16)) / 255,- blue: .init(strtoul(String(chars[4...5]), nil, 16)) / 255,- alpha: alpha)- }-- convenience init?(hexaRGBA: String) {- var chars = Array(hexaRGBA.hasPrefix("#") ? hexaRGBA.dropFirst() : hexaRGBA[...])- switch chars.count {- case 3: chars = chars.flatMap { [$0, $0] }; fallthrough- case 6: chars.append(contentsOf: ["F","F"])- case 8: break- default: return nil- }- self.init(red: .init(strtoul(String(chars[0...1]), nil, 16)) / 255,- green: .init(strtoul(String(chars[2...3]), nil, 16)) / 255,- blue: .init(strtoul(String(chars[4...5]), nil, 16)) / 255,- alpha: .init(strtoul(String(chars[6...7]), nil, 16)) / 255)- }-- convenience init?(hexaARGB: String) {- var chars = Array(hexaARGB.hasPrefix("#") ? hexaARGB.dropFirst() : hexaARGB[...])- switch chars.count {- case 3: chars = chars.flatMap { [$0, $0] }; fallthrough- case 6: chars.append(contentsOf: ["F","F"])- case 8: break- default: return nil- }- self.init(red: .init(strtoul(String(chars[2...3]), nil, 16)) / 255,- green: .init(strtoul(String(chars[4...5]), nil, 16)) / 255,- blue: .init(strtoul(String(chars[6...7]), nil, 16)) / 255,- alpha: .init(strtoul(String(chars[0...1]), nil, 16)) / 255)- }-}diff --git a/console/iOS/ORLib/ORLib/Utils/UIViewController+WKDelegate.swift b/console/iOS/ORLib/ORLib/Utils/UIViewController+WKDelegate.swiftdeleted file mode 100644index 8b1378917..000000000--- a/console/iOS/ORLib/ORLib/Utils/UIViewController+WKDelegate.swift+++ /dev/null@@ -1 +0,0 @@-diff --git a/console/iOS/ORLib/ORLib/Utils/WKWebView+Utils.swift b/console/iOS/ORLib/ORLib/Utils/WKWebView+Utils.swiftdeleted file mode 100644index da8c9a3d5..000000000--- a/console/iOS/ORLib/ORLib/Utils/WKWebView+Utils.swift+++ /dev/null@@ -1,83 +0,0 @@-import WebKit--extension WKWebView {-- enum PrefKey {- static let cookie = "cookies"- }-- func writeCookiesToStorage(for domain: String, completion: (() -> (Void))?) {- fetchInMemoryCookies(for: domain) { cookies in- UserDefaults.standard.set(cookies, forKey: PrefKey.cookie + domain)- completion?();- }- }-- func clearCookies(for domain: String, completion: (() -> (Void))?) {- WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in- records.forEach { record in- WKWebsiteDataStore.default().removeData(ofTypes: record.dataTypes, for: [record], completionHandler: {})- print("[WebCacheCleaner] Record \(record) deleted")- }- }- WKWebsiteDataStore.default().httpCookieStore.getAllCookies { (cookies) in- for cookie in cookies {- if domain.contains(cookie.domain) {- self.configuration.websiteDataStore.httpCookieStore.delete(cookie)- }- }- }- UserDefaults.standard.removeObject(forKey: PrefKey.cookie + domain)- UserDefaults.standard.synchronize()- completion?();- }--- func loadCookiesFromStorage(for domain: String, completion: (() -> (Void))?) {- if let storedCookies = UserDefaults.standard.dictionary(forKey: (PrefKey.cookie + domain)){- fetchInMemoryCookies(for: domain) { freshCookies in-- let mergedCookie = storedCookies.merging(freshCookies) { (_, new) in new }-- for (_, cookieConfig) in mergedCookie {- let cookie = cookieConfig as! Dictionary<String, Any>-- var expire : Any? = nil-- if let expireTime = cookie["Expires"] as? Double{- expire = Date(timeIntervalSinceNow: expireTime)- }-- let newCookie = HTTPCookie(properties: [- .domain: cookie["Domain"] as Any,- .path: cookie["Path"] as Any,- .name: cookie["Name"] as Any,- .value: cookie["Value"] as Any,- .secure: cookie["Secure"] as Any,- .expires: expire as Any- ])-- self.configuration.websiteDataStore.httpCookieStore.setCookie(newCookie!)- }-- completion?()- }-- }- else{- completion?()- }- }-- func fetchInMemoryCookies(for domain: String, completion: (([String: Any]) -> (Void))?) {- var cookieDict = [String: AnyObject]()- WKWebsiteDataStore.default().httpCookieStore.getAllCookies { (cookies) in- for cookie in cookies {- if domain.contains(cookie.domain) {- cookieDict[cookie.name] = cookie.properties as AnyObject?- }- }- completion?(cookieDict)- }- }-}diff --git a/console/iOS/ORLib/ORLib/Utils/Window+Utils.swift b/console/iOS/ORLib/ORLib/Utils/Window+Utils.swiftdeleted file mode 100644index 80713308b..000000000--- a/console/iOS/ORLib/ORLib/Utils/Window+Utils.swift+++ /dev/null@@ -1,28 +0,0 @@-//-// Window+Utils.swift-// GenericApp-//-// Created by Michael Rademaker on 02/11/2020.-// Copyright © 2020 OpenRemote. All rights reserved.-//--import Foundation-import UIKit--extension UIWindow {-- public var topController : UIViewController? {-- guard let rootViewController = self.rootViewController else {- return nil- }-- var topController = rootViewController-- while let newTopController = topController.presentedViewController {- topController = newTopController- }-- return topController- }-}diff --git a/console/iOS/ORLib/ORLibrary/ORLibrary.h b/console/iOS/ORLib/ORLibrary/ORLibrary.hdeleted file mode 100644index 92484ce1e..000000000--- a/console/iOS/ORLib/ORLibrary/ORLibrary.h+++ /dev/null@@ -1,18 +0,0 @@-//-// ORLibrary.h-// ORLibrary-//-// Created by Michael Rademaker on 21/02/2022.-//--#import <Foundation/Foundation.h>--//! Project version number for ORLibrary.-FOUNDATION_EXPORT double ORLibraryVersionNumber;--//! Project version string for ORLibrary.-FOUNDATION_EXPORT const unsigned char ORLibraryVersionString[];--// In this header, you should import all the public headers of your framework using statements like #import <ORLibrary/PublicHeader.h>--diff --git a/console/iOS/ORLib/Tests/ConfigManagerTest.swift b/console/iOS/ORLib/Tests/ConfigManagerTest.swiftdeleted file mode 100644index 53a5236b3..000000000--- a/console/iOS/ORLib/Tests/ConfigManagerTest.swift+++ /dev/null@@ -1,144 +0,0 @@-//-// ConfigManagerTest.swift-// Tests-//-// Created by Eric Bariaux on 31/08/2022.-//--import XCTest--@testable import ORLib--class ConfigManagerTest: XCTestCase {-- let configManager = ConfigManager(apiManagerFactory: { url in- FileApiManager(baseUrl: url)- })-- func test0() async throws {- var state = try await configManager.setDomain(domain: "test0")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test0.openremote.app", "manager", nil))- state = try configManager.setRealm(realm: "master")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test0.openremote.app", app: "manager", realm: "master")))- }-- func test1() async throws {- let state = try await configManager.setDomain(domain: "test1")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test1.openremote.app", app: "manager", realm: nil)))- }-- func test2() async throws {- var state = try await configManager.setDomain(domain: "test2")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test2.openremote.app", "Console 1", nil))- state = try configManager.setRealm(realm: nil)- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test2.openremote.app", app: "Console 1", realm: nil)))- }-- func test3() async throws {- var state = try await configManager.setDomain(domain: "test3")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test3.openremote.app", "Console 1", nil))- state = try configManager.setRealm(realm: "master")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test3.openremote.app", app: "Console 1", realm: "master")))- }-- func test4() async throws {- var state = try await configManager.setDomain(domain: "test4")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test4.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 1")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test4.openremote.app", "Console 1", nil))- state = try configManager.setRealm(realm: nil)- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test4.openremote.app", app: "Console 1", realm: nil)))- }-- func test5() async throws {- var state = try await configManager.setDomain(domain: "test5")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test5.openremote.app", nil))- state = try configManager.setApp(app: "Console")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test5.openremote.app", "Console", nil))- state = try configManager.setRealm(realm: "master")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test5.openremote.app", app: "Console", realm: "master")))- }-- func test6() async throws {- var state = try await configManager.setDomain(domain: "test6")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test6.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 2")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test6.openremote.app", "Console 2", nil))- state = try configManager.setRealm(realm: "master")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test6.openremote.app", app: "Console 2", realm: "master")))- }-- func test7() async throws {- var state = try await configManager.setDomain(domain: "test7")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test7.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 1")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test7.openremote.app", "Console 1", ["master1", "master2"]))- state = try configManager.setRealm(realm: "master1")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test7.openremote.app", app: "Console 1", realm: "master1")))- }-- func test8() async throws {- var state = try await configManager.setDomain(domain: "test8")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test8.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 1")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test8.openremote.app", "Console 1", ["master1", "master2"]))- state = try configManager.setRealm(realm: "master1")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test8.openremote.app", app: "Console 1", realm: "master1")))- }--- func test8_GoBack() async throws {- var state = try await configManager.setDomain(domain: "test8")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test8.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 1")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test8.openremote.app", "Console 1", ["master1", "master2"]))- state = try configManager.setRealm(realm: "master1")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test8.openremote.app", app: "Console 1", realm: "master1")))- state = try configManager.setRealm(realm: "master2")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test8.openremote.app", app: "Console 1", realm: "master2")))- }-- func test9() async throws {- var state = try await configManager.setDomain(domain: "test9")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test9.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 1")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test9.openremote.app", "Console 1", ["master1", "master2"]))- state = try configManager.setRealm(realm: "master1")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test9.openremote.app", app: "Console 1", realm: "master1")))- }-- func test10() async throws {- var state = try await configManager.setDomain(domain: "test10")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test10.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 1")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test10.openremote.app", "Console 1", ["master3", "master4"]))- state = try configManager.setRealm(realm: "master3")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test10.openremote.app", app: "Console 1", realm: "master3")))- }-- func test11() async throws {- var state = try await configManager.setDomain(domain: "test11")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test11.openremote.app", ["Console 2"]))- state = try configManager.setApp(app: "Console 2")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test11.openremote.app", "Console 2", nil))- state = try configManager.setRealm(realm: "master3")- XCTAssertEqual(state, ConfigManagerState.complete(ProjectConfig(domain: "https://test11.openremote.app", app: "Console 2", realm: "master3")))- }-- func test12() async throws {- var state = try await configManager.setDomain(domain: "test12")- XCTAssertEqual(state, ConfigManagerState.selectApp("https://test12.openremote.app", ["Console 1", "Console 2"]))- state = try configManager.setApp(app: "Console 1")- XCTAssertEqual(state, ConfigManagerState.selectRealm("https://test12.openremote.app", "Console 1", nil))- state = try configManager.setRealm(realm: "master1")- 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/FileApiManager.swift b/console/iOS/ORLib/Tests/FileApiManager.swiftdeleted file mode 100644index 4bfea2a38..000000000--- a/console/iOS/ORLib/Tests/FileApiManager.swift+++ /dev/null@@ -1,72 +0,0 @@-//-// FileApiManager.swift-// Tests-//-// Created by Eric Bariaux on 31/08/2022.-//--import Foundation-@testable import ORLib--class FileApiManager: ApiManager {-- let decoder = JSONDecoder()-- private var fixture: Fixture-- public init(baseUrl: String) {- let pattern = #"https://(?<domain>.*)\.openremote\.app"#- do {- let regex = try NSRegularExpression(pattern: pattern, options: [])- let nsrange = NSRange(baseUrl.startIndex..<baseUrl.endIndex, in: baseUrl)- if let match = regex.firstMatch(in: baseUrl, options: [], range: nsrange) {- let nsrange = match.range(withName: "domain")- if nsrange.location != NSNotFound, let range = Range(nsrange, in: baseUrl) {- let domain = baseUrl[range]- if let fixtureFile = Bundle(for: FileApiManager.self).url(forResource: String(domain), withExtension: "json") {- if let fixtureData = try? Data(contentsOf: fixtureFile as URL) {- do {- fixture = try self.decoder.decode(Fixture.self, from: fixtureData)- return- } catch {- print(error)- }- }- }- }- }- } catch {- // Will use default value below- }- fixture = Fixture()- }--- func getConsoleConfig(callback: ResponseBlock<ORConsoleConfig>?) {- }-- public func getConsoleConfig() async throws -> ORConsoleConfig? {- if let returnCode = fixture.consoleConfigReturnCode {- throw ApiManagerError.communicationError(returnCode)- }- return fixture.consoleConfig- }-- public func getApps(callback: ResponseBlock<[String]>?) {- }-- public func getApps() async throws -> [String]? {- if let returnCode = fixture.appsReturnCode {- throw ApiManagerError.communicationError(returnCode)- }- return fixture.apps- }-- public func getAppInfo(appName: String) async throws -> ORAppInfo? {- if let returnCode = fixture.appsInfoReturnCode {- throw ApiManagerError.communicationError(returnCode)- }- return fixture.appsInfo?[appName]- }--}diff --git a/console/iOS/ORLib/Tests/Fixture.swift b/console/iOS/ORLib/Tests/Fixture.swiftdeleted file mode 100644index eb75839b2..000000000--- a/console/iOS/ORLib/Tests/Fixture.swift+++ /dev/null@@ -1,24 +0,0 @@-//-// Fixture.swift-// Tests-//-// Created by Eric Bariaux on 17/09/2022.-//--import Foundation-@testable import ORLib--struct Fixture: Codable {- var consoleConfigReturnCode: Int?- var consoleConfig: ORConsoleConfig?- var appsReturnCode: Int?- var apps: [String]?- var appsInfoReturnCode: Int?- var appsInfo: [String: ORAppInfo]?-- init() {- consoleConfigReturnCode = 404- appsReturnCode = 404- appsInfoReturnCode = 404- }-}diff --git a/console/iOS/ORLib/Tests/Fixtures/Tests.md b/console/iOS/ORLib/Tests/Fixtures/Tests.mddeleted file mode 100644index f50725714..000000000--- a/console/iOS/ORLib/Tests/Fixtures/Tests.md+++ /dev/null@@ -1,58 +0,0 @@-### Test0--DefaultConfig, nothing present--### Test1--ConsoleConfig not asking for app or realm, no apps list -> defaults to manager, no realm--### Test2--ConsoleConfig with a specified app--### Test3--ConsoleConfig with a specified app but requesting the text field to enter an app name -> should still use the specified app--### Test4--ConsoleConfig with no specified app and a list of apps--### Test5--ConsoleConfig with no specified app and a list of apps but requesting the text field to enter an app name--### Test6--ConsoleConfig with no specified app and no allowed apps but apps list available via Apps call--### Test 7--Similar to Test6 but with a list of realm defined for the selected app--### Test 8--Similar to Test7 but with the realms defined for the default app--### Test 9--Similar to Test6 but with a project specific Info.json--### Test 10--Similar to Test 9 but with global override of realms--### Test 11-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-----TODO:-- add test for full URLs entrydiff --git a/console/iOS/ORLib/Tests/Fixtures/test1.json b/console/iOS/ORLib/Tests/Fixtures/test1.jsondeleted file mode 100644index 2c9fee105..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test1.json+++ /dev/null@@ -1,10 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {}- },- "appsReturnCode": 404-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test10.json b/console/iOS/ORLib/Tests/Fixtures/test10.jsondeleted file mode 100644index 406786ee1..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test10.json+++ /dev/null@@ -1,25 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {- "Console 1" : {- "consoleAppIncompatible" : false,- "realms" : ["master3", "master4"],- "providers" : [],- "description" : ""- }- }- },- "apps": ["Console 1", "Console 2"],- "appsInfo" : {- "Console 1" : {- "consoleAppIncompatible" : false,- "realms" : ["master1", "master2"],- "providers" : [],- "description" : ""- }- }-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test11.json b/console/iOS/ORLib/Tests/Fixtures/test11.jsondeleted file mode 100644index bc098a5ec..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test11.json+++ /dev/null@@ -1,18 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {}- },- "apps": ["Console 1", "Console 2"],- "appsInfo" : {- "Console 1" : {- "consoleAppIncompatible" : true,- "realms" : ["master1", "master2"],- "providers" : [],- "description" : ""- }- }-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test12.json b/console/iOS/ORLib/Tests/Fixtures/test12.jsondeleted file mode 100644index 9f3e18c6d..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test12.json+++ /dev/null@@ -1,16 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {- "Console 1" : {- "consoleAppIncompatible" : false,- "providers" : [],- "description" : ""- }- }- },- "apps": ["Console 1", "Console 2"]-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test13.json b/console/iOS/ORLib/Tests/Fixtures/test13.jsondeleted file mode 100644index 19260ff4f..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test13.json+++ /dev/null@@ -1,10 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {}- },- "apps": ["Console 1"]-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test2.json b/console/iOS/ORLib/Tests/Fixtures/test2.jsondeleted file mode 100644index cb58a550a..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test2.json+++ /dev/null@@ -1,11 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : "Console 1",- "allowedApps" : [],- "apps" : {}- },- "appsReturnCode": 404-}-diff --git a/console/iOS/ORLib/Tests/Fixtures/test3.json b/console/iOS/ORLib/Tests/Fixtures/test3.jsondeleted file mode 100644index dfa847266..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test3.json+++ /dev/null@@ -1,10 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : true,- "showRealmTextInput" : false,- "app" : "Console 1",- "allowedApps" : [],- "apps" : {}- },- "appsReturnCode": 404-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test4.json b/console/iOS/ORLib/Tests/Fixtures/test4.jsondeleted file mode 100644index 05457c991..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test4.json+++ /dev/null@@ -1,10 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : ["Console 1", "Console 2"],- "apps" : {}- },- "appsReturnCode": 404-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test5.json b/console/iOS/ORLib/Tests/Fixtures/test5.jsondeleted file mode 100644index c82670dcf..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test5.json+++ /dev/null@@ -1,10 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : true,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : ["Console 1", "Console 2"],- "apps" : {}- },- "appsReturnCode": 404-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test6.json b/console/iOS/ORLib/Tests/Fixtures/test6.jsondeleted file mode 100644index 74ec733e9..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test6.json+++ /dev/null@@ -1,10 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {}- },- "apps": ["Console 1", "Console 2"]-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test7.json b/console/iOS/ORLib/Tests/Fixtures/test7.jsondeleted file mode 100644index a4b4006c0..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test7.json+++ /dev/null@@ -1,17 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {- "Console 1" : {- "consoleAppIncompatible" : false,- "realms" : ["master1", "master2"],- "providers" : [],- "description" : ""- }- }- },- "apps": ["Console 1", "Console 2"]-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test8.json b/console/iOS/ORLib/Tests/Fixtures/test8.jsondeleted file mode 100644index 6a083aa56..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test8.json+++ /dev/null@@ -1,17 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {- "default" : {- "consoleAppIncompatible" : false,- "realms" : ["master1", "master2"],- "providers" : [],- "description" : ""- }- }- },- "apps": ["Console 1", "Console 2"]-}diff --git a/console/iOS/ORLib/Tests/Fixtures/test9.json b/console/iOS/ORLib/Tests/Fixtures/test9.jsondeleted file mode 100644index 9349335e8..000000000--- a/console/iOS/ORLib/Tests/Fixtures/test9.json+++ /dev/null@@ -1,18 +0,0 @@-{- "consoleConfig": {- "showAppTextInput" : false,- "showRealmTextInput" : false,- "app" : null,- "allowedApps" : [],- "apps" : {}- },- "apps": ["Console 1", "Console 2"],- "appsInfo" : {- "Console 1" : {- "consoleAppIncompatible" : false,- "realms" : ["master1", "master2"],- "providers" : [],- "description" : ""- }- }-}diff --git a/console/iOS/ORLib/Tests/Tests.swift b/console/iOS/ORLib/Tests/Tests.swiftdeleted file mode 100644index f4185f5c1..000000000--- a/console/iOS/ORLib/Tests/Tests.swift+++ /dev/null@@ -1,35 +0,0 @@-//-// Tests.swift-// Tests-//-// Created by Eric Bariaux on 31/08/2022.-//--import XCTest--class Tests: XCTestCase {-- override func setUpWithError() throws {- // Put setup code here. This method is called before the invocation of each test method in the class.- }-- override func tearDownWithError() throws {- // Put teardown code here. This method is called after the invocation of each test method in the class.- }-- func testExample() throws {- // This is an example of a functional test case.- // Use XCTAssert and related functions to verify your tests produce the correct results.- // Any test you write for XCTest can be annotated as throws and async.- // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.- // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.- }-- func testPerformanceExample() throws {- // This is an example of a performance test case.- measure {- // Put the code you want to measure the time of here.- }- }--}