Giter VIP home page Giter VIP logo

flutter_plugin_appcenter's Introduction

New maintainer wanted : since I don't use this service anymore this plugin is very low on my priority list. If anyone is interested in becoming the owner and going further I would be happy to give him/her ownership ! Sorry

Visual Studio App Center Plugin for Flutter

pub package

Several Flutter plugins to use the Microsoft Visual Studio App Center SDKs.

Note: This plugin is still under development, and some APIs (Distribute and Push are still missing) might not be available yet. Feedback and Pull Requests are most welcome!

Setup

To use this plugin:

  1. Connect to Visual Studio App Center Portal
  2. From the index page, select Add new and create a new iOS application (Platform: Objective-C/Swift), and keep your iOS app secret (ex: 123cfac9-123b-123a-123f-123273416a48).
  3. From the index page, select Add new and create a new Android application (Platform: Java), and keep your Android app secret (ex: 321cfac9-123b-123a-123f-123273416a48).
  4. Add those as dependencies in your pubspec.yaml file:
    • appcenter
    • appcenter_analytics
    • appcenter_crashes

Usage

Global

import 'package:appcenter/appcenter.dart';
import 'package:appcenter_analytics/appcenter_analytics.dart';
import 'package:appcenter_crashes/appcenter_crashes.dart';

Starting services

final ios = defaultTargetPlatform == TargetPlatform.iOS;
var app_secret = ios ? "123cfac9-123b-123a-123f-123273416a48" : "321cfac9-123b-123a-123f-123273416a48";

await AppCenter.start(app_secret, [AppCenterAnalytics.id, AppCenterCrashes.id]);

Enabling or disabling services

await AppCenter.setEnabled(false); // global 
await AppCenterAnalytics.setEnabled(false); // just a service
await AppCenterCrashes.setEnabled(false); // just a service

Analytics

Track events

AppCenterAnalytics.trackEvent("map"); 
AppCenterAnalytics.trackEvent("casino", { "dollars" : "10" }); // with custom properties

Getting Started

See the example directory for a complete sample app using Visual Studio App Center.

flutter_plugin_appcenter's People

Contributors

aloisdeniel avatar damienaicheh avatar devjoaolopes avatar tomalabaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_plugin_appcenter's Issues

Example App occurred Unhandled exception: type 'Future<dynamic>' is not a subtype of type 'Future<String>'

I tried to run the example. But Build Error.
I was build success when I replaced 'AppcenterAnalytics' to 'AppCenterAnalytics' in main.dart

But error Occurred.

E/flutter ( 9825): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception: E/flutter ( 9825): type 'Future<dynamic>' is not a subtype of type 'Future<String>' where E/flutter ( 9825): Future is from dart:async E/flutter ( 9825): Future is from dart:async E/flutter ( 9825): String is from dart:core E/flutter ( 9825): E/flutter ( 9825): #0 AppCenter.start (package:appcenter/appcenter.dart:14:86) E/flutter ( 9825): #1 _MyAppState.initPlatformState (file:///Users/nakasho/study/flutter_plugin_appcenter/example/lib/main.dart:35:21) E/flutter ( 9825): <asynchronous suspension> E/flutter ( 9825): #2 _MyAppState.initState (file:///Users/nakasho/study/flutter_plugin_appcenter/example/lib/main.dart:30:5) E/flutter ( 9825): #3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3743:58) E/flutter ( 9825): #4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3609:5) E/flutter ( 9825): #5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2899:14) E/flutter ( 9825): #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2702:12) E/flutter ( 9825): #7 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:857:16) E/flutter ( 9825): #8 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:828:5) E/flutter ( 9825): #9 RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:774:17) E/flutter ( 9825): #10 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2214:19) E/flutter ( 9825): #11 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:773:13) E/flutter ( 9825): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:662:7) E/flutter ( 9825): #13 runApp (package:flutter/src/widgets/binding.dart:704:7) E/flutter ( 9825): #14 main (file:///Users/nakasho/study/flutter_plugin_appcenter/example/lib/main.dart:9:16) E/flutter ( 9825): #15 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:279:19) E/flutter ( 9825): #16 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12) W/AppCenter( 9825): App Center may only be configured once.
my flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.3.2, on Mac OS X 10.13.4 17E202, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3.1)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.23.1)
[✓] Connected devices (1 available)

'AppCenter/AppCenter.h' file not found

Hi there.

Actually I'm have an error to run the application with iOS. I'm using the simulator to run the app.

/Users/macbook/flutter/.pub-cache/hosted/pub.dartlang.org/appcenter-0.2.1/ios/Classes/AppcenterPlugin.m:3:9: fatal error: 'AppCenter/AppCenter.h' file not found
    #import <AppCenter/AppCenter.h>
            ^~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Could not build the application for the simulator.
Error launching application on iPhone Xʀ.

This is my flutter doctor

flutter doctor -v

