qzxing icon indicating copy to clipboard operation
qzxing copied to clipboard

QZXing Crashing on Qt6.4 on IOS for latest Iphone 13

Open kpkale opened this issue 2 years ago • 4 comments

I have created the simple App with QML Application. However, I am getting an error as follows:

Error: You are creating QApplication before calling UIApplicationMain. If you are writing a native iOS application, and only want to use Qt for parts of the application, a good place to create QApplication is from within 'applicationDidFinishLaunching' inside your UIApplication delegate.

This error is seen whether I deploy the application on Simulator IPhone 14 or on actual device. And that happens whether I deploy from Qt Creator or from within XCode.

Unable to find a way to get this working, Uploading the test project. DTest4.zip

kpkale avatar Oct 25 '22 14:10 kpkale

I also encountered the same problem. After excluding other modules, I located to qzxing qt6.4.1 iOS

angeluslove avatar Nov 18 '22 05:11 angeluslove

qt6.2.4 qzxing v3.3.0
error: You are creating QApplication before calling UIApplicationMain. If you are writing a native iOS application, and only want to use Qt for parts of the application, a good place to create QApplication is from within 'applicationDidFinishLaunching' inside your UIApplication delegate.

angeluslove avatar Nov 21 '22 02:11 angeluslove

A solution has been found for the time being. It is to use static compilation, and then integrate it into the program using static libraries, so that no error will be reported

Qt6.4.1 qzxing 3.3.0

angeluslove avatar Nov 21 '22 07:11 angeluslove

I googled for this error and found this: https://stackoverflow.com/questions/45508043/qt-ios-linker-error-entry-point-main-undefined/45617820#45617820

and this: https://stackoverflow.com/questions/25353686/you-are-creating-qapplication-before-calling-uiapplicationmain-error-on-ios

StefanoD avatar Dec 12 '22 18:12 StefanoD