https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
a

Alper Tekin

04/09/2023, 9:48 PM
Hi, I use shared code via swift package in iOS. I can successfully use moko-resources after adding the script to copy resources to app. Although I see the resources(Localizable.strings) included in the SPM bundle, why isn’t it possible to reach them without the script we use in xcode? What am I missing?
a

alex009

04/10/2023, 3:53 AM
hi. custom script required only in case of
static
framework usage. if you change your framework to
isStatic = false
in gradle - your framework will save all bundles in application too. but static frameworks can't have any resources. it's not our limits - it's apple limits
a

Alper Tekin

04/12/2023, 8:48 PM
I already use
isStatic = false
. Successfully call the resource like
OR.strings().my_string.desc().localized()
and run the app. But receiving following error after launch (without using the script):
Uncaught Kotlin exception: kotlin.IllegalArgumentException: bundle with identifier <http://com.organtis.shared.MR|com.organtis.shared.MR> not found


    at 0   Organtis                            0x10bdf27c6        kfun:dev.icerock.moko.resources.utils#loadableBundle__at__platform.Foundation.NSBundle.Companion(kotlin.String){}platform.Foundation.NSBundle + 3734 
    at 1   Organtis                            0x10be1784c        kfun:com.organtis.shared.OR.$<init>$lambda$0$FUNCTION_REFERENCE$1.invoke#internal + 124 
    at 2   Organtis                            0x10bb5689b        kfun:kotlin.native.concurrent.SynchronizedLazyImpl#<get-value>(){}1:0 + 1211 
    at 3   Organtis                            0x10be0a41a        kfun:com.organtis.shared.OR.<get-bundle>#internal + 186 
    at 4   Organtis                            0x10be0a6fa        kfun:com.organtis.shared.OR.strings#<init>(){} + 714 
    at 5   Organtis                            0x10bfe33ff        objc2kotlin.2821 + 991 
    at 6   Organtis                            0x10b7bf0fa        $sSo15SharedORStringsCABycfCTO + 26 
    at 7   Organtis                            0x10b7be6f0        $s10HomeModule0A9PresenterC11prepareApps33_6E3CB8679A12B9E99F21727465D80D59LLyyF + 4096 
    at 8   Organtis                            0x10b7bf7d5        $s10HomeModule0A9PresenterC15createObserversyyFySo15SharedPagedListCySo0F3AppCGSgcfU0_ + 1125 
    at 9   Organtis                            0x10b6c2490        $s9CoreUtils12listenValues_9onLoading0E7Success0E5Error0E5Empty7Combine11Cancellable_pSo17SharedFlowAdapterCySo0L9ViewStateCyxGG_ySbcyxSgcySSSgcySbctRlzClFyAMcfU0_ + 352 
    at 10  Organtis                            0x10b6c2809        $s9CoreUtils12listenValues_9onLoading0E7Success0E5Error0E5Empty7Combine11Cancellable_pSo17SharedFlowAdapterCySo0L9ViewStateCyxGG_ySbcyxSgcySSSgcySbctRlzClFyAMcfU0_TA + 73 
    at 11  Combine                             0x10e4a0de2        $s7Combine11SubscribersO4SinkC7receiveyAC6DemandVxF + 82 
    at 12  Combine                             0x10e4a149f        $s7Combine11SubscribersO4SinkCy_xq_GAA10SubscriberA2aGP7receiveyAC6DemandV5InputQzFTW + 15 
    at 13  Combine                             0x10e4d83ae        $s7Combine10PublishersO9ReceiveOnV5Inner33_1178A6B2012BC46DB46053E713A746B4LLC7receiveyAA11SubscribersO6DemandV6OutputQzFyycfU_ + 222 
    at 14  libswiftDispatch.dylib              0x10eb24cc8        $sIeg_IeyB_TR + 24 
    at 15  libdispatch.dylib                   0x111efc815        _dispatch_call_block_and_release + 11 
    at 16  libdispatch.dylib                   0x111efda5a        _dispatch_client_callout + 7 
    at 17  libdispatch.dylib                   0x111f0c324        _dispatch_main_queue_drain + 1168 
    at 18  libdispatch.dylib                   0x111f0be85        _dispatch_main_queue_callback_4CF + 30 
    at 19  CoreFoundation                      0x1102c9ed4        __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8 
    at 20  CoreFoundation                      0x1102c46c9        __CFRunLoopRun + 2760 
    at 21  CoreFoundation                      0x1102c3703        CFRunLoopRunSpecific + 561 
    at 22  GraphicsServices                    0x11bd80c8d        GSEventRunModal + 138 
    at 23  UIKitCore                           0x12b04f659        -[UIApplication _run] + 927 
    at 24  UIKitCore                           0x12b0542b4        UIApplicationMain + 100 
    at 25  libswiftUIKit.dylib                 0x1100c4cc1        $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 97 
    at 26  Organtis                            0x10b5e6087        $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 103 
    at 27  Organtis                            0x10b5e6016        $s8Organtis11AppDelegateC5$mainyyFZ + 38 
    at 28  Organtis                            0x10b5e80a7        main + 23 
    at 29  dyld                                0x10d8b1f20        0x0 + 4522188576 
    at 30  ???                                 0x11c06351d        0x0 + 4765136157
a

alex009

04/13/2023, 3:50 AM
show please gradle config where you set isStatic = false
a

Alper Tekin

04/13/2023, 7:09 PM
listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach {
        it.binaries.framework {
            baseName = "Organtis"
            isStatic = false
            export("dev.icerock.moko:resources:0.20.1")
        }
    }
I feel like it doesn’t effect. Currently, using
0.20.1
and gradle
7.6
a

alex009

04/14/2023, 2:58 AM
Maybe you have multiple framework compilations? One this with dynamic and one another for spm. Show please ./gradlew tasks of module where framework configured
a

Alper Tekin

04/15/2023, 4:04 PM
🤦‍♂️ I think you’re right. I was supposing
multiplatformSwiftPackage
plugin is using the one I set above but not 🙂 On the other hand, I can’t make non-static because of
dev.gitlive:firebase-auth
need to find a solution for it first and then will give a try. Thank you so much 🙋‍♂️