Xamarin iOS - Firebase Analytics is not available - xamarin.ios

I have download the example project and library from this link: Xamarin Firebase but after 2 days of configuration i get this error when i launch the app:
[Firebase/Core][I-COR000022] Firebase Analytics is not available.
I did not find documentation related to this error for Xamarin iOS Firebase Analytics and can not find a solution.
I have reference the same library of the example project, checked the GoogleService-Info.plist and insert it in the project as documentation, called the App.Configure ();.
Nothing to do, does anyone have any idea?

Resolved!
Firebase Analytics requires 3 references to work:
.Core
.Analytics
.IstanceID
Following only the code in the documentation the project at start-up load only .Core skipping the other two, this causes the error.
To work around this problem, I added in AppDelegate:
using Firebase.Analytics;
using Firebase.InstanceID;
and before of App.Configure (); i have add this two line to force the app to load the two assemblies:
Firebase.Analytics.Loader loader1 = new Firebase.Analytics.Loader();
Firebase.InstanceID.Loader loader2 = new Firebase.InstanceID.Loader();
Of course, if you implement other instructions later using these two assemblies, you will not need these two instructions.

Related

Has anybody been able to successfully get an Express app running from Azure Functions?

I'm interested to see if anybody has managed this? If so, if they could point me to some boiler plate code?
I've tried running these packages:
https://www.npmjs.com/package/azure-function-express
https://www.npmjs.com/package/azure-function-express-2
https://www.npmjs.com/package/azure-aws-serverless-express
I've also tried running these with & without using the Serverless framework all without any success.
No routes that I've set up respond as expected and I'm unable to get any response from the server at all.
After several hours of testing I managed to get this working so I created this report / template to help others get started:
https://github.com/ytsruh/azurefunction-express-template
I'm still unable to get this working via the Serverless framework as the template (Serverless template, not the above repo) appears to not be updated to working with Azure Function Runtime v2.
The other things of note, is that the folder structure appears to be very important & opinionated. Eg the function/app must be inside a folder with the associated function.json file. I'll keep searching for a way to resolve this so it can follow a more 'standard' file structure for an ExpressJS app.

