{"id":21145475,"url":"https://github.com/codemillmatt/partly-newsy-s1e1","last_synced_at":"2025-07-09T07:31:34.554Z","repository":{"id":50063435,"uuid":"202188047","full_name":"codemillmatt/partly-newsy-s1e1","owner":"codemillmatt","description":"Episode 1 of the Partly Cloudy Show - Hello News!","archived":false,"fork":false,"pushed_at":"2021-06-07T14:58:54.000Z","size":406,"stargazers_count":14,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-02-27T20:24:07.073Z","etag":null,"topics":["azure","azure-functions","c-sharp","xamarin","xamarin-forms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemillmatt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-13T16:56:07.000Z","updated_at":"2022-02-23T21:51:55.000Z","dependencies_parsed_at":"2022-09-19T05:51:43.073Z","dependency_job_id":null,"html_url":"https://github.com/codemillmatt/partly-newsy-s1e1","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemillmatt%2Fpartly-newsy-s1e1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemillmatt%2Fpartly-newsy-s1e1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemillmatt%2Fpartly-newsy-s1e1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemillmatt%2Fpartly-newsy-s1e1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemillmatt","download_url":"https://codeload.github.com/codemillmatt/partly-newsy-s1e1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225492617,"owners_count":17482924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-functions","c-sharp","xamarin","xamarin-forms"],"created_at":"2024-11-20T08:40:43.811Z","updated_at":"2024-11-20T08:40:44.617Z","avatar_url":"https://github.com/codemillmatt.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to Partly Cloudy\n\nI'm happy to announce today a new series that I started on the [Xamarin YouTube Channel](https://www.youtube.com/user/XamarinVideos) called [Partly Cloudy](https://www.youtube.com/watch?v=PAVb73wD4TY\u0026list=PLM75ZaNQS_FYeMHheKdscYMxRVqVtPeto)!\n\nIn each _season_ of Partly Cloudy, you'll learn how to build an app from scratch and take it all the way through deploying it to the App Stores. And with a name like Partly Cloudy - we'll explore topics like [Azure](https://azure.microsoft.com/free?WT.mc_id=partlycloudy-github-masoucou) and [DevOps](https://azure.microsoft.com/services/devops?WT.mc_id=partlycloudy-github-masoucou) along with [Xamarin development](https://docs.microsoft.com/xamarin/?WT.mc_id=partlycloudy-github-masoucou) ... you know ... Partly Cloudy!\n\n![Partly Cloudy Logo](https://res.cloudinary.com/code-mill-technologies-inc/image/upload/bo_1px_solid_rgb:000000,c_scale,h_600,r_20/v1571192518/PC-Header_busw9j.jpg)\n\nIn the first season, we'll build up a clone of the Microsoft News app!\n\n## The Shows\n\nEach week we'll cover a different aspect of mobile cloud development that's needed to build up our application.\n\nOne week we'll be building an [Azure Function backend](https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=partlycloudy-github-masoucou). The next we'll be diving in on [Xamarin.Forms Shell](https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell/?WT.mc_id=partlycloudy-github-masoucou). Then we'll be off and running with [App Center Auth](https://docs.microsoft.com/appcenter/auth/?WT.mc_id=partlycloudy-github-masoucou) or even doing some DevOps.\n\nMy aim is to keep each episode of Partly Cloudy to 15 minutes or less. \n\nThe shows themselves serve as a gateway for the topic of the week. Just enough to whet your appetite, get you started in the right direction, and show you some landmarks along the way.\n\nBecause I'm keeping the episodes so short, I won't be able to go deep into every single topic that each episode covers ... that's what these blogs, articles, and readmes are for.\n\nIf there's anything in the episode that needs more explanation - I'll cover it in an article like this. This way you'll have a step-by-step guide to get your app up and running! And the each episode's full code will be on [GitHub](https://github.com/codemillmatt/partly-newsy-s1e1).\n\nAnd as always, if you have any questions, or would like any topic from a particular episode expanded upon - please drop me a line on Twitter at [@codemillmatt](https://twitter.com/codemillmatt) - my DMs are always open!\n\n## Episode 1: Hello News\n\n[Episode 1](https://channel9.msdn.com/Shows/Partly-Cloudy/Hello-News-Intro-project-structure-and-HTTP-requests?term=partly%20cloudy\u0026WT.mc_id=partlycloudy-github-masoucou) is all about getting things up and running. File-\u003eNew for a Xamarin app.\n\nWe move fast though! Before the episode is over, our soon-to-be Microsoft News clone is invoking an Azure Function that's running locally!\n\nAnd that's where I want to expand a bit more. So grab yourself some [Free Azure](https://azure.microsoft.com/free?WT.mc_id=partlycloudy-github-masoucou) and settle in for some fun!\n\nFirst thing I want to talk about is installing the Azure Functions Core Tools locally.\n\nAnd then how to modify your iOS and Android applications to invoke the Function without it being served over HTTPS!\n\n### Azure Functions Core Tools\n\nFirst off - the official documentation on installing the [Functions Core Tools lives here](https://docs.microsoft.com/azure/azure-functions/functions-run-local?WT.mc_id=partlycloudy-github-masoucou).\n\nFwiw ... You want to run the **2.x** version of the tools.\n\nGot everything downloaded \u0026 installed? Good!\n\nIf you followed along with the video and used VS Code (or Visual Studio) to create the Function App from scratch, you'll be good to go.\n\nBut... if you're cloning my repo and starting from there, you'll need to add a `local.settings.json` file.\n\nCreate a file by that name, and add this to it:\n\n```language-json\n{\n  \"IsEncrypted\": false,\n  \"Values\": {\n    \"FUNCTIONS_WORKER_RUNTIME\": \"dotnet\",\n    \"AzureWebJobsStorage\": \"\"\n  },\n  \"ConnectionStrings\": {}\n}\n```\n\nYou should now be able to run and debug your Azure Function!\n\n### iOS HTTP Local HTTP Debugging\n\nBy default, iOS does not let you call out to any web service that is not served over HTTPS.\n\nAnd by default, our Azure Function is not served over HTTPS.\n\nBut not to worry - there's a relatively easy workaround for this that doesn't involve creating or trusting any certificates!\n\nOpen up the iOS's `Info.plist` file in a text editor - and add the following within the top level `\u003cdict\u003e\u003c/dict\u003e` element.\n\n```language-xml\n\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\u003cdict\u003e\n    \u003ckey\u003eNSAllowsLocalNetworking\u003c/key\u003e\n    \u003ctrue/\u003e\n\u003c/dict\u003e\n```\n\nThat's going to allow iOS to load up any content found locally regardless of its SSL state.\n    \nGood for us!\n\n### Android Local HTTP Debugging\n\nAndroid suffers from the same fate that iOS does. No loading of non-secure content! (It's actually a good thing.)\n\nBut Android is a little more difficult than iOS. Android 9 (API 28) and later requires SSL. And it just so happens that's what we're targeting with this project!\n\nMy good friend James Montemagno [wrote a great post](https://devblogs.microsoft.com/xamarin/cleartext-http-android-network-security/?WT.mc_id=partlycloudy-github-masoucou) on how to allow local network traffic on an Android emulator.\n\nRead the post for the full details - but essentially you have to add a special XML file and then specify in there to allow traffic on IP address `10.0.2.2` to go through in clear text.\n\nWhy `10.0.2.2`? Because that's the address that the Android emulator sees its local traffic come through as!\n\nBUT THAT'S NOT ALL!\n\nWe also have to change the URL of the function from `http://localhost:7071` to `http://10.0.2.2:7071` ... cuz that's what the Android emulator is using for it's local loopback.\n\nTo do that - use some [Xamarin.Essentials goodness](https://docs.microsoft.com/xamarin/essentials/device-information?WT.mc_id=partlycloudy-github-masoucou)!\n\n```language-csharp\nif (DeviceInfo.DeviceType == DeviceType.Virtual \u0026\u0026 DeviceInfo.Platform == DevicePlatform.Android)\n    FunctionUrl = \"http://10.0.2.2:7071/api\";\n```\n\n### Summing It Up\n\nSo episode 1 of Partly Cloudy is in the books!\n\nXamarin.Forms File-\u003eNew. The project's structure explained. Azure Functions. And having our application make an HTTP call out to an Azure Function ... running on our local machine!!\n\nThat was a lot of ground for an inaugrual episode! Can't wait to see you next week when we bring in the Bing News Search API!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemillmatt%2Fpartly-newsy-s1e1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemillmatt%2Fpartly-newsy-s1e1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemillmatt%2Fpartly-newsy-s1e1/lists"}