diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 5cc5414..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/README.md b/README.md
index 4ddbbe6..cc4f474 100644
--- a/README.md
+++ b/README.md
@@ -7,13 +7,25 @@ Provides a method and a stream which calls on managed app configuration changes.
## Additional Information
+### Android:
+
https://developer.android.com/work/managed-configurations
-### Test on Android:
+#### How to Test
It could be that you need to factory reset your android device before installing TestDPC for testing.
* https://github.com/googlesamples/android-testdpc
* https://developer.android.com/work/guide#testing
+### iOS/macOS
+https://developer.apple.com/documentation/foundation/nsuserdefaults#2926901
+
+#### How to Test
+
+Apple does not provide a dev environment to test managed app configuration so you will need to use one of the available
+MDM provider. This package was created to work with [Relution](https://relution.io).
+You can create a free Account and enroll up to 5 devices to test your implementation.
+
+For more information check out the documentation of the used MDM provider how to add managed app configuration to your app.
## How to use
diff --git a/android/build.gradle b/android/build.gradle
index 6878afc..f0c902a 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -2,14 +2,14 @@ group 'io.mway.managed_configurations'
version '1.0-SNAPSHOT'
buildscript {
- ext.kotlin_version = '1.9.21'
+ ext.kotlin_version = '2.0.20'
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.1.2'
+ classpath 'com.android.tools.build:gradle:8.7.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -17,7 +17,7 @@ buildscript {
rootProject.allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
}
@@ -28,12 +28,13 @@ android {
if (project.android.hasProperty('namespace')) {
namespace 'io.mway.managed_configurations'
}
- compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
+
defaultConfig {
+ compileSdk 31
minSdkVersion 21
}
@@ -44,7 +45,6 @@ android {
}
dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'com.google.code.gson:gson:2.8.9'
+ implementation 'com.google.code.gson:gson:2.11.0'
implementation 'androidx.enterprise:enterprise-feedback:1.1.0'
}
diff --git a/darwin/Classes/ManagedConfigurationsPlugin.swift b/darwin/Classes/ManagedConfigurationsPlugin.swift
index 9d42055..48c0e67 100644
--- a/darwin/Classes/ManagedConfigurationsPlugin.swift
+++ b/darwin/Classes/ManagedConfigurationsPlugin.swift
@@ -38,7 +38,7 @@ public class ManagedConfigurationsPlugin: NSObject, FlutterPlugin {
}
/**
- Handles the getManagedConfiguration method ivoked by flutter side.
+ Handles the getManagedConfiguration method invoked by flutter side.
Writes the managed configuration in the result as json converted to String
If something fails returns empty json string ("{}")
*/
@@ -63,7 +63,7 @@ public class ManagedConfigurationsPlugin: NSObject, FlutterPlugin {
Used to handle the Event channel
On Flutter stream subscribe creates an observer on UsersDefault.
Calls on changes the mdConfigChange method
- Its not necassary to remove this observer as it will anyway removed if not used
+ Its not necessary to remove this observer as it will anyway removed if not used
*/
class SwiftStreamHandler: NSObject, FlutterStreamHandler {
/// save the sink as we need it to put the changes in it
@@ -81,7 +81,7 @@ class SwiftStreamHandler: NSObject, FlutterStreamHandler {
}
/**
- handles the notification if something happend on UserDefaults
+ handles the notification if something happened on UserDefaults
Extracts the managed configuration and converts them to json String. Checks if something changed.
If so, puts in the sink (Flutter side will be notified)
*/
@@ -90,7 +90,6 @@ class SwiftStreamHandler: NSObject, FlutterStreamHandler {
let jsonData = try? JSONSerialization.data(withJSONObject: managedConf, options: .prettyPrinted),
let jsonString = String(data: jsonData, encoding: .utf8),
let events = eventsVariable{
- print("calling dies das")
if lastJsonString == nil {
lastJsonString = jsonString
events(jsonString)
diff --git a/darwin/Resources/PrivacyInfo.xcprivacy b/darwin/Resources/PrivacyInfo.xcprivacy
new file mode 100644
index 0000000..ee81a11
--- /dev/null
+++ b/darwin/Resources/PrivacyInfo.xcprivacy
@@ -0,0 +1,26 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyTrackingDomains
+
+
+ NSPrivacyCollectedDataTypes
+
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryUserDefaults
+ NSPrivacyAccessedAPITypeReasons
+
+ AC6B.1
+
+
+
+
+
+
diff --git a/darwin/managed_configurations.podspec b/darwin/managed_configurations.podspec
index e51e531..de9c727 100644
--- a/darwin/managed_configurations.podspec
+++ b/darwin/managed_configurations.podspec
@@ -14,6 +14,7 @@ A new flutter plugin project.
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
+ s.resource_bundles = {'package_name_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
s.platform = :ios, '9.0'
s.platform = :osx, '10.11'