Repository: openMF/kmp-project-template
Pull request #48: fix: Configure iOS project to connect cmp-shared  module
Author: login: HekmatullahAmin
Created: 2025-03-11T19:22:57Z | Merged: 2025-03-13T10:47:51Z

[KMPPT-1](https://mifosforge.jira.com/browse/KMPPT-1)

<img width="345" alt="Screenshot 2025-03-11 at 19 09 45" src="https://github.com/user-attachments/assets/caeb25d9-aae4-47e0-a6ba-9d2810bccaef" />


[KMPPT-1]: https://mifosforge.jira.com/browse/KMPPT-1?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ


Diff:
diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml
index 4e5bc23c..ca253964 100644
--- a/.github/workflows/pr-check.yml
+++ b/.github/workflows/pr-check.yml
@@ -89,4 +89,4 @@ jobs:
       desktop_package_name: 'cmp-desktop' # <-- Change Your Desktop Package Name
       web_package_name: 'cmp-web' # <-- Change Your Web Package Name
       ios_package_name: 'cmp-ios' # <-- Change Your iOS Package Name
-      build_ios: false # <-- Change to 'false' if you don't want to build iOS
+      build_ios: true # <-- Change to 'false' if you don't want to build iOS
diff --git a/Gemfile.lock b/Gemfile.lock
index 3d88467a..b485febd 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -9,21 +9,22 @@ GEM
       public_suffix (>= 2.0.2, < 7.0)
     artifactory (3.0.17)
     atomos (0.1.3)
-    aws-eventstream (1.3.0)
-    aws-partitions (1.1029.0)
-    aws-sdk-core (3.214.1)
+    aws-eventstream (1.3.2)
+    aws-partitions (1.1065.0)
+    aws-sdk-core (3.220.1)
       aws-eventstream (~> 1, >= 1.3.0)
       aws-partitions (~> 1, >= 1.992.0)
       aws-sigv4 (~> 1.9)
+      base64
       jmespath (~> 1, >= 1.6.1)
-    aws-sdk-kms (1.96.0)
-      aws-sdk-core (~> 3, >= 3.210.0)
+    aws-sdk-kms (1.99.0)
+      aws-sdk-core (~> 3, >= 3.216.0)
       aws-sigv4 (~> 1.5)
-    aws-sdk-s3 (1.176.1)
-      aws-sdk-core (~> 3, >= 3.210.0)
+    aws-sdk-s3 (1.182.0)
+      aws-sdk-core (~> 3, >= 3.216.0)
       aws-sdk-kms (~> 1)
       aws-sigv4 (~> 1.5)
-    aws-sigv4 (1.10.1)
+    aws-sigv4 (1.11.0)
       aws-eventstream (~> 1, >= 1.0.2)
     babosa (1.0.4)
     base64 (0.2.0)
@@ -33,7 +34,7 @@ GEM
     commander (4.6.0)
       highline (~> 2.0.0)
     declarative (0.0.20)
-    digest-crc (0.6.5)
+    digest-crc (0.7.0)
       rake (>= 12.0.0, < 14.0.0)
     domain_name (0.6.20240107)
     dotenv (2.8.1)
@@ -67,7 +68,7 @@ GEM
     faraday-retry (1.0.3)
     faraday_middleware (1.2.1)
       faraday (~> 1.0)
-    fastimage (2.3.1)
+    fastimage (2.4.0)
     fastlane (2.226.0)
       CFPropertyList (>= 2.3, < 4.0.0)
       addressable (>= 2.8, < 3.0.0)
@@ -137,12 +138,12 @@ GEM
       google-apis-core (>= 0.11.0, < 2.a)
     google-apis-storage_v1 (0.31.0)
       google-apis-core (>= 0.11.0, < 2.a)
-    google-cloud-core (1.7.1)
+    google-cloud-core (1.8.0)
       google-cloud-env (>= 1.0, < 3.a)
       google-cloud-errors (~> 1.0)
     google-cloud-env (1.6.0)
       faraday (>= 0.17.3, < 3.0)
-    google-cloud-errors (1.4.0)
+    google-cloud-errors (1.5.0)
     google-cloud-storage (1.47.0)
       addressable (~> 2.8)
       digest-crc (~> 0.4)
@@ -160,15 +161,17 @@ GEM
     highline (2.0.3)
     http-cookie (1.0.8)
       domain_name (~> 0.5)
-    httpclient (2.8.3)
+    httpclient (2.9.0)
+      mutex_m
     jmespath (1.6.2)
-    json (2.9.1)
+    json (2.10.2)
     jwt (2.10.1)
       base64
     mini_magick (4.13.2)
     mini_mime (1.1.5)
     multi_json (1.15.0)
     multipart-post (2.4.1)
+    mutex_m (0.3.0)
     nanaimo (0.4.0)
     naturally (2.2.1)
     nkf (0.2.0)
@@ -182,10 +185,10 @@ GEM
       trailblazer-option (>= 0.1.1, < 0.2.0)
       uber (< 0.2.0)
     retriable (3.1.2)
-    rexml (3.4.0)
+    rexml (3.4.1)
     rouge (3.28.0)
     ruby2_keywords (0.0.5)
-    rubyzip (2.3.2)
+    rubyzip (2.4.1)
     security (0.1.5)
     signet (0.19.0)
       addressable (~> 2.8)
@@ -220,8 +223,8 @@ GEM
       xcpretty (~> 0.2, >= 0.0.7)
 
 PLATFORMS
+  arm64-darwin-24
   ruby
-  x64-mingw-ucrt
 
 DEPENDENCIES
   fastlane
@@ -232,4 +235,4 @@ RUBY VERSION
    ruby 3.3.5p100
 
 BUNDLED WITH
-   2.5.23
+   2.6.5
diff --git a/cmp-android/prodRelease-badging.txt b/cmp-android/prodRelease-badging.txt
index 2e4b9b42..5caf1b7e 100644
--- a/cmp-android/prodRelease-badging.txt
+++ b/cmp-android/prodRelease-badging.txt
@@ -1,4 +1,4 @@
-package: name='cmp.android.app' versionCode='1' versionName='2025.3.3-beta.0.3' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
+package: name='cmp.android.app' versionCode='1' versionName='2025.3.3-beta.0.5' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
 sdkVersion:'26'
 targetSdkVersion:'34'
 uses-permission: name='android.permission.INTERNET'
diff --git a/cmp-ios/Configuration/Config.xcconfig b/cmp-ios/Configuration/Config.xcconfig
index 6a64cfd8..17d58e84 100644
--- a/cmp-ios/Configuration/Config.xcconfig
+++ b/cmp-ios/Configuration/Config.xcconfig
@@ -1,3 +1,3 @@
-TEAM_ID=
+TEAM_ID=L432S2FZP5
 BUNDLE_ID=cmp.ios
 APP_NAME=iOSApp
diff --git a/cmp-ios/iosApp.xcodeproj/project.pbxproj b/cmp-ios/iosApp.xcodeproj/project.pbxproj
index 7ab73fc8..67ed1d05 100644
--- a/cmp-ios/iosApp.xcodeproj/project.pbxproj
+++ b/cmp-ios/iosApp.xcodeproj/project.pbxproj
@@ -17,7 +17,7 @@
 		058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
 		2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = "<group>"; };
-		7555FF7B242A565900829871 /* MifosPay.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MifosPay.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		7555FF7B242A565900829871 /* iOSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
 		7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
@@ -62,7 +62,7 @@
 		7555FF7C242A565900829871 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				7555FF7B242A565900829871 /* MifosPay.app */,
+				7555FF7B242A565900829871 /* iOSApp.app */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -104,10 +104,8 @@
 			dependencies = (
 			);
 			name = iosApp;
-			packageProductDependencies = (
-			);
 			productName = iosApp;
-			productReference = 7555FF7B242A565900829871 /* MifosPay.app */;
+			productReference = 7555FF7B242A565900829871 /* iOSApp.app */;
 			productType = "com.apple.product-type.application";
 		};
 /* End PBXNativeTarget section */
@@ -135,8 +133,6 @@
 				Base,
 			);
 			mainGroup = 7555FF72242A565900829871;
-			packageReferences = (
-			);
 			productRefGroup = 7555FF7C242A565900829871 /* Products */;
 			projectDirPath = "";
 			projectRoot = "";
@@ -175,7 +171,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n  echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n  exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :mifospay-shared:embedAndSignAppleFrameworkForXcode\n";
+			shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n  echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n  exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :cmp-shared:embedAndSignAppleFrameworkForXcode\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
diff --git a/cmp-ios/iosApp.xcodeproj/project.xcworkspace/xcuserdata/hekmatullahamin.xcuserdatad/UserInterfaceState.xcuserstate b/cmp-ios/iosApp.xcodeproj/project.xcworkspace/xcuserdata/hekmatullahamin.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 00000000..1f88f43d
Binary files /dev/null and b/cmp-ios/iosApp.xcodeproj/project.xcworkspace/xcuserdata/hekmatullahamin.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/cmp-ios/iosApp.xcodeproj/xcuserdata/hekmatullahamin.xcuserdatad/xcschemes/xcschememanagement.plist b/cmp-ios/iosApp.xcodeproj/xcuserdata/hekmatullahamin.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 00000000..56b5955f
--- /dev/null
+++ b/cmp-ios/iosApp.xcodeproj/xcuserdata/hekmatullahamin.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,14 @@
+<?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>SchemeUserState</key>
+	<dict>
+		<key>iosApp.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+</dict>
+</plist>


Reviews:
user: login: niyajali
body: Also if you're able to build the iOS application then enable the workflow here..

