Get all wearable data from healthkit - ios

I want to get step count from wearable devices such as samsung gear fit bit etc from the healthkit api.
I want to know if it is possible to get data of all the wearables from the healthkit itself.

According to Apple, HealthKit provides a central repository for health and fitness data on iPhone and Apple Watch.
Health Kit works only for iOS and WatchOS devices.
If you need to integrate Fitbit data into your iOS App, you need to use their api.
According to Samsung developer page, Companion applications are not supported for iPhone.

Related

Apple HealthKit Determine Between Watch and iPhone

Currently we are programming an application in Xamarin. The application pulls activity data from the apple health kit. We haven't found a class that can distinguish between the apple watch and the iphone data, when we pull from the Apple Healthkit. For example, when someone walks with their phone and watch it is logging steps for both devices. So we are having trouble getting an accurate count.
I know Swift has predicateForObjects & HKSourceQuery. However, is there a version of these classes for xamarin?

Is the requestTrackingAuthorization only needed for IDFA?

I am getting confused if we have to show the requestTrackingAuthorization prompt or not. I thought it needs to be shown when third parties collect any data. Not I got the information from onesignal (which we use for push-notifications) that although they collect date the prompt is for their SDK not needed because they don't collect IDFA.
So in other words: Is IDFA the true reason to show the prompt and other data not?
Thanks
Andreas
Based on Apple's User Privacy and Data Use Website, it is said:
Starting with iOS 14.5, iPadOS 14.5, and tvOS 14.5, you’ll need to receive the user’s permission through the AppTrackingTransparency framework to track them or access their device’s advertising identifier. Tracking refers to the act of linking user or device data collected from your app with user or device data collected from other companies’ apps, websites, or offline properties for targeted advertising or advertising measurement purposes.
In the simple way, IDFA (Identifier for Advertisers) is required if you need to show more personalized ads. As far as I know, based on my experience I need IDFA to show more personalized ads in Google Mobile Ads SDK (AdMob). To achieve this, i have to show App Tracking prompt. When user choose to allow, the SDK can track user and show user more relevan ads. If user choose to not allow tracking, the ads are still showing but maybe less relevan and less personalized.
You have to know what data being collected by OneSignal, because in the end you have to write all them down in App Privacy section in App Store Connect if you want to upload your app to App Store. Since I have no experience using OneSignal, sorry i'm not sure what data they are collecting.
Google has good website documentation about App Tracking policy in iOS 14 to prepare iOS 14 app tracking policy. OneSignal also has Apple App Privacy Requirement.
It is said:
As OneSignal is a third-party to your app, you’ll need to ensure you are properly disclosing to your users the ways you are using OneSignal in regards to their data.
So basically, you have to disclose and write all data collected by OneSignal in App Privacy section when you want to upload your app to App Store. OneSignal collect Purchase and Product Interaction automatically by default. Maybe you use more data type, you have to disclose them.
OneSignal does not collect IDFA as of iOS SDK version 2.16.0*.
*IDFA and IDFV are no longer captured by the OneSignal iOS SDK as of version 2.16.0 and 3.0.0 beta cut 4. If you’re using an older version of the SDK prior to 2.16.0, you will need to disclose this as collected data.
According to the documentation, OneSignal doesn't require you to implement App Tracking prompt since OneSignal does not collect IDFA as of iOS SDK version 2.16.0. Yes, right! You no need to implement App Tracking, assuming that you are only using OneSignal in your app project.
But if you also use other SDK which needs IDFA to work best such as Google Mobile Ads, you need to implement it.

Does iOS 12.2 support GPS for PWA?

I'm about to build a PWA, but it requires a use of GPS. I know Android supports that, but have no clue if that will work for iOS users.
Does anyone know whether iOS 12.2(current last version) supports GPS for PWA?
100% sure you can use GPS in iOS PWA
Abilities of PWAs on iOS
With the Web Platform on iOS you can access:
Geolocation
Sensors (Magnetometer, Accelerometer, Gyroscope)
Camera
Audio output
Speech Synthesis (with headsets connected only)
Apple Pay
WebAssembly, WebRTC, WebGL as well as many other experimental
features under a flag.
Limitations
Compared with native iOS apps:
The app can store offline data and files only up to 50 Mb
If the user doesn’t use the app for a few weeks, iOS will free up the
app’s files.
No access to Bluetooth, serial, Beacons, Touch ID, Face ID, ARKit,
altimeter sensor, battery information
No background processing
No access to private information (contacts, background location) and
also no access to native social apps
No access to In App Payments
No Push Notifications, no icon badge or Siri integration
Progressive Web Apps on iOS are here - Medium
ref1
ref2
For anyone who wants a detailed review of PWAs on iOS 12.2, please check this article from Maximiliano Firtman on Medium (published on March, 26th - 2019). In short, Apple Web Kit team created a new framework for PWAs. It doesn't rely anymore on Safari. The main drawback I experienced is that updates through service worker seems not to work anymore as well as offline browsing when the page includes lazy loaded pictures.

Possible to livestream hr data from watch app to iphone app? how if yes?

we have a iOS fitness application. We are building a watchOS companion app. We are looking for suggestions on how to architect the following feature.
We want to stream heart rate data back to our iOS app from our watchOS companion app. For example, during a HKworkout on the companion watchOS app, I would like to stream the users heartRate values back to the iOS app to be displayed during the users HKworkout session.
I am able to retrieve the hr data on the watch even if it is running in the background during a HKworkout, but don't know how to livestream the hr data back to the iOS app.
I tried to use TransferUserInfo function to send the data in the background, but it does not work properly. It has budget limitation as well.
Another idea is to use apple healthKit. In other word, send hr data from watchOS to the healthStore (healthKit) then simultaneously have the iOS app pull the data from healthKit. I figured there has to be an easier way to stream live HR data back to an iOS app.
Any ideas, thoughts, or suggestions would be greatly appreciated.
Thanks!
HealthKit isn't a realtime data transport mechanism for apps. If you want to transfer live information collected by your WatchKit app to the iPhone, you need to use WatchConnectivity APIs.
If WatchConnectivity APIs don't work reliably while your app is recording a workout, you should file a bug with Apple.

iOS - How to integrate bluetooth devices in my app

I'm trying to create some application that connects to blue tooth devices. A simple thing like a bluetooth barcode scanner that scans and sends a number to my app. I want to know which framework or something to be used in my app that can integrate the barcode scanner with my app. Is there any API or examples or tutorials etc that can help me implement such things?
Apple provides an API called the External Accessory framework, which can be used to interact with paired Bluetooth devices or devices connected through wired, Apple Connector at the base of the device.
However, to be able to use a paired device from within your application as you desire, you will have to a device that is designed to be compatible with iOS devices (meaning, the manufacturer must be a member of the Apple MFi program) and the device manufacturer must provide a protocol that you must add to your applications info.plist file.
If you have bought an off-the-shelf, Bluetooth barcode reader, there is a fair chance that you can not do what you are trying to do. If the device states that it can be integrated into custom iOS applications, consult the device manufacturer for further support regarding setting up your application to interact with their hardware.

Resources