Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS app is not sending any log information to Application Insights. #36

Open
shushil opened this issue Oct 29, 2024 · 5 comments
Open

Comments

@shushil
Copy link

shushil commented Oct 29, 2024

Hello first of all thank you for this nugget package.

My App configuration:

TinyInsights.Maui nugget version 1.0.6
.net 8
iOS minimum build target 16.0
Android Min target 10

I have one instance of Application Insight setup for both iOS and Android.
I receive all the logs from Android Application including crash logs and so on. However I don't receive any logs and crash log information via iOS in Application Insights.

I have followed the setup as per document. (as below)
TinnyInsights configuration:
.UseTinyInsights(builder.Configuration["ApplicationInsights:ConnectionString"], provider =>
{
provider.IsTrackEventsEnabled = true;
provider.IsTrackPageViewsEnabled = true;
provider.IsTrackErrorsEnabled = true;
provider.IsTrackCrashesEnabled = true;
provider.IsTrackDependencyEnabled = false;
provider.IsAutoTrackPageViewsEnabled = false;
})

// ILogger setup as:
builder.Services.AddSingleton((serviceProvider) =>
{
var insights = serviceProvider.GetRequiredService();
var providers = insights.GetProviders();

            if (providers.Any())
            {
                return (ILogger)providers.First();
            }

            throw new InvalidOperationException("No insights provider found");
        });

        return builder;

Am I missing something?
Do I need to use different instances of Application Insights for each platfom?

@dhindrik
Copy link
Owner

I cannot see that you are doing anything work? Are you sure that you get the correct connecting string? I checked my apps and it seems to work even for iOS.

@shushil
Copy link
Author

shushil commented Oct 30, 2024

Yes connection string is correct. Again if connection string is wrong it should not work for Android app right? since i am using same connection for both.

@dhindrik
Copy link
Owner

Sorry, I missunderstood. I thought you had different instances of Application Insights.

I will investigate and see if I can find anything.

@dhindrik
Copy link
Owner

I see the problem in one of my apps too. But not when I run the test app in debug and not in my other published app,

@dhindrik
Copy link
Owner

I was wrong, I did not see the problem in on of my apps. It was just that I was running a branch without the code :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants