From 2ccdc68d474c158ae7cfbcae993e430a578173ec Mon Sep 17 00:00:00 2001 From: Paul DeMarco Date: Fri, 18 Oct 2019 03:17:29 -0400 Subject: [PATCH] Update project files (#401) * Update project files for Android and iOS * Remove dependency on protoc in iOS podspec file --- .metadata | 10 ++ android/build.gradle | 11 +- android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + android/src/main/AndroidManifest.xml | 2 +- .../AdvertisementParser.java | 4 +- .../FlutterBluePlugin.java | 10 +- .../ProtoMaker.java | 2 +- example/.gitignore | 49 ++------- example/.metadata | 10 ++ example/README.md | 12 ++- example/android.iml | 12 --- example/android/.gitignore | 7 ++ example/android/app/build.gradle | 2 +- .../android/app/src/debug/AndroidManifest.xml | 7 ++ .../android/app/src/main/AndroidManifest.xml | 11 +- .../MainActivity.java | 3 +- .../app/src/profile/AndroidManifest.xml | 7 ++ example/android/build.gradle | 2 +- example/android/gradle.properties | 5 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/ios/.gitignore | 32 ++++++ example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Podfile | 87 +++++++++++++++ example/ios/Podfile.lock | 32 ++++++ example/ios/Runner.xcodeproj/project.pbxproj | 102 +++++++++--------- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/AppDelegate.m | 4 +- .../Icon-App-1024x1024@1x.png | Bin 11112 -> 10932 bytes example/ios/Runner/Info.plist | 2 +- ios/.gitignore | 1 + ios/flutter_blue.podspec | 36 ++----- protos/flutterblue.proto | 2 +- pubspec.yaml | 10 +- test/flutter_blue_test.dart | 23 ++++ 35 files changed, 330 insertions(+), 181 deletions(-) create mode 100644 .metadata create mode 100644 android/gradle/wrapper/gradle-wrapper.properties rename android/src/main/java/com/pauldemarco/{flutterblue => flutter_blue}/AdvertisementParser.java (98%) rename android/src/main/java/com/pauldemarco/{flutterblue => flutter_blue}/FlutterBluePlugin.java (99%) rename android/src/main/java/com/pauldemarco/{flutterblue => flutter_blue}/ProtoMaker.java (99%) create mode 100644 example/.metadata delete mode 100644 example/android.iml create mode 100644 example/android/.gitignore create mode 100644 example/android/app/src/debug/AndroidManifest.xml rename example/android/app/src/main/java/com/pauldemarco/{flutterblueexample => flutter_blue_example}/MainActivity.java (87%) create mode 100644 example/android/app/src/profile/AndroidManifest.xml create mode 100644 example/ios/.gitignore create mode 100644 example/ios/Podfile create mode 100644 example/ios/Podfile.lock create mode 100644 test/flutter_blue_test.dart diff --git a/.metadata b/.metadata new file mode 100644 index 00000000..9796a7e5 --- /dev/null +++ b/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: f53b32eb2317ba09137969999d130c24a6314997 + channel: master + +project_type: plugin diff --git a/android/build.gradle b/android/build.gradle index 6c5609ec..d7d65fdd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,18 +11,17 @@ gradle.buildFinished { buildResult -> } } -group 'com.pauldemarco.flutterblue' +group 'com.pauldemarco.flutter_blue' version '1.0-SNAPSHOT' buildscript { repositories { google() jcenter() - mavenLocal() } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10' } } @@ -31,7 +30,6 @@ rootProject.allprojects { repositories { google() jcenter() - mavenLocal() } } @@ -48,11 +46,6 @@ android { lintOptions { disable 'InvalidPackage' } - dependencies { - // Required for local unit tests (JUnit 4 framework) - testImplementation 'junit:junit:4.12' - implementation 'androidx.core:core:1.0.2' - } sourceSets { main { proto { diff --git a/android/gradle.properties b/android/gradle.properties index 8bd86f68..38c8d454 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1 +1,4 @@ org.gradle.jvmargs=-Xmx1536M +android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..019065d1 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 9edd329e..7a2ef35f 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.pauldemarco.flutter_blue"> diff --git a/android/src/main/java/com/pauldemarco/flutterblue/AdvertisementParser.java b/android/src/main/java/com/pauldemarco/flutter_blue/AdvertisementParser.java similarity index 98% rename from android/src/main/java/com/pauldemarco/flutterblue/AdvertisementParser.java rename to android/src/main/java/com/pauldemarco/flutter_blue/AdvertisementParser.java index 315ffe44..c12c4803 100644 --- a/android/src/main/java/com/pauldemarco/flutterblue/AdvertisementParser.java +++ b/android/src/main/java/com/pauldemarco/flutter_blue/AdvertisementParser.java @@ -25,10 +25,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -package com.pauldemarco.flutterblue; +package com.pauldemarco.flutter_blue; import com.google.protobuf.ByteString; -import com.pauldemarco.flutterblue.Protos.AdvertisementData; +import com.pauldemarco.flutter_blue.Protos.AdvertisementData; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; diff --git a/android/src/main/java/com/pauldemarco/flutterblue/FlutterBluePlugin.java b/android/src/main/java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java similarity index 99% rename from android/src/main/java/com/pauldemarco/flutterblue/FlutterBluePlugin.java rename to android/src/main/java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java index 5dd56a2e..32b23454 100644 --- a/android/src/main/java/com/pauldemarco/flutterblue/FlutterBluePlugin.java +++ b/android/src/main/java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java @@ -2,7 +2,7 @@ // All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -package com.pauldemarco.flutterblue; +package com.pauldemarco.flutter_blue; import android.app.Activity; import android.Manifest; @@ -53,9 +53,7 @@ import io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener; -/** - * FlutterBluePlugin - */ +/** FlutterBluePlugin */ public class FlutterBluePlugin implements MethodCallHandler, RequestPermissionsResultListener { private static final String TAG = "FlutterBluePlugin"; private static final String NAMESPACE = "plugins.pauldemarco.com/flutter_blue"; @@ -74,9 +72,7 @@ public class FlutterBluePlugin implements MethodCallHandler, RequestPermissionsR private MethodCall pendingCall; private Result pendingResult; - /** - * Plugin registration. - */ + /** Plugin registration. */ public static void registerWith(Registrar registrar) { final FlutterBluePlugin instance = new FlutterBluePlugin(registrar); registrar.addRequestPermissionsResultListener(instance); diff --git a/android/src/main/java/com/pauldemarco/flutterblue/ProtoMaker.java b/android/src/main/java/com/pauldemarco/flutter_blue/ProtoMaker.java similarity index 99% rename from android/src/main/java/com/pauldemarco/flutterblue/ProtoMaker.java rename to android/src/main/java/com/pauldemarco/flutter_blue/ProtoMaker.java index 0740b1e0..31e758a8 100644 --- a/android/src/main/java/com/pauldemarco/flutterblue/ProtoMaker.java +++ b/android/src/main/java/com/pauldemarco/flutter_blue/ProtoMaker.java @@ -2,7 +2,7 @@ // All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -package com.pauldemarco.flutterblue; +package com.pauldemarco.flutter_blue; import android.annotation.TargetApi; import android.bluetooth.BluetoothDevice; diff --git a/example/.gitignore b/example/.gitignore index 47e0b4d6..437cb458 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -1,6 +1,5 @@ # Miscellaneous *.class -*.lock *.log *.pyc *.swp @@ -16,8 +15,10 @@ *.iws .idea/ -# Visual Studio Code related -.vscode/ +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ # Flutter/Dart/Pub related **/doc/api/ @@ -26,46 +27,10 @@ .packages .pub-cache/ .pub/ -build/ +/build/ -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* +# Web related +lib/generated_plugin_registrant.dart # Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/example/.metadata b/example/.metadata new file mode 100644 index 00000000..2b288502 --- /dev/null +++ b/example/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: f53b32eb2317ba09137969999d130c24a6314997 + channel: master + +project_type: app diff --git a/example/README.md b/example/README.md index 9f0cd815..e19fbb22 100644 --- a/example/README.md +++ b/example/README.md @@ -4,5 +4,13 @@ Demonstrates how to use the flutter_blue plugin. ## Getting Started -For help getting started with Flutter, view our online -[documentation](http://flutter.io/). +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/example/android.iml b/example/android.iml deleted file mode 100644 index 462b903e..00000000 --- a/example/android.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/example/android/.gitignore b/example/android/.gitignore new file mode 100644 index 00000000..bc2100d8 --- /dev/null +++ b/example/android/.gitignore @@ -0,0 +1,7 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 8b09d65c..758061cf 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -32,7 +32,7 @@ android { } defaultConfig { - applicationId "com.pauldemarco.flutterblueexample" + applicationId "com.pauldemarco.flutter_blue_example" minSdkVersion 19 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..925f1de2 --- /dev/null +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 1113a9dd..c05ef495 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,12 +1,5 @@ - - - - + package="com.pauldemarco.flutter_blue_example"> + + diff --git a/example/android/build.gradle b/example/android/build.gradle index 541636cc..e0d7ae2c 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:3.5.0' } } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 53ae0ae4..38c8d454 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,3 +1,4 @@ -android.enableJetifier=true -android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M +android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 2819f022..296b146b 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/example/ios/.gitignore b/example/ios/.gitignore new file mode 100644 index 00000000..e96ef602 --- /dev/null +++ b/example/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9367d483..6b4c0f78 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable App CFBundleIdentifier diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 00000000..98a90b8a --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,87 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def parse_KV_file(file, separator='=') + file_abs_path = File.expand_path(file) + if !File.exists? file_abs_path + return []; + end + generated_key_values = {} + skip_line_start_symbols = ["#", "/"] + File.foreach(file_abs_path) do |line| + next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } + plugin = line.split(pattern=separator) + if plugin.length == 2 + podname = plugin[0].strip() + path = plugin[1].strip() + podpath = File.expand_path("#{path}", file_abs_path) + generated_key_values[podname] = podpath + else + puts "Invalid plugin specification: #{line}" + end + end + generated_key_values +end + +target 'Runner' do + # Flutter Pod + + copied_flutter_dir = File.join(__dir__, 'Flutter') + copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') + copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') + unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) + # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. + # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. + # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. + + generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') + unless File.exist?(generated_xcode_build_settings_path) + raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) + cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; + + unless File.exist?(copied_framework_path) + FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) + end + unless File.exist?(copied_podspec_path) + FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) + end + end + + # Keep pod path relative so it can be checked into Podfile.lock. + pod 'Flutter', :path => 'Flutter' + + # Plugin Pods + + # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock + # referring to absolute paths on developers' machines. + system('rm -rf .symlinks') + system('mkdir -p .symlinks/plugins') + plugin_pods = parse_KV_file('../.flutter-plugins') + plugin_pods.each do |name, path| + symlink = File.join('.symlinks', 'plugins', name) + File.symlink(path, symlink) + pod name, :path => File.join(symlink, 'ios') + end +end + +# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. +install! 'cocoapods', :disable_input_output_paths => true + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['ENABLE_BITCODE'] = 'NO' + end + end +end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock new file mode 100644 index 00000000..71e5fcfe --- /dev/null +++ b/example/ios/Podfile.lock @@ -0,0 +1,32 @@ +PODS: + - Flutter (1.0.0) + - flutter_blue (0.0.1): + - Flutter + - flutter_blue/Protos (= 0.0.1) + - flutter_blue/Protos (0.0.1): + - Flutter + - Protobuf + - Protobuf (3.10.0) + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_blue (from `.symlinks/plugins/flutter_blue/ios`) + +SPEC REPOS: + trunk: + - Protobuf + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_blue: + :path: ".symlinks/plugins/flutter_blue/ios" + +SPEC CHECKSUMS: + Flutter: 0e3d915762c693b495b44d77113d4970485de6ec + flutter_blue: 763739beea88e81195eb6cb8693d530057430feb + Protobuf: a4dc852ad69c027ca2166ed287b856697814375b + +PODFILE CHECKSUM: 3dbe063e9c90a5d7c9e4e76e70a821b9e2c1d271 + +COCOAPODS: 1.8.4 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index cfaa4c95..8fc5bbc7 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 23175688AA110A51F809F778 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 60D991E9C9B0195ABB61DAFF /* libPods-Runner.a */; }; 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, ); }; }; @@ -19,6 +18,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + BC840DD82826110B54BA6046 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 037D6201B3317D19077DBE1C /* libPods-Runner.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -37,17 +37,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 037D6201B3317D19077DBE1C /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 03F90B064E5989CDFA6AE40B /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 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 = ""; }; - 1972BFE8FFDC21C33AA378B2 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 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 = ""; }; - 496C03649F7E3036B107E8CF /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 60D991E9C9B0195ABB61DAFF /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 654AF8D0FB3F7BFE3766A2D2 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 5FD1D91DB4DD22B46C0A30FB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 90D362CFC65AB38900749923 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; 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 = ""; }; 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; @@ -66,23 +66,13 @@ files = ( 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, - 23175688AA110A51F809F778 /* libPods-Runner.a in Frameworks */, + BC840DD82826110B54BA6046 /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 30F11C343C5FF369427FEE15 /* Pods */ = { - isa = PBXGroup; - children = ( - 496C03649F7E3036B107E8CF /* Pods-Runner.debug.xcconfig */, - 654AF8D0FB3F7BFE3766A2D2 /* Pods-Runner.release.xcconfig */, - 1972BFE8FFDC21C33AA378B2 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -102,8 +92,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 30F11C343C5FF369427FEE15 /* Pods */, - FF555442636EC2F707A35FC6 /* Frameworks */, + 9FA2C22F3442E6B32D987688 /* Pods */, + FE7C0B0D97F9B20AF18716C5 /* Frameworks */, ); sourceTree = ""; }; @@ -139,10 +129,21 @@ name = "Supporting Files"; sourceTree = ""; }; - FF555442636EC2F707A35FC6 /* Frameworks */ = { + 9FA2C22F3442E6B32D987688 /* Pods */ = { + isa = PBXGroup; + children = ( + 03F90B064E5989CDFA6AE40B /* Pods-Runner.debug.xcconfig */, + 90D362CFC65AB38900749923 /* Pods-Runner.release.xcconfig */, + 5FD1D91DB4DD22B46C0A30FB /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + FE7C0B0D97F9B20AF18716C5 /* Frameworks */ = { isa = PBXGroup; children = ( - 60D991E9C9B0195ABB61DAFF /* libPods-Runner.a */, + 037D6201B3317D19077DBE1C /* libPods-Runner.a */, ); name = Frameworks; sourceTree = ""; @@ -154,14 +155,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 725D073084925181E8D21DCC /* [CP] Check Pods Manifest.lock */, + F70296DE928E36AB7322BF47 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 696B38C9567D8F47DB5731B6 /* [CP] Embed Pods Frameworks */, + 25F30DD022E5D3EED9183A8A /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -178,7 +179,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1030; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -188,10 +189,9 @@ }; buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, Base, ); @@ -220,6 +220,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 25F30DD022E5D3EED9183A8A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -234,22 +249,21 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; }; - 696B38C9567D8F47DB5731B6 /* [CP] Embed Pods Frameworks */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "[CP] Embed Pods Frameworks"; + name = "Run Script"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - 725D073084925181E8D21DCC /* [CP] Check Pods Manifest.lock */ = { + F70296DE928E36AB7322BF47 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -271,20 +285,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -325,7 +325,6 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -366,6 +365,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -377,7 +377,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -389,7 +388,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterBlueExample; + PRODUCT_BUNDLE_IDENTIFIER = com.pauldemarco.flutterBlueExample; PRODUCT_NAME = "$(TARGET_NAME)"; VERSIONING_SYSTEM = "apple-generic"; }; @@ -400,7 +399,6 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -457,7 +455,6 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -498,6 +495,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -509,7 +507,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -521,7 +518,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterBlueExample; + PRODUCT_BUNDLE_IDENTIFIER = com.pauldemarco.flutterBlueExample; PRODUCT_NAME = "$(TARGET_NAME)"; VERSIONING_SYSTEM = "apple-generic"; }; @@ -533,7 +530,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -545,7 +541,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterBlueExample; + PRODUCT_BUNDLE_IDENTIFIER = com.pauldemarco.flutterBlueExample; PRODUCT_NAME = "$(TARGET_NAME)"; VERSIONING_SYSTEM = "apple-generic"; }; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 12f056a5..a28140cf 100644 --- a/example/ios/Runner.xcode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NIh?)&+c~*&e~CYPDhPYjb+Xu zKg5w^XB3(_9{Waa4E(-J-Kq_u6t_k?a8kEHqai-N-4#`SRerO!h}!cS%SMC<)tGix zOzVP^_t!HN&HIPL-ZpcgWitHM&yFRC7!k4zSI+-<_uQ}|tX)n{Ib;X>Xx>i_d*KkH zCzogKQFpP1408_2!ofU|iBq2R8hW6G zuqJs9Tyw{u%-uWczPLkM!MfKfflt+NK9Vk8E!C>AsJwNDRoe2~cL+UvqNP|5J8t)( z0$iMa!jhudJ+fqFn+um&@Oj6qXJd_3-l`S^I1#0fnt!z3?D*hAHr*u(*wR@`4O z#avrtg%s`Fh{?$FtBFM^$@@hW!8ZfF4;=n0<8In&X}-Rp=cd0TqT_ne46$j^r}FzE z26vX^!PzScuQfFfl1HEZ{zL?G88mcc76zHGizWiykBf4m83Z${So-+dZ~YGhm*RO7 zB1gdIdqnFi?qw+lPRFW5?}CQ3Me3G^muvll&4iN+*5#_mmIu;loULMwb4lu9U*dFM z-Sr**(0Ei~u=$3<6>C-G6z4_LNCx||6YtjS)<;hf)YJTPKXW+w%hhCTUAInIse9>r zl2YU6nRb$u-FJlWN*{{%sm_gi_UP5{=?5}5^D2vPzM=oPfNw~azZQ#P zl5z8RtSSiTIpEohC15i-Q1Bk{3&ElsD0uGAOxvbk29VUDmmA0w;^v`W#0`};O3DVE z&+-ca*`YcN%z*#VXWK9Qa-OEME#fykF%|7o=1Y+eF;Rtv0W4~kKRDx9YBHOWhC%^I z$Jec0cC7o37}Xt}cu)NH5R}NT+=2Nap*`^%O)vz?+{PV<2~qX%TzdJOGeKj5_QjqR&a3*K@= P-1+_A+?hGkL;m(J7kc&K diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index e4603f3c..27ca8510 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/ios/.gitignore b/ios/.gitignore index 710ec6cf..aa479fd3 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -34,3 +34,4 @@ Icon? .tags* /Flutter/Generated.xcconfig +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/ios/flutter_blue.podspec b/ios/flutter_blue.podspec index c2c42f69..8774abfc 100644 --- a/ios/flutter_blue.podspec +++ b/ios/flutter_blue.podspec @@ -1,46 +1,32 @@ # -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint flutter_blue.podspec' to validate before publishing. # Pod::Spec.new do |s| s.name = 'flutter_blue' s.version = '0.0.1' - s.summary = 'A new flutter plugin project.' + s.summary = 'Bluetooth Low Energy plugin for Flutter.' s.description = <<-DESC -A new flutter plugin project. +Bluetooth Low Energy plugin for Flutter. DESC - s.homepage = 'http://example.com' + s.homepage = 'https://github.com/pauldemarco/flutter_blue' s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } + s.author = { 'Paul DeMarco' => 'paulmdemarco@gmail.com' } s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.dependency '!ProtoCompiler' + s.platform = :ios, '8.0' s.framework = 'CoreBluetooth' - protoc = ENV['PWD'] + '/Pods/!ProtoCompiler/protoc' - objc_out = 'gen' - proto_in = '../protos' - s.prepare_command = <<-CMD - mkdir -p #{objc_out} - #{protoc} \ - --objc_out=#{objc_out} \ - --proto_path=#{proto_in} \ - #{proto_in}/*.proto - CMD - s.subspec 'Protos' do |ss| ss.source_files = 'gen/**/*.pbobjc.{h,m}' - ss.header_mappings_dir = 'gen' + ss.header_mappings_dir = '.' ss.requires_arc = false ss.dependency 'Protobuf' end - s.pod_target_xcconfig = { - # This is needed by all pods that depend on Protobuf: - 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', - } - - s.ios.deployment_target = '8.0' -end + # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64', } +end \ No newline at end of file diff --git a/protos/flutterblue.proto b/protos/flutterblue.proto index 0d2830ef..d6bd191a 100644 --- a/protos/flutterblue.proto +++ b/protos/flutterblue.proto @@ -4,7 +4,7 @@ syntax = "proto3"; -option java_package = "com.pauldemarco.flutterblue"; +option java_package = "com.pauldemarco.flutter_blue"; option java_outer_classname = "Protos"; option objc_class_prefix = "Protos"; diff --git a/pubspec.yaml b/pubspec.yaml index 4ab3ee70..240fbe13 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,11 +16,11 @@ dependencies: protobuf: "^0.14.1" rxdart: "^0.22.0" -flutter: - plugin: - androidPackage: com.pauldemarco.flutterblue - pluginClass: FlutterBluePlugin - dev_dependencies: flutter_test: sdk: flutter + +flutter: + plugin: + androidPackage: com.pauldemarco.flutter_blue + pluginClass: FlutterBluePlugin diff --git a/test/flutter_blue_test.dart b/test/flutter_blue_test.dart new file mode 100644 index 00000000..67f69906 --- /dev/null +++ b/test/flutter_blue_test.dart @@ -0,0 +1,23 @@ +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:flutter_blue/flutter_blue.dart'; + +void main() { + const MethodChannel channel = MethodChannel('flutter_blue'); + + TestWidgetsFlutterBinding.ensureInitialized(); + + setUp(() { + channel.setMockMethodCallHandler((MethodCall methodCall) async { + return '42'; + }); + }); + + tearDown(() { + channel.setMockMethodCallHandler(null); + }); + + test('getPlatformVersion', () async { + expect(await FlutterBlue.platformVersion, '42'); + }); +}