From ab1a2ecbb5d3607524fd243ad0fb687940ec4b7d Mon Sep 17 00:00:00 2001 From: Soundbytes Date: Mon, 8 Oct 2018 15:59:20 +0200 Subject: [PATCH 1/3] Made project compatible with Dart 2.1 updated dependencies added SDK constraint in all pubspec.yaml files --- example/pubspec.yaml | 5 ++++- src/appcenter/pubspec.yaml | 5 +++++ src/appcenter_analytics/pubspec.yaml | 3 +++ src/appcenter_crashes/pubspec.yaml | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index cf9e366..88210c6 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,10 +1,13 @@ name: appcenter_example description: Demonstrates how to use the appcenter plugin. +environment: + sdk: ">=2.0.0-dev.68.0 <3.0.0" + dependencies: flutter: sdk: flutter - cupertino_icons: ^0.1.0 + cupertino_icons: ^0.1.2 dev_dependencies: flutter_test: diff --git a/src/appcenter/pubspec.yaml b/src/appcenter/pubspec.yaml index 7f8614f..38a5689 100644 --- a/src/appcenter/pubspec.yaml +++ b/src/appcenter/pubspec.yaml @@ -3,9 +3,14 @@ description: Visual Studio App Center plugin for Flutter applications. version: 0.0.1 author: Aloïs Deniel homepage: https://github.com/aloisdeniel/flutter_plugin_appcenter + +environment: + sdk: ">=2.0.0-dev.68.0 <3.0.0" + dependencies: flutter: sdk: flutter + flutter: plugin: androidPackage: com.aloisdeniel.flutter.appcenter diff --git a/src/appcenter_analytics/pubspec.yaml b/src/appcenter_analytics/pubspec.yaml index fb3ac11..2e64a84 100644 --- a/src/appcenter_analytics/pubspec.yaml +++ b/src/appcenter_analytics/pubspec.yaml @@ -4,6 +4,9 @@ version: 0.0.1 author: Aloïs Deniel homepage: https://github.com/aloisdeniel/flutter_plugin_appcenter +environment: + sdk: ">=2.0.0-dev.68.0 <3.0.0" + dependencies: flutter: sdk: flutter diff --git a/src/appcenter_crashes/pubspec.yaml b/src/appcenter_crashes/pubspec.yaml index 95479c6..d032609 100644 --- a/src/appcenter_crashes/pubspec.yaml +++ b/src/appcenter_crashes/pubspec.yaml @@ -4,6 +4,9 @@ version: 0.0.1 author: Aloïs Deniel homepage: https://github.com/aloisdeniel/flutter_plugin_appcenter +environment: + sdk: ">=2.0.0-dev.68.0 <3.0.0" + dependencies: flutter: sdk: flutter From 99085f2d6c4f6859cfa5932587e5d6454eea3d75 Mon Sep 17 00:00:00 2001 From: Soundbytes Date: Mon, 8 Oct 2018 16:02:17 +0200 Subject: [PATCH 2/3] Made project compatible with Dart 2.1 fixed type errors. fixed naming inconsistencies (replaced Appcenter... with AppCenter...) --- example/lib/main.dart | 11 +++++------ src/appcenter/lib/appcenter.dart | 4 ++-- src/appcenter_analytics/lib/appcenter_analytics.dart | 2 +- src/appcenter_crashes/lib/appcenter_crashes.dart | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 7396cea..5894687 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:appcenter/appcenter.dart'; import 'package:appcenter_analytics/appcenter_analytics.dart'; import 'package:appcenter_crashes/appcenter_crashes.dart'; @@ -15,13 +14,13 @@ class MyApp extends StatefulWidget { class _MyAppState extends State { - String _app_secret; + String _appSecret; String _installId = 'Unknown'; bool _areAnalyticsEnabled = false, _areCrashesEnabled = false; _MyAppState() { final ios = defaultTargetPlatform == TargetPlatform.iOS; - _app_secret = ios ? "a8a33033-ef2f-4911-a664-a7d118287ce7" : "3f1f3b0e-24ff-436a-b42d-3c08b117d46a"; + _appSecret = ios ? "a8a33033-ef2f-4911-a664-a7d118287ce7" : "3f1f3b0e-24ff-436a-b42d-3c08b117d46a"; } @override @@ -32,7 +31,7 @@ class _MyAppState extends State { // Platform messages are asynchronous, so we initialize in an async method. initPlatformState() async { - await AppCenter.start(_app_secret, [AppCenterAnalytics.id, AppCenterCrashes.id]); + await AppCenter.start(_appSecret, [AppCenterAnalytics.id, AppCenterCrashes.id]); if (!mounted) return; @@ -69,12 +68,12 @@ class _MyAppState extends State { new IconButton( icon: new Icon(Icons.map), tooltip: 'map', - onPressed: () { AppcenterAnalytics.trackEvent("map"); }, + onPressed: () { AppCenterAnalytics.trackEvent("map"); }, ), new IconButton( icon: new Icon(Icons.casino), tooltip: 'casino', - onPressed: () { AppcenterAnalytics.trackEvent("casino", { "dollars" : "10" }); }, + onPressed: () { AppCenterAnalytics.trackEvent("casino", { "dollars" : "10" }); }, ), ]) ] diff --git a/src/appcenter/lib/appcenter.dart b/src/appcenter/lib/appcenter.dart index ec84631..97719d4 100644 --- a/src/appcenter/lib/appcenter.dart +++ b/src/appcenter/lib/appcenter.dart @@ -11,12 +11,12 @@ class AppCenter { 'app_secret': app_secret, }); - static Future start(String app_secret, List services) => _channel.invokeMethod('start', { + static Future start(String app_secret, List services) => _channel.invokeMethod('start', { 'app_secret': app_secret, 'services': services }); - static Future get installId => _channel.invokeMethod('installId'); + static Future get installId => _channel.invokeMethod('installId'); static Future get isEnabled => _channel.invokeMethod('isEnabled'); diff --git a/src/appcenter_analytics/lib/appcenter_analytics.dart b/src/appcenter_analytics/lib/appcenter_analytics.dart index 768c911..18463f2 100644 --- a/src/appcenter_analytics/lib/appcenter_analytics.dart +++ b/src/appcenter_analytics/lib/appcenter_analytics.dart @@ -10,7 +10,7 @@ class AppCenterAnalytics { static const MethodChannel _channel = const MethodChannel('aloisdeniel.github.com/flutter_plugin_appcenter/appcenter_analytics'); - static Future get isEnabled => _channel.invokeMethod('isEnabled'); + static Future get isEnabled => _channel.invokeMethod('isEnabled'); static Future setEnabled(bool isEnabled) => _channel.invokeMethod('setEnabled', { 'isEnabled': isEnabled, diff --git a/src/appcenter_crashes/lib/appcenter_crashes.dart b/src/appcenter_crashes/lib/appcenter_crashes.dart index ad87bca..28f8271 100644 --- a/src/appcenter_crashes/lib/appcenter_crashes.dart +++ b/src/appcenter_crashes/lib/appcenter_crashes.dart @@ -10,7 +10,7 @@ class AppCenterCrashes { static const MethodChannel _channel = const MethodChannel('aloisdeniel.github.com/flutter_plugin_appcenter/appcenter_crashes'); - static Future get isEnabled => _channel.invokeMethod('isEnabled'); + static Future get isEnabled => _channel.invokeMethod('isEnabled'); static Future setEnabled(bool isEnabled) => _channel.invokeMethod('setEnabled', { 'isEnabled': isEnabled, From c1fcadc635d50315dcee0b1b19197ffcb983d5d2 Mon Sep 17 00:00:00 2001 From: Soundbytes Date: Mon, 8 Oct 2018 16:02:53 +0200 Subject: [PATCH 3/3] Made project compatible with Dart 2.1 upgraded configuration files --- example/ios/Flutter/Debug.xcconfig | 1 + example/ios/Flutter/Release.xcconfig | 1 + example/ios/Podfile.lock | 44 +++++++++++--------- example/ios/Runner.xcodeproj/project.pbxproj | 26 +++--------- 4 files changed, 31 insertions(+), 41 deletions(-) diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig index 592ceee..e8efba1 100644 --- a/example/ios/Flutter/Debug.xcconfig +++ b/example/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig index 592ceee..399e934 100644 --- a/example/ios/Flutter/Release.xcconfig +++ b/example/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 1f04407..6871561 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -2,13 +2,13 @@ PODS: - appcenter (0.0.1): - AppCenter - Flutter - - AppCenter (1.0.1): - - AppCenter/Analytics (= 1.0.1) - - AppCenter/Crashes (= 1.0.1) - - AppCenter/Analytics (1.0.1): + - AppCenter (1.2.0): + - AppCenter/Analytics (= 1.2.0) + - AppCenter/Crashes (= 1.2.0) + - AppCenter/Analytics (1.2.0): - AppCenter/Core - - AppCenter/Core (1.0.1) - - AppCenter/Crashes (1.0.1): + - AppCenter/Core (1.2.0) + - AppCenter/Crashes (1.2.0): - AppCenter/Core - appcenter_analytics (0.0.1): - AppCenter/Analytics @@ -19,28 +19,32 @@ PODS: - Flutter (1.0.0) DEPENDENCIES: - - appcenter (from `/Users/alois/flutter_plugin_appcenter/src/appcenter/ios`) - - appcenter_analytics (from `/Users/alois/flutter_plugin_appcenter/src/appcenter_analytics/ios`) - - appcenter_crashes (from `/Users/alois/flutter_plugin_appcenter/src/appcenter_crashes/ios`) - - Flutter (from `/Users/alois/flutter/bin/cache/artifacts/engine/ios`) + - appcenter (from `/Users/AS/AndroidStudioProjects/flutter_plugin_appcenter/src/appcenter/ios`) + - appcenter_analytics (from `/Users/AS/AndroidStudioProjects/flutter_plugin_appcenter/src/appcenter_analytics/ios`) + - appcenter_crashes (from `/Users/AS/AndroidStudioProjects/flutter_plugin_appcenter/src/appcenter_crashes/ios`) + - Flutter (from `/Users/AS/dev/flutter/bin/cache/artifacts/engine/ios`) + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - AppCenter EXTERNAL SOURCES: appcenter: - :path: /Users/alois/flutter_plugin_appcenter/src/appcenter/ios + :path: "/Users/AS/AndroidStudioProjects/flutter_plugin_appcenter/src/appcenter/ios" appcenter_analytics: - :path: /Users/alois/flutter_plugin_appcenter/src/appcenter_analytics/ios + :path: "/Users/AS/AndroidStudioProjects/flutter_plugin_appcenter/src/appcenter_analytics/ios" appcenter_crashes: - :path: /Users/alois/flutter_plugin_appcenter/src/appcenter_crashes/ios + :path: "/Users/AS/AndroidStudioProjects/flutter_plugin_appcenter/src/appcenter_crashes/ios" Flutter: - :path: /Users/alois/flutter/bin/cache/artifacts/engine/ios + :path: "/Users/AS/dev/flutter/bin/cache/artifacts/engine/ios" SPEC CHECKSUMS: - AppCenter: 1d9e08e4ffe7a8eab6e9741a12d27e44074e73a7 - appcenter: ec63d9079174977ead44a0040ff083d6dd4c94c5 - appcenter_analytics: 46cd35cb5fac57f7a4b2ae5d5040f984b4ad4b5a - appcenter_crashes: 1b06d86617183e4778779b59f85a25c4bbc89493 - Flutter: d674e78c937094a75ac71dd77e921e840bea3dbf + AppCenter: d0b68b2a7a87ac0aed78e66f36d87fd321d0a29c + appcenter: 5e85f0b7c5c040e551f8976c559103bfdb13cee2 + appcenter_analytics: ff44d283dfb2942015f45a0550bf3e8be60eb757 + appcenter_crashes: 5c44889c35121ee939f1b7ca3ea040d6876f9096 + Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 PODFILE CHECKSUM: 351e02e34b831289961ec3558a535cbd2c4965d2 -COCOAPODS: 1.3.1 +COCOAPODS: 1.5.3 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 1e7c97f..bcc5c8e 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -16,7 +17,6 @@ 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; - 9740EEBB1CF902C7004384FC /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -42,6 +42,7 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 54CE9D792210C22D5C6E8F8E /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -50,7 +51,6 @@ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEB71CF902C7004384FC /* app.flx */ = {isa = PBXFileReference; lastKnownFileType = file; name = app.flx; path = Flutter/app.flx; sourceTree = ""; }; 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -92,9 +92,9 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 9740EEB71CF902C7004384FC /* app.flx */, 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, @@ -161,7 +161,6 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 96D9A8465C60EEE798E7F303 /* [CP] Embed Pods Frameworks */, - 18512D816A7A23D58E333AC8 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -209,10 +208,10 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9740EEBB1CF902C7004384FC /* app.flx in Resources */, 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, @@ -222,21 +221,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 18512D816A7A23D58E333AC8 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -276,7 +260,7 @@ ); inputPaths = ( "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/../../../../flutter/bin/cache/artifacts/engine/ios/Flutter.framework", + "${PODS_ROOT}/../../../../../dev/flutter/bin/cache/artifacts/engine/ios/Flutter.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = (