How to install iOS app on a real device for iOS Test Automation? - swift

I am writing XCUITests for an app without source code. I have .app file of the app.
I am using XCUIApplications init(bundleIdentifier:) method to launch the application.
This works fine if I have the app pre installed on the device.
If I don't have the app insalled, XCUIApplication fails to launch the app as it cannot find the build.
How can I provide .app file of the app to Xcode to install and launch the application using init(bundleIdentifier:) ?

It is usually done with https://github.com/libimobiledevice/ideviceinstaller
This tool allows installing and uninstalling the apps

Related

flutter 2 ,can build an iPhone app (ios) without an Apple device?

I heard that (flutter 2) after the new update, you can build an iPhone app (ios) without an Apple device. Is this correct? If this is true, how can I do that?
You can write an iPhone-compatible app without Apple device but you will need a Mac to test, build and push it to the App Store. Nothing changed about that with Flutter 2
No, you can't build without a MacOS.
However, you can use an external tool like Appollo (https://github.com/Appollo-CLI/Appollo), a Python CLI that lets you connect to a MacOS machine to test your app and configure Xcode.
You can install Appollo like this:
pip install appollo
Follow the doc here (https://appollo.readthedocs.io/en/master/tutorial/index.html) to link your Apple developper account with Appollo and more.

Installing a TestFlight app on iOS iPhone Simulator - Registration Failed

I'm attempting to install a TestFlight app on XCode's iOS simulator using the iPhone simulator. The link to the TestFlight app takes me to a page that says "This device will need to be registered before it can install betas."
There is a friendly Register button. When I click the register button, it says "Registering Device" and then it takes me to the iPhone's General settings page. If I navigate back to the TestFlight page, it says "Registration Failed."
Does anyone know of a way to install a TestFlight app on the iPhone Simulator? Thanks.
The app you are trying to install is an app compiled for arm architecture, which is different from the simulator (the simulator is not an emulator). The simulator only runs x86 apps compiled for it. You will need to contact the developer of the application to send you the x86 binaries, and add them directly to the application directory of the iOS simulator. The directory (on Xcode 4.5 beta 4) is /Applications/Xcode45-DP4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications. Note that the simulator's sdk version has to match the version of iOS you are trying to use the simulator with.
If you need test your Release application
you can run your on a release build go to
->Product->Scheme -> Edit scheme-> in Run change debug to Release
in this you can check your release build in simulator
If I had to guess, I would presume that since the Simulator is not a valid device, it is not able to install the TestFlight Profiles onto the device, and therefore failing registration process (when you are directed to the iPhone's Settings, it tries to install a profile on your device).
May I ask why you are trying to install the app via the iPhone Simulator? If the app's code exists on GitHub, you can use the GitHub for Mac app to checkout the code, and XCode to compile the project and build it to the iOS Simulator. There should not really be any reason to have to install TestFlight on the iOS Simulator.

Application failed to install in iPad2

My Application runs fine in iPad simulator, but when i try to install it in iPad 2.. It throws me Application Name Failed to install.
iOS version is 5.0.
I am using Titanium Mobile for development. The same Application works fine in Android emulator and device.
You need to have a developer certificate before you can deploy the application in iPad2.
https://developer.apple.com/programs/ios/
Once you have got the certificate, you can right click on your project and select install on IOS device. It would ask to upload your dev certificate which you have got for your iPad. From there i see no problem in deploying your app.
This would generate an .ipa file.
Note: for iOS 5.0, you need to have 1.8 and above to make it work properly.

how to run project in iphone mobile

hi i am new to iPhone application development. i developed a simple project on xcode now i check it in mobile. how can i done this ,means need to create exe file or any thing else
pls help me
The first step is to join the iPhone development program. Once you that and follow the instructions of createing a developer certificate you can run your code on a physical device. If you're using the latest version if Xcode just connect your device - choose device in the build settings and build & run. It will install the app on your device and run it.
iPhone developer program
Obtaining your iPhone Development Certificate - Requires login to apple dev center

How can I create a Installer package for iPhone?

How can I create a Installer package for iPhone ?
You should expose your question in a detailed and better way. Are you using xcode? It has everything you need to build your app for the iPhone.
You just code the app, and hit the button "build" or "build and run" and the .app file is automatically generated.
There is no such thing as an "installer package" for iPhone. As a developer, you create an app bundle, containing the executable and all resources, and just zip that and upload it to the App Store via iTunes Connect.
Detailed instructions for uploading an app to the App Store are available in the iPhone program portal.
Installation of an app on the device is handled by the iPhone OS and the App Store or iTunes (or by Xcode during development).