I am considering building a Compose Multiplatform ...
# multiplatform
k
I am considering building a Compose Multiplatform library intended for apps developed with React Native. I was wondering if anyone has attempted this. My plan is to publish a CocoaPod dependency for iOS and an AAR dependency for Android from the KMP shared module. Then, I will create a React Native library module that incorporates them and publish it as an npm module that apps can easily use.
p
I haven't tried but keep in mind that the size this library will add to a consumer project won't be small. If you are ok with that then go for it 😃
k
Yeah besides that, I am wondering if it is even possible to show compose BottomSheet over React Native view. The feature that am considering is Payment Bottom Sheet exactly like this
p
I see, I really can't tell because I've never done that, not even tried. Technically it seems to be possible, react-native bridges into the native View system so what is in the background is a native view after all. I know now there is react skia which is a bit different but shouldn't be a problem. You can try it and see what happens
k
@Pablichjenkov do you have any ideas how to publish shared lib as pod for React Native, I was trying to run
pod lib lint
but its failing with
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use
--verbose` for more information.` it looks like podspec source has to have ios project source but mine is multiplatform. Any clue how to do this.
Copy code
spec.source                   = { :http=> '<https://github.com/khalid64927/kmp-tes-app.git>'}
p
Unfortunately not, I stopped using cocoapods a long time ago. Only doing Swift Package Manager these days.
I don't know what that
pod lib lint
does, it seems that it is running lint and then build a library. I recall the gradle task to generate the podframework had a different name. Try to generate the podframework and use it manually from the project where you have react native integrated. Then if successful, investigate how to publish/consume it as a cocoapod package.
k
Thanks @Pablichjenkov, I managed to get the pod and integrate it with RN project but I got another issue where background of my Bottom sheet is not transparent in iOS. I opened issue on Compose Multiplatform. Do you know if this is valid issue and I'm not doing it right ?
p
Oh great to hear that you were able to integrate them 👏 In regards to the white background I think someone from JB commented. Seems to be the same issue reported before about interop UiKitView not being able to set transparency in the background