diff --git a/experimental/pedometer/.gitignore b/experimental/pedometer/.gitignore
new file mode 100644
index 000000000..96486fd93
--- /dev/null
+++ b/experimental/pedometer/.gitignore
@@ -0,0 +1,30 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# 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
+# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
+/pubspec.lock
+**/doc/api/
+.dart_tool/
+.packages
+build/
diff --git a/experimental/pedometer/.metadata b/experimental/pedometer/.metadata
new file mode 100644
index 000000000..4defcaca8
--- /dev/null
+++ b/experimental/pedometer/.metadata
@@ -0,0 +1,30 @@
+# 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.
+
+version:
+ revision: 098aac7ffeef2a1846eb3a7f14788520c8400a14
+ channel: master
+
+project_type: plugin_ffi
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 098aac7ffeef2a1846eb3a7f14788520c8400a14
+ base_revision: 098aac7ffeef2a1846eb3a7f14788520c8400a14
+ - platform: ios
+ create_revision: 098aac7ffeef2a1846eb3a7f14788520c8400a14
+ base_revision: 098aac7ffeef2a1846eb3a7f14788520c8400a14
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/experimental/pedometer/CHANGELOG.md b/experimental/pedometer/CHANGELOG.md
new file mode 100644
index 000000000..41cc7d819
--- /dev/null
+++ b/experimental/pedometer/CHANGELOG.md
@@ -0,0 +1,3 @@
+## 0.0.1
+
+* TODO: Describe initial release.
diff --git a/experimental/pedometer/LICENSE b/experimental/pedometer/LICENSE
new file mode 100644
index 000000000..ba75c69f7
--- /dev/null
+++ b/experimental/pedometer/LICENSE
@@ -0,0 +1 @@
+TODO: Add your license here.
diff --git a/experimental/pedometer/README.md b/experimental/pedometer/README.md
new file mode 100644
index 000000000..e3402143f
--- /dev/null
+++ b/experimental/pedometer/README.md
@@ -0,0 +1,56 @@
+# FFIgen + JNIgen pedometer
+
+This is a demo for some of our tooling around calling platform APIs directly from dart code. This repository represents a demo of a plugin that leverages FFIgen & JNIgen. There is also an example pedometer app that uses the bindings generated from these tools.
+
+- [FFIgen](https://pub.dev/packages/ffigen) is used to generate bindings for C, Objective-C and Swift APIs
+- [JNIgen](https://pub.dev/packages/jnigen) is used to generate bindings for Jave and Kotlin APIs
+
+**These tools are both experimental and are currently a work in progress.** If you find any issues or have feedback, please file it on the corresponding Github repositories.
+
+
+## Re-generating bindings
+The bindings that allow the dart code to call the platform code have already been generated [here](/lib). You can regenerate them by following the steps below.
+
+### FFIgen
+Configuration for FFIgen is [here](/ffigen.yaml) for the [CoreMotion](https://developer.apple.com/documentation/coremotion) framework. FFIgen currently does not support autogenerating the code to handle callbacks. So, there were a few steps needed to appropriately handle callbacks in Objective-C. You can [read more here](https://dart.dev/guides/libraries/objective-c-interop#callbacks-and-multithreading-limitations).
+
+`dart run ffigen --config ffigen.yaml`
+
+### JNIgen
+Configuration for JNIgen is [here](/jnigen.yaml) for the [HealthConnect API](https://developer.android.com/guide/health-and-fitness/health-connect). Right now, JNIgen requires an Android folder to generate the bindings so there are a few steps to regenerate:
+
+1. `flutter create .`
+2. `flutter build apk`
+3. `dart run jnigen --config jnigen.yaml`
+4. delete the android folder
+
+
+## Running the example app
+Note that step counting is only available on physical devices.
+
+### iOS
+- `flutter run`
+- Allow *pedometer* app access to step counting
+
+### Android
+- Make sure that Google Fit is installed (to ensure that steps are being counted)
+- `flutter run`
+- Install Health Connect and grant access to Google Fit and the *jni_demo* app
+
+
+## Project stucture
+
+* `src`: Contains the native source code, and a CmakeFile.txt file for building
+ that source code into a dynamic library.
+
+* `lib`: Contains the Dart code that defines the API of the plugin, and which
+ calls into the native code using `dart:ffi`.
+
+* platform folders (`ios` etc.): Contains the build files
+ for building and bundling the native code library with the platform application.
+
+* `example`: Contains the native source code, and a CmakeFile.txt file for building
+ that source code into a dynamic library.
+
+
+
diff --git a/experimental/pedometer/analysis_options.yaml b/experimental/pedometer/analysis_options.yaml
new file mode 100644
index 000000000..a5744c1cf
--- /dev/null
+++ b/experimental/pedometer/analysis_options.yaml
@@ -0,0 +1,4 @@
+include: package:flutter_lints/flutter.yaml
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/experimental/pedometer/classes.jar b/experimental/pedometer/classes.jar
new file mode 100644
index 000000000..c5462a88e
Binary files /dev/null and b/experimental/pedometer/classes.jar differ
diff --git a/experimental/pedometer/example/.gitignore b/experimental/pedometer/example/.gitignore
new file mode 100644
index 000000000..24476c5d1
--- /dev/null
+++ b/experimental/pedometer/example/.gitignore
@@ -0,0 +1,44 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# 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/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/experimental/pedometer/example/README.md b/experimental/pedometer/example/README.md
new file mode 100644
index 000000000..808ae6feb
--- /dev/null
+++ b/experimental/pedometer/example/README.md
@@ -0,0 +1,16 @@
+# pedometer_example
+
+Demonstrates how to use the pedometer plugin.
+
+## Getting Started
+
+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://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/experimental/pedometer/example/analysis_options.yaml b/experimental/pedometer/example/analysis_options.yaml
new file mode 100644
index 000000000..61b6c4de1
--- /dev/null
+++ b/experimental/pedometer/example/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/experimental/pedometer/example/android/.gitignore b/experimental/pedometer/example/android/.gitignore
new file mode 100644
index 000000000..d945a87dd
--- /dev/null
+++ b/experimental/pedometer/example/android/.gitignore
@@ -0,0 +1,14 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/app/.cxx/
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/experimental/pedometer/example/android/app/build.gradle b/experimental/pedometer/example/android/app/build.gradle
new file mode 100644
index 000000000..20998ca96
--- /dev/null
+++ b/experimental/pedometer/example/android/app/build.gradle
@@ -0,0 +1,83 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def keystoreProperties = new Properties()
+def keystorePropertiesFile = rootProject.file('key.properties')
+if (keystorePropertiesFile.exists()) {
+ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion '25.1.8937393'
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.jni_demo"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
+ compileSdkVersion 33
+ minSdkVersion 30
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ signingConfig signingConfigs.debug
+ }
+ }
+
+ externalNativeBuild {
+ cmake {
+ path "../../../src/health_connect/CMakeLists.txt"
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
+ implementation "androidx.health.connect:connect-client:1.0.0-alpha06"
+}
diff --git a/experimental/pedometer/example/android/app/proguard-rules.pro b/experimental/pedometer/example/android/app/proguard-rules.pro
new file mode 100644
index 000000000..c917f5609
--- /dev/null
+++ b/experimental/pedometer/example/android/app/proguard-rules.pro
@@ -0,0 +1,2 @@
+-keep class androidx.health.connect.client.** { *; }
+-keep class kotlin.coroutines.** { *; }
diff --git a/experimental/pedometer/example/android/app/src/debug/AndroidManifest.xml b/experimental/pedometer/example/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 000000000..dfafb1a95
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/experimental/pedometer/example/android/app/src/main/AndroidManifest.xml b/experimental/pedometer/example/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..0b7b61644
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/experimental/pedometer/example/android/app/src/main/kotlin/com/example/jni_demo/MainActivity.kt b/experimental/pedometer/example/android/app/src/main/kotlin/com/example/jni_demo/MainActivity.kt
new file mode 100644
index 000000000..7d34f80a9
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/main/kotlin/com/example/jni_demo/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.example.jni_demo
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {}
diff --git a/experimental/pedometer/example/android/app/src/main/res/drawable-v21/launch_background.xml b/experimental/pedometer/example/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 000000000..f74085f3f
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/android/app/src/main/res/drawable/launch_background.xml b/experimental/pedometer/example/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 000000000..304732f88
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/experimental/pedometer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..db77bb4b7
Binary files /dev/null and b/experimental/pedometer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/experimental/pedometer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/experimental/pedometer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..17987b79b
Binary files /dev/null and b/experimental/pedometer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/experimental/pedometer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/experimental/pedometer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..09d439148
Binary files /dev/null and b/experimental/pedometer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/experimental/pedometer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/experimental/pedometer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..d5f1c8d34
Binary files /dev/null and b/experimental/pedometer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/experimental/pedometer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/experimental/pedometer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 000000000..4d6372eeb
Binary files /dev/null and b/experimental/pedometer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/experimental/pedometer/example/android/app/src/main/res/values-night/styles.xml b/experimental/pedometer/example/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 000000000..06952be74
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/android/app/src/main/res/values/health-permissions.xml b/experimental/pedometer/example/android/app/src/main/res/values/health-permissions.xml
new file mode 100644
index 000000000..bd3b65651
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/main/res/values/health-permissions.xml
@@ -0,0 +1,8 @@
+
+
+ - androidx.health.permission.HeartRate.READ
+ - androidx.health.permission.HeartRate.WRITE
+ - androidx.health.permission.Steps.READ
+ - androidx.health.permission.Steps.WRITE
+
+
\ No newline at end of file
diff --git a/experimental/pedometer/example/android/app/src/main/res/values/styles.xml b/experimental/pedometer/example/android/app/src/main/res/values/styles.xml
new file mode 100644
index 000000000..cb1ef8805
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/android/app/src/profile/AndroidManifest.xml b/experimental/pedometer/example/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 000000000..dfafb1a95
--- /dev/null
+++ b/experimental/pedometer/example/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/experimental/pedometer/example/android/build.gradle b/experimental/pedometer/example/android/build.gradle
new file mode 100644
index 000000000..11f164c35
--- /dev/null
+++ b/experimental/pedometer/example/android/build.gradle
@@ -0,0 +1,32 @@
+buildscript {
+ ext.kotlin_version = '1.7.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.3.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
+
diff --git a/experimental/pedometer/example/android/gradle.properties b/experimental/pedometer/example/android/gradle.properties
new file mode 100644
index 000000000..94adc3a3f
--- /dev/null
+++ b/experimental/pedometer/example/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/experimental/pedometer/example/android/gradle/wrapper/gradle-wrapper.properties b/experimental/pedometer/example/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000..dcf0f19c5
--- /dev/null
+++ b/experimental/pedometer/example/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-7.6-all.zip
diff --git a/experimental/pedometer/example/android/settings.gradle b/experimental/pedometer/example/android/settings.gradle
new file mode 100644
index 000000000..44e62bcf0
--- /dev/null
+++ b/experimental/pedometer/example/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/experimental/pedometer/example/ios/.gitignore b/experimental/pedometer/example/ios/.gitignore
new file mode 100644
index 000000000..7a7f9873a
--- /dev/null
+++ b/experimental/pedometer/example/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.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/ephemeral/
+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/experimental/pedometer/example/ios/Flutter/AppFrameworkInfo.plist b/experimental/pedometer/example/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 000000000..9625e105d
--- /dev/null
+++ b/experimental/pedometer/example/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 11.0
+
+
diff --git a/experimental/pedometer/example/ios/Flutter/Debug.xcconfig b/experimental/pedometer/example/ios/Flutter/Debug.xcconfig
new file mode 100644
index 000000000..ec97fc6f3
--- /dev/null
+++ b/experimental/pedometer/example/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/experimental/pedometer/example/ios/Flutter/Release.xcconfig b/experimental/pedometer/example/ios/Flutter/Release.xcconfig
new file mode 100644
index 000000000..c4855bfe2
--- /dev/null
+++ b/experimental/pedometer/example/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/experimental/pedometer/example/ios/Podfile b/experimental/pedometer/example/ios/Podfile
new file mode 100644
index 000000000..88359b225
--- /dev/null
+++ b/experimental/pedometer/example/ios/Podfile
@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '11.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 flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/experimental/pedometer/example/ios/Runner.xcodeproj/project.pbxproj b/experimental/pedometer/example/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 000000000..84e7ee74d
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,559 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 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 */; };
+ CD8D487B2DE298847620CE27 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD546C851461740D88EB9EA1 /* Pods_Runner.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 0E73CBA5419BEF015A90306B /* 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 = ""; };
+ 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 = ""; };
+ 3838EA3C4ACB62ED755A9FF6 /* 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 = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 6FC09200CFFED4F1241C2B25 /* 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 = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/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 = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ CD546C851461740D88EB9EA1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CD8D487B2DE298847620CE27 /* Pods_Runner.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 2E033E4F7934F793372AF7BD /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ CD546C851461740D88EB9EA1 /* Pods_Runner.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ 3CD8DEE842AFA53B3E88ECBE /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 6FC09200CFFED4F1241C2B25 /* Pods-Runner.debug.xcconfig */,
+ 3838EA3C4ACB62ED755A9FF6 /* Pods-Runner.release.xcconfig */,
+ 0E73CBA5419BEF015A90306B /* Pods-Runner.profile.xcconfig */,
+ );
+ path = Pods;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 3CD8DEE842AFA53B3E88ECBE /* Pods */,
+ 2E033E4F7934F793372AF7BD /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ CF8D8954002953B19E29F0D1 /* [CP] Check Pods Manifest.lock */,
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ C8366BDABC1428824E3EC64F /* [CP] Embed Pods Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1300;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ 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";
+ };
+ C8366BDABC1428824E3EC64F /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ CF8D8954002953B19E29F0D1 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ 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;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = S8QB4VV633;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.leighatest;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = S8QB4VV633;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.leighatest;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = S8QB4VV633;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.leighatest;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 000000000..919434a62
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 000000000..18d981003
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 000000000..f9b0d7c5e
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/experimental/pedometer/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 000000000..c87d15a33
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/experimental/pedometer/example/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 000000000..21a3cc14c
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/experimental/pedometer/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 000000000..18d981003
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/experimental/pedometer/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 000000000..f9b0d7c5e
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner/AppDelegate.swift b/experimental/pedometer/example/ios/Runner/AppDelegate.swift
new file mode 100644
index 000000000..70693e4a8
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 000000000..d36b1fab2
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 000000000..dc9ada472
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 000000000..7353c41ec
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 000000000..797d452e4
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 000000000..6ed2d933e
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 000000000..4cd7b0099
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 000000000..fe730945a
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 000000000..321773cd8
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 000000000..797d452e4
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 000000000..502f463a9
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 000000000..0ec303439
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 000000000..0ec303439
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 000000000..e9f5fea27
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 000000000..84ac32ae7
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 000000000..8953cba09
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 000000000..0467bf12a
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 000000000..0bedcf2fd
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 000000000..9da19eaca
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 000000000..9da19eaca
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 000000000..9da19eaca
Binary files /dev/null and b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 000000000..89c2725b7
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/experimental/pedometer/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/experimental/pedometer/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 000000000..f2e259c7c
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner/Base.lproj/Main.storyboard b/experimental/pedometer/example/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 000000000..f3c28516f
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner/Info.plist b/experimental/pedometer/example/ios/Runner/Info.plist
new file mode 100644
index 000000000..15dfe789c
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/Info.plist
@@ -0,0 +1,53 @@
+
+
+
+
+ CADisableMinimumFrameDurationOnPhone
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Pedometer
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ pedometer_example
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ NSMotionUsageDescription
+ Live stream pedometer
+ UIApplicationSupportsIndirectInputEvents
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+
+
diff --git a/experimental/pedometer/example/ios/Runner/Runner-Bridging-Header.h b/experimental/pedometer/example/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 000000000..308a2a560
--- /dev/null
+++ b/experimental/pedometer/example/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/experimental/pedometer/example/lib/main.dart b/experimental/pedometer/example/lib/main.dart
new file mode 100644
index 000000000..82a754b73
--- /dev/null
+++ b/experimental/pedometer/example/lib/main.dart
@@ -0,0 +1,217 @@
+import 'package:flutter/material.dart';
+import 'package:intl/intl.dart';
+import 'package:fl_chart/fl_chart.dart';
+
+import 'steps_repo.dart';
+
+void main() {
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ title: 'Flutter Demo',
+ theme: ThemeData(
+ primarySwatch: Colors.blue,
+ ),
+ home: const Home(),
+ );
+ }
+}
+
+class RoundClipper extends CustomClipper {
+ @override
+ Path getClip(Size size) {
+ final diameter = size.shortestSide * 1.5;
+ final x = -(diameter - size.width) / 2;
+ final y = size.height - diameter;
+ final rect = Offset(x, y) & Size(diameter, diameter);
+ return Path()..addOval(rect);
+ }
+
+ @override
+ bool shouldReclip(CustomClipper oldClipper) {
+ return false;
+ }
+}
+
+class Home extends StatefulWidget {
+ const Home({
+ Key? key,
+ }) : super(key: key);
+
+ @override
+ State createState() => _HomeState();
+}
+
+class _HomeState extends State {
+ var hourlySteps = [];
+ DateTime? lastUpdated;
+
+ @override
+ void initState() {
+ runPedometer();
+ super.initState();
+ }
+
+ void runPedometer() async {
+ final now = DateTime.now();
+ hourlySteps = await StepsRepo.instance.getSteps();
+ lastUpdated = now;
+ setState(() {});
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final textTheme = Theme.of(context).textTheme;
+
+ final barGroups = hourlySteps
+ .map(
+ (e) => BarChartGroupData(
+ x: int.parse(e.startHour),
+ barRods: [
+ BarChartRodData(
+ color: Colors.blue[900],
+ toY: e.steps.toDouble() / 100,
+ )
+ ],
+ ),
+ )
+ .toList();
+
+ return Scaffold(
+ body: Stack(
+ children: [
+ ClipPath(
+ clipper: RoundClipper(),
+ child: FractionallySizedBox(
+ heightFactor: 0.55,
+ widthFactor: 1,
+ child: Container(color: Colors.blue[300]),
+ ),
+ ),
+ Align(
+ alignment: Alignment.topCenter,
+ child: Padding(
+ padding: const EdgeInsets.all(80.0),
+ child: Column(
+ children: [
+ lastUpdated != null
+ ? Padding(
+ padding: const EdgeInsets.symmetric(vertical: 50.0),
+ child: Text(
+ DateFormat.yMMMMd('en_US').format(lastUpdated!),
+ style: textTheme.titleLarge!
+ .copyWith(color: Colors.blue[900]),
+ ),
+ )
+ : const SizedBox(height: 0),
+ Text(
+ hourlySteps.fold(0, (t, e) => t + e.steps).toString(),
+ style: textTheme.displayMedium!.copyWith(color: Colors.white),
+ ),
+ Text(
+ 'steps',
+ style: textTheme.titleLarge!.copyWith(color: Colors.white),
+ )
+ ],
+ ),
+ ),
+ ),
+ Align(
+ alignment: Alignment.centerRight,
+ child: GestureDetector(
+ onTap: runPedometer,
+ child: Padding(
+ padding: const EdgeInsets.all(20.0),
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.blue[900],
+ shape: BoxShape.circle,
+ ),
+ child: const Padding(
+ padding: EdgeInsets.all(8.0),
+ child: Icon(
+ Icons.refresh,
+ color: Colors.white,
+ size: 50,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ Align(
+ alignment: Alignment.bottomCenter,
+ child: Padding(
+ padding:
+ const EdgeInsets.symmetric(horizontal: 30.0, vertical: 50.0),
+ child: AspectRatio(
+ aspectRatio: 1.2,
+ child: BarChart(
+ BarChartData(
+ titlesData: FlTitlesData(
+ show: true,
+ // Top titles are null
+ topTitles:
+ AxisTitles(sideTitles: SideTitles(showTitles: false)),
+ rightTitles:
+ AxisTitles(sideTitles: SideTitles(showTitles: false)),
+ leftTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: false,
+ ),
+ ),
+ bottomTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: true,
+ reservedSize: 30,
+ getTitlesWidget: getBottomTitles,
+ ),
+ ),
+ ),
+ borderData: FlBorderData(
+ show: false,
+ ),
+ barGroups: barGroups,
+ gridData: FlGridData(show: false),
+ alignment: BarChartAlignment.spaceAround,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ));
+ }
+}
+
+// Axis labels for bottom of chart
+Widget getBottomTitles(double value, TitleMeta meta) {
+ String text;
+ switch (value.toInt()) {
+ case 0:
+ text = '12AM';
+ break;
+ case 6:
+ text = '6AM';
+ break;
+ case 12:
+ text = '12PM';
+ break;
+ case 18:
+ text = '6PM';
+ break;
+ default:
+ text = '';
+ }
+ return SideTitleWidget(
+ axisSide: meta.axisSide,
+ space: 4,
+ child: Text(text, style: TextStyle(fontSize: 14, color: Colors.blue[900])),
+ );
+}
diff --git a/experimental/pedometer/example/lib/steps_repo.dart b/experimental/pedometer/example/lib/steps_repo.dart
new file mode 100644
index 000000000..e11ed2c12
--- /dev/null
+++ b/experimental/pedometer/example/lib/steps_repo.dart
@@ -0,0 +1,166 @@
+// ignore_for_file: depend_on_referenced_packages
+
+import 'dart:ffi' as ffi;
+import 'dart:io';
+import 'dart:isolate';
+
+import 'package:flutter/foundation.dart';
+import 'package:intl/intl.dart';
+import 'package:jni/jni.dart' as jni;
+import 'package:pedometer/pedometer_bindings_generated.dart' as pd;
+import 'package:pedometer/health_connect.dart' as hc;
+
+/// Class to hold the information needed for the chart
+class Steps {
+ String startHour;
+ int steps;
+ Steps(this.startHour, this.steps);
+}
+
+abstract class StepsRepo {
+ static const _formatString = "yyyy-MM-dd HH:mm:ss";
+
+ static StepsRepo? _instance;
+ static StepsRepo get instance =>
+ _instance ??= Platform.isAndroid ? _AndroidStepsRepo() : _IOSStepsRepo();
+
+ Future> getSteps();
+}
+
+class _IOSStepsRepo implements StepsRepo {
+ static const _dylibPath =
+ '/System/Library/Frameworks/CoreMotion.framework/CoreMotion';
+
+ // Bindings for the CMPedometer class
+ final lib = pd.PedometerBindings(ffi.DynamicLibrary.open(_dylibPath));
+ // Bindings for the helper function
+ final helpLib = pd.PedometerBindings(ffi.DynamicLibrary.process());
+
+ late final pd.CMPedometer client;
+ late final pd.NSDateFormatter formatter;
+ late final pd.NSDateFormatter hourFormatter;
+
+ _IOSStepsRepo() {
+ // Contains the Dart API helper functions
+ final dylib = ffi.DynamicLibrary.open("pedometer.framework/pedometer");
+
+ // Initialize the Dart API
+ final initializeApi = dylib.lookupFunction<
+ ffi.IntPtr Function(ffi.Pointer),
+ int Function(ffi.Pointer)>('Dart_InitializeApiDL');
+
+ final initializeResult = initializeApi(ffi.NativeApi.initializeApiDLData);
+ if (initializeResult != 0) {
+ throw StateError('failed to init API.');
+ }
+
+ // Create a new CMPedometer instance.
+ client = pd.CMPedometer.new1(lib);
+
+ // Setting the formatter for date strings.
+ formatter =
+ pd.NSDateFormatter.castFrom(pd.NSDateFormatter.alloc(lib).init());
+ formatter.dateFormat = pd.NSString(lib, "${StepsRepo._formatString} zzz");
+ hourFormatter =
+ pd.NSDateFormatter.castFrom(pd.NSDateFormatter.alloc(lib).init());
+ hourFormatter.dateFormat = pd.NSString(lib, "HH");
+ }
+
+ pd.NSDate dateConverter(DateTime dartDate) {
+ // Format dart date to string.
+ final formattedDate = DateFormat(StepsRepo._formatString).format(dartDate);
+ // Get current timezone. If eastern african change to AST to follow with NSDate.
+ final tz = dartDate.timeZoneName == "EAT" ? "AST" : dartDate.timeZoneName;
+
+ // Create a new NSString with the formatted date and timezone.
+ final nString = pd.NSString(lib, "$formattedDate $tz");
+ // Convert the NSString to NSDate.
+ return formatter.dateFromString_(nString);
+ }
+
+ @override
+ Future> getSteps() async {
+ if (!pd.CMPedometer.isStepCountingAvailable(lib)) {
+ debugPrint("Step counting is not available.");
+ return [];
+ }
+
+ final futures = [];
+ final now = DateTime.now();
+
+ for (var h = 0; h <= now.hour; h++) {
+ // Open up a port to receive data from native side.
+ final receivePort = ReceivePort();
+ final nativePort = receivePort.sendPort.nativePort;
+ final start = dateConverter(DateTime(now.year, now.month, now.day, h));
+ final end = dateConverter(DateTime(now.year, now.month, now.day, h + 1));
+
+ pd.PedometerHelper.startPedometerWithPort_pedometer_start_end_(
+ helpLib,
+ nativePort,
+ client,
+ start,
+ end,
+ );
+ // Handle the data received from native side.
+ futures.add(receivePort.first);
+ }
+
+ final data = await Future.wait(futures);
+ return data.where((e) => e != null).cast().map((address) {
+ final result = ffi.Pointer.fromAddress(address);
+ final pedometerData =
+ pd.CMPedometerData.castFromPointer(lib, result, release: true);
+ final stepCount = pedometerData.numberOfSteps?.intValue ?? 0;
+ final startHour =
+ hourFormatter.stringFromDate_(pedometerData.startDate!).toString();
+ return Steps(startHour, stepCount);
+ }).toList();
+ }
+}
+
+class _AndroidStepsRepo implements StepsRepo {
+ late final hc.Activity activity;
+ late final hc.Context applicationContext;
+ late final hc.HealthConnectClient client;
+
+ _AndroidStepsRepo() {
+ jni.Jni.initDLApi();
+ activity = hc.Activity.fromRef(jni.Jni.getCurrentActivity());
+ applicationContext =
+ hc.Context.fromRef(jni.Jni.getCachedApplicationContext());
+ client = hc.HealthConnectClient.getOrCreate1(applicationContext);
+ }
+
+ @override
+ Future> getSteps() async {
+ final futures = >[];
+ final now = DateTime.now();
+
+ for (var h = 0; h <= now.hour; h++) {
+ final start =
+ DateTime(now.year, now.month, now.day, h).millisecondsSinceEpoch;
+ final end =
+ DateTime(now.year, now.month, now.day, h + 1).millisecondsSinceEpoch;
+ final request = hc.AggregateRequest(
+ hc.Set.of1(
+ hc.AggregateMetric.type(hc.Long.type),
+ hc.StepsRecord.COUNT_TOTAL,
+ ),
+ hc.TimeRangeFilter.between(
+ hc.Instant.ofEpochMilli(start),
+ hc.Instant.ofEpochMilli(end),
+ ),
+ hc.Set.of(jni.JObject.type),
+ );
+ futures.add(client.aggregate(request));
+ }
+ final data = await Future.wait(futures);
+ return data.asMap().entries.map((entry) {
+ final stepsLong =
+ entry.value.get0(hc.Long.type, hc.StepsRecord.COUNT_TOTAL);
+ final steps = stepsLong.isNull ? 0 : stepsLong.intValue();
+ return Steps(entry.key.toString().padLeft(2, '0'), steps);
+ }).toList();
+ }
+}
diff --git a/experimental/pedometer/example/pubspec.yaml b/experimental/pedometer/example/pubspec.yaml
new file mode 100644
index 000000000..93ce4c2a0
--- /dev/null
+++ b/experimental/pedometer/example/pubspec.yaml
@@ -0,0 +1,100 @@
+name: pedometer_example
+description: Demonstrates how to use the pedometer plugin.
+# The following line prevents the package from being accidentally published to
+# pub.dev using `flutter pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+# The following defines the version and build number for your application.
+# A version number is three numbers separated by dots, like 1.2.43
+# followed by an optional build number separated by a +.
+# Both the version and the builder number may be overridden in flutter
+# build by specifying --build-name and --build-number, respectively.
+# In Android, build-name is used as versionName while build-number used as versionCode.
+# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
+# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
+# Read more about iOS versioning at
+# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
+# In Windows, build-name is used as the major, minor, and patch parts
+# of the product and file versions while build-number is used as the build suffix.
+version: 1.0.0+1
+
+environment:
+ sdk: '>=2.19.0-389.0.dev <3.0.0'
+
+# Dependencies specify other packages that your package needs in order to work.
+# To automatically upgrade your package dependencies to the latest versions
+# consider running `flutter pub upgrade --major-versions`. Alternatively,
+# dependencies can be manually updated by changing the version numbers below to
+# the latest version available on pub.dev. To see which dependencies have newer
+# versions available, run `flutter pub outdated`.
+dependencies:
+ flutter:
+ sdk: flutter
+
+ pedometer:
+ # When depending on this package from a real application you should use:
+ # pedometer: ^x.y.z
+ # See https://dart.dev/tools/pub/dependencies#version-constraints
+ # The example app is bundled with the plugin so we use a path dependency on
+ # the parent directory to use the current plugin's version.
+ path: ../
+
+ # The following adds the Cupertino Icons font to your application.
+ # Use with the CupertinoIcons class for iOS style icons.
+ cupertino_icons: ^1.0.2
+ ffi: ^2.0.1
+ intl: ^0.18.0
+ fl_chart: ^0.55.2
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+
+ # The "flutter_lints" package below contains a set of recommended lints to
+ # encourage good coding practices. The lint set provided by the package is
+ # activated in the `analysis_options.yaml` file located at the root of your
+ # package. See that file for information about deactivating specific lint
+ # rules and activating additional ones.
+ flutter_lints: ^2.0.0
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter packages.
+flutter:
+
+ # The following line ensures that the Material Icons font is
+ # included with your application, so that you can use the icons in
+ # the material Icons class.
+ uses-material-design: true
+
+ # To add assets to your application, add an assets section, like this:
+ # assets:
+ # - images/a_dot_burr.jpeg
+ # - images/a_dot_ham.jpeg
+
+ # An image asset can refer to one or more resolution-specific "variants", see
+ # https://flutter.dev/assets-and-images/#resolution-aware
+
+ # For details regarding adding assets from package dependencies, see
+ # https://flutter.dev/assets-and-images/#from-packages
+
+ # To add custom fonts to your application, add a fonts section here,
+ # in this "flutter" section. Each entry in this list should have a
+ # "family" key with the font family name, and a "fonts" key with a
+ # list giving the asset and other descriptors for the font. For
+ # example:
+ # fonts:
+ # - family: Schyler
+ # fonts:
+ # - asset: fonts/Schyler-Regular.ttf
+ # - asset: fonts/Schyler-Italic.ttf
+ # style: italic
+ # - family: Trajan Pro
+ # fonts:
+ # - asset: fonts/TrajanPro.ttf
+ # - asset: fonts/TrajanPro_Bold.ttf
+ # weight: 700
+ #
+ # For details regarding fonts from package dependencies,
+ # see https://flutter.dev/custom-fonts/#from-packages
diff --git a/experimental/pedometer/ffigen.yaml b/experimental/pedometer/ffigen.yaml
new file mode 100644
index 000000000..aa27fa0d6
--- /dev/null
+++ b/experimental/pedometer/ffigen.yaml
@@ -0,0 +1,23 @@
+# Run with `flutter pub run ffigen --config ffigen.yaml`.
+name: PedometerBindings
+description: "Bindings for CM pedometers"
+language: objc
+output: "lib/pedometer_bindings_generated.dart"
+compiler-opts:
+ - "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks"
+ - "-mios-version-min=13.0"
+exclude-all-by-default: true
+objc-interfaces:
+ include:
+ - "CMPedometer"
+ - "PedometerHelper"
+ - "NSDate"
+ - "NSDateFormatter"
+headers:
+ entry-points:
+ - "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMotion.framework/Headers/CMPedometer.h"
+ - "src/pedometerHelper.h"
+
+# To use this API, you must include the NSMotionUsageDescription key in your app’s Info.plist file
+# and provide a usage description string for this key.
+# The usage description appears in the prompt that the user must accept the first time the system asks the user to access motion data for your app.
\ No newline at end of file
diff --git a/experimental/pedometer/ios/Classes/dart_api_dl.c b/experimental/pedometer/ios/Classes/dart_api_dl.c
new file mode 100644
index 000000000..20b9bf290
--- /dev/null
+++ b/experimental/pedometer/ios/Classes/dart_api_dl.c
@@ -0,0 +1,2 @@
+#include "../../src/dart-sdk/include/dart_api_dl.c"
+
diff --git a/experimental/pedometer/ios/Classes/pedometerHelper.m b/experimental/pedometer/ios/Classes/pedometerHelper.m
new file mode 100644
index 000000000..ac82ca067
--- /dev/null
+++ b/experimental/pedometer/ios/Classes/pedometerHelper.m
@@ -0,0 +1,3 @@
+// Relative import to be able to reuse the C sources.
+// See the comment in ../{projectName}}.podspec for more information.
+ #include "../../src/pedometerHelper.m"
diff --git a/experimental/pedometer/ios/pedometer.podspec b/experimental/pedometer/ios/pedometer.podspec
new file mode 100644
index 000000000..3f5d503e5
--- /dev/null
+++ b/experimental/pedometer/ios/pedometer.podspec
@@ -0,0 +1,29 @@
+#
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
+# Run `pod lib lint pedometer.podspec` to validate before publishing.
+#
+Pod::Spec.new do |s|
+ s.name = 'pedometer'
+ s.version = '0.0.1'
+ s.summary = 'A new Flutter FFI plugin project.'
+ s.description = <<-DESC
+A new Flutter FFI plugin project.
+ DESC
+ s.homepage = 'http://example.com'
+ s.license = { :file => '../LICENSE' }
+ s.author = { 'Your Company' => 'email@example.com' }
+
+ # This will ensure the source files in Classes/ are included in the native
+ # builds of apps using this FFI plugin. Podspec does not support relative
+ # paths, so Classes contains a forwarder C file that relatively imports
+ # `../src/*` so that the C sources can be shared among all target platforms.
+ s.source = { :path => '.' }
+ s.source_files = 'Classes/**/*'
+ s.dependency 'Flutter'
+ s.platform = :ios, '9.0'
+ s.requires_arc = []
+
+ # Flutter.framework does not contain a i386 slice.
+ s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
+ s.swift_version = '5.0'
+end
diff --git a/experimental/pedometer/jnigen.yaml b/experimental/pedometer/jnigen.yaml
new file mode 100644
index 000000000..3f140db9b
--- /dev/null
+++ b/experimental/pedometer/jnigen.yaml
@@ -0,0 +1,34 @@
+android_sdk_config:
+ add_gradle_deps: true
+
+summarizer:
+ backend: asm
+
+# Experimental flag to convert suspend functions in Kotlin to Dart async
+# functions. Only available in suspend-fun branch of jnigen for now.
+suspend_fun_to_async: true
+
+output:
+ c:
+ library_name: health_connect
+ path: src/health_connect/
+ dart:
+ path: lib/health_connect.dart
+ structure: single_file
+
+class_path:
+ - 'classes.jar'
+classes:
+ - 'androidx.health.connect.client.HealthConnectClient'
+ - 'androidx.health.connect.client.PermissionController'
+ - 'androidx.health.connect.client.records.StepsRecord'
+ - 'androidx.health.connect.client.time'
+ - 'android.content.Context'
+ - 'android.content.Intent'
+ - 'android.app.Activity'
+ - 'java.time.Instant'
+ - 'java.lang.Long'
+ - 'java.util.Set'
+ - 'androidx.health.connect.client.request'
+ - 'androidx.health.connect.client.aggregate.AggregationResult'
+ - 'androidx.health.connect.client.aggregate.AggregateMetric'
diff --git a/experimental/pedometer/lib/health_connect.dart b/experimental/pedometer/lib/health_connect.dart
new file mode 100644
index 000000000..ea44f7dce
--- /dev/null
+++ b/experimental/pedometer/lib/health_connect.dart
@@ -0,0 +1,12152 @@
+// Autogenerated by jnigen. DO NOT EDIT!
+
+// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_extensions
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
+// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
+// ignore_for_file: overridden_fields
+// ignore_for_file: unnecessary_cast
+// ignore_for_file: unused_element
+// ignore_for_file: unused_import
+
+import "dart:isolate" show ReceivePort;
+import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
+import "package:jni/jni.dart" as jni;
+
+// Auto-generated initialization code.
+
+final ffi.Pointer Function(String sym) jniLookup =
+ ProtectedJniExtensions.initGeneratedLibrary("health_connect");
+
+/// from: androidx.health.connect.client.HealthConnectClient
+class HealthConnectClient extends jni.JObject {
+ late final jni.JObjType? _$type;
+ @override
+ jni.JObjType get $type => _$type ??= type;
+
+ HealthConnectClient.fromRef(
+ jni.JObjectPtr ref,
+ ) : super.fromRef(ref);
+
+ /// The type which includes information such as the signature of this class.
+ static const type = $HealthConnectClientType();
+
+ static final _get_Companion =
+ jniLookup>(
+ "get_HealthConnectClient__Companion")
+ .asFunction();
+
+ /// from: static public final androidx.health.connect.client.HealthConnectClient$Companion Companion
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ static jni.JObject get Companion =>
+ const jni.JObjectType().fromRef(_get_Companion().object);
+
+ /// from: static public final java.lang.String DEFAULT_PROVIDER_PACKAGE_NAME
+ static const DEFAULT_PROVIDER_PACKAGE_NAME =
+ "com.google.android.apps.healthdata";
+
+ static final _getPermissionController = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer)>>(
+ "HealthConnectClient__getPermissionController")
+ .asFunction)>();
+
+ /// from: public abstract androidx.health.connect.client.PermissionController getPermissionController()
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ PermissionController getPermissionController() =>
+ const $PermissionControllerType()
+ .fromRef(_getPermissionController(reference).object);
+
+ static final _insertRecords = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__insertRecords")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object insertRecords(java.util.List list, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future insertRecords(jni.JObject list) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _insertRecords(reference, list.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _updateRecords = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__updateRecords")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object updateRecords(java.util.List list, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future updateRecords(jni.JObject list) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _updateRecords(reference, list.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _deleteRecords = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__deleteRecords")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object deleteRecords(kotlin.reflect.KClass kClass, java.util.List list, java.util.List list1, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future deleteRecords(
+ jni.JObject kClass, jni.JObject list, jni.JObject list1) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _deleteRecords(
+ reference, kClass.reference, list.reference, list1.reference, $c)
+ .object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _deleteRecords1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>(
+ "HealthConnectClient__deleteRecords1")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object deleteRecords(kotlin.reflect.KClass kClass, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future deleteRecords1(
+ jni.JObject kClass, TimeRangeFilter timeRangeFilter) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _deleteRecords1(reference, kClass.reference, timeRangeFilter.reference, $c)
+ .object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _readRecord = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__readRecord")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object readRecord(kotlin.reflect.KClass kClass, java.lang.String string, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future readRecord(
+ jni.JObjType $T, jni.JObject kClass, jni.JString string) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _readRecord(reference, kClass.reference, string.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _readRecords = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__readRecords")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object readRecords(androidx.health.connect.client.request.ReadRecordsRequest readRecordsRequest, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future readRecords(
+ jni.JObjType $T, ReadRecordsRequest readRecordsRequest) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _readRecords(reference, readRecordsRequest.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _aggregate = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__aggregate")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object aggregate(androidx.health.connect.client.request.AggregateRequest aggregateRequest, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future aggregate(AggregateRequest aggregateRequest) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _aggregate(reference, aggregateRequest.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const $AggregationResultType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const $AggregationResultType().fromRef($o);
+ }
+
+ static final _aggregateGroupByDuration = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer, ffi.Pointer)>>(
+ "HealthConnectClient__aggregateGroupByDuration")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object aggregateGroupByDuration(androidx.health.connect.client.request.AggregateGroupByDurationRequest aggregateGroupByDurationRequest, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future aggregateGroupByDuration(
+ AggregateGroupByDurationRequest aggregateGroupByDurationRequest) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _aggregateGroupByDuration(
+ reference, aggregateGroupByDurationRequest.reference, $c)
+ .object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _aggregateGroupByPeriod = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer, ffi.Pointer)>>(
+ "HealthConnectClient__aggregateGroupByPeriod")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object aggregateGroupByPeriod(androidx.health.connect.client.request.AggregateGroupByPeriodRequest aggregateGroupByPeriodRequest, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future aggregateGroupByPeriod(
+ AggregateGroupByPeriodRequest aggregateGroupByPeriodRequest) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _aggregateGroupByPeriod(
+ reference, aggregateGroupByPeriodRequest.reference, $c)
+ .object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _getChangesToken = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer, ffi.Pointer)>>(
+ "HealthConnectClient__getChangesToken")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object getChangesToken(androidx.health.connect.client.request.ChangesTokenRequest changesTokenRequest, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future getChangesToken(
+ ChangesTokenRequest changesTokenRequest) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _getChangesToken(reference, changesTokenRequest.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JStringType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JStringType().fromRef($o);
+ }
+
+ static final _getChanges = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__getChanges")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object getChanges(java.lang.String string, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future getChanges(jni.JString string) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _getChanges(reference, string.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+
+ static final _isAvailable = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__isAvailable")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: static public boolean isAvailable(android.content.Context context, java.util.List list)
+ static bool isAvailable(Context context, jni.JObject list) =>
+ _isAvailable(context.reference, list.reference).boolean;
+
+ static final _getOrCreate = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer)>>("HealthConnectClient__getOrCreate")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: static public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, java.util.List list)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ static HealthConnectClient getOrCreate(Context context, jni.JObject list) =>
+ const $HealthConnectClientType()
+ .fromRef(_getOrCreate(context.reference, list.reference).object);
+
+ static final _isAvailable1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("HealthConnectClient__isAvailable1")
+ .asFunction)>();
+
+ /// from: static public boolean isAvailable(android.content.Context context)
+ static bool isAvailable1(Context context) =>
+ _isAvailable1(context.reference).boolean;
+
+ static final _getOrCreate1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("HealthConnectClient__getOrCreate1")
+ .asFunction)>();
+
+ /// from: static public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ static HealthConnectClient getOrCreate1(Context context) =>
+ const $HealthConnectClientType()
+ .fromRef(_getOrCreate1(context.reference).object);
+}
+
+class $HealthConnectClientType extends jni.JObjType {
+ const $HealthConnectClientType();
+
+ @override
+ String get signature =>
+ r"Landroidx/health/connect/client/HealthConnectClient;";
+
+ @override
+ HealthConnectClient fromRef(jni.JObjectPtr ref) =>
+ HealthConnectClient.fromRef(ref);
+}
+
+extension $HealthConnectClientArray on jni.JArray {
+ HealthConnectClient operator [](int index) {
+ return (elementType as $HealthConnectClientType)
+ .fromRef(elementAt(index, jni.JniCallType.objectType).object);
+ }
+
+ void operator []=(int index, HealthConnectClient value) {
+ (this as jni.JArray)[index] = value;
+ }
+}
+
+/// from: androidx.health.connect.client.PermissionController
+class PermissionController extends jni.JObject {
+ late final jni.JObjType? _$type;
+ @override
+ jni.JObjType get $type => _$type ??= type;
+
+ PermissionController.fromRef(
+ jni.JObjectPtr ref,
+ ) : super.fromRef(ref);
+
+ /// The type which includes information such as the signature of this class.
+ static const type = $PermissionControllerType();
+
+ static final _createRequestPermissionActivityContract = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer)>>(
+ "PermissionController__createRequestPermissionActivityContract")
+ .asFunction)>();
+
+ /// from: public abstract androidx.activity.result.contract.ActivityResultContract createRequestPermissionActivityContract()
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ jni.JObject createRequestPermissionActivityContract() =>
+ const jni.JObjectType()
+ .fromRef(_createRequestPermissionActivityContract(reference).object);
+
+ static final _getGrantedPermissions = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer, ffi.Pointer)>>(
+ "PermissionController__getGrantedPermissions")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object getGrantedPermissions(java.util.Set set, kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future> getGrantedPermissions(Set set0) async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _getGrantedPermissions(reference, set0.reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const $SetType(jni.JObjectType()).getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const $SetType(jni.JObjectType()).fromRef($o);
+ }
+
+ static final _revokeAllPermissions = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>>(
+ "PermissionController__revokeAllPermissions")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: public abstract java.lang.Object revokeAllPermissions(kotlin.coroutines.Continuation continuation)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Future revokeAllPermissions() async {
+ final $p = ReceivePort();
+ final $c = jni.Jni.newPortContinuation($p);
+ _revokeAllPermissions(reference, $c).object;
+ final $o = ffi.Pointer.fromAddress(await $p.first);
+ final $k = const jni.JObjectType().getClass().reference;
+ if (jni.Jni.env.IsInstanceOf($o, $k) == 0) {
+ throw "Failed";
+ }
+ return const jni.JObjectType().fromRef($o);
+ }
+}
+
+class $PermissionControllerType extends jni.JObjType {
+ const $PermissionControllerType();
+
+ @override
+ String get signature =>
+ r"Landroidx/health/connect/client/PermissionController;";
+
+ @override
+ PermissionController fromRef(jni.JObjectPtr ref) =>
+ PermissionController.fromRef(ref);
+}
+
+extension $PermissionControllerArray on jni.JArray {
+ PermissionController operator [](int index) {
+ return (elementType as $PermissionControllerType)
+ .fromRef(elementAt(index, jni.JniCallType.objectType).object);
+ }
+
+ void operator []=(int index, PermissionController value) {
+ (this as jni.JArray)[index] = value;
+ }
+}
+
+/// from: androidx.health.connect.client.records.StepsRecord
+class StepsRecord extends jni.JObject {
+ late final jni.JObjType? _$type;
+ @override
+ jni.JObjType get $type => _$type ??= type;
+
+ StepsRecord.fromRef(
+ jni.JObjectPtr ref,
+ ) : super.fromRef(ref);
+
+ /// The type which includes information such as the signature of this class.
+ static const type = $StepsRecordType();
+
+ static final _get_Companion =
+ jniLookup>(
+ "get_StepsRecord__Companion")
+ .asFunction();
+
+ /// from: static public final androidx.health.connect.client.records.StepsRecord$Companion Companion
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ static jni.JObject get Companion =>
+ const jni.JObjectType().fromRef(_get_Companion().object);
+
+ static final _get_COUNT_TOTAL =
+ jniLookup>(
+ "get_StepsRecord__COUNT_TOTAL")
+ .asFunction();
+
+ /// from: static public final androidx.health.connect.client.aggregate.AggregateMetric COUNT_TOTAL
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ static AggregateMetric get COUNT_TOTAL =>
+ const $AggregateMetricType($LongType())
+ .fromRef(_get_COUNT_TOTAL().object);
+
+ static final _ctor = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Int64,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("StepsRecord__ctor")
+ .asFunction<
+ jni.JniResult Function(
+ int,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public void (long j, java.time.Instant instant, java.time.ZoneOffset zoneOffset, java.time.Instant instant1, java.time.ZoneOffset zoneOffset1, androidx.health.connect.client.records.metadata.Metadata metadata)
+ StepsRecord(int j, Instant instant, jni.JObject zoneOffset, Instant instant1,
+ jni.JObject zoneOffset1, jni.JObject metadata)
+ : super.fromRef(_ctor(j, instant.reference, zoneOffset.reference,
+ instant1.reference, zoneOffset1.reference, metadata.reference)
+ .object);
+
+ static final _ctor1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Int64,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Int32,
+ ffi.Pointer)>>("StepsRecord__ctor1")
+ .asFunction<
+ jni.JniResult Function(
+ int,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ int,
+ ffi.Pointer)>();
+
+ /// from: public void (long j, java.time.Instant instant, java.time.ZoneOffset zoneOffset, java.time.Instant instant1, java.time.ZoneOffset zoneOffset1, androidx.health.connect.client.records.metadata.Metadata metadata, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)
+ StepsRecord.ctor1(
+ int j,
+ Instant instant,
+ jni.JObject zoneOffset,
+ Instant instant1,
+ jni.JObject zoneOffset1,
+ jni.JObject metadata,
+ int i,
+ jni.JObject defaultConstructorMarker)
+ : super.fromRef(_ctor1(
+ j,
+ instant.reference,
+ zoneOffset.reference,
+ instant1.reference,
+ zoneOffset1.reference,
+ metadata.reference,
+ i,
+ defaultConstructorMarker.reference)
+ .object);
+
+ static final _getCount = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("StepsRecord__getCount")
+ .asFunction)>();
+
+ /// from: public final long getCount()
+ int getCount() => _getCount(reference).long;
+
+ static final _getStartTime = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("StepsRecord__getStartTime")
+ .asFunction)>();
+
+ /// from: public java.time.Instant getStartTime()
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Instant getStartTime() =>
+ const $InstantType().fromRef(_getStartTime(reference).object);
+
+ static final _getStartZoneOffset = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("StepsRecord__getStartZoneOffset")
+ .asFunction)>();
+
+ /// from: public java.time.ZoneOffset getStartZoneOffset()
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ jni.JObject getStartZoneOffset() =>
+ const jni.JObjectType().fromRef(_getStartZoneOffset(reference).object);
+
+ static final _getEndTime = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("StepsRecord__getEndTime")
+ .asFunction)>();
+
+ /// from: public java.time.Instant getEndTime()
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ Instant getEndTime() =>
+ const $InstantType().fromRef(_getEndTime(reference).object);
+
+ static final _getEndZoneOffset = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("StepsRecord__getEndZoneOffset")
+ .asFunction)>();
+
+ /// from: public java.time.ZoneOffset getEndZoneOffset()
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ jni.JObject getEndZoneOffset() =>
+ const jni.JObjectType().fromRef(_getEndZoneOffset(reference).object);
+
+ static final _getMetadata = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("StepsRecord__getMetadata")
+ .asFunction)>();
+
+ /// from: public androidx.health.connect.client.records.metadata.Metadata getMetadata()
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ jni.JObject getMetadata() =>
+ const jni.JObjectType().fromRef(_getMetadata(reference).object);
+
+ static final _equals1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer)>>("StepsRecord__equals1")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: public boolean equals(java.lang.Object object)
+ bool equals1(jni.JObject object) =>
+ _equals1(reference, object.reference).boolean;
+
+ static final _hashCode1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer)>>("StepsRecord__hashCode1")
+ .asFunction)>();
+
+ /// from: public int hashCode()
+ int hashCode1() => _hashCode1(reference).integer;
+}
+
+class $StepsRecordType extends jni.JObjType {
+ const $StepsRecordType();
+
+ @override
+ String get signature =>
+ r"Landroidx/health/connect/client/records/StepsRecord;";
+
+ @override
+ StepsRecord fromRef(jni.JObjectPtr ref) => StepsRecord.fromRef(ref);
+}
+
+extension $StepsRecordArray on jni.JArray {
+ StepsRecord operator [](int index) {
+ return (elementType as $StepsRecordType)
+ .fromRef(elementAt(index, jni.JniCallType.objectType).object);
+ }
+
+ void operator []=(int index, StepsRecord value) {
+ (this as jni.JArray)[index] = value;
+ }
+}
+
+/// from: androidx.health.connect.client.time.TimeRangeFilter$Companion
+class TimeRangeFilter_Companion extends jni.JObject {
+ late final jni.JObjType? _$type;
+ @override
+ jni.JObjType get $type => _$type ??= type;
+
+ TimeRangeFilter_Companion.fromRef(
+ jni.JObjectPtr ref,
+ ) : super.fromRef(ref);
+
+ /// The type which includes information such as the signature of this class.
+ static const type = $TimeRangeFilter_CompanionType();
+
+ static final _between = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>>("TimeRangeFilter_Companion__between")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public final androidx.health.connect.client.time.TimeRangeFilter between(java.time.Instant instant, java.time.Instant instant1)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ TimeRangeFilter between(Instant instant, Instant instant1) =>
+ const $TimeRangeFilterType().fromRef(
+ _between(reference, instant.reference, instant1.reference).object);
+
+ static final _between1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer, ffi.Pointer)>>(
+ "TimeRangeFilter_Companion__between1")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, ffi.Pointer,
+ ffi.Pointer)>();
+
+ /// from: public final androidx.health.connect.client.time.TimeRangeFilter between(java.time.LocalDateTime localDateTime, java.time.LocalDateTime localDateTime1)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ TimeRangeFilter between1(
+ jni.JObject localDateTime, jni.JObject localDateTime1) =>
+ const $TimeRangeFilterType().fromRef(_between1(
+ reference, localDateTime.reference, localDateTime1.reference)
+ .object);
+
+ static final _before = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer)>>("TimeRangeFilter_Companion__before")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: public final androidx.health.connect.client.time.TimeRangeFilter before(java.time.Instant instant)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ TimeRangeFilter before(Instant instant) => const $TimeRangeFilterType()
+ .fromRef(_before(reference, instant.reference).object);
+
+ static final _before1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer)>>("TimeRangeFilter_Companion__before1")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: public final androidx.health.connect.client.time.TimeRangeFilter before(java.time.LocalDateTime localDateTime)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ TimeRangeFilter before1(jni.JObject localDateTime) =>
+ const $TimeRangeFilterType()
+ .fromRef(_before1(reference, localDateTime.reference).object);
+
+ static final _after = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer)>>("TimeRangeFilter_Companion__after")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ /// from: public final androidx.health.connect.client.time.TimeRangeFilter after(java.time.Instant instant)
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ TimeRangeFilter after(Instant instant) => const $TimeRangeFilterType()
+ .fromRef(_after(reference, instant.reference).object);
+
+ static final _after1 = jniLookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(ffi.Pointer,
+ ffi.Pointer