https://github.com/openMF/kmp-project-template/blob/bd6789977c795be43eeb74bb883f8f0352c2f46e/.github/workflows/pr-check.yml#L92
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-03-11T20:54:45Z
user: login: therajanmaurya
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-03-11T21:35:42Z
user: login: therajanmaurya
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-12T16:53:39Z
user: login: niyajali
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-13T10:47:43Z

Review comments:
diff_hunk: @@ -321,7 +321,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
-				DEVELOPMENT_TEAM = "${TEAM_ID}";
+				DEVELOPMENT_TEAM = L432S2FZP5;
path: cmp-ios/iosApp.xcodeproj/project.pbxproj
user: login: niyajali
body: I’m not sure, but previously, we were able to pass the team ID from another config file. I haven’t tried it yet, but I think we didn’t pass the team ID before, so the IDE used the variable. Now that you’ve provided the team ID, it’s directly applying the value instead of the variable. Could you look into this?

Yes, I just checked—we can pass the value from the following config file, and it will use the variable instead of hardcoded values for the team ID:

`cmp-ios/Configuration/Config.xcconfig`
created_at: 2025-03-11T20:48:16Z
author_association: COLLABORATOR
diff_hunk: @@ -321,7 +321,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
-				DEVELOPMENT_TEAM = "${TEAM_ID}";
+				DEVELOPMENT_TEAM = L432S2FZP5;
path: cmp-ios/iosApp.xcodeproj/project.pbxproj
user: login: therajanmaurya
body: We need to manage the TEAM_ID somewhere else so we can connect here. 
created_at: 2025-03-11T21:35:12Z
author_association: MEMBER
diff_hunk: @@ -351,7 +351,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
-				DEVELOPMENT_TEAM = "${TEAM_ID}";
+				DEVELOPMENT_TEAM = L432S2FZP5;
path: cmp-ios/iosApp.xcodeproj/project.pbxproj
user: login: therajanmaurya
body: same
created_at: 2025-03-11T21:35:20Z
author_association: MEMBER

PR comments:
user: login: niyajali
created_at: 2025-03-11T21:00:13Z
body: @HekmatullahAmin Install fastlane and Ruby 3.5, then run the fastlane command to check if you can build the iOS application locally if you have a teamID. Previously, we didn’t have the teamID and were unable to test the fastlane configuration. Let me know the results.

Refer to the Fastlane documentation: [https://docs.fastlane.tools/](https://docs.fastlane.tools/).

Instructions on how to run fastlane tasks can be found in the `fastlane/Readme.md` file.
author_association: COLLABORATOR
user: login: HekmatullahAmin
created_at: 2025-03-11T22:27:05Z
body: @niyajali my ruby version is `2.6.10p210` and receive the following result after running fastlane:
## video
https://github.com/user-attachments/assets/4d2418d1-9096-43ea-bf91-651e6c403733

## screenshots:
<img width="1357" alt="Screenshot 2025-03-11 at 22 00 30" src="https://github.com/user-attachments/assets/114e468f-c7cf-402a-ad02-9fc512e93bcd" />

<img width="1357" alt="Screenshot 2025-03-11 at 22 00 44" src="https://github.com/user-attachments/assets/db9fbe66-89ba-44d8-aeea-7a18103831e3" />

<img width="1357" alt="Screenshot 2025-03-11 at 22 00 54" src="https://github.com/user-attachments/assets/0fe56ded-3bf8-4bb5-a19e-0ad1e6a6ce70" />



author_association: MEMBER
user: login: niyajali
created_at: 2025-03-12T11:14:39Z
body: @HekmatullahAmin run the fastlane jobs like `bundle exec fastlane ios build_ios`
author_association: COLLABORATOR
user: login: HekmatullahAmin
created_at: 2025-03-12T15:27:36Z
body: @niyajali below is the result after running `bundle exec fastlane ios build_ios`
<img width="1000" alt="Screenshot 2025-03-12 at 15 25 22" src="https://github.com/user-attachments/assets/89063929-88a3-4afb-8179-dec9f0899985" />
<img width="1000" alt="Screenshot 2025-03-12 at 15 25 38" src="https://github.com/user-attachments/assets/c742532e-ec7a-49b1-a624-357840444bfa" />
<img width="1000" alt="Screenshot 2025-03-12 at 15 25 47" src="https://github.com/user-attachments/assets/b75d2a7d-9817-436a-ac95-9aa8853ed818" />
<img width="1000" alt="Screenshot 2025-03-12 at 15 25 53" src="https://github.com/user-attachments/assets/69fba1f9-9ba1-45b2-a85d-938cd3f1feb0" />

author_association: MEMBER
user: login: HekmatullahAmin
created_at: 2025-03-13T10:20:12Z
body: @therajanmaurya , @niyajali if it looks good then kindly merge it
author_association: MEMBER