Apologies for the repost, but thought to ask here ...
# compose-ios
j
Apologies for the repost, but thought to ask here to see if it gets a bit more traction. Im having a bit of trouble pulling in external ios dependencies into the
compose-multiplatform-ios-android-template
and wondering if someone can point me in the right direction. I have the vanilla template and I’m trying to pull in
GoogleMLKit/BarcodeScanning ~> 3.2.0
pod and cannot get the ios target to run correctly from AS. If I open the app in xCode its running fine (minus some ios deployment target warnings) but from AS i get:
Copy code
warning: None of the architectures in ARCHS (arm64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64e, i386, x86_64) which is not in EXCLUDED_ARCHS (arm64). (in target 'iosApp' from project 'iosApp')
…
/path/to/project/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks.sh: line 132: ARCHS[@]: unbound variable
I tried a few possible fixes I found, like making sure the launch config is point at the workspace, and removing the excluded architectures from the iosApp build settings in xcode but still not having much luck.
👍 2
If i remove the excluded archs like Apple suggests I get to the
framework not found Pods_iosApp
error like Marco did but in my case my launch config points at
iosApp.xcworkspace
so i don’t think this is the issue. (edited) We are able to get it to run fine from AS on a intel based mac so I think this might be a arm64 issue.
d
Maybe this is a problem related to JDK you are using. By default, Android Studio should properly use JDK based on your Mac architecture, but also it may be configured in settings. Maybe this is not a ARM64 JDK in your AndroidStudio Gradle settings ?
In my case a can see directly "jdk17/darwin-arm64" in the JDK path
j
Hmm so mine doesn’t have the arch in the path, however the JDK configured in settings points to this release:
Copy code
JAVA_VERSION="17.0.7"
...
OS_ARCH="aarch64"
OS_NAME="Darwin"
d
I think, JDK is correct
Can you please install kdoctor:
brew install kdoctor
Run it in project directory and copy console output
kdoctor
Here you can find additional info about kdoctor tool: https://github.com/Kotlin/kdoctor
j
Yeah, kdoc is reporting all green
Copy code
kdoctor
Environment diagnose (to see all details, use -v option):
[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✓] Cocoapods

Conclusion:
  ✓ Your system is ready for Kotlin Multiplatform Mobile Development!
FWIW I’m able to run the template, and the chat and imageViewer examples. Its just when I add the mlkit cocoapod it fails in AS.
d
@Jordan Petersen Can you please share minimal reproducible sample on GitHub?
j
Yeah, here is a sample repo with the two dependencies and has the issue. https://github.com/gr347wh173n0r7h/fantastic-octo-potato