Xamarin - iPhone Distribution - ios

I have published an application on the AppStore and now I want to make a new Release for this app.
In Visual Studio I have just two build configurations, Debug and Release. The other configurations, "Ad-Hoc" and "AppStore", are missing
If I select the Release build configuration the "Archive" option is disabled, I can select just "Show the IPA file on server", if I load the file using "Load Application" it will be loaded like a testing version.
What can I do to be able to publish it like a release application?

I don't believe that Archive menu item has been implemented in Visual Studio yet. You can do an archive from the command line. See:
https://developer.xamarin.com/guides/ios/troubleshooting/questions/create-xcarchive/
As of Xamarin 4.x, it is now possible to create a .xcarchive from Windows by setting the ArchiveOnBuild property to true. For example, using MSBuild on the command line:
msbuild /p:Configuration=Release /p:ServerAddress=10.211.55.2 /p:ServerUser=xamUser /p:Platform=iPhone /p:ArchiveOnBuild=true /t:"Build" MyProject.csproj
The .xcarchive will be placed in the $HOME/Library/Developer/Xcode/Archives directory on the Mac build host that both Xcode and Xamarin Studio search to display previously built archives.
See this Xamarin Forums post for some brief additional notes about the ArchiveOnBuild property. See the documentation about Xamarin.iOS command line builds on Windows for additional details about the ServerAddress and ServerUser properties.

Related

Why can't I archive a Xamarin.Forms iOS application?