Shared library from Create React App projects giving (jsx isn't currently enabled error)

I'm attempting to use a shared library for reusable components and using just 2 out of the box Create react apps. One is called 'shared-lib' the other 'project-example'. I made a super simple component in shared-lib, exported (working when I test). I NPM linked both seemingly correctly (shared-lib is in my project-example node_modules with a special icon).
I built the shared-lib, I also imported the shared component (SharedComponent)
import SharedComponent from 'shared-lib'; <- lib is in my node_modules
../shared-lib/src/index.js
SyntaxError: /Users/bemker/dev/portals-modern/shared-lib/src/index.js: Support for the experimental syntax 'jsx' isn't currently enabled (8:3):
Add #babel/plugin-transform-react-jsx (https://git.io/vb4yd) to the 'plugins' section of your Babel config to enable transformation.
I'm following a vid tutorial and he didn't have to eject his create react app, but I'm guessing this is where the error is coming from.
Here is the vid I'm following if anyone wants to take a look. https://www.youtube.com/watch?v=B7iYJT_ll-U
Anyone know why this is occurring, or how to get past it (preferably without ejecting)?
I couldn't find a solution using the above, but there is a package similar to Create React App for building libraries that made it pretty easy. Its not maintained by FB, but it worked for me.
https://github.com/transitive-bullshit/create-react-library
https://github.com/transitive-bullshit/react-modern-library-boilerplate (multiple exports)
vid tutorial using it: https://www.youtube.com/watch?v=N8d-CLmg3hw
second w/ 'real' usage: https://www.youtube.com/watch?v=6R699AQYH74
Hope this helps someone.

How to use GCP Runtime Configurator from Node.js?

I'm working on a Node.js application hosted on Google Cloud, using Google Application Engine. The app has a few settings like the following:
const TASK_BATCH_SIZE = 50;
Currently, every time we need to change some settings like that one to do some tests we need to re-deploy the app, and that happens very often. We are looking for some alternatives inside the Google Cloud ecosystem that allows us to configure our running services without needing to re-deploy.
One of the things we found in the docs was Runtime Configurator, which still seems to be a beta product. For Node.js specifically nodejs-rcloadenv is the only client library we found, but doesn't seem to support the Watcher / Waiter concepts described in the Runtime Configurator docs or any other way to subscribe to variable changes in a configuration resource.
Is Runtime Configurator the solution to our problem? Are there any other services inside the Google Cloud ecosystem, or any other library for Node.js that could help us with this?
If you want to update or to make some settings changes in the service, you need to re-delpoy the service.
You can't use Runtime Configurator as it's for Compute Engine and not for App Engine.
You can create a feature request on Google's Public Issue Tracker for your issue ( to update configurations without re-deploying the service).

Azure Function Structure

I'm trying to wrap my head around how we're supposed to build Azure functions.
I love the idea of building serverless, compact, single-function apps that respond to events.
Here are the problems I'm running into:
I have nice class libraries built in .NET Standard 2 that handle all my "backend needs" namely handling CRUD ops with Cosmos Db, Azure Table Storage, Azure SQL, Redis, Azure Storage. No matter what I did, I couldn't integrate these class libraries into an Azure Functions project. More details below.
Also, getting dependency injection in Azure Functions project has proven to be quite a task -- especially with my class libraries mentioned above.
At this point, the only option I'm seeing is to "copy and paste" code into a new Azure Functions project and use it without any DI.
This seems to go against "best practices". So what's the solution other than either to create monolithic code or wait till Azure Functions support .NET Core and DI.
I thought I could use my .NET Standard class libraries from a regular Azure Functions project targeting .NET Framework. After all, the idea of .NET Standard is to "standardize" things. I opened a couple of posts here on SO. I'm providing the links so that you can see the issues I've run into:
Using .NET Core 2.0 Libraries in WebJob Targeting .NET Framework 4.7
No parameterless constructor error in WebJobs with .NET Core and Ninject
P.S. My previous posts are referring to WebJobs. That was plan B approach because WebJobs seem half a step ahead of Azure Functions when it comes to supporting things like .NET Core and DI. Ultimately, I'd like to build a few Azure Functions that can use my class libraries built in .NET Standard 2.
Also, my previous posts mention that my class libraries target .NET Core 2.0. Since then I converted them to .NET Standard 2 which didn't really take much at all. I did this so that I truly conform to .NET Standard 2.
One issue is that Visual Studio has an outdated version of the Functions Core tools. Until this is resolved, you can work around in the following way:
Install the latest via npm by running npm install -g azure-functions-core-tools
In your Function App in VS, go to the Properties
Go to Debug, and click New... under Profile
Name the new Profile something like FunctionsNpm
Set the executable to (replace [YourUserName]): C:\Users\[YourUserName]\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe
Set the arguments to host start
Set the working directory to $(TargetDir)
In toolbar, look for the green triangle icon to change your current Profile to the one you just created:
Now when you run from VS, you'll be using the npm tools instead of the older one that come with the VS package.
.NET Standard 2 support is on its way, see this github issue.

Azure Mobile Engagement for Unity Android

EngagementReachAgent.Initialize(); does not exist in the current context
How can I solve this error? I can't deliver push notifications and I can't find anywhere a fix for this error. I tried everything that is explained here: https://azure.microsoft.com/en-us/documentation/articles/mobile-engagement-unity-android-get-started/
You did not follow the instruction well. You need to download and import the Azure Plugin package into Unity. You can get that here. When this is done, the EngagementReachAgent class and the Initialize() function will be present in your Unity project. They are not there now, so you can't use them.

Resources