diff --git a/.github/workflows/builds_mobile_cmake.yml b/.github/workflows/builds_mobile_cmake.yml index 388facb..921f8c8 100644 --- a/.github/workflows/builds_mobile_cmake.yml +++ b/.github/workflows/builds_mobile_cmake.yml @@ -156,6 +156,13 @@ jobs: base64 -d release.keystore.base64 > release.keystore ${{env.QT_HOST_PATH}}/bin/androiddeployqt --input build/android-${{env.APP_NAME}}-deployment-settings.json --output build/android-build/ --android-platform android-34 --aab --release --sign release.keystore ${{ secrets.ANDROID_SIGNINGKEY_ALIAS }} --storepass ${{ secrets.ANDROID_SIGNINGKEY_PASSWORD }} + # Upload Android app bundle (GitHub CI) + - name: Upload Android app bundle (GitHub CI) + uses: actions/upload-artifact@v4 + with: + name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-Android.aab + path: build/android-build/build/outputs/bundle/release/android-build-release.aab + # Upload Android app bundle (Play Store) - name: Upload Android app bundle (Play Store) run: | @@ -164,13 +171,6 @@ jobs: mv assets/android/fastlane/ fastlane/ fastlane android deploy - # Upload Android app bundle (GitHub CI) - - name: Upload Android app bundle (GitHub CI) - uses: actions/upload-artifact@v4 - with: - name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-Android.aab - path: build/android-build/build/outputs/bundle/release/android-build-release.aab - ## iOS build ################################################################# build-ios: name: "iOS CI build" diff --git a/CMakeLists.txt b/CMakeLists.txt index d81c2c7..c99d671 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,21 +44,29 @@ target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC src/thirdparty/) ## Android if(ANDROID) - set(QT_ANDROID_ABIS "armeabi-v7a;arm64-v8a;x86;x86_64") - set(QT_ANDROID_BUILD_ALL_ABIS ON) - set(QT_ANDROID_MIN_SDK_VERSION 23) - set(QT_ANDROID_TARGET_SDK_VERSION 34) - set(QT_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/assets/android/") + set_target_properties(QmlAppTemplate PROPERTIES + QT_ANDROID_ABIS "armeabi-v7a;arm64-v8a;x86;x86_64" + QT_ANDROID_BUILD_ALL_ABIS ON + QT_ANDROID_MIN_SDK_VERSION 23 + QT_ANDROID_TARGET_SDK_VERSION 34 + QT_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/assets/android/" + ) +endif() + +if (APPLE) + set(CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "io.emeric.qmlapptemplate") + set(CMAKE_XCODE_ATTRIBUTE_MARKETING_VERSION "${PROJECT_VERSION}") + + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Development") + set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "") endif() ## macOS if(APPLE AND NOT IOS) set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0) - set(CMAKE_XCODE_ATTRIBUTE_INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/assets/ios/Info.plist") - - set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "") - set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Development") + set(CMAKE_XCODE_ATTRIBUTE_INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/assets/macos/Info.plist") set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/assets/macos/${CMAKE_PROJECT_NAME}.entitlements") endif() @@ -66,9 +74,7 @@ endif() if(IOS) set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 14.0) set(CMAKE_XCODE_ATTRIBUTE_INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/assets/ios/Info.plist") - - set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "") - set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Development") + set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2") # iPhone,iPad endif() ## Windows