I'm trying to build a xamarin.ios console application and send it to another member of the development team. We have an Apple Developer account, but not an Enterprise account.
I went through all the provisioning steps in "Ad-Hoc Distribution for Xamarin.iOS Apps".
Tried real clean.
I get only:
bin\iphone\Debug...
bin\iphone\Release...
...but no .ipa anywhere within the project folder.
In Project > props > iOS IPA Options I set Build iTunes Package Archive (IPA)
Ensure that you are building your application in Release mode.
Related
I am creating a Xamarin Forms app which I have uploaded to TestFlight
I am using Visual Studio which now includes the ability to post your archived build directly onto TestFlight
However when browsing the app on TestFlight, it says symbols were not included with the build
I can see by browsing through the project folder that a .dSYM was generated
How do I stipulate using Visual Studio (on Mac) should include this with the upload?
Aboud Provisioning in TestFlight :
To test your builds with TestFlight, you will need to create an App Store distribution profile with the new beta entitlement. This entitlement allows beta testing through TestFlight, and any new App Store distribution profile automatically contains this entitlement. You can follow the step-by-step instructions in the Creating a Distribution Profile guide to generate a new profile.
You can confirm that your distribution profile contains the beta entitlement when validating your build in Xcode, as illustrated below:
I have a ionic v1 app that I am trying to create both an android and ios version of the app using a Visual Studio Team Services build definition. The app builds out for both ios and android. I am now howerver having trouble with the Xcode IOS build of the app.
ionic cordova build ios --release
The above command creates the ios platform along with the xcode project and workspace file.
I then have the following VSTS XCode tasks to try build the ipa file for the ios app.
I have created both the p12 cert and provisioning profile and added them to the project. Both of which pass when running the build definition.
Here is my Xcode build configuration
The build definition fails at this point with the following erros
Code Signing Error: App has conflicting provisioning settings. App is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
and
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
After trying both manual and automatic signing with no joy, I finally got it to work with a few minor tweaks.
When installing the apple certificate, select temporary keychain and supply a password. If you don't use this the build agent will be waiting for user input to type the keychain password causing the build to timeout.
Switch to manual signing.
In the apple certificate install task and the Xcode build task to set the "Certificate Signing Identity" equal to the full name of the cert including the team name in brackets.
In my case, I was able to build, archive and export the ionic iOS App integrating a build.json file in the project structure, at root level:
{
"ios": {
"release": {
"codeSignIdentitiy": "iPhone Distribution: TEAM_NAME (TEAM_ID)",
"developmentTeam":"TEAM_ID",
"provisioningProfile": "UUID",
"packageType": "ad-hoc"
}
}
}
Notice that in my case I wanted to generate and ad-hoc distribution, but you can generate the app for the store, development or enterprise distribution.
Once the project is prepared and built, an exportOptions.plist file is generated in the iOS Cordova project with all the configuration to export the app and generate the IPA file.
Take a look at the cordova documentation about using build.json here: https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
Then, In the Xcode VSTS task, I followed all the recommendations from #psyco :
Manual signing using the full name for the signing identity and the provisioning profile UUID.
Also take into account that for the provisioning profile name, Xcode 9 (the one used by default on VSTS Mac OS Agents at this moment) does not accept Xcode-generated Provisioning Profile (with "XC iOS" in the name), mine was like that and was weird to find the solution, thanks to Cœur
Xcode 9: Provisioning profile is Xcode managed, but signing settings require a manually managed profile
With all those things, finally I was able to do it, and also to send the IPA to App Center using another VSTS task, so the IC cycle was completed.
I have a Xamarin.Mac solution that runs correctly in Debug or Release build from within Xamarin Studio, but I am struggling to create a working installer for it.
I want to use direct distribution (outside the App Store), so this is the procedure I used to create the installer:
Within the Apple developer portal:
Created "Developer ID" application and installer certificates
Created an App ID for the app
Created a provisioning profile that references the App ID and the
application certificate
Downloaded the 2 certificates and the provision profile
On the development Mac:
Double-clicked the 2 certificates and verified that they were
installed in Keychain Access
Double-clicked the provisioning profile and verified that it was
installed in Profiles
Within Xcode:
Opened Preferences > Accounts and downloaded the provisioning profile
Restarted Xcode to propagate the downloads to Xamarin Studio
Within Xamarin Studio:
Configured the Bundle ID in info.plist (to match the App ID)
Selected the Release build signing identity, as created above
Selected the Release build provisioning profile, as created above
Selected the Release build installer identity, as created above
Rebuilt the solution in Release build configuration
After the build is complete, the bin/Release folder contains everything I would expect, including the .pkg and .app files.
If I double-click the .pkg file, it appears to correctly execute the installation sequence, but the installed app is not listed in Applications or Launchpad. Moreover, if I run the .app file from its bin/Release folder, it executes correctly, but if I manually move it to the Applications folder, it crashes on startup.
Within Utilities > System Information > Software > Applications, I can see that the app was installed and that its source is an "Identified Developer", so this seems to confirm that the signing worked correctly.
I'm puzzled why, if it was correctly installed, I am unable to run it.
Sorry, I am quite new to both Mac and Xamarin.Mac, so I am not completely sure what I should expect to see here, but I assume it's more than I am currently seeing.
Any clues please?
Likely if you are able to run an application locally but not able to via an installed package, you are running into code signing issues.
As noted here you could try running your application from the command line:
Run your application from the command line and look at the output (in
the Terminal app) by using: MyApp.app/Contents/MacOS/MyApp (where
MyApp is the name of your application)
and see if you are getting a code signing specific error on launch.
If so, then possibly your machine may not be on the provisioning profile/certificate selected.
I want to automate the release for my xamarin iOS and android apps into the stores. I was wondering, if I can use fast lane tools via VSTS to do it.
Right now I directly add the playstore step in VSTS to deploy the android app into playstore. But, I want to make use of snapshot,snap grab, spaceship, supply and various other fastlane tools. Is it possible? If yes can anyone provide steps of how to do it? I tried searching the marketplace in vsts but the fastlane tools are not available.
Thanks.
FYI, VSTS released extensions to release iOS app on App Store or test flights.
Extension
Microsoft Visual Studio Team Services (VSTS) and Team Foundation
Server (TFS) use fastlane in their Apple App Store extension.
Getting Started
Once you have created or retrieved credentials for
your App Store account, then perform the following steps to automate
releasing updates from a VSTS build or release definition:
Install the App Store extension from the VSTS Marketplace
Go to your VSTS or TFS project, click on the Build tab, and create a new build
definition (the "+" icon) that is hooked up to your project's appropriate
source repo
Click Add build step... and select the
necessary tasks to generate your release assets (e.g. Gulp, Cordova
Build)
Click Add build step... and select App Store Release from the
Deploy category
Configure the App Store Release task with the desired
authentication method, the generated IPA file path, and the desired
release track.
Now when you build, your app will automatically be
published to iTunes Connect!
Fastlane Docs
As per this Apple article, I have set up my project to automatically code sign.
A Bot set to run a scheme using the "Release" configuration builds an archive which uploads to TestFlight fine (via pilot.)
A Bot set to run a scheme using the "Debug" configuration builds, but fails to upload to TestFlight because of a certificate error. Inspecting the .ipa, its embedded.mobileprovision contains a development certificate.
Why? What makes Xcode decide to use a Development certificate for Debug builds and a Distribution certificate for Release builds?
The debug builds use the iOS Team Provisioning Profiles. If you set the team on the Xcode portion of the Server app, it automatically downloads all the profiles to the right directory in your system for the bot to locate them. Otherwise you have to copy them manually to the /library/developer/xcodeserver/provisioning profile directory.