From 2d3ea8f4ca05cfc49792fc4a2c472e0a3f62bea5 Mon Sep 17 00:00:00 2001 From: ilyas ipek <54671252+ilyasipek@users.noreply.github.com> Date: Fri, 24 May 2024 17:30:59 +0300 Subject: [PATCH 1/4] Add the missing 'contacts' permission to README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8c8c0f9..5191e88 100755 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ The full list can be found in `dev.icerock.moko.permissions.Permission` enum. * Bluetooth Scan: **Permission.BLUETOOTH_SCAN** * Bluetooth Connect: **Permission.BLUETOOTH_CONNECT** * Bluetooth Advertise: **Permission.BLUETOOTH_ADVERTISE** +* Contacts: **Permission.CONTACTS** * Motion: **Permission.MOTION** ## Usage From f8f5607356b33edb4fec6c6b5ec8396e3252ee70 Mon Sep 17 00:00:00 2001 From: Andrey Dorofeev Date: Wed, 16 Oct 2024 15:50:05 +0700 Subject: [PATCH 2/4] #128 fixed usage of deprecated api --- .../permissions/ios/PermissionsController.kt | 2 +- .../src/Resources/Base.lproj/Main.storyboard | 22 ++++++++++++++----- sample/ios-app/src/TestViewController.swift | 4 ++++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/permissions/src/iosMain/kotlin/dev/icerock/moko/permissions/ios/PermissionsController.kt b/permissions/src/iosMain/kotlin/dev/icerock/moko/permissions/ios/PermissionsController.kt index 45485a2..6c74eac 100755 --- a/permissions/src/iosMain/kotlin/dev/icerock/moko/permissions/ios/PermissionsController.kt +++ b/permissions/src/iosMain/kotlin/dev/icerock/moko/permissions/ios/PermissionsController.kt @@ -32,7 +32,7 @@ class PermissionsController : PermissionsControllerProtocol { override fun openAppSettings() { val settingsUrl: NSURL = NSURL.URLWithString(UIApplicationOpenSettingsURLString)!! - UIApplication.sharedApplication.openURL(settingsUrl) + UIApplication.sharedApplication.openURL(settingsUrl, mapOf(), null) } private fun getDelegate(permission: Permission): PermissionDelegate { diff --git a/sample/ios-app/src/Resources/Base.lproj/Main.storyboard b/sample/ios-app/src/Resources/Base.lproj/Main.storyboard index e97e081..282da6a 100755 --- a/sample/ios-app/src/Resources/Base.lproj/Main.storyboard +++ b/sample/ios-app/src/Resources/Base.lproj/Main.storyboard @@ -1,11 +1,9 @@ - - - - + + - + @@ -37,7 +35,7 @@ - + + diff --git a/sample/ios-app/src/TestViewController.swift b/sample/ios-app/src/TestViewController.swift index 76e9c6d..87ee542 100755 --- a/sample/ios-app/src/TestViewController.swift +++ b/sample/ios-app/src/TestViewController.swift @@ -25,6 +25,10 @@ class TestViewController: UIViewController { @IBAction func onPermissionPressed() { viewModel.onRequestPermissionButtonPressed() } + + @IBAction func onOpenSettingsPressed() { + PermissionsController().openAppSettings() + } } extension TestViewController: SampleViewModelEventListener { From 19ecc41b0da27236172e5f4d597daf079801c92a Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Thu, 17 Oct 2024 15:56:30 +0700 Subject: [PATCH 3/4] #128 fix ci --- sample/mpp-library/MultiPlatformLibrary.podspec | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sample/mpp-library/MultiPlatformLibrary.podspec b/sample/mpp-library/MultiPlatformLibrary.podspec index e736430..9367fcb 100644 --- a/sample/mpp-library/MultiPlatformLibrary.podspec +++ b/sample/mpp-library/MultiPlatformLibrary.podspec @@ -19,7 +19,6 @@ Pod::Spec.new do |spec| 'KOTLIN_FRAMEWORK_BUILD_TYPE[config=*elease]' => 'release', 'CURENT_SDK[sdk=iphoneos*]' => 'iphoneos', 'CURENT_SDK[sdk=iphonesimulator*]' => 'iphonesimulator', - 'CURENT_SDK[sdk=macosx*]' => 'macos' } spec.script_phases = [ @@ -37,21 +36,17 @@ fi if [ "$CURENT_SDK" == "iphoneos" ]; then TARGET="Ios" ARCH="Arm64" -elif [ "$CURENT_SDK" == "macos" ]; then - TARGET="Macos" - if [ "$NATIVE_ARCH" == "arm64" ]; then - ARCH="Arm64" - else - ARCH="X64" - fi -else - if [ "$NATIVE_ARCH" == "arm64" ]; then +elif [ "$CURENT_SDK" == "iphonesimulator" ]; then + if [ "$ARCHS" == "arm64" ]; then TARGET="IosSimulator" ARCH="Arm64" else TARGET="Ios" ARCH="X64" fi +else + echo "unsupported $CURENT_SDK" + exit 1 fi MPP_PROJECT_ROOT="$SRCROOT/../../mpp-library" From fb6c780b56c07beb020d5883c9dbb064d4bb7900 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Thu, 17 Oct 2024 15:57:02 +0700 Subject: [PATCH 4/4] up version --- README.md | 6 +++--- gradle/libs.versions.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5191e88..aa53a7b 100755 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ allprojects { project **build.gradle** ```groovy dependencies { - commonMainApi("dev.icerock.moko:permissions:0.18.0") + commonMainApi("dev.icerock.moko:permissions:0.18.1") // compose multiplatform - commonMainApi("dev.icerock.moko:permissions-compose:0.18.0") // permissions api + compose extensions + commonMainApi("dev.icerock.moko:permissions-compose:0.18.1") // permissions api + compose extensions - commonTestImplementation("dev.icerock.moko:permissions-test:0.18.0") + commonTestImplementation("dev.icerock.moko:permissions-test:0.18.1") } ``` diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f7359ab..fd2dcd3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,7 +9,7 @@ androidLifecycleVersion = "2.2.0" androidCoreTestingVersion = "2.2.0" coroutinesVersion = "1.6.4" mokoMvvmVersion = "0.16.0" -mokoPermissionsVersion = "0.18.0" +mokoPermissionsVersion = "0.18.1" composeJetBrainsVersion = "1.5.1" lifecycleRuntime = "2.6.1" composeUiVersion = "1.0.1"