From a0652e2646e6a01c6260ca4dd82762f3274b0837 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 26 Apr 2023 13:48:01 +0300 Subject: [PATCH] Use Xcode for iOS builds (#267) --- .github/workflows/ci-build.yml | 15 ++++++++------- CMakeLists.txt | 2 ++ os/ios/Info.plist | 7 ------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 25382f26..6408aab6 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -78,7 +78,7 @@ jobs: ios: name: iOS - runs-on: macos-11 + runs-on: macos-12 steps: - name: Clone @@ -88,30 +88,31 @@ jobs: uses: actions/cache@v3 with: path: build - key: ios-cmake-v1 + key: ios-cmake-v2 - name: Configure run: | cmake \ -B build \ - -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \ -D ENABLE_BITCODE=0 \ -D PLATFORM=OS64 \ + -G Xcode \ + -D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \ # EOL - name: Build run: | cmake \ --build build \ + --config RelWithDebInfo \ -j $(sysctl -n hw.physicalcpu) \ - --target package \ # EOL - # TODO: Should be a part of packaging. - - name: Prepare for uploading + - name: Pack run: | - cp build/fallout2-ce.zip build/fallout2-ce.ipa + cd build + cpack -C RelWithDebInfo - name: Upload uses: actions/upload-artifact@v3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cf9e534..751dc882 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -311,6 +311,7 @@ if(APPLE) set_source_files_properties("os/ios/LaunchScreen.storyboard" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") set_target_properties(${EXECUTABLE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/ios/Info.plist") set_target_properties(${EXECUTABLE_NAME} PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2") + set_target_properties(${EXECUTABLE_NAME} PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.alexbatalov.fallout2-ce") else() set_target_properties(${EXECUTABLE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/macos/Info.plist") endif() @@ -348,6 +349,7 @@ if(APPLE) set(CPACK_GENERATOR "ZIP") set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) set(CPACK_PACKAGE_FILE_NAME "fallout2-ce") + set(CPACK_ARCHIVE_FILE_EXTENSION "ipa") else() install(TARGETS ${EXECUTABLE_NAME} DESTINATION .) install(CODE " diff --git a/os/ios/Info.plist b/os/ios/Info.plist index 3eedf545..78e86659 100644 --- a/os/ios/Info.plist +++ b/os/ios/Info.plist @@ -22,8 +22,6 @@ ${MACOSX_BUNDLE_SHORT_VERSION_STRING} CFBundleVersion ${MACOSX_BUNDLE_BUNDLE_VERSION} - LSApplicationCategoryType - public.app-category.role-playing-games LSMinimumSystemVersion 11.0 LSRequiresIPhoneOS @@ -32,11 +30,6 @@ True UIApplicationSupportsIndirectInputEvents - UIDeviceFamily - - 1 - 2 - UIFileSharingEnabled UILaunchStoryboardName