Xcode Deployment No such file or directory code object is not signed at all
-
I tried
qmake -spec macx-xcode MYAPP.pro
and it works and can upload to the App Store.
But then the Qt Frameworks are missing.So I added the required
Qt.... frameworksto Embeded Frameworks.
It does compile , but not sign.
Hot to create a .app with Qt Frameworks in it?
QtWidgets.framework/Versions/A - SymLink A does not exist in Frameworks. But Xcode ask for it.
It's Current or 5 within framework.
When I create a Symlink, it says its not signed at all.CodeSign .../MYAPP.app/Contents/Frameworks/QtWidgets.framework/Versions/A cd ... export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate Signing Identity: "Mac Developer: MYNAME (sdfsadfsdf)" /usr/bin/codesign --force --sign FDSHERTERGSGDSG --preserve-metadata=identifier,entitlements --timestamp=none /Users/michi/Library/Developer/Xcode/DerivedData/MYAPP-eijfetqxsbfwyacdweuokvbasktu/ArchiveIntermediates/MYAPP/InstallationBuildProductsLocation/Applications/MYAPP.app/Contents/Frameworks/QtWidgets.framework/Versions/A MYAPP/InstallationBuildProductsLocation/Applications/MYAPP.app/Contents/Frameworks/QtWidgets.framework/Versions/A: No such file or directory Command /usr/bin/codesign failed with exit code 1
I know the
macdeployqt
productbuild
But then I can not update the resulting .pkg or even not create the .pkg and/or upload with Application Uploader or how the name is.
-
Hi,
What is the exact problem with maceployqt ? The latest version also has an option to sign your bundle.
-
Hi,
What is the exact problem with maceployqt ? The latest version also has an option to sign your bundle.
@SGaist macdeployqt - I know, but it did not work (crash) or I could not made it work unfortunately. Details see below.
So I think if I can do it manually or with Xcode it would be fine. But with Xcode it does not let my sign when I added the Qt Frameworks as Embedded (Sign Errors) , but upload would work here better.
Xcode:
I have an Mac App submitted to the App Store , but it's missing some Qt Frameworks.
'@rpath/QtWidgets.framework'
'@rpath/QtGui.framework'
'@rpath/QtCore.framework'
(This App was created with Xcode (using precompiled Qt Frameworks, not recompiled by myself), but not with Embedded Frameworks in it. If I add them manually in "Embedded Frameworks" or so, Xcode complains and cannot sign it...)So I have a working App, but the Qt framework is not there. Xcode can upload it, but Qt Frameworks are missing.
So I stick to macdeployqt
Here I have the problem that it's not clear what to do after build and getting the plain .app.If I run macdeployqt with -codesign it crashes:
(Also not sure which Certificate I have to use there: "3rd Party Mac Developer Application: MyName" ?
Or Mac Developer: MyName ?)$ macdeployqt MyApp.app -appstore-compliant -codesign="3rd Party Mac Developer Application: MyName" ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/objdump: '...src/build-MyApp-Desktop_Qt_5_7_0_clang_64bit-Release/ MyApp.app/Contents/Frameworks/QtWidgets.framework/Versions/5/Resources/Info.plist': The file was not recognized as a valid object file.\nfatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: internal objdump command failed\n" Segmentation fault: 11
However if I left out -codesign I get a "standalone app" with Frameworks in it.
Then sign it with (not sure):
$ codesign --deep --force --entitlements ../MyApp/MyApp.entitlements -s "3rd Party Mac Developer Application: MyName" MyApp.app $ echo $? 0 $
Then CHECK it:
$ codesign -d --entitlements - MyApp.app Executable=/... MyApp.app/Contents/MacOS/MyApp ??qq?<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> </dict> </plist> $
Seems to be sandboxed.
$ codesign -dv MyApp.app Executable=... Identifier=com.ABC.MyApp Format=app bundle with Mach-O thin (x86_64) CodeDirectory v=20200 size=7323 flags=0x0(none) hashes=221+5 location=embedded Signature size=4725 Signed Time=18 Oct 2016, 14:53:09 Info.plist entries=11 TeamIdentifier=ABCDSDAFSADF Sealed Resources version=2 rules=13 files=20 Internal requirements count=1 size=208 $
Seems to be signed.
But if fails:
$ spctl -a -vvvv MyApp.app MyApp.app: rejected <---- REJECTED, don't know why. origin=3rd Party Mac Developer Application: MyName $
(Maybe that must be so?)
If I go further:
After that (if it should not fail, maybe but this is normal for apps DISTRIBUTION), I think I can create a .pkg with:
$ /usr/bin/productbuild --component ./MyApp.app /Applications MyApp.pkg
Then I should be able to upload this .pkg with Application Loader into itunesconnect.
(I was able to do that but with Xcode only and there I'm missing the Qt Frameworks as "Embedded")Application Loader
The Info.plist indicates a Mac app, but submitting an ipa.
Qt Version used
Qt Creator 4.0.3 Based on Qt 5.7.0 (Clang 7.0 (Apple), 64 bit)
Any idea ?
Is it possible to use Xcode (because then the upload process is easier.)
Or do it all by Qt / Xcode command line tools, but here I run into sign problems as well.Reference docs from Apple:
(But's not so helpful, because they do not contain a single simple straight forward working example from .app to .pkg upload to iTunes. It's also not clear which Certificates we have to use there and when.)- https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html
- https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
- https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/DistributingApplicationsOutside/DistributingApplicationsOutside.html
- https://developer.apple.com/library/content/technotes/tn2206/_index.html
Update:
"Like Gatekeeper, spctl will only accept Developer ID-signed apps and apps downloaded from the Mac App Store by default. It will reject apps signed with Mac App Store development or distribution certificates."
(Source: https://developer.apple.com/library/content/technotes/tn2206/_index.html - about in the middle)
Is this maybe normal? -
Hi,
What is the exact problem with maceployqt ? The latest version also has an option to sign your bundle.
I think it has to do with the Qt*.framework hirarchy:
I did a 1:1 copy of ~HOME/Qt/ to my Xcode project so that I can fix / change thinks.
But why does it include the _debug and *.h things even if I so a Xcode > build > Archive (which does a Release ) ?
Resulting Release Archive Framework (This is what's within after Xcode created my .app):
QtCore.framework: QtCore Resources // <- must this be here? Note Resources directory below Versions: 5: _CodeSignature: CodeResources QtCore Resources: Info.plist // plist within /Versions/5/Resources/Info.plist Current
SOURCE Framework (1:1 copy to Xcode project, added to "Embedded" Frameworks):
Errors:
MyApp.app/Contents/Frameworks/QtDBus.framework/Versions/A: No such file or directory
Fix:$ ln -s 5 A
within FrameworkThen I get this error within Xcode:
/MyApp.app/Contents/Frameworks/QtPrintSupport.framework/Versions/A: code object is not signed at all
Then I sign by hand with:
codesign --deep --force -s "Mac Developer: MyName" QtDBus.framework/Versions/5/QtDBus
codesign --deep --force -s "Mac Developer: MyName" QtDBus.framework/Versions/5/QtDBus_debug
to get rid of the sign problem.
Then Xcode does warn mewarning: skipping copy phase strip, binary is code signed: /.../MyApp/QtPrintSupport.framework/Versions/5/QtPrintSupport warning: skipping copy phase strip, binary is code signed: /.../MyApp/QtPrintSupport.framework/Versions/5/QtPrintSupport_debug
So I ignore that, because I signed by hand before.
Then I can COMPILE and do Product > Archive.
Also Validation returns "OK".But when I export as "macOS App" it CRASHes.
(I can upload this to the App Store but then it will show "Invalid Binary" within itunesconnect.)QtCore.framework: Headers QtCore QtCore_debug QtCore_debug.prl QtCore.prl Resources // <-- ??? Versions: 5: _CodeSignature: CodeResources Headers: 5.7.0: QtCore: private: cp949codetbl_p.h qabstractanimation_p.h qabstracteventdispatcher_p.h qabstractfileengine_p.h qabstractitemmodel_p.h qabstractproxymodel_p.h qabstractstate_p.h qabstracttransition_p.h qanimationgroup_p.h qbig5codec_p.h qbytearray_p.h qbytedata_p.h qcfsocketnotifier_p.h qcollator_p.h qcore_mac_p.h qcore_unix_p.h qcoreapplication_p.h qcorecmdlineargs_p.h qcoreglobaldata_p.h qcrashhandler_p.h qdatastream_p.h qdataurl_p.h qdatetime_p.h qdatetimeparser_p.h qdebug_p.h qdir_p.h qdoublescanprint_p.h qelfparser_p.h qeucjpcodec_p.h qeuckrcodec_p.h qeventdispatcher_cf_p.h qeventdispatcher_glib_p.h qeventdispatcher_unix_p.h qeventdispatcher_win_p.h qeventdispatcher_winrt_p.h qeventloop_p.h qeventtransition_p.h qfactoryloader_p.h qfile_p.h qfiledevice_p.h qfileinfo_p.h qfileselector_p.h qfilesystemengine_p.h qfilesystementry_p.h qfilesystemiterator_p.h qfilesystemmetadata_p.h qfilesystemwatcher_fsevents_p.h qfilesystemwatcher_inotify_p.h qfilesystemwatcher_kqueue_p.h qfilesystemwatcher_p.h qfilesystemwatcher_polling_p.h qfilesystemwatcher_win_p.h qfinalstate_p.h qfreelist_p.h qfsfileengine_iterator_p.h qfsfileengine_p.h qfunctions_fake_env_p.h qfunctions_p.h qfutureinterface_p.h qfuturewatcher_p.h qgb18030codec_p.h qharfbuzz_p.h qhistorystate_p.h qhooks_p.h qiconvcodec_p.h qicucodec_p.h qiodevice_p.h qipaddress_p.h qisciicodec_p.h qitemselectionmodel_p.h qjiscodec_p.h qjni_p.h qjnihelpers_p.h qjpunicode_p.h qjson_p.h qjsonparser_p.h qjsonwriter_p.h qlatincodec_p.h qlibrary_p.h qlocale_data_p.h qlocale_p.h qlocale_tools_p.h qlockfile_p.h qloggingregistry_p.h qmachparser_p.h qmetaobject_moc_p.h qmetaobject_p.h qmetaobjectbuilder_p.h qmetatype_p.h qmetatypeswitcher_p.h qmimedatabase_p.h qmimeglobpattern_p.h qmimemagicrule_p.h qmimemagicrulematcher_p.h qmimeprovider_p.h qmimetype_p.h qmimetypeparser_p.h qmutex_p.h qmutexpool_p.h qnoncontiguousbytedevice_p.h qnumeric_p.h qobject_p.h qorderedmutexlocker_p.h qparallelanimationgroup_p.h qpodlist_p.h qpoll_p.h qppsattribute_p.h qppsattributeprivate_p.h qppsobject_p.h qppsobjectprivate_p.h qprocess_p.h qpropertyanimation_p.h qreadwritelock_p.h qresource_iterator_p.h qresource_p.h qringbuffer_p.h qsavefile_p.h qscopedpointer_p.h qsequentialanimationgroup_p.h qsettings_p.h qsharedmemory_p.h qsignaleventgenerator_p.h qsignaltransition_p.h qsimd_p.h qsimplecodec_p.h qsjiscodec_p.h qstate_p.h qstatemachine_p.h qstorageinfo_p.h qstringalgorithms_p.h qstringiterator_p.h qsystemerror_p.h qsystemlibrary_p.h qsystemsemaphore_p.h qt_pch.h qtemporaryfile_p.h qtextcodec_p.h qtextstream_p.h qthread_p.h qthreadpool_p.h qtimerinfo_unix_p.h qtimezoneprivate_data_p.h qtimezoneprivate_p.h qtldurl_p.h qtools_p.h qtranslator_p.h qtsciicodec_p.h qunicodetables_p.h qunicodetools_p.h qurl_p.h qurltlds_p.h qutfcodec_p.h qvariant_p.h qvariantanimation_p.h qwindowscodec_p.h qwindowspipereader_p.h qwindowspipewriter_p.h qwinoverlappedionotifier_p.h qxmlstream_p.h qxmlutils_p.h Q_PID Q_SECURITY_ATTRIBUTES Q_STARTUPINFO QAbstractAnimation qabstractanimation.h QAbstractEventDispatcher qabstracteventdispatcher.h QAbstractItemModel qabstractitemmodel.h QAbstractListModel QAbstractNativeEventFilter qabstractnativeeventfilter.h QAbstractProxyModel qabstractproxymodel.h QAbstractState qabstractstate.h QAbstractTableModel QAbstractTransition qabstracttransition.h qalgorithms.h QAnimationDriver QAnimationGroup qanimationgroup.h QArgument QArrayData qarraydata.h qarraydataops.h QArrayDataPointer qarraydatapointer.h QArrayDataPointerRef QAssociativeIterable qatomic_bootstrap.h qatomic_cxx11.h qatomic_msvc.h qatomic.h QAtomicInt QAtomicInteger QAtomicPointer qbasicatomic.h QBasicMutex QBasicTimer qbasictimer.h QBitArray qbitarray.h QBitRef QBuffer qbuffer.h QByteArray qbytearray.h QByteArrayData QByteArrayDataPtr QByteArrayList qbytearraylist.h QByteArrayListIterator QByteArrayMatcher qbytearraymatcher.h QByteRef QCache qcache.h QChar qchar.h QCharRef QChildEvent QCollator qcollator.h QCollatorSortKey QCommandLineOption qcommandlineoption.h QCommandLineParser qcommandlineparser.h qcompilerdetection.h qconfig-dist.h qconfig-large.h qconfig-medium.h qconfig-minimal.h qconfig-nacl.h qconfig-small.h qconfig.h QConstOverload qcontainerfwd.h QContiguousCache qcontiguouscache.h QContiguousCacheData QContiguousCacheTypedData QCoreApplication qcoreapplication.h qcoreevent.h QCryptographicHash qcryptographichash.h QDataStream qdatastream.h QDate QDateTime qdatetime.h QDebug qdebug.h QDebugStateSaver QDeferredDeleteEvent QDir qdir.h QDirIterator qdiriterator.h QDynamicPropertyChangeEvent QEasingCurve qeasingcurve.h QElapsedTimer qelapsedtimer.h QEnableSharedFromThis qendian.h QEvent QEventLoop qeventloop.h QEventLoopLocker QEventTransition qeventtransition.h QException qexception.h QExplicitlySharedDataPointer QFactoryInterface qfactoryinterface.h qfeatures.h QFile qfile.h QFileDevice qfiledevice.h QFileInfo qfileinfo.h QFileInfoList QFileSelector qfileselector.h QFileSystemWatcher qfilesystemwatcher.h QFinalState qfinalstate.h QFlag QFlags qflags.h QForeachContainer QFunctionPointer qfunctions_nacl.h qfunctions_vxworks.h qfunctions_wince.h qfunctions_winrt.h QFuture qfuture.h QFutureInterface qfutureinterface.h QFutureInterfaceBase QFutureIterator QFutureSynchronizer qfuturesynchronizer.h QFutureWatcher qfuturewatcher.h QFutureWatcherBase QGenericArgument qgenericatomic.h QGenericReturnArgument qglobal.h QGlobalStatic qglobalstatic.h QHash qhash.h QHashData QHashDummyValue QHashFunctions qhashfunctions.h QHashIterator QHashNode QHistoryState qhistorystate.h QIdentityProxyModel qidentityproxymodel.h QIncompatibleFlag QIntegerForSize QInternal QIODevice qiodevice.h qisenum.h QItemSelection QItemSelectionModel qitemselectionmodel.h QItemSelectionRange qiterator.h QJsonArray qjsonarray.h QJsonDocument qjsondocument.h QJsonObject qjsonobject.h QJsonParseError QJsonValue qjsonvalue.h QJsonValuePtr QJsonValueRef QJsonValueRefPtr QLatin1Char QLatin1Literal QLatin1String QLibrary qlibrary.h QLibraryInfo qlibraryinfo.h QLine qline.h QLineF QLinkedList qlinkedlist.h QLinkedListData QLinkedListIterator QLinkedListNode QList qlist.h QListData QListIterator QListSpecialMethods QLocale qlocale.h QLockFile qlockfile.h qlogging.h QLoggingCategory qloggingcategory.h QMap qmap.h QMapData QMapDataBase QMapIterator QMapNode QMapNodeBase QMargins qmargins.h QMarginsF qmath.h QMessageAuthenticationCode qmessageauthenticationcode.h QMessageLogContext QMessageLogger QMetaClassInfo QMetaEnum QMetaMethod QMetaObject qmetaobject.h QMetaProperty QMetaType qmetatype.h QMimeData qmimedata.h QMimeDatabase qmimedatabase.h QMimeType qmimetype.h QModelIndex QModelIndexList QMultiHash QMultiMap QMutableByteArrayListIterator QMutableFutureIterator QMutableHashIterator QMutableLinkedListIterator QMutableListIterator QMutableMapIterator QMutableSetIterator QMutableStringListIterator QMutableVectorIterator QMutex qmutex.h QMutexLocker qnamespace.h QNoDebug QNonConstOverload qnumeric.h QObject qobject_impl.h qobject.h QObjectCleanupHandler qobjectcleanuphandler.h QObjectData qobjectdefs_impl.h qobjectdefs.h QObjectList QObjectUserData QPair qpair.h QParallelAnimationGroup qparallelanimationgroup.h QPauseAnimation qpauseanimation.h QPersistentModelIndex qplugin.h QPluginLoader qpluginloader.h QPoint qpoint.h QPointer qpointer.h QPointF QProcess qprocess.h QProcessEnvironment qprocessordetection.h QPropertyAnimation qpropertyanimation.h QQueue qqueue.h QReadLocker QReadWriteLock qreadwritelock.h QRect qrect.h QRectF qrefcount.h QRegExp qregexp.h QRegularExpression qregularexpression.h QRegularExpressionMatch QRegularExpressionMatchIterator QResource qresource.h qresultstore.h QReturnArgument QRunnable qrunnable.h QSaveFile qsavefile.h QScopedArrayPointer QScopedPointer qscopedpointer.h QScopedPointerArrayDeleter QScopedPointerDeleteLater QScopedPointerDeleter QScopedPointerObjectDeleteLater QScopedPointerPodDeleter QScopedValueRollback qscopedvaluerollback.h QSemaphore qsemaphore.h QSequentialAnimationGroup qsequentialanimationgroup.h QSequentialIterable QSet qset.h QSetIterator QSettings qsettings.h QSharedData qshareddata.h QSharedDataPointer QSharedMemory qsharedmemory.h QSharedPointer qsharedpointer_impl.h qsharedpointer.h QSignalBlocker QSignalMapper qsignalmapper.h QSignalTransition qsignaltransition.h QSize qsize.h QSizeF QSocketNotifier qsocketnotifier.h QSortFilterProxyModel qsortfilterproxymodel.h QStack qstack.h QStandardPaths qstandardpaths.h QState qstate.h QStateMachine qstatemachine.h QStaticArrayData QStaticAssertFailure QStaticByteArrayData QStaticPlugin QStaticStringData QStorageInfo qstorageinfo.h QString qstring.h QStringBuilder qstringbuilder.h QStringData QStringDataPtr QStringList qstringlist.h QStringListIterator QStringListModel qstringlistmodel.h QStringMatcher qstringmatcher.h QStringRef QSysInfo qsysinfo.h qsystemdetection.h QSystemSemaphore qsystemsemaphore.h Qt qt_windows.h QtAlgorithms QtCleanUpFunction QtConfig QtContainerFwd QtCore QtCoreDepends QtCoreVersion qtcoreversion.h QtDebug QTemporaryDir qtemporarydir.h QTemporaryFile qtemporaryfile.h QtEndian QTextBoundaryFinder qtextboundaryfinder.h QTextCodec qtextcodec.h QTextDecoder QTextEncoder QTextStream qtextstream.h QTextStreamFunction QTextStreamManipulator QtGlobal QThread qthread.h QThreadPool qthreadpool.h QThreadStorage qthreadstorage.h QThreadStorageData QTime QTimeLine qtimeline.h QTimer qtimer.h QTimerEvent QTimeZone qtimezone.h QtMath QtMessageHandler QtMsgHandler QtNumeric QtPlugin QtPluginInstanceFunction QtPluginMetaDataFunction QTranslator qtranslator.h QTypeInfo qtypeinfo.h QTypeInfoMerger QTypeInfoQuery qtypetraits.h QUnhandledException QUrl qurl.h QUrlQuery qurlquery.h QUrlTwoFlags QUuid quuid.h QVariant qvariant.h QVariantAnimation qvariantanimation.h QVariantComparisonHelper QVariantHash QVariantList QVariantMap QVarLengthArray qvarlengtharray.h QVector qvector.h QVectorIterator QVersionNumber qversionnumber.h qversiontagging.h QWaitCondition qwaitcondition.h QWeakPointer QWinEventNotifier qwineventnotifier.h QWriteLocker qxmlstream.h QXmlStreamAttribute QXmlStreamAttributes QXmlStreamEntityDeclaration QXmlStreamEntityDeclarations QXmlStreamEntityResolver QXmlStreamNamespaceDeclaration QXmlStreamNamespaceDeclarations QXmlStreamNotationDeclaration QXmlStreamNotationDeclarations QXmlStreamReader QXmlStreamStringRef QXmlStreamWriter QtCore QtCore_debug Resources: Info.plist // <-- must be here only? A // <--- I added this with $ ln -s 5 A because Xcode asked for it. Current
-
Hi,
What is the exact problem with maceployqt ? The latest version also has an option to sign your bundle.
-
I don't have any error with macdeployqt, can run it through a debugger to see where it fails ?