{"id":1860,"date":"2020-10-25T11:47:46","date_gmt":"2020-10-25T11:47:46","guid":{"rendered":"https:\/\/sezeromer.com\/?p=1860"},"modified":"2023-03-04T13:19:45","modified_gmt":"2023-03-04T10:19:45","slug":"xamarin-forms-debugging-firebase-events","status":"publish","type":"post","link":"https:\/\/sezeromer.com\/en\/xamarin-forms-debugging-firebase-events\/","title":{"rendered":"Xamarin Forms Debugging Firebase Events"},"content":{"rendered":"<p>Hello friends. In this article, we will talk about how we can instantly see the events that we log to Firebase with Xamarin Forms. It is very important to be able to see this because this is how we can see if it is working properly. Testers can also check with Debug View. In my previous article, I talked about how to log an event to Firebase with Xamarin Forms, you can find it <a href=\"https:\/\/sezeromer.com\/en\/xamarin-forms-firebase-analytics\/\">here<\/a>.<\/p>\n<p>It&#8217;s actually pretty simple to do this. Let&#8217;s start with the android part first. You need to run the logged project on an emulator or your physical device. After that, you need to open the terminal and go to your Android SDK location. Because we need to mark this application as debug via adb. If you don&#8217;t know how to navigate from the terminal to your SDK location, you can also go through Visual Studio. If you choose SDK Command Prompt from the Tools section; Visual studio will open the terminal for you and go to the correct location.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1891\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-24-at-15.13.39.png\" alt=\"\" width=\"988\" height=\"292\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-24-at-15.13.39.png 988w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-24-at-15.13.39-300x89.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-24-at-15.13.39-768x227.png 768w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/p>\n<p>Here, you only have to write a single line of code. You need to enter the package name of your application instead of Package Name.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;swift&quot;,&quot;mime&quot;:&quot;text\/x-swift&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">adb shell setprop debug.firebase.analytics.app &lt;packagename&gt;<\/pre>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1894\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-24-at-15.20.04-1.png\" alt=\"\" width=\"697\" height=\"449\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-24-at-15.20.04-1.png 697w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-24-at-15.20.04-1-300x193.png 300w\" sizes=\"(max-width: 697px) 100vw, 697px\" \/><\/p>\n<p>Then, while logging the event, we will be able to see which event is logged on the android side via Debug View with a few seconds delay.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1895\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.28.35-1024x511.png\" alt=\"\" width=\"640\" height=\"319\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.28.35-1024x511.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.28.35-300x150.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.28.35-768x383.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.28.35-1536x767.png 1536w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.28.35-2048x1023.png 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>There are simpler methods for this process on the iOS side. Click the Run With option from the Run section and customize it while running the application. For this, we need to add the following line in the Extra Mlaunch Arguments section. In this way, we enable Debug View in the application.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;swift&quot;,&quot;mime&quot;:&quot;text\/x-swift&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">--argument=-FIRAnalyticsDebugEnabled<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1897\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.32.27.png\" alt=\"\" width=\"938\" height=\"590\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.32.27.png 938w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.32.27-300x189.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.32.27-768x483.png 768w\" sizes=\"(max-width: 938px) 100vw, 938px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1896\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.33.14.png\" alt=\"\" width=\"728\" height=\"537\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.33.14.png 728w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-25-at-14.33.14-300x221.png 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>If you have questions, you can reach by e-mail or comment. Good work.<\/p>","protected":false},"excerpt":{"rendered":"<p>Hello friends. In this article, we will talk about how we can instantly see the events that we log to Firebase with Xamarin Forms. It is very important to be able to see this because this is how we can see if it is working properly. Testers can also check with Debug View. In my [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1857,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[289,1,288,3],"tags":[733,436,734,725,115,8,7,440,566,732,22,735,119,736],"class_list":["post-1860","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-c-ile-ilgili-yazilar","category-ios","category-xamarin-ile-yapilmis-projeler","tag-analytics","tag-debug","tag-debug-view","tag-firebase","tag-ios","tag-omer","tag-omer-sezer","tag-sezer","tag-view","tag-visual-stuido","tag-xamarin","tag-xamarin-android","tag-xamarin-forms","tag-xamarin-ios"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1860"}],"collection":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/comments?post=1860"}],"version-history":[{"count":5,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1860\/revisions"}],"predecessor-version":[{"id":2655,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1860\/revisions\/2655"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media\/1857"}],"wp:attachment":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media?parent=1860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/categories?post=1860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/tags?post=1860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}