qt
下载链接如下
https://download.qt.io/new_archive/qt/5.14/5.14.2/qt-opensource-mac-x64-5.14.2.dmg
安装选项全勾选就行,这里特别说明下qt5.14.2/qml
- qt5.14.2对qml支持还算成熟,但很多特性还得qt6才行,这里用qt5.14.2主要是考虑到服务器是租赁的,为了稳定考虑
- 吐槽下qt5.14.2/qml
- TextField不支持添加close button
- RowLayout和Qt widget的是相反的,添加边距页不是那么友好
- Button远没有Rectange+MouseArea好用
- 自带的日历页没法用,需要重写
- 要熟练使用Loader这个很关键,涉及大量自定义控件都可以用Loader
- 对NetWork支持不够,windows只能配合mvsc使用,mac基本没戏,很多js的 图表没法用,基本只能用Charts
- 项目开发的文件目录如下,可以作为参考
- 动画支持很好,滑动效果页不错
- 多语言基本和qt widget的一样
- qml对jsData支持很特别,可以好好研究下
- 使用inputMethodHints可以指定弹出键盘的类型,如数字键盘、适配邮箱的键盘、密码键盘等,会有些bug要慢慢试
- qt的作用是生成xcodeproj文件,后续模拟器之类的在xcode里进行就行
- 这里用IOS Simulator来编译
xcode
- mac上必须安装xcode,先判断系统的版本号,在appstore里找到对应的xcode版本,直接下载一般是没用的
- 在下面链接找到对应的xcode
https://developer.apple.com/download/more/ - 解压到/Applications里
- 设置环境变量
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- 安装python3
brew install python
- 编译项目会遇到无法识别python的时候
ios/mkspecs/features/uikit/devices.py: /usr/bin/python: bad interpreter: No such file or directory
按下面方法来
gedit /Users/mac/Qt5.14.2/5.14.2/ios/mkspecs/features/uikit/devices.py
#!/usr/bin/python 改为#!/usr/bin/python3
- xcode编译失败错误如下
The following build commands failed:
CompileC
/Users/mac/Qt5.14.2/Examples/Qt-5.14.2/gui/build-analogclock-Qt_5_14_2_for_iOS_Simulator-Release/analogclock.build/Release-iphonesimulator/analogclock.build/Objects-normal/x86_64/moc_rasterwindow.o
/Users/mac/Qt5.14.2/Examples/Qt-5.14.2/gui/build-analogclock-Qt_5_14_2_for_iOS_Simulator-Release/moc_rasterwindow.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'analogclock' from project 'analogclock')
(1 failure)
make: *** [xcodebuild-release-simulator] Error 65
08:31:32: 进程"/usr/bin/make"退出,退出代码 2 。
Error while building/deploying project analogclock (kit: Qt 5.14.2 for iOS Simulator)
按下面方法来
感谢csdn article/details/122301192
pro加
LIBS += -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks -framework VideoToolbox
LIBS += -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks -framework CoreMedia
LIBS += -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks -framework CoreVideo
- xcode发布时需要开发者账号688一年,用自己的appid就行,appstore下载Developer,在Developer里完成购买,注意别填自己的名字,填团队的名字,然后需要第二个账号用于团队管理,加入后才能后续开发,这些都要在xcode里预先配置好
- 若之前配置好的账号出现问题如下图,清除所有账号信息,重启xcode可以解决
info.list
-
qt的发布全部在info.list完成,不要动xcode的任何设置
参考了项目c2gQtWS_x -
ios文件夹的目录结构
要注意图片分辨率,MyLaunchScreen.xib是app启动前的画面,这里只是居中文字显示了,简单些
-
Images.xcassets文件夹只有下面一个文件夹
-
AppIcon.appiconset文件夹下包含app图标
-
共23个文件,要注意图片分辨率,其他照抄就行
-
ios的部分图片是不支持透明通道的,一般ITunes之类的图标不行,自己改或通过makeappicon生成也行
-
info.plist内容如下,特别注意CFBundleShortVersionString,这个是正儿八经的版本号,后期软件更新递增就行,如1.0.0-》1.0.1,其他照抄
<?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>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
<string>${QMAKE_FULL_VERSION}</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) uses photos</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
appstoreconnect
TestFlight
好了,一些准备就绪就开始上传项目,这里先传TestFlight,好好测试App
- 添加内测人员
这里会发送邮件,内含兑换码,打开TestFlight,输入兑换码即可下载并测试
发布
内测可以正式发布了,发布时要传"如何登录的视频"和App的介绍,可以用中文,要尽量简洁方便理解,这个切记
- App Review
一般第一次审核时会被驳回,如Guideline 2.1 - Information Needed
除了要考虑下面这条,其他如实填写
Are the enterprise services in your app sold to single users, consumers, or for family use?
A: No, our app is provided to employees who have joined xxx.
记住真诚是最大的必杀技,要清晰明了的表达自己的意见,并附带视频、截图等
最后大功告成
附审核的问答
Hello,
Thank you for your resubmission, but we need additional information before we can continue our review.
Please reply to this message in App Store Connect with detailed answers to the questions below.
Review Environment
Submission ID: xxxx
Review date: January 13, xxx
Version reviewed: 1.0.0
Guideline 2.1 - Information Needed
We have started our review, but we need additional information to continue. Specifically, it appears your app may access or include paid digital content or services, and we want to understand your business model before completing our review.
Next Steps
Please review the following questions and provide as much detailed information about your business model as you can.
1. Who are the users that will use the paid features and services in the app?
2. Where can users purchase the subscriptions that can be accessed in the app?
3. What specific types of previously purchased services can a user access in the app?
4. What paid content, subscriptions, or features are unlocked within your app that do not use in-app purchase?
5. Are the enterprise services in your app sold to single users, consumers, or for family use?
Support
- Reply to this message in your preferred language if you need assistance. If you need additional support, use the Contact Us module.
- Consult with fellow developers and Apple engineers on the Apple Developer Forums.
- Provide feedback on this message and your review experience by completing a short survey.
Dear Apple Review Team:
Thank you for your patient review.
Firstly, let's introduce the xxx. It is a company that xxx, yyy, and more. Its homepage is "https://www.xxx.com".
The xxx is one of the brands of the xxx.
Regarding the 5 questions you mentioned, our response is as follows:
1. Who are the users that will use the paid features and services in the app?
A: Companies such as xxx, zzz and yyy will use the paid features and services.
2. Where can users purchase the subscriptions that can be accessed in the app?
A: Fisrtly, open webpage "https://www.xxxx.net/register" and fill in the relevant information and complete the registration to obtain the account.
Secondary, open webpage "https://www.xxxx.net/xxxx/xxxx", user can purchase the subscriptions in the "Billing&subscriptions" section.
Please see the attachment "How do users obtain an account. png", "Introduce of subscriptions.png" and "How do users purchase the subscriptions.png" for details.
3. What specific types of previously purchased services can a user access in the app?
A: User can access "xxx", "zzz", "yyyy", "vvv" and "www" in xxx app.
4. What paid content, subscriptions, or features are unlocked within your app that do not use in-app purchase?
A: All function are used after subscriptions, Employees can access the application during the trial period, but if exceeds, employees must subscribe to the service.
5. Are the enterprise services in your app sold to single users, consumers, or for family use?
A: No, our app is provided to employees who have joined xxx.