I recently wrote an article on Compose Multiplatfo...
# compose-ios
k
I recently wrote an article on Compose Multiplatform where I walked through a real-world implementation, discussed the challenges I faced, and provided insights on whether Compose Multiplatform is ready for production in it's current state. I’d love to hear your thoughts and opinions on this. https://medium.com/proandroiddev/exploring-the-viability-of-cross-platform-ui-development-with-compose-multiplatform-c5be0608b69d
👀 2
K 4
c
Announcements should go to #feed
k
Could you show the string resources which don't work with the compose multiplatform?
k
@Konstantin Tskhovrebov Sure, this is one example in the article:
Copy code
<string name="signup_email_question">What\'s your email?</string>
When escaping the apostrophe with the backslash character, the apostrophe is still displayed in the UI. The only way I was able to get it to work was by using unicode characters. In this case, the unicode for apostrophe is
\u0027s
, so the string resource now becomes:
Copy code
<string name="signup_email_question">What\u0027s your email?</string>
This is the only way I was able to make it work. These are all the strings used in the sample app. I had to replace all usages of apostrophes with unicode characters: https://github.com/KwabenBerko/Spotify-2021-Compose-Multiplatform/blob/main/common/src/commonMain/composeResources/values/strings.xml
n
When escaping the apostrophe with the backslash character
What if you don't escape the apostrophe and just use it as is?
👍 1
k
image.png
@Kwabena Berko it would be good to update the article
Ping?
sorry 1
k
Sorry for the late reply. Not escaping the apostrophe fails the build with the following error:
Can not extract resource from com.android.aaptcompiler
@Konstantin Tskhovrebov It seems you're running it on a desktop project. Can you try building and running on either Android or iOS?
k
Copy code
kotlin = "2.0.0"
compose = "1.6.10"
agp = "8.2.2"
@Kwabena Berko there shouldn't be the problem!
k
Interesting 🤔 So, why does mine fail?
I even get an IDE error as well as a build error:
Also, for context, I'm using:
Android Studio Koala | 2024.1.1 Patch 1
k
I don't know. Could you file the issue and attach the reproducer? https://youtrack.jetbrains.com/newIssue?project=CMP
k
Sure, will do
k
Closed
and waiting the article update please wait 😉
k
Awesome. Thank you very much! I will update the article very soon. I will let you know when I do that as well
👍 1
Article has been updated. Thank you very much for helping to resolve this. I really appreciate it.
🙏 1
👍 1