[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.6 18G95, locale es-CO)
    • Flutter version 1.7.8+hotfix.4 at /Users/macbook/flutter
    • Framework revision 20e59316b8 (8 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/macbook/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.1

[✓] iOS tools - develop for iOS devices
    • ios-deploy 1.9.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.38.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.4.1

[✓] Connected device (2 available)
    • TA 1025   • PLEGAR27B1010086                     
    • android-arm64 • Android 9 (API 28)
    • iPhone Xʀ • 847FE23E-FADD-4BAB-9180-79830B379D4E • ios           •
      com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)

• No issues found!

Thanks

Crash Reporting

Is crash reporting working ?

The only method I find is generateTestCrash and I can't pass any exception.

Regards.

AppSecretDenied - wrong format ?

Hi i build in the pub.dev AppCenter Lib for Flutter and tun into this AppSecretDenied error which seems like my secret is not correct.

Comparing it with other reference secrets it seems mine has no dahsed "-" in it and seems a little longer.
Personally i want to believe that AppCenter may have changed it ? Or is it possible i am creating my appSecret at the wrong place ?

Setting > AppAPI Tokens.

Resulting error below

E/AppCenter(32626): Sending logs groupName=group_core id=******* failed
E/AppCenter(32626): com.microsoft.appcenter.http.HttpException: 401 - {"status":"AppSecretDenied","validDiagnosticsIds":[],"throttledDiagnosticsIds":[],"correlationId":"*******"}
E/AppCenter(32626): 	at com.microsoft.appcenter.http.DefaultHttpClientCallTask.doHttpCall(DefaultHttpClientCallTask.java:265)
E/AppCenter(32626): 	at com.microsoft.appcenter.http.DefaultHttpClientCallTask.doInBackground(DefaultHttpClientCallTask.java:279)
E/AppCenter(32626): 	at com.microsoft.appcenter.http.DefaultHttpClientCallTask.doInBackground(DefaultHttpClientCallTask.java:48)
E/AppCenter(32626): 	at android.os.AsyncTask$2.call(AsyncTask.java:333)
E/AppCenter(32626): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AppCenter(32626): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AppCenter(32626): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AppCenter(32626): 	at java.lang.Thread.run(Thread.java:764)

all import statements fail

putting

import 'package:appcenter/appcenter.dart';
import 'package:appcenter_analytics/appcenter_analytics.dart';
import 'package:appcenter_crashes/appcenter_crashes.dart';

in main.dart, produce not found errors on flutter run

The 'Pods-Runner' target has transitive dependencies

This is just a reference to the issue at flutter/flutter#14161 opened by you already:

  1. Is there any clarification on "We do seem to need s.static_framework = true in podspecs when Swift is involved in the app and using CocoaPods 1.5.0 or later."?
  2. If the answer to 1. above is "yes, we do need...", is that change planned?
  3. If the answer to 1. above is "no, we do not need..." or "we have no clue", is the only workaround using ObjC instead of Swift?

Dart SDK 2 version?

The current Dart SDK version is 2.1.0-dev.3.0.flutter-760a9690c2.

Because stiver depends on appcenter >=0.0.2 which requires SDK version <2.0.0, version solving failed.
pub get failed (1)

The 'Pods-Runner' target has transitive dependencies that include statically linked binaries

I am not sure this is on the 2nd library I am using or yours. If this is on the other library simply let me know and we can close this. I have tried to skinny the problem down as much as possible. If you go here and run the example app it should work fine. If you then go into the pubspec.yaml of the same example project and add a line to your library:
appcenter: 0.2.1

the pod install fails with:
The 'Pods-Runner' target has transitive dependencies that include statically linked binaries

Any help would be appreciated.

PushNotification ?

Hello, is there any plans to integrate the Push Notification stuff for Flutter also? That would be very nice ;)

Crash in Android not working

Used generateTestCrash to generate test crash, it's working on iOS build, somehow, it's not working on Android at all.

I can see the crash was generated in Flutter Logs. But it never arrive Appcenter Diagnostics dashboard.

Tried with the example from this repo, same result, crash can be sent on iOS but not on Android.

I am using Android 9. Any luck get crash working on android platform?

flutter build apk fails after flutter upgrade

after updating flutter to 1.12.13+hotfix.5
flutter build apk fails with:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':appcenter:verifyReleaseResources'.

1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
C:\Data\Projects\Jobs\MRNSW\risk2\mobileApp\build\appcenter\intermediates\res\merged\release\values\values.xml:236: error: resource android:attr/fontVariationSettings not found.
C:\Data\Projects\Jobs\MRNSW\risk2\mobileApp\build\appcenter\intermediates\res\merged\release\values\values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Removing appcenter from pubspec.yaml fixes the problem
My android:targetSdkVersion is 28
I can't use the appcenter plugin until this is resolved

Update SDK to the flutter 2.5

The plugins appcenter, appcenter_crashes use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

Track Flutter errors (non crashes)

Only native crashes are submitted to AppCenter, Errors cought by the Flutter environment are not reportable. Because it's not a crash and the stacktrace is too long for an event. It would be nice if you could develop an method to pass an FlutterErrorDetails object to AppCenter, so its handled like an native crash or something like this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.