Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

xcode - Qt, build as shared library from source for iOS, code signing error

I try to build Qt for iOS as shared library and I have a code signing error.

More precisely, I downloaded sources of Qt 5.12.10, I have Mac OS Catalina 10.15.7, Xcode 12.3.

I configure Qt with the following command:

./configure -prefix ../iosSharedR -shared -opensource -release -optimize-size -nomake examples -nomake tests -xplatform macx-ios-clang -sdk iphoneos -qt-zlib -qt-libpng

Then I build with make and get the error:

=== BUILD TARGET qmltime OF PROJECT qmltime WITH CONFIGURATION Release ===
Check dependencies

Code Signing Error: No profiles for 'com.example.pollyenabler.qmltime' were found:  Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.pollyenabler.qmltime'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 14.3'

** BUILD FAILED **

The following build commands failed:

Check dependencies
(1 failure)
make[3]: *** [xcodebuild-release-device] Error 65
make[2]: *** [sub-qmltime-make_first] Error 2
make[1]: *** [sub-tools-make_first] Error 2
make: *** [module-qtdeclarative-make_first] Error 2

So how to correct that to build shared library of Qt for iOS? Thanks.

EDIT:

I tried adding this in qt.pro file:

ios:{
  QMAKE_DEVELOPMENT_TEAM = ...
  QMAKE_PROVISIONING_PROFILE = ...
  QMAKE_XCODE_CODE_SIGN_IDENTITY = ...
}

but still have the same error.

Same with:

ios:{
  QMAKE_CXXFLAGS += -allowProvisioningUpdates
}

EDIT 2 : I found and follow that https://bugreports.qt.io/browse/QTBUG-75457

and I have the same error:

Undefined symbols for architecture arm64: 
"lcEventDispatcher()", referenced from: 
...

And I use source from Qt5.12.10, so apparently not solved.

Did anyone succeed to build Qt shared libraries for iOS? Until some times ago, it was not possible to use dynamic libs on iOS so maybe it was not a problem not to have them for Qt iOS, but Apple changed that.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...