How to build iOS App Store release file from command line? - ios

I can build an ad hoc release from command line but I struggle with building an App Store release from command line. How do you do that?
Ideally, I'd like to take an ad hoc release and transform that into an App Store release (resigning it?). That way I can test the ad hoc release and know the App Store release is identical.
If you can, please provide code examples.

Ad-Hoc and AppStore builds have differences in provisioning profile only which is included within the app. The cert is the same. So you don't need to build Ad-hoc, then resign. Just build AppStore and you will able to install this build on device which have Ad-Hoc provisioning profile installed. That's what we always do.

Related

Nativescript iOS App Signing App in Azure Devops

I have a pipeline that builds an ipa and an xcarchive. Currently, I have to download the xcarchive onto my Mac and open it, distribute the app and sign it using codesign. Ideally, I would like to achieve this in an Azure Devops Pipeline. Is there an easy way to distribute the xcarchive, grab the ipa, sign it and publish the ipa to the pipeline artifact?
If you want to sign app in Azure Pipelines, you could try with the Signing and provisioning options in Xcode pipeline task.
First, you could store your Apple certificate and Provisioning Profile as the secure files in Azure DevOps.
Then, you could use the Install Apple Certificate and Install Apple Provisioning Profile tasks install them from the secure files and make them available to Xcode during a build.
When you use Xcode task, please fill the inputs for Signing and provisioning options, such as selecting the signingoptions and other details. Meanwhile, the Xcode task also helps you build the project.
After that, you could publish the build output to your pipeline artifact.

flutter ios build fail - do i need to enroll apple developer?

I am starter of flutter.
I finished building my first app and I want to export ipa app to give my friends.
I don't want to release to apple app store, I just want to use myself(and my friends).
So, once I input flutter build ios (also i tried flutter build ios --debug ) ,
Running "flutter pub get" in mighty_v2... 4.0s
Building com.example.mightyV2 for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 66H5V644W9
Running pod install... 2,370ms
Running Xcode build...
Xcode build done. 5.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: No profiles for 'com.example.mightyV2' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.mightyV2'. Automatic
signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project
'Runner')
above error was founded.
I already know what is wrong. My problem is, do not enrolled apple developer, and do not enrolled my app profiles init.
So question is, do I have to enroll and give 100$? I just use this app myself although the app is debug mode. I just want light ipa file. What can I do?
It can be two things. First you need to create a iOS App Development provisioning profile,to create that click on Xcode at top of the screen beside apple logo then > preferences > accounts here you will find you apple id and below that you will see download manual profiles and manage certificate options. Create a profile here and clean the build folder then build again.
Second, if you have the provisioning profile and still won't be able to create the .ipa file from Product > Archive then you definitely need a developer account.
You do not need to have a developer account if you are not publishing. However, you will have to open your app in Xcode and go to the Signing & Capabilities tab under Runner to set a Team in order to build. This can be any Apple ID.
Using this method, you will not be able to just send the .ipa to your friends and them easily install it. You will need to push to their phones via Xcode.
I encourage you to checkout Firebase App Distribution as a much easier, free alternative to distribute your app to your friends if you do not want to publish yet.

Can`t debug iphone apps with on xcode

I can`t debug apps on my test device.
Error says,
A valid provisioning profile for this executable was not found.
I created the distribution provisioning file for App store.
Then on xcode, changed the build configuration to Release.
But above error shows.
When I debug with Debug mode, it works.
Could someone help me with this problem?
The type provisioning profile that you need to 'directly' run on your device is called 'Ad hoc'.
Not sure it still is the only way today but before you had to put the .ipa in your itunes and synchronise to install the application.
Nowadays, I find it is easier in the long run just to upload the 'appstore' builds to itunes connect build and enable testflight instead of the 'ad hoc' way

can you run old builds of an app after a new provisioning profile has been made?

So the app we are doing we make new builds for clients each week, if the provisioning profile used for the ad-hoc builds (or development ones) is changed, will the old builds we have made for the clients still work on the devices that were provisioned previously?
this has happened and im trying to run an old build on a device i know i have run the build on before (it is our testing device for builds) but now im getting provisioning profile problems when trying to install the old builds, surely the ipa that is signed previously should still work?

ad hoc builds install team provisioning profile

When I install an ad hoc build of my ipad app, I notice that I get both the ad hoc provisioning file and a "team provisioning profile" showing up on my ipad. I've only ever dragged the ad hoc provisioning file to my itunes and am trying to debug why for a while I had an error showing up when I was syncing the app, something about a signer not being valid.
Does anyone know what makes this team provision file get added and either 1) how I can prevent it from being added so I can debug the adhoc provision file itself or 2) if this team provision file is normal and how things work now with ad hoc builds? It shows up when I install it from my mac where I develop the app and also on a secondary mac where I don't develop the app so it doesn't seem to be something xcode is sticking on the ipad during debug builds.
Xcode automatically installs the Team Provisioning Profile onto the device, if it is registered to your account as a development device.
This profile is only used for apps build using the debug Xcode configuration. AdHoc builds are not signed with this profile but using the AdHoc profile. So those two profiles to not interfere.
The signer error usually means that the provisioning profile, which the app is requiring, is not installed on the device and the profile being inside the app doesn't have the device listed.

Resources