You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+58-58Lines changed: 58 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,19 @@
1
-
# Application Insights for Xamarin (1.0-alpha.2)
1
+
# Application Insights for Xamarin.Forms (1.0-alpha.3)
2
2
3
3
<spanstyle="color:green">If you want to use the a version of the SDK, which doesn't have a dependency on Xamarin.Forms, please switch to</span> [**feature/remove-xamarin-forms**](https://github.com/Microsoft/ApplicationInsights-Xamarin/tree/feature/remove-xamarin-forms)*(Thanks to [xvare](https://github.com/xvare))*. However, changes on this branch have not been fully tested, yet.
4
4
5
5
This project provides an Xamarin SDK for Application Insights. [Application Insights](http://azure.microsoft.com/en-us/services/application-insights/) is a service that allows developers to keep their applications available, performing, and succeeding. This SDK allows your Xamarin apps to send telemetry of various kinds (events, traces, exceptions, etc.) to the Application Insights service where your data can be visualized in the Azure Portal. Currently, we provide support for iOS and Android.
6
6
7
+
##Breaking Changes!
8
+
9
+
Version 1.0-alpha.3 of the Application Insights SDK for Xamarin.Forms comes with two major changes:
10
+
11
+
Crash Reporting and the API to send handled exceptions have been removed from the SDK. In addition, the Application Insights SDK for Xamarin.Forms is now deprecated.
12
+
13
+
The reason for this is that [HockeyApp](http://hockeyapp.net/releases) is now our major offering for mobile and cross-plattform crash reporting, beta distribution and user feedback. We are focusing all our efforts on enhancing the HockeySDK and adding telemetry features to make HockeyApp the best platform to build awesome apps. We've launched [HockeyApp Preseason](http://hockeyapp.net/blog/2016/02/02/introducing-preseason.html) so you can try all the new bits yourself, including User Metrics.
14
+
15
+
We apologize for any inconvenience and please feel free to [contact us](http://support.hockeyapp.net/) at any time.
16
+
7
17
## Content
8
18
1.[Requirements](#1)
9
19
2.[Release Notes](#2)
@@ -12,46 +22,47 @@ This project provides an Xamarin SDK for Application Insights. [Application Insi
12
22
5.[Developer Mode](#5)
13
23
6.[Basic Usage](#6)
14
24
7.[Automatic Collection of Lifecycle Events](#7)
15
-
8.[Exception Handling (Crashes)](#8)
16
-
9.[Additional configuration](#9)
17
-
10.[Integrate plugin sources](#10)
18
-
11.[Troubleshooting](#11)
19
-
12.[Contact](#12)
25
+
8.[Additional configuration](#8)
26
+
9.[Integrate plugin sources](#9)
27
+
10.[Troubleshooting](#10)
28
+
11.[Contact](#11)
20
29
21
30
22
31
## <aname="1"></a> 1. Requirements
23
-
The minimum API level to use the Application Insights Xamarin SDK in your **Android** app is 9. However, automatic collection of lifecycle-events requires API level 15 and up (Ice Cream Sandwich+). For **iOS** builds the minimum iOS version is 6.
32
+
The minimum API level to use the Application Insights SDK for Xamarin.Forms in your **Android** app is 9. However, automatic collection of lifecycle-events requires API level 15 and up (Ice Cream Sandwich+). For **iOS** builds the minimum iOS version is 6. Furthermore, the SDK has a dependency on 2.0.1.6505.
24
33
25
34
The SDK has been developed and tested with the following framework versions:
26
35
27
-
* Mono Framework MDK 4.0.2.5
28
-
* Xamarin.Android 5.1.4.16
29
-
* Xamarin.iOS 8.10.3.2
36
+
* Xamarin.Android 6.0.1.10
37
+
* Xamarin.iOS 9.4.1.25
30
38
31
39
Older versions might work, but haven't been tested.
32
40
33
41
## <aname="2"></a> 2. Release Notes
34
42
35
43
Also see changes in [older versions](NOTES.md).
36
44
37
-
* Add NuGet support
38
-
* Prevent linker from stripping SDK assemblies (release builds on iOS)
39
-
* Align public interface (remove additional parameters of setup()-method on Android)
40
-
* Add license and release notes
45
+
* Update underlying SDKs
46
+
* Application Insights SDK for iOS 1.0-beta.7
47
+
* Application Insights SDK for Android 1.0-beta.9
48
+
* Remove crash/exception reporting APIs
49
+
* Add APIs for setting common properties
50
+
* Remove API to set the `userID` field, add API to set the `authUserID` (fixes user statistics)
*`setup()`-method for Android changed: As on iOS this method only takes the instrumentation key as parameter
56
+
*Remove crash reporting and APIs for exception tracking
57
+
*`ApplicationInsights.SetUserId(string)`changed to `ApplicationInsights.SetAuthUserId(string)`
47
58
48
59
##<aname="4"></a> 4. Setup
49
60
50
61
We're assuming you are using Xamarin Studio to create your apps.
51
62
52
63
### 4.1 **Add SDK to your Xamarin solution**
53
64
54
-
Clone the repository in order to get the SDK sources. It contains 2 subfolder, one for a demo project (*DemoApp*)and one for the SDK (*ApplicationInsightsXamarin*).
65
+
Clone the repository in order to get the SDK sources. It contains 3 subfolder, one for a demo project (*DemoApp*), one for a local NuGet package (*NuGet*), and another one for the SDK sources (*ApplicationInsightsXamarin*).
55
66
56
67
There are several ways to integrate the Application Insights Xamarin SDK into your app. The recommend way is to use the NuGet-package. However, you can also integrate the SDK by importing the sources.
57
68
@@ -60,7 +71,7 @@ There are several ways to integrate the Application Insights Xamarin SDK into yo
60
71
3.[Configure a local package source](http://developer.xamarin.com/guides/cross-platform/application_fundamentals/nuget_walkthrough/) and let it point to
61
72
*ApplicationInsightsXamarin/NuGet*
62
73
4. Choose the local package source in the sources dropdown
63
-
4. Check the **Show pre-release packages** and select **ApplicationInsights SDK for Xamarin-Forms**
74
+
4. Check the **Show pre-release packages** and select **ApplicationInsights SDK for Xamarin.Forms**
64
75
5. Click the **Add Package** button
65
76
6. Repeat those steps for all other platform projects
66
77
@@ -96,7 +107,7 @@ Please see the "[Getting an Application Insights Instrumentation Key](https://gi
96
107
AI.XamarinSDK.iOS.ApplicationInsights.Init();
97
108
```
98
109
99
-
4. Replace `<YOUR_IKEY_HERE>`with the instrumentation key of your app.
110
+
4. Replace `<YOUR_IKEY_HERE>`with the instrumentation key of your app.
100
111
101
112
**Congratulation, now you're all set to use Application Insights! See [Usage](#6) on how to use Application Insights.**
The ```TelemetryManager``` provides various class methods to track events, traces, metrics page views, and handled exceptions. The class should only be used after *ApplicationInsights* has been [set up & started](#4).
126
+
The ```TelemetryManager``` provides various class methods to track events, traces, metrics, and page views. The class should only be used after *ApplicationInsights* has been [set up & started](#4).
The Application Insights Xamarin SDK enables crash reporting **per default**. Unhandled exceptions from managed (C# code) & unmanaged code (Java / native library) will be sent to the server as soon as possible: On Android this mighthappen even before the app crashes. For iOS builds unhandled exceptions will be reported right after the next app start.
To get more meaningful crash reports (File name and line numbers) you can change the **Debug Informations** level of your plattform specific app projects.
184
-
185
-
1. Right click on your Android or iOS app project in the Solution panel
186
-
2. Go to *Options* - *Compiler*
187
-
3. Set *Debug Informations* to `Full`. Make sure you have selected the right target (Debug/Release) before you check the results.
188
-
189
-
## <aname="9"></a>9. Additional Configuration
175
+
## <aname="8"></a>8. Additional Configuration
190
176
191
177
To configure Application Insights according to your needs, there are some other options listed here
192
178
193
-
### 9.1 Set User Session Time
179
+
### 8.1 Set User Session Time
194
180
195
181
The default time the users entering the app counts as a new session is 20s. If you want to set it to a different value, do the following:
196
182
@@ -199,25 +185,38 @@ The default time the users entering the app counts as a new session is 20s. If y
### 8.3 Override sessionID and ID of authenticated users
211
197
212
198
Application Insights manages IDs for a session and for individual users for you. If you want to override the generated IDs with your own, it can be done like this:
[**NOTE**] Depending on the platform your are running on, the common property API behaves is slightly different. While it is possible to set those properties at any time if your app is running on iOS, you can only set common properties on Android between the `Setup()` and `Start()` call (otherwise the call will just be ignored).
218
+
219
+
##<aname="9"></a> 9. Integrate plugin sources
221
220
222
221
There are several ways to integrate the Application Insights Xamarin SDK into your app. The recommend way is to use the NuGet-package. However, you can also integrate the SDK by importing the sources:
223
222
@@ -248,7 +247,7 @@ There are several ways to integrate the Application Insights Xamarin SDK into yo
248
247
249
248
4. Follow instructions in [4.2](#4)..
250
249
251
-
##<aname="11"></a> 11. Troubleshooting
250
+
##<aname="10"></a> 10. Troubleshooting
252
251
253
252
### SDK references broken
254
253
@@ -261,6 +260,7 @@ If you plan to support *iOS* you currently need to make a direct call to the iOS
261
260
```csharp
262
261
AI.XamarinSDK.iOS.ApplicationInsights.Init();
263
262
```
264
-
##<aname="12"></a> 12. Contact
265
-
266
-
If you have further questions or are running into trouble that cannot be resolved by any of the steps here, feel free to contact us at [AppInsights-Xamarin@microsoft.com](mailto:AppInsights-Xamarin@microsoft.com)
263
+
264
+
##<aid="11"></a> 11. Contact
265
+
266
+
If you have further questions or are running into trouble that cannot be resolved by any of the steps here, feel free to open a GitHub issue here or contact us at [support@hockeyapp.net](mailto:support@hockeyapp.net)
0 commit comments