What is the best way to set up CI/CD for Xamarin Forms PCL Project - xamarin

My Xamarin Forms PCL project is included a lot of DDL that requires to connect embedded devices. so i am working on to get an iOS/Android CI/CD set up.
I tried with MSBUILD plugin with Jenkins - its not always building and failing to build dependency projects.
I explored and found out that Cake Build is very good and started that. Still it failing.
Looking for any better solution for Xamarin PCL CI/CD other than Jenkins and build scripts.
I explored and found out that Cake Build is very good and started that. Still it failing.

Did you tried Appcenter Build?
https://appcenter.ms/apps

Related

Release Build Issue in Android - Nativescript+ Angular

I am having an issue while taking a release build in android:
I am having different html files for android and ios for two components. There is no issue while building or running in develop mode.. When I am trying to take a release build this possess as an issue and not able to take the build. Is there any solution for this. Thanks in advance

Xamarin Forms on TeamCity: Xamarin.Forms tasks do not match targets

I am building a Xamarin Forms solution (containing an iOS library, an Android library and a .NET Standard library) in TeamCity.
I have just upgraded to Xamarin Forms 3.1.0.583944. The project builds without any problem locally, but on my TeamCity build server (Windows Server 2016), I'm consistently getting the following error:
C:\BuildAgent\work\f12265fda07473c1\src\packages\Xamarin.Forms.3.1.0.583944\build\netstandard2.0\Xamarin.Forms.targets(44,
3): error XF002: Xamarin.Forms tasks do not match targets. Please
ensure that all projects reference the same version of Xamarin.Forms,
and if the error persists, please restart the IDE.
I have tried downgrading Xamarin Forms, and rebooting the build agent. Neither of these has succeeded.
UPDATE: There is a new error:
C:\BuildAgent\temp\buildTmp.nuget\packages\xamarin.forms\3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets(44, 3): error XF002: Xamarin.Forms tasks do not match targets. Please ensure that all projects reference the same version of Xamarin.Forms, and if the error persists, please restart the IDE.
For some reason, the agent is looking for Version 3.0.0.561731. But that is no longer anywhere in the project. I had deleted the entire C:\BuildAgent\temp\buildTmp\.nuget\packages\xamarin.forms\3.0.0.561731 folder, but it has come back.
ADDENDUM: I notice that every time I upgrade Xamarin.Forms to this version via NuGet, it fails to uninstall the old package, and I have to restart Visual Studio to complete the process. This happens without fail. I am fairly sure this is connected to the breaking build, but that is more due to speculation and experience than concrete analysis.
I found out how to fix the problem, but it's not clear to me why it would manifest in the way it has -- locally and even when I RDP onto the build agent, it builds without trouble, but when I run the build agent from the TeamCity console I hit these compilation errors.
One of my dependencies is a NuGet package, which itself has a dependency on Xamarin Forms. Fortunately, I own that NuGet package, and was able to upgrade its Xamarin Forms version to the latest available package. If I didn't own that package I would be completely stuck though -- so this is only a partial solution.
The above answer was quite helpful for me . I would like to add a couple of additional notes though. I was facing this issue when I was using Xamarin Forms 3+ and my local build was being really inconsistent with the same error "Xamarin.Forms tasks do not match targets. Please ensure that all projects reference the same version of Xamarin.Forms, and if the error persists, please restart the IDE.". Then I cleared my local NuGet cache and rebuilt the project and saw that there were other NuGet package versions being pulled for Xamarin Forms when I did a NuGet restore. I then reversed the ordering of the NuGet packages starting with Xamarin Forms and it all worked fine.

Rider 2018.1 iOS simulator not running after build

I have a Xamarin iOS and Android project with a dotnet standard 2.0 library that is being shared between the two operating systems. When trying to run my iOS project, the project build fine and doesn't give any errors but Rider cannot seem to deploy it to a simulator.
I will give the following error:
I thought it could be the problem what is described here, but that did not help. When running the project in VS on MacOs, the iOS project also build and runs on a simulator.
Failed to load Xamarin Forms project with .NET Standard 2.0 Lib in Rider
Can anyone help me trying to fix this, please?
You are not the only one with this problem, the problem is already reported multiple time in Riders issue tracker:
https://youtrack.jetbrains.com/issue/RIDER-15544
https://youtrack.jetbrains.com/issue/RIDER-15514
https://youtrack.jetbrains.com/issue/RIDER-15419
According to the last issue, it's fixed in Rider 2018.2, which will probably be released pretty soon.

Same Jenkins Configuration for 2 Different Jobs

Greetings StackOverflow Community!
Is it possible to have the same configuration setup for an XCode Project and an Appcelerator Project in Jenkins?
I haven't really tried creating Titanium Project, and I'm not sure if it can generate an XCode Project (Like in Unity). If it's possible, can we do a generic setup?
EDITED:
Now I know that an Appcelerator Project builds an XCode project as well. Can we add an additional layer in Jenkins which dynamically determines the project then points the Project directory?
Or would it be best to just have a setup guide for XCode project and a different setup guide for Appcelerator Project in Jenkins? (As I'm documenting a guide, by the way)
Since Titanium indeed generates an Xcode project, you could do pretty much anything you'd do with an Xcode project once Titanium is done. So I'd document the Titanium compile step as a stage before continuing with either a Titanium-compiled or plain Xcode project.

What is the best way of integrating TeamCity and Crashlytics?

We are developing mobile apps (both Android and iOS) and started to build our apps with TeamCity. The problem is how to upload our builds made by TeamCity to the Crashlytics? How do you solve this problem?
I am not aware of existing TeamCity of Crashlytics plugins for integration.
The simpliest workaround would be adding a Command Line Runner build step with a call to curl that will upload rerquired files.
For iOS you can use fastlane and trigger the uploading through the teamcity.
Fastlane has plugins for crashlytics.
For android you can write a custom script to upload the artifact (apk) to crashlytics.
We are using Hockey app and doing it that way.
Probably a little late but below gradle command will upload you apk to crashlytics beta
./gradlew crashlyticsUploadDistributionRelease
For details, you can have a look at Crashlytics Beta distribution docs.

Resources