https://kotlinlang.org logo
#library-development
Title
# library-development
k

Kumar

09/20/2023, 12:29 PM
HI Devs, I am trying to create my own library for my project, Please help me how to create KMP library for iOS and Android. Please suggest me reference links
c

CLOVIS

09/20/2023, 9:06 PM
What have you already done, and what are you trying to do? • do you have a configured Gradle project? • does it have all platforms you want already? • how you published your library to MavenLocal? • are you trying to publish to MavenCentral?
k

Kumar

09/21/2023, 6:09 AM
No, @CLOVIS, I am new to this concept I am working Kotlin Multiplatform project from last 1 and 1/2 year. • I don't know KMP Library gradle configuration • I need only iOS and Android platform • Moven Local new to me Please share document or tutorial
c

CLOVIS

09/21/2023, 7:24 AM
You should start with this, and ask if you have any questions
k

Kumar

09/21/2023, 10:33 AM
👍
HI @CLOVIS Now I am able to generate the .jar, .aar, .xcframework using KMP Library Upto here I am good. Now I am trying to consume those .jar, .aar in native android and .xcframework in native iOS 1. In iOS am able to import the share code. 2. while running the app, I am getting below error 3. dyld: Library not loaded: @rpath/shared.framework/shared 4. Reason: image not found 5. dyld: launch, loading dependent libraries 6. DYLD_LIBRARY_PATH=/usr/lib/system/introspection 7. DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib/Developer/usr/lib/libMainThreadChecker.dylib/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
c

CLOVIS

10/05/2023, 8:58 AM
Is the Android app in the same repository, or in another one?
k

Kumar

10/05/2023, 9:02 AM
thanks for quick response , no, I added .jar in app libs folder, trying to import in android app activity. Not able to access it
in my question if you have any clarification please ask me I will try to give best
c

CLOVIS

10/05/2023, 9:03 AM
I don't know much about iOS, so I recommend you ask a new question in #multiplatform or #ios
k

Kumar

10/05/2023, 9:06 AM
please review below image, I hope my local maven successfully generated .jar, .aar, .xcframeworks
sure I will connect in recommended platforms