Open Corvus400 opened 3 weeks ago
I may be able to create a draft for now, but I'm not quite sure if it will be correct. I would love to get some help from iOS people or people familiar with XCFramework. π
We are experiencing some issues with X64 architecture. However, for ARM users, we can refer to the README in the app-ios directory of the DroidKaigi 2024 conference app repository. I believe we are facing two distinct problems: running the app on a physical device and running it on an X64
Related discussion: https://github.com/DroidKaigi/conference-app-2024/discussions/768
I've added the Trouble shooting https://github.com/DroidKaigi/conference-app-2024/tree/main/app-ios#case3-you-are-using-x86_64-mac-and-want-to-build-the-project
I can confirm that the build was successful on x64 after following the revised instructions! The current script will always build both debug and release builds, however, which adds a lot of time to each build. Maybe we could constrain it to just the debug build for normal development, and then create a separate release pipeline for that variant?
@mannodermaus I agree. Could you rename it to "x86_64Debug" or something similar, and filter the debug version as "arm64SimulatorDebug"?
@takahirom Thank you for your response! π However, I can build the iPhone Simulator, but I can't seem to build on the actual iPhone device if I follow the instructions. π I tried adding the command, but still no luck.
./gradlew iosArm64AggregateResources --no-configuration-cache
@takahirom I have tried everything since then, but the build to the actual device is still not successful. π We will proceed with development only in the simulator. π«‘
@takahirom I have patched it locally so that the configuration in Xcode dictates which XCFramework to build (debug or release). This works fairly well. I'll submit this proposal as a PR shortly and you can decide what to do with it. πββοΈ
build_xcframework_with_xcode_environment_variable.sh
:
# Initialize the target architecture
target_arch=""
+target_configuration=""
+if [[ "$CONFIGURATION" == *"Debug"* ]]; then
+ target_configuration="Debug"
+elif [[ "$CONFIGURATION" == *"Release"* ]]; then
+ target_configuration="Release"
+fi
-./gradlew assembleSharedXCFramework --no-configuration-cache -Papp.ios.shared.arch=$target_arch
+./gradlew assembleShared${target_configuration}XCFramework --no-configuration-cache -Papp.ios.shared.arch=$target_arch
@Corvus400 I wasn't able to build as I'm seeing the error "Signing for 'DroidKaigi2024App' requires a development team. Select a development team in the Signing & Capabilities editor."
However, I think you can run Clean Build Folder
after executing ./gradlew app-ios-shared:assembleSharedXCFramework -Papp.ios.shared.arch=arm64 --no-configuration-cache
. (In my environment, this was able to fix the "no library for this platform" error.)
@mannodermaus Thanks!
@takahirom Thank you very much! I will try again when I have more time!
@takahirom I was able to install it on the actual iPhone device! π₯³ (It did not crash when activated.)
The steps we tried are as follows
A fair amount of knowledge should be required, but nowhere is it mentioned what operations are needed to build the environment or in everyday development. It might be nice if the README.md was placed in a module such as app-ios-shared and linked from the README.md in the project root.