Offline Ad-Hoc deployment of iOS apps - ios

I have registered about 80 devices to my Apple Developer account. Now I want to be able to deploy my app to them in an environment where both XCode and device have no Internet connection. The problem being that if I deploy the app via XCode, the device must have network connection to verify the developer profile. (installed automatically when deploying the app via XCode)
How can I do this? I can setup XCode and the devices with Internet connection, but after the initial setup, developers will have to be able to make changes to the code and re-deploy the app onto the devices all without a network connection.

It takes a while to compile, but you could build,sign and package the app for Ad Hoc deployment, then install it via iTunes.
Steps:
In Xcode set the scheme's device to Generic iOS Device.
Then in the top menu: Product -> Archive.
...it takes a while to compile...
In the Organizer (pops up after build completes, or found in Window -> Organizer) select the build and click the Export button on the right hand side (under the big Upload to App Store... button).
Select Save for Ad Hoc Deployment and continue.
...You should get a .ipa file...
Open the .ipa file, which should open iTunes.
Plug your device into the computer via a lightning cable.
In iTunes go to the device then apps.
Click on the Install button next to the app in the apps list, so it says Will Install.
Click Apply.
All things going well you should have the app on the device!
If you then can't open the app you may find the device was not included in the provisioning profile, and you'll need to have some fun in the developer portal.

Related

Xamarin Deploying iOS App Ad Hoc Failing to Install

I am trying to deploy an iOS app Ad Hoc to an iPhone for beta testing. I've been developing the app on Windows VS, I have a Macbook air with all the necessary software (Xcode, VS, etc), and I have paired to it with VS on my Windows machine. I have also followed the following steps:
Created an Apple Developer account
Created an App ID with the bundle identifier as the same exact one as the one in info.plist
Created a signing certificate using my Macbook Air, downloaded it, and installed it into XCode
Created a provisioning profile with the App ID and the certificate, and made sure to include the device that I want to load the app onto.
Made sure everything above was set to "distribution" and "ad hoc" as needed.
Set Bundle Signing in my iOS project properties to Manual Provisioning, and selected the Signing Identity and Provisioning Profile to the ones that I created for this deployment.
Set the build to Release and the target to Remote Device
Ensured that the deployment target in info.plist was set to the highest available, which is 15.4, though my iPhone is at 15.6 (could this be the problem?)
Set the IPA Packaging Options to "Build iTunes Package Archive (IPA)"
Set "Include iTunesArtwork images and the iTunesMetadata.plist" to true in the same area
Successfully built the iOS project and produced a .ipa file
After all that, I've been trying to get the .ipa onto my phone, which is definitely the device I added to the provisioning profile.
I've tried two methods to do this, and both have failed:
Connecting my phone to my Windows machine and opening iTunes. Dragging the .ipa file onto the device. The app shows up on my phone, but when I try to open it, I get this error:
"This app could not be installed because its integrity could not be verified". Though it should have been.. The device is linked to the provisioning profile that was used to create the darn thing.
Connected my phone to my Macbook Air and accessed the device through XCode > Window > Devices and Simulators. I emailed myself the .ipa file and downloaded it onto the machine (the Microsoft docs explicitly state that emailing the .ipa should work just fine). In the "Intalled apps" section of the device, I clicked the little '+' and then pointed it to the downloaded .ipa. After a few seconds, it pops up an alert window that says "Unable to install *.iOS".
Other things I have tried since this has been a problem:
Recreating the above steps by re-registering my device, creating new certificates, downloading, installing, all that business.
Messing with the deployment target version.
Jumping out from behind the couch and startling it to make it do what it's supposed to.
I swear I'm done with Xamarin forever after this problem is solved, but all the headaches I've experienced have made me think twice about whether to even bother with .NET Maui haha thanks for any help you can provide
Firstly, the error This app could not be installed because its integrity could not be verified" may be caused by the proper certificate or the test devices are not visible in 'Devices' (UDIDs added) in developer.apple.com/account.I found two simialr issues, you can refer to them: link1, link2.
Secondly, have you follow this docs on how to generate the IPA file?

How can I test ios app i coded on Xamarin.Forms on Windows 10 using a real iPhone iOS device?

