ubuntudroid
02/11/2022, 1:43 PMisStatic = true
to integrate our shared module into the iOS app.
However, I now have to make shared dynamic due to some third party library issue which can only be worked around with that due to this Kotlin native issue: https://youtrack.jetbrains.com/issue/KT-50982#focus=Comments-27-5741956.0-0 Apart from that, it seems that using dynamic frameworks is the preferred way anyway, so I am generally fine with that workaround:
cocoapods {
ios.deploymentTarget = "14.1"
framework {
summary = "Shared Module"
baseName = "shared"
isStatic = false
embedBitcode(BITCODE)
podfile = project.file("../iosApp/Podfile")
}
}
All is good and well and the app builds as it should until I try to export the archive which now fails with the following error message:
shared not found in dylib search path
Any idea what I might need to change to make this work?ubuntudroid
02/11/2022, 3:51 PMbitcode-build-tool
arguments didn’t have the shared framework as an argument 🤔 (I am using bitrise for building btw).kpgalligan
02/11/2022, 5:29 PMApart from that, it seems that using dynamic frameworks is the preferred way anywayI wouldn’t generally assume this. I default to static, and I would say in general iOS app dev, it’s far from a “most teams recommend this” situation. I know that doesn’t help with your current situation, and I wouldn’t say you should avoid dynamic, but I would definitely not call it “preferred” either
kpgalligan
02/11/2022, 5:30 PMubuntudroid
02/11/2022, 5:51 PMubuntudroid
02/11/2022, 5:56 PMld: warning: directory not found for option '-F/Users/ubuntudroid/Library/Developer/Xcode/DerivedData/MyApp-exiyzzachjfrvmbualscrdesogez/Build/Intermediates.noindex/ArchiveIntermediates/MyApp-Debug/BuildProductsPath/Release-iphoneos'
ld: bitcode bundle could not be generated because '/Users/ubuntudroid/projects/github/ubuntudroid/myApp/shared/build/cocoapods/framework/shared.framework/shared' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/ubuntudroid/projects/github/ubuntudroid/myApp/shared/build/cocoapods/framework/shared.framework/shared' for architecture arm64
The first warning might be caused by using non-default schemes/configurations (MyApp-Debug/MyApp-Stage/MyApp) - but I am not sure whether it is actually a problem.
The second error seems to be more problematic. However, I don’t know why I am even getting this, because as you can see in my first post bitcode embedding is enabled. 🤔kpgalligan
02/11/2022, 6:22 PMubuntudroid
02/11/2022, 7:08 PMSiggi Gunnarss
02/12/2022, 9:17 AM