Update dependencies from https://github.com/dotnet/arcade build 20190725.3 (#15836)
[mono-project.git] / sdks / ios / README.md
blob74ca6aea2c6aaff1015491bc62c9614b6b42cbc0
1 # The test runner
3 The test runner is an objective-c app which embeds the runtime. It has a command line interface similar to the mono runtime, i.e. `<exe> <arguments>`.
5 # The test harness
7 The test harness is a C# app which automates running a test suite. It
8 install the app on the simulator, runs it, and collects output into
9 a log file.
11 # The app builder
13 This is a C# app which is used to create an ios .app bundle.
15 # Make targets
17 Similar to the ones in xamarin-macios/tests
19         * *action*-*what*-*where*-*project*
21 * Action
23         * build-
24         * install-
25         * run-
27 * What
29         * -ios-
31 * Where
33         * -sim-
34         * -dev-
36 * Project
38         * corlib etc.
40 The test apps require the corresponding test assembly to be already
41 built, i.e. by running make PROFILE=monotouch test in mcs/class/corlib
42 etc.
44 # Running tests on device
46 * The test apps need to be signed using a real signing identity instead
47 of the default ad-hoc signing. It also needs to include a provisioning
48 profile. This can be done using:
50 ```
51 make build-ios-dev-<app> IOS_SIGNING_IDENTITY="iPhone Developer: XXX" IOS_PROVISIONING_PROFILE="$HOME/Library/MobileDevice/Provisioning Profiles/test.mobileprovision"
52 ```
54 * The certificates/provisioning profiles need to be installed on the
55 host/device.
57 * The app is installed/run using 'ios-deploy', make sure it is installed.
59 * The host and the device needs to be on the same network. This is
60 needed because the test results are sent back over a tcp connection.
62 Other possible approaches for returning results:
64 * Using the ios os_log facility. Unfortunately, the command line 'log' tool cannot
65 seem to read the device logs, only the graphical Console app can.
66 * Using `idevicesyslog` from `libimobiledevice`.
67 * Have the app listen on a port, and have the test harness connect to it using
68 `libimobiledevice`, i.e. https://github.com/rsms/peertalk.
69 * Use a publish-subscribe pattern by uploading test results to some cloud service like
70 Azure EventHub. This only requires client side internet access on the device and
71 the test harness.
73 ## Notes
75 Bernhard needed this patch to make it work on his machine: https://gist.github.com/lewurm/7711187deadb57bae97a4d4be4df563b