Currently i don’t have apple developer account. I am developing on Xamarin.Forms in Visual Studio 2019 on Windows 10. I also have a mac device. I installed xcode on this mac. I run simulators on windows by the help of this mac connection. But i want to test my app on real iphone. How can i do this ?
You cannot run your development app on iOS device unless you have an Apple developer account. After you create the account, you need to create provisioning certificates for the device, download them. Only then you can run it
To be able to deploy on a physical iOS Device, you either need to have an Apple Developer Account or you can get a free provisioning profile from XCode (No Apple Developer Account required).
To get a free provisioning profile,
You have to (on your Mac):
Open XCode > Preferences and add your Apple ID in the Accounts section. You can then close the Preferences tab.
Create a new project and select Single View App. In the Team drop-down list, set it to the Apple Id you just added.
After the creation of the project, target your iOS device for building.
Open General > Identity and make sure the Bundle Identifier matches the one found in your info.plist directly from your Xamarin.iOS app.
Under Signing, select Automatically manage signing and select your Team.
You should now be able to see your provisioning profile when clicking the 🛈 symbol under Signing - Provisoning Profile and you can test the deployment by clicking the run button.
To deploy your app from Visual Studio:
Make sure your Visual Studio is paired to the Mac.
Connect your iOS Device to the Mac
Navigate to iOS Bundle Signing in Your iOS Project > Properties.
For Configuration, select Debug.
For Platform, select iPhone.
Select Manual Provisioning.
Select the provisioning profile and the signing identity created by XCode
You should now be able to run the app. (Don't forget to target your IPhone for Deployment)
For more info, visit (https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=windows)
Plug your phone into your computer using a USB to Lightning connector. Click Trust on your phone. Click on the simulator on XCode and choose your phone name. Click build. You will get an error on your phone saying untrusted developer. Go to settings on your phone, click general then profiles. Click on the only one there and click trust. Now you can open your app.

Deploying IPA on iPhone

I'm trying to deploy my ipa to my iphone. but the blue outlines don't seem to appear on itunes. I've deployed a app to this device before but it seems after i updated my iPhone it isn't possible anymore. iTunes is updated to the latest update, which is 11.2.1 atm.
Using a mac in our network to build from, development is being done on a PC.
I have an apple developer account, the UDID is added to the iOS Provisioning Profile.
In the app the bundle identifie is set to the App ID in the provisioning profile.
What i've tried is to untrust all pc's doing (both):
To untrust all computers, tap Settings > General > Reset > Reset
Location & Privacy. This will also reset your location and privacy
settings. You can also untrust all computers by tapping Settings >
General > Reset > Reset Network Settings. This will also reset your
network settings.
Rebuild the application from scratch and still no luck, even with nothing in the project but the mainpage.xaml ( welcome to xamarin forms message ). app is build in xamarin
Add a colleague his iphone to profile, and rebuilding it. That works and i get to deploy the ipa to his iphone. I tried switching phones again, no luck there. He's updated to the latest ios version as wel.
So basicly my iphone won't accept my build.
Here is the another way to test your IPA in your device
If you have added UDID in your provisioning profile then,
Upload your IPA on https://www.diawi.com/ after uploading it will generate sharable link. Open this link in your device with safari browser and allow to download the application. This will download the application in your device and test your application.
you can install through xcode. In xcode go window->Devices and simulators.Select Phone . Click on + button select IPA.It will install ipa in phone.

How to run iOS application in real device through terminal without a paid apple developer account?

First this not duplicate of Test iOS app on device without apple developer program or jailbreak
I know it is possible to run app on device using Xcode 7 and free AppleId but i want to achieve this using terminal only Or in other words, Is there any way to generate provisioning profile & certificate using unpaid Apple Id through terminal.
If i will follow mentioned steps then my app installed and run successfully in device but i want to generate IPA using this free certificate and provisioning profile using terminal only.
In Xcode, add your Apple ID to Accounts preferences, described in
Adding Your Apple ID Account in Xcode.
In the project navigator,
select the project and your target to display the project editor.
Click General and choose your name from the Team pop-up menu.
Connect the device to your Mac and choose your device from the
Scheme toolbar menu. Below the Team pop-up menu, click Fix Issue.
Xcode creates a free provisioning profile for you and the warning
text under the Team pop-up menu disappears.
Click the Run button. Xcode installs the app on the device before launching the app.
I am working on some automation task and want to generate and install this signed iPA using unpaid Apple Id through Terminal.
I do not believe this is possible. The challenge is not just extracting the provisioning profile that is created in Xcode. That will not work because Xcode also manages the devices in the profile. So if your devices change, you need Xcode to register the new device and add it to the profile on Apple's servers, before re-downloading it. It also manages the bundle ID.
In theory, if you were to set up the app and all devices in Xcode before grabbing the provisioning profile from ~/Library/MobileDevice/Provisioning Profiles, maybe it would work.
If you can successfully get the profile. maybe you can use these instructions to build and install on the device as long as it was set up ahead of time: install application in iphone device through command line

IOS: install .ipa

I created an adhoc version of my app (.ipa) and I sent it to a my friend; now he hasn't his mac, can he install .ipa without macbook (with iTunes) on his iPad? or .ipa is possible to install only through iTunes with a mac?
You can install with the itunes for Windows.
If not use the "over the air" distribution. You'll provide an online link and he will install it directly in his phone. Search the web, there are many tutorials.
If you are interested in OTA installs, I would check out TestFlight, they are free and honestly fantastic.
Your friend can install the app using iTunes on Windows, but you will still need to make sure his UDID is added to the provisioning profile you built the app under. Otherwise it will fail on his end for code signing issues. TestFlight is good for making sure these are resolved before publishing. Otherwise you can put the .ipa file on dropbox for your friend to download.
An Easiest Way to Install .ipa file to iDevice listed below.
Make sure your device UDID is registered in Developer account.
Select Generic Device as Target and go for Archive to Generate .ipa file. (Hope you know the process of generating .ipa file for development)
Once your .ipa file is ready then connect your iPhone or iPad to MacBook and select Device and Simulator in X-Code Window option.
Enable "Connect Via Network" Option in the Popped Up Window.
Click on to the + Symbol button which is located at below Installed Application List Section.
enter image description here
Select .ipa file which was earlier generated and saved at some location of your MacBook.
enter image description here
It will take few seconds to get your application installed on your device and will also appear in "Installed Application List" with build number.
INFO: you can do this with connecting the iDevice to your system or if your iDevice in same Network (only if, you have enabled Connect Via Network to the device).

Resources