We are building a Xamarin.Forms app on windows machines using Visual Studio 2019. We have created the developer provisioning certificates, distribution certificates, developer provisioning profiles, and distribution profiles.
We pair Visual Studio to a Mac and can deploy our applications onto iOS devices. When in xCode on the Mac, we can see the provisioning profiles are installed.
When we look in Visual Studio, at Options->Xamarin->Apple Accounts, we can see everything looks like it should:
But we can't right-click->Archive our iOS project. It always appears grayed out.
Our project is set to Release and iPhone for the Active solution platform. What else needs to be done to get the archive functionality working for iOS projects inside visual studio?
I had the same issue, after deleting all bin and obj folders and moving just the proj and sln (don't copy .git, .vs etc) to mac I was able to publish using vs for mac.
note: I had to update vs for mac, otherwise it wanted to use application loader, which is no longer supported for xcode 11.
You need to have Visual Studio 2019 version 16.3 or higher to be able to archive iOS projects.
Alternatively, you can manually upload the IPA file from a mac using this from the command line:
xcrun altool --upload-app --type ios --file "/Users/*****/*****/******.iOS.ipa" --username "Your Apple ID" --password "app-specific password"

Xamarin iOS - Cannot create dSYM folder/files

I'm trying to symbolicate crash logs for a Xamarin.Ios app. But I cannot get the dSYM files.
My Environment
Visual Studio for Mac 7.4.3. Build 10
Xamarin.Ios Version: 11.9.1.24 (Visual Studio Community)
What I've tried
In Xamarin.Ios project > Compiler, set Debug Information to Full and Symbols Only. Built DEBUG/RELEASE on simulator and device, it did not create a dSYM folder in the designated debug or release bin path.
In Xamarin.Ios project > Ios Debug, enabled Debugging. Built DEBUG/RELEASE on simulator and device, it did not create a dSYM folder in the designated debug or release bin path.
With steps 1 and 2 still enabled, built app in VSTS. Log showed
CompileAppManifest: Directory "bin/iPhone/Release/My.app.dSYM" doesn't exist. Skipping.
Updated HockeyApp deployment task to publish dSYM along with ipa, but only ipa was published.
Created Copy To and Publish Artifact tasks in VSTS, but dSYM is not created so it is not copied.
UPDATE 20180427
Returned to VSTS, tweaked the Copy To task to use a different Source Folder /Users/vso######/vsts-agent/_work/2/s/iOS/bin/iPhone/Release and the Contents are **/*.ipa and **/*.dSYM/**. This worked.
Left the Publish Artifact task as is but updated the HockeyApp task Symbols File Path value to $(build.artifactstagingdirectory)/**/*.dSYM/**. This publishes a zip file to HockeyApp in the Symbols section. However, I'm not sure this is correct. The contents of the zip show:
Contents\
---------Info.plist
---------Resources\
-------------------------DWARF\
-------------------------------------MyApp.iOS
Research
dSYM file missing in Xamarin iOS app in VSTS #1983
Xamarin Insights App Settings
VSTS Copy and Build Artifacts
VSTS Drop Folder
Any recommendations?

visual studio for mac unable to create ipa file

I am using visual studio for mac Community Edition on MAC Virtual Machine. I have created a webView iOS application with iPhone Simulator. In project options, I have checked the box for creating ipa file but actually I am not able to find ipa file for the project in directory
bin->iPhoneSimulator->Release
Please help me.
Screenshots are attached.
Select a Release Configuration
Select a Device
Perform a Build / Archive for Publishing

How to build an iOS application using Visual Studio Tools for Apache Cordova and Xcode 8

This if question for those, who know what I am doing wrong and help for those experiencing the same issue.
I use Visual Studio 2015 on Win10 and Visual Studio Tools for Apache Cordova. I have Xcode 8 on my Mac. When setting up my projects, I follow this guide - https://taco.visualstudio.com/en-us/docs/ios-guide/. I also use a the hook available here - https://dpogue.ca/articles/cordova-xcode8.html. At this moment I am building ad-hoc application (I do believe store distribution type of application will be another issue).
Although I do all the steps mentioned in the lineked documents my builds fails with message "No suitable provisioning file found ..."(yes, I downloaded all necessary provisionig file under Acount dialog using my Xcode installation).
I found this solution - after the first build I open the project on Mac using Xcode (the project file is located under Macintosh HD/Users/MYNAME/.taco_home/remotebuilds/taco-remote/builds/BUILDNUMBER/cordovaApp/platforms/ios). I don't change anything, I only choose Build option from the Xcode menu. The project is build successfuly and since that, I am able to build the project from Visual Studio any time I need. Am I doing anything wrong? I think the compilation directly in Xcode shouldn't be necessary.
P.S. I just found, that new provisioning profile apears on my Mac, once it builds it - it's named "iOS Team Provisioning Profile: APP_ID". Probably, it's somehow related to the issue.
Finally I found the solution when building the app for app-store. It's necessary to specify provisionig file ID in your build.json. file. It's necessary to add this section INCLUDING the provisioningProfile key.
"release": {
"developmentTeam": "XXXXXXXXXXX",
"codeSignIdentity": "iPhone Distribution",
"provisioningProfile": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
"packageType": "app-store"
}
The ID is name of the provisioning file, which is stored on Mac in ~/Library/MobileDevice/Provisioning Profiles/
More info can be found How to build and upload a correctly signed iOS app to App Store and https://cordova.apache.org/docs/en/latest/guide/platforms/ios/

No IPA output for Cordova build in Visual Studio

I'm developing a mobile app with Visual Studio Tools for Apache Cordova CTP 3.1 in VS 2013. I have configured everything according to the MSDN specifications here Install Tools to Build for iOS. I am able to build the app and run the remote simulator (as described here Run Your Apache Cordova App on iOS).
My problem is there is no output from the build back on the Windows machine where I have Visual Studio. More than that, there is no .ipa file created on the Mac either. I can find the build at /Users//remote-builds/builds/ but that's all. I can open the project in XCode for instance, but that's not what I want.
I want the final package file that I can install on test devices and eventually publish to the store. How do I get that?
Also my goal is to setup a TFS build definition so I can get a build each time I commit changes. I need to get that output file to the drop location of my build.
From within VS, you will have to choose "Remote Device" or "Local Device" as your debug target and then "build" to get an IPA back.
Also, refer to TFS build does not copy Cordova project output for instructions on how to setup TFS for CI workflow.

Resources