Finally managed to get a build to TestFlight, than...
# multiplatform
m
Finally managed to get a build to TestFlight, thankfully this is far from anything being actually deployed to the App Store. Nonetheless, I needed to do the following: switch Archiving scheme build config type to Debug, set
ENABLE_BITCODE
as
FALSE
and finally it worked. This is obviously not the best way to go about things: is there any guide that would explain what kind of a setup a creating a release build for the KMM lib requires?
h
CONFIGURATION=RELEASE ./gradlew packForXcode
šŸ‘ 1
m
Thanks, I'll give it a go šŸ‘
h
Alternative use the new
assembleXCFramework
tasks, which always builds both
Copy code
val xcf = XCFramework()
    iosArm64 {
        binaries {
            framework {
                xcf.add(this)
            }
        }
    }
šŸ™‡ 1
m
@hfhbd I’m looking again at making a test build, this time really using a release flavor. Using something that you suggested, I created a
releaseXCFramework
with the added gradle task. Now I’m wondering what would be the best way to go about actually making the release archive from XCode: obviously this new XCFramework is not included in the project. Would you happen to know if there’s a guide somewhere out there on how to do it?
m
Thanks! I didn't find the official sample somehow! I'll look into these, thanks for taking the time, much obliged šŸ‘ šŸ‘
I’ve been researching this once more. Either I’m just really lost or I cannot seem to find the correct documentation anywhere. Most likely it’s the former šŸ™‚ . In my case I am using CocoaPods. Anyhow, I can see a few ways to integrate with iOS build: • Cocoapods: add CocaPods block to KMM module, add Podspec • Build an XCFramework (or here) and integrate that (also can be done with CocoaPods or manually) I looked at the above projects: • kmm-prod-sample does not use CocoaPods, instead Swift packages. It’s using the above
Run Script
in the Xcode build phases to
embedAndSignAppleFrameworkForXcode
. I guess this does the trick and that would work nicely for
RELEASE
build configuration ---> No luck here, as I am using CocoaPods • Your ComposeTodo app: also does not use CocoaPods. Unfortunately I’m still on Xcode 12 and as such cannot open the project, nonetheless, my guess is that you have a similar setup as above, based on the
clients/build.gradle.kts
and lack of CocoaPods. --> No luck here either • PeopleInSpace uses Cocoapods: Xcode project config actually contains two configs: one for
Debug
and one for
Release
: these use different Pods, one of them
debug
and other
release
. Here, Podspec doesn’t contain anything that would point to a different Release build.
CocoaPods
block on the
common
gradle file is two lines long: I think this one is created with https://github.com/ge-org/multiplatform-swiftpackage but the project also has a
Podfile
--> This looks to be the closest example: need to research this
multiplatform-swiftpackage
a bit more closely, but maybe it could work
I was expecting there to be a single given way to do this, but looks like there’s actually quite a few. Didn’t really expect this part to be so ā€œtrickyā€, otherwise I’d have put significantly more time into considering the integration in the beginning. Now I’m already using
Podfile
in the iOS project to manage dependencies +
xcodegen
to not have to care about project files.
Google’d around, added this and that to my build gradle:
relase
build works without any tricks as does the
Release
archive 🤷
Not too confident with this: I’d rather know what’s happening behind the scenes šŸ˜…
Xcode build log tells me the following:
Showing Recent Messages
> Task sharedlinkPodReleaseFrameworkIos
So, looks like there’s definitely some
release
magic happening 🤷
117 Views