Comments (9)
Hi all,
does it happen now in the 2.1.0 version? Unfortunately I don't have any iOS 12 device by hand.
I assume the problem was here
The availability macro was in the wrong place
from health_kit_reporter.
If you add it directly with Xcode, it will be reset every time you start it via Flutter, so I added the following to the project's ios/Podfile to make a temporary workaround.
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
+
+ if target.name == 'HealthKitReporter'
+ # Add HealthKit.framework with Weak attribute.
+ ref_healthkit = target.project.frameworks_group.new_reference('HealthKit.framework')
+ ref_healthkit.source_tree = 'SDKROOT'
+
+ ref_build_phases_healthkit = target.frameworks_build_phases.add_file_reference(ref_healthkit)
+ ref_build_phases_healthkit.settings = { 'ATTRIBUTES' => ['Weak'] }
+ end
end
end
from health_kit_reporter.
Hi @thachnn2
Thank you for your report. According to Apple documentation you must have iOS 14 minimum to use Electrocardiogram related API. Source. Also see in the consumed library
In the example app you might locally comment out the lines 107 and 108 of main.dart file and give it a try again.
from health_kit_reporter.
Hi @VictorKachalov
I'm also experiencing this issue with iPhone 5S iOS 12.4. The app crashes in release mode and is frozen in debug.
from health_kit_reporter.
Hi @thachnn2,
I was able to get this working by downgrading the Command Line tools to Xcode 13.2.1.
Find out how to downgrade here.
@VictorKachalov This doesn't fix the issue. It would be good to know why this is happening in the latest version of Xcode.
from health_kit_reporter.
I have the same issue.
The app is only saving to mindful minutes, and a lot of iOS 12 devices are crashing right at the app start.
from health_kit_reporter.
Hi @thachnn2,
I was able to get this working by downgrading the Command Line tools to Xcode 13.2.1.
Find out how to downgrade here.
@VictorKachalov This doesn't fix the issue. It would be good to know why this is happening in the latest version of Xcode.
This no longer works. @VictorKachalov Any updates on when this will be fixed?
from health_kit_reporter.
Does it also happen for you, if you use the native lib https://github.com/VictorKachalov/HealthKitReporter ?
from health_kit_reporter.
Hi @VictorKachalov
Even if health_kit_reporter was set to 2.1.0, an error occurred at runtime and it could not be started. (iOS 12.4.1)
dyld: Symbol not found: _OBJC_CLASS_$_HKElectrocardiogramQuery
Referenced from: /private/var/containers/Bundle/Application/0B2AD4DC-AEA1-4EFB-B075-4177D73FA04D/Runner.app/Frameworks/HealthKitReporter.framework/HealthKitReporter
Expected in: /System/Library/Frameworks/HealthKit.framework/HealthKit
in /private/var/containers/Bundle/Application/0B2AD4DC-AEA1-4EFB-B075-4177D73FA04D/Runner.app/Frameworks/HealthKitReporter.framework/HealthKitReporter
In the main project, HealthKit.framework is linked as Optional, but when I added HealthKit.framework as Optional to HealthKitReporter on the Pods side, I was able to start it even on "iOS 12.4.1".
(In this case, you can also remove the link to HealthKit.framework from the main project.)
Can't it be solved by adding the following to HealthKitReporter.podspec of HealthKitReporter?
spec.weak_frameworks = 'HealthKit'
from health_kit_reporter.
Related Issues (20)
- HealthKitReporter.workoutRouteQuery: Unhandled Exception: type 'Null' is not a subtype of type 'List<dynamic>' HOT 6
- Support retrieving voltage measurements for ECG records HOT 1
- Save WorkoutRouteHarmonized HOT 1
- Build error 2.0.3 - extra arguments at positions #2, #3 in call ... reporter.reader.electrocardiogramQuery HOT 2
- Is there a way to pull a list of workouts? HOT 2
- No new data on subsequent queries HOT 4
- Adding Blood Pressure Correlation Crashes HOT 3
- Build error with latest version HOT 1
- HKMetadataKeySyncIdentifier / HKMetadataKeySyncVersion are not updated when passed in Quantity.metadata HOT 3
- Calling `statisticsQuery` for `QuantityType.restingHeartRate` is never returning (future never completes). HOT 2
- Calling `statisticsQuery` for a `QuantityType` that does not have any data in Health Kit should not throw. HOT 1
- Flutter throwing categoryQuery identifier error HOT 1
- support iOS 16 sleep stages HOT 2
- Category.sourceRevision should be nullable
- Deprecated usage warning
- Add a way to verify platform support HOT 1
- Hard Crash when addQuantity is used. HOT 1
- Workout metadata missing. HOT 2
- InvalidValueException with swimBikeRun activities
- method data not found when predicate period include minutes and seconds HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from health_kit_reporter.