I downloaded provisioning profiles with XCode:
File xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx.mobileprovision
appeared in ~/Library/MobileDevice/Provisioning\ Profiles
folder and the command:
/usr/bin/env xcrun security find-identity -v -p codesigning
printed three sign identities:
Added the following into my CMake:
if(IOS)
set(APP_BUNDLE_IDENTIFIER "com.mydomain.myapp")
set(DEVELOPMENT_TEAM_ID "XXXXXXX")
set(CODE_SIGN_IDENTITY "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
set(PROVISIONING_PROFILE_NAME "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx")
set_target_properties(${PROJECT_NAME} PROPERTIES
#...
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${DEVELOPMENT_TEAM_ID}
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CODE_SIGN_IDENTITY}
XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER ${PROVISIONING_PROFILE_NAME}
XCODE_ATTRIBUTE_CODE_SIGN_STYLE Manual
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER ${APP_BUNDLE_IDENTIFIER})
endif()
and tried to build my app from the command line with the following command having Qt_6_7_0_iOS_Release
as a current directory:
"/opt/local/bin/cmake" --build . --target ALL_BUILD --config RelWithDebInfo -- -allowProvisioningUpdates
but got errSecInternalComponent
signing error:
/usr/bin/codesign --force --sign 7062E8DFCE48EAC4BEBD580F63FF6549AE83E9B0 --entitlements /Users/admin/dev/repos/examples/src/MyApp/MyAppQt/build/Qt_6_7_0_iOS_Release/build/MyAppQt.build/RelWithDebInfo-iphoneos/MyAppQt.app.xcent --timestamp\=none --generate-entitlement-der /Users/admin/dev/repos/examples/src/MyApp/MyAppQt/build/Qt_6_7_0_iOS_Release/RelWithDebInfo-iphoneos/MyAppQt.app
/Users/admin/dev/repos/examples/src/MyApp/MyAppQt/build/Qt_6_7_0_iOS_Release/RelWithDebInfo-iphoneos/MyAppQt.app: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
Then I tried to build the with XCode and it asked a password during build:
and successfully built the app.
Then I clicked Product->Archive, XCode built the app and the archive appeared in the Archives organizer:
When I tried to upload my app for a Test Flight I got the following validation errors:
Asset validation failed
Invalid bundle. The “UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown” orientations were provided for the UISupportedInterfaceOrientations Info.plist key in the com.mydomain.myapp bundle, but you need to include all of the “UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight” orientations to support iPad multitasking. For details, visit: https://developer.apple.com/documentation/bundleresources/information_property_list/uisupportedinterfaceorientations. (ID: e0f42229-9b79-4e1a-8e0d-9835af9097e2)
Asset validation failed
Invalid large app icon. The large app icon in the asset catalog in “MyApp.app” can’t be transparent or contain an alpha channel. For details, visit: https://developer.apple.com/design/human-interface-guidelines/app-icons. (ID: 9e5bc503-b4dd-4474-b497-d578a463928f)
I added the orientations to Info.plist.app.in
:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
Created opaque icons and was able to upload the app for the Test Flight:
But got the following error from Apple Connect:
ITMS-90683: Missing purpose string in Info.plist – Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “Classic Lines.app” bundle should contain a NSCameraUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.
To fix I added the following to Info.plist
:
<key>NSCameraUsageDescription</key>
<string>Actually my app does not use Camera, but probably QT multimedia module requires it. Ideally I need to get rid of it in future versions.</string>
Distributing your app for beta testing and releases
https://developer.apple.com/documentation/xcode/distributing-your-app-for-beta-testing-and-releases
Publish desktop MacOS app in Apple AppStore
https://forum.qt.io/topic/156413/publish-desktop-macos-app-in-apple-appstore