Can we deploy on iOS using Network instead of the cable like XCode does?
-
Hi,
Is it normal that QtCreator sees my iPhone disconnected although it is connected through the network in XCode?
I can build in Qt but not deploy. If I open the generated xcodeproj in XCode, I've no issue to deploy (using the Network).
Is there a trick to make it work directly in QtCreator?(I'm running MacOS in a VM, I had to use USB Network Gate in order to connect the iPhone. Now that the phone is paired, I can just connect from XCode using Wifi. That's convenient as USB Network Gate isn't free and the demo expires after 14 days.)
-
Hi,
I might be wrong here but I don't think Qt Creator currently knows how to handle an iPhone through a network connection.
-
Hi, re. deployment of your mobile app thru WiFi (not cable) from Qt Creator: it's not working but I think it's an upcoming feature.
But there are 3rd party apps out there that can help push your app bundle to your iphone across WiFi, I use one called ios-deploy
You should be able to install it using homebrew inside your VM:
brew install ios-deploy
To deploy, first check that the iPhone is up and running on your network:
ios-deploy -c [....] Waiting up to 5 seconds for iOS device to be connected [....] Found a02328a4bc16005421432a3071eb5bcacd25a6a23a (D211AP, iPhone 8 Plus, iphoneos, arm64) a.k.a. 'HenrysPhone' connected through WIFI.
Then navigate to your build folder and deploy to the phone, example:
cd /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos ios-deploy --bundle untitled.app [....] Waiting for iOS device to be connected [....] Using a02328a4bc16005421432a3071eb5bcacd25a6a23a (D211AP, iPhone 8 Plus, iphoneos, arm64) a.k.a. 'HenrysPhone'. ------ Install phase ------ [ 0%] Found a02328a4bc16005421432a3071eb5bcacd25a6a23a (D211AP, iPhone 8 Plus, iphoneos, arm64) a.k.a. 'HenrysPhone' connected through WIFI, beginning install [ 5%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/META-INF/ to device [ 6%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/META-INF/com.apple.ZipMetadata.plist to device [ 8%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/_CodeSignature/ to device [ 10%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/_CodeSignature/CodeResources to device [ 11%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/Default-568h@2x.png to device [ 13%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/LaunchScreen.storyboardc/ to device [ 15%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib to device [ 17%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib to device [ 18%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/LaunchScreen.storyboardc/Info.plist to device [ 20%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/untitled to device [ 44%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/embedded.mobileprovision to device [ 46%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/Info.plist to device [ 48%] Copying /Users/henry/Projects/build-untitled-Qt_5_15_0_for_iOS-Release/Release-iphoneos/untitled.app/PkgInfo to device [ 52%] CreatingStagingDirectory [ 57%] ExtractingPackage [ 60%] InspectingPackage [ 60%] TakingInstallLock [ 65%] PreflightingApplication [ 65%] InstallingEmbeddedProfile [ 70%] VerifyingApplication [ 75%] CreatingContainer [ 80%] InstallingApplication [ 85%] PostflightingApplication [ 90%] SandboxingApplication [ 95%] GeneratingApplicationMap [100%] Installed package untitled.app
It should be possible to add that command ios-deploy --bundle untitled.app as a custom deployment step in Qt Creator, but I haven't tested it yet, also I am not using the debugger (instead just depending on qDebug())