Dietmar, I had a similar issue some time ago. It sounds like you've navigated a complex signing process, and you're very close! The error message clearly points to an issue with a debug symbol file (.dSYM) within your application bundle having an Apple-reserved bundle identifier (com.apple.xcode.dsym...). This typically happens when these files aren't properly handled during the deployment and signing process for third-party applications.
Understanding the Error:
The App Store Connect validation is rejecting your build because it found a .dSYM file with a bundle identifier that belongs to Apple. This suggests that either:
Debug Symbols for Qt Plugins are Included Incorrectly: The .dSYM file for the libqtqmlcoreplugin.dylib (a Qt plugin) is being bundled in a way that retains Apple's internal identifier.
Incorrect Handling of .dSYM Files during macdeployqt6: The macdeployqt6 tool might be copying these debug symbol files without the necessary modifications for App Store distribution.
Strategies for Correctly Managing Qt for Mac App Store Distribution:
Here's a breakdown of approaches and steps you should consider:
1. Focus on Release Builds and Stripping Symbols:
Build in Release Mode: Ensure your Qt application is built in Release mode. Debug builds often include extensive debugging symbols that are not needed for the App Store.
Strip Symbols: The most crucial step is to strip debugging symbols from your application and all its dependencies (Qt frameworks, plugins, and your own libraries) before creating the final .app bundle. This removes the .dSYM files that are causing the issue.
You can use the strip command-line tool on macOS for this. For example:
Bash
strip -x frogSIP.app/Contents/Frameworks/QtCore.framework/Versions/A/QtCore
strip -x frogSIP.app/Contents/Frameworks/QtQml.framework/Versions/A/QtQml
strip -x frogSIP.app/Contents/PlugIns/QtQuick/libqtquickplugin.dylib
# ... and so on for all Qt frameworks and plugins
strip -x frogSIP.app/Contents/MacOS/frogSIP
The -x option removes the symbol table and the string table for dynamic symbols.
macdeployqt6 with --strip: The macdeployqt6 tool has a --strip option that should handle the removal of symbols. Ensure you are using this option when deploying your application.
Bash
macdeployqt6 frogSIP.app -bundle-id com.frogblue.frogSIP --strip
2. Review Your macdeployqt6 Usage:
Bundle Identifier: Double-check that you are providing the correct bundle identifier for your application (e.g., com.frogblue.frogSIP) to macdeployqt6.
Plugins and Frameworks: Verify that macdeployqt6 is correctly identifying and bundling the necessary Qt frameworks and plugins. It should adjust their internal identifiers as needed for your application bundle.
3. Static vs. Dynamic Linking of Qt:
Dynamic Linking (Recommended for App Store): While static linking might seem simpler for deployment, it can lead to larger application bundles and potential compatibility issues. Dynamic linking is generally preferred for Mac App Store submissions. It allows for smaller app sizes and leverages system-provided libraries where possible (though Qt frameworks are usually bundled).
If Dynamically Linking: Ensure that all the required Qt frameworks and plugins are correctly copied into your application bundle's Contents/Frameworks and Contents/PlugIns directories by macdeployqt6.
4. Inspect the Contents of Your .app Bundle:
Before Signing: After running macdeployqt6, carefully examine the contents of your frogSIP.app bundle. Look for any .dSYM files within the Contents/Frameworks or Contents/PlugIns directories, especially within the Resources/qml/QtCore path mentioned in the error. These should ideally be absent after stripping.
5. Code Signing Order and .dSYM Handling:
Sign After Deployment and Stripping: Ensure you are performing code signing after you have used macdeployqt6 and stripped the symbols.
.dSYM Generation for App Store: While you need to strip the symbols from the app bundle for submission, you will likely want to keep the .dSYM files for your own crash reporting and debugging purposes. Xcode usually generates these during the archive process. You can archive your app in Xcode (as you did initially) to get these .dSYM files, but do not include them directly in the final .app bundle you deploy with macdeployqt6 and submit. You can store them separately.
Revised Workflow:
Based on the above, here's a refined workflow you should consider:
Build your Qt application in Release mode in Xcode. This will create your initial .app bundle.
Use macdeployqt6 to deploy the necessary Qt frameworks and plugins into your .app bundle. Make sure to use the correct bundle identifier and the --strip option:
Bash
/path/to/Qt/YourQtVersion/bin/macdeployqt6 frogSIP.app -bundle-id com.frogblue.frogSIP --strip
(Replace /path/to/Qt/YourQtVersion/bin/ with the actual path to your Qt installation).
Code sign your application bundle using the "3rd Party Mac Developer Application" certificate:
Bash
codesign --deep --force --verify --sign "3rd Party Mac Developer Application" frogSIP.app
Create the .pkg installer using productbuild:
Bash
productbuild --component frogSIP.app /Applications --sign "3rd Party Mac Developer Installer" frogSIP.pkg
Submit the .pkg file using xcrun altool (or Transporter).
Key Takeaway:
The error strongly suggests the presence of unwanted .dSYM files with Apple's bundle identifier within your final application bundle. The --strip option of macdeployqt6 is your primary tool to address this. Ensure you are using it correctly and that no stray .dSYM files are left in your .app before signing and packaging.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags: