Skip to content

Commit

Permalink
Xamarin docs migration
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorbenei committed Nov 29, 2016
1 parent 3f9f8c6 commit 863e77a
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 2 deletions.
49 changes: 49 additions & 0 deletions docs/tutorials/build-with-fake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
To add support for your [FAKE](http://fsharp.github.io/FAKE/) build scripts,
open your app's [Workflow Editor on bitrise.io](/getting-started/manage-your-bitrise-workflow/)
and add a `Script` step to your workflow.

Below you can find an example script content to perform a build with FAKE,
_make sure you fill out the parameters at the top of the script_!

```bash
#!/bin/bash
set -ex

# Fill out these parameters:
# You should use the same directory that you set in your build script for the FAKE dll
output_directory=tools
fake_build_script=build.fsx
fake_target_name=
fake_option_flags=

# ---

fake_exe="${output_directory}/FAKE/tools/fake.exe"

if [ ! -f "${fake_exe}" ]; then
printf "\e[34mInstalling FAKE\e[0m\n"
nuget install FAKE -OutputDirectory "${output_directory}" -ExcludeVersion -NoCache -NonInteractive
fi

command=("mono" "${fake_exe}")

if [ -n "$fake_build_script" ] ; then
command+=("${fake_build_script}")
fi

if [ -n "$fake_target_name" ] ; then
command+=("${fake_target_name}")
fi

if [ -n "$fake_option_flags" ] ; then
command+=("${fake_option_flags}")
fi

printf "\e[34mExecuting ${fake_build_script}\e[0m\n"
$(IFS=' '; echo "${command[*]}")
```

You should update the `output_directory` and `fake_build_script` variables for your needs and you are ready to go!

!!! note
You should set the `output_directory` to the same directory where your build script will search for the FAKE dlls.
27 changes: 27 additions & 0 deletions docs/xamarin/add-custom-sources-to-nuget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
If you are using third-party NuGet packages in your application
you have to add these sources to your NuGet package sources.

Simply add a new `Script` step to your workflow with the following bash script as the content:

```
#!/bin/bash
set -ex
nuget sources add -Name NAME_FOR_SOURCE -Source SOURCE_URL
```

!!! warning
Don't forget to update the `NAME_FOR_SOURCE` and `SOURCE_URL` parameters,
and make sure to place the `Script` step before the `NuGet Restore Step`.


### Custom NuGet source with credentials

If you need to set credentials for your NuGet source you can modify the `Script` above in the following way:

```
#!/bin/bash
set -ex
nuget sources add -Name NAME_FOR_SOURCE -Source SOURCE_URL -UserName NUGET_USERNAME -Password NUGET_PASSWORD
```
3 changes: 3 additions & 0 deletions docs/xamarin/add-unit-test-to-your-xamarin-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__Work in progress__

_Previous, outdated tutorial can be found at: http://devcenter.bitrise.io/v1.0/docs/add-unit-test-to-your-xamarin-app ._
43 changes: 43 additions & 0 deletions docs/xamarin/deploy-your-xamarin-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
After successfully adding your Xamarin application we will create a default workflow (build configuration) for you.
This workflow includes a `Deploy to bitrise.io` step by default.

Building the default workflow will checkout your git repository,
archive your application and move all the generated applications ( `ipa` / `apk` ) to the deployment folder.
After the archive the `Deploy to bitrise.io` step will upload these files to Bitrise.

We will not just upload your application,
but send out an email to your team as well.
They can simply open the email from their mobile device and install the application from there.
Also you can send out the build to any tester by providing their email address.

## But what if you are already using or want to use another deployment service?

Besides the default Bitrise deployment we have [dozens of other services integrated](http://www.bitrise.io/integrations#?filter=deploy) to Bitrise.
You can simply modify your workflow and add the ones you would like to,
like [HockeyApp](http://hockeyapp.net/), [Appaloosa](/tutorials/deploy/publish-your-app-to-appaloosa/)
or [TestFairy](/tutorials/deploy/deploy-to-testfairy-with-bitrise/) -
just filter by the `deploy` tag in the list to see all the available deployment steps.

Simply add the integration Step you want to use instead of the `Deploy to bitrise.io` step or after that
(but in any case after the `Xamarin Archive` step, as that's the step which generates the
deployable artifact - `.ipa`, `.apk`, ...), and fill out the parameters of the step.

The next time you start a build your app will be deployed to the service of your choice!

## Code signing

### Xamarin.Android

For Xamarin Android project code signing see the [Create signed APK on bitrise.io](/tutorials/create-signed-apk-on-bitrise/) tutorial.

### Xamarin.iOS

__Work in progress__ - this section will be updated soon.

Right now the best way to get started with Xamarin.iOS code signing
is to run [codesigndoc](https://github.com/bitrise-tools/codesigndoc#one-liner)
and upload the files it generates, or to manually upload the code signing
files you use locally.

_Code signing files can be uploaded to [bitrise.io](https://www.bitrise.io)
in the app's Workflow Editor, under the `Code signing & Files` section of the editor._
7 changes: 5 additions & 2 deletions docs/xamarin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ video session about setting up Xamarin apps on Bitrise here: [https://www.youtub
* [Connect your Xamarin account to Bitrise](/xamarin/connect-your-xamarin-account-to-bitrise/)
* [Creating your first App on Bitrise](/getting-started/create-your-first-app-on-bitrise/)
* [Restore NuGet packages and Xamarin Components](/xamarin/restore-nuget-packages-and-xamarin-components)
* [Deploy your first Xamarin app](doc:deploy-your-first-xamarin-app)
* [Add Unit Test to your Xamarin app](doc:add-unit-test-to-your-xamarin-app)
* [Deploy your Xamarin app](/xamarin/deploy-your-xamarin-app)
* [Add Unit Test to your Xamarin app](/xamarin/add-unit-test-to-your-xamarin-app)
* [Run your tests in the Xamarin Test Cloud](/xamarin/run-your-tests-in-the-xamarin-test-cloud)
* [Add custom sources to NuGet](/xamarin/add-custom-sources-to-nuget)
* [Build with FAKE (F# Make)](/tutorials/build-with-fake/)

!!! note "Community created tutorials"
For more, community created tutorials, see the Xamarin section on the
Expand Down
24 changes: 24 additions & 0 deletions docs/xamarin/run-your-tests-in-the-xamarin-test-cloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
To add [Xamarin Test Cloud](https://xamarin.com/test-cloud) to your Xamarin application,
go to your app's `Workflow` tab on [bitrise.io](https://www.bitrise.io) to open the Workflow Editor.

## Xamarin Test Cloud for iOS apps

In the Workflow Editor [add](/getting-started/manage-your-bitrise-workflow/#add-a-new-step)
the `Xamarin Test Cloud for iOS` step to the workflow.
After adding the step you should set the following parameters:

* **Path to Xamarin UITest Project**: The relative path to your test project _(relative to the repository's root directory)_
* **User email**: Your Xamarin user's email address
* **Api key**: Your Xamarin Test Cloud API key
* **Device selection id**: The device id that you would like to use

## Xamarin Test Cloud for Android apps

In the Workflow Editor [add](/getting-started/manage-your-bitrise-workflow/#add-a-new-step)
add the `Xamarin Test Cloud for Android` step to the workflow.
After adding the step you should set the following parameters:

* **Path to Xamarin UITest Project**: The relative path to your test project _(relative to the repository's root directory)_
* **User email**: Your Xamarin user's email address
* **Api key**: Your Xamarin Test Cloud API key
* **Device selection id**: The device id that you would like to use
5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pages:
- Efficient Continuous Integration and Deployment Workflow for iOS development: tutorials/efficient-continuous-integration-and-deployment-workflow-for-ios.md
- Configure and connect to your VPN: tutorials/vpn-configuration.md
- Auto deploy your Middleman blog / static website: tutorials/auto-deploy-middleman-project.md
- Build with FAKE (F# Make): tutorials/build-with-fake.md
- Deployment Tutorials:
- Bitrise OTA App Deployment: tutorials/deploy/bitrise-app-deployment.md
- Publish your app to Appaloosa: tutorials/deploy/publish-your-app-to-appaloosa.md
Expand Down Expand Up @@ -71,6 +72,10 @@ pages:
- About Xamarin: xamarin/index.md
- Connect your Xamarin account to Bitrise: xamarin/connect-your-xamarin-account-to-bitrise.md
- Restore NuGet packages and Xamarin Components: xamarin/restore-nuget-packages-and-xamarin-components.md
- Deploy your Xamarin app: xamarin/deploy-your-xamarin-app.md
- Add UITest to your Xamarin app: xamarin/add-unit-test-to-your-xamarin-app.md
- Run your tests in the Xamarin Test Cloud: xamarin/run-your-tests-in-the-xamarin-test-cloud.md
- Add custom sources to NuGet: xamarin/add-custom-sources-to-nuget.md
- Tips & Tricks:
- Skip a Build (skip ci): tips-and-tricks/skip-a-build.md
- Attach any file as an Artifact to the Build: tips-and-tricks/attach-any-file-to-build.md
Expand Down

0 comments on commit 863e77a

Please sign in to comment.