GE Folks, quick question for Primal Devs and iOS/Swift devs in general. I'm investigating a bug between Khatru's Blossom implementation and Primal on iOS. I'm not a mobile dev, so please bear with me. I'm trying to understand what’s happening in Primal's Blossom client code. Specifically, I want to figure out what’s going on in IosPrimalBlossomUploadService ( Apparently, this is part of an XCFramework bundle (PrimalShared.xcframework), but how can I obtain the code for it? #asknostr #primal #iOS #devstr

Replies (6)

Hey @Pavle, nice to meet you. If you could point me towards the source code or give me a hand here, I’d appreciate it. Apparently (though not confirmed), Primal's Blossom client on iOS isn't following redirects on Blossom endpoints like /media and /upload. This is breaking both mirroring workflows and the upcoming CDN/Public Object Storage functionality (see this comment: by @sudocarlos). Both functionalities work fine on Primal Web.
Hey @Anthony Accioly, you are looking for `PrimalUploadService.kt`, can be found in primal-android-app repo under `networking-upload` module which is in charge of blossom uploading. Mirroring with Haven did not work because Haven does not support BUD-04 (which we're using for mirroring). Not sure if anything has changed recently. Check this thread for more details. View quoted note →
Thanks, both. That was a quick response 🙂. Just to give a bit more context to the GitHub issue: things have progressed on Khatru and Haven. The /mirror endpoint is already in place on Khatru, and for now, we are redirecting /media to /upload. It all seems to be working fine on Primal Web. I believe the problem on Android is a known issue due to Khatru not returning a `Content-Type: application/json` header, which is likely fixed on Khatru master (or at least, I tested the fix some time ago and it was working). I'll cut a new test release of Haven tomorrow and see if I can get it working with Android. Hopefully, this will also fix things on Primal iOS. If I need anything on the Primal side, I'll reach out for sure.