B4i Library iHealth - Get the health information from HeathKit framework

Discussion in 'iOS Libraries' started by Alberto Iglesias, Jul 27, 2018.

  1. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    [​IMG]

    iHealth - Get the health information from HeathKit framework

    Installation instructions:

    - Copy the *.a and *.h files into the folder "Libs" in your MAC or in your MAC HOSTED by AnywhereSoftware, normally in "B4i-MacServer\Libs" folder

    -Copy the iHealth.xml to your custom libraries folder in B4i
    - Select in your REFERENCED LIBRARIES

    [​IMG]

    iHealth
    Author:
    Alberto Iglesias (alberto@visualnet.inf.br)
    Version: 1.02
    • HealhKit
      Events:
      • onInitialized ( )
      • ReceivedSteps (Steps as List )
      • ReceivedBirthday (Birthday as String )
      Methods:
      • Initialize: (EventName As String)
        Initializes the object
      • GetSteps:: (StartDate As String, EndDate As String)
        Get Steps
      • GetBirthday As String
        Get Birthday
      • isHealthDataAvailable As Boolean
        Is HeathData Available
      • LicenseShow
        Show License
      Properties:
      • DebugMode As Boolean
        Enable/Disable Debug mode from Library
      • Author As String [read only]
        Author of this Library
      • Version As String [read only]
        Version of this Library
      • LicenseEmail As String
        License Email
      • LicenseKey As String
        License Key

    [​IMG]


    [​IMG]


    [​IMG]


    And import thing is for this, you need from apple the correct provisioning profile with this application service
    [​IMG]


    You can get your license key in our library store:
    (you don't have limit of time if you don't want to buy)

    [​IMG]
     

    Attached Files:

    Last edited: Jul 30, 2018
  2. mkh_fx

    mkh_fx Member Licensed User

    hello my friend

    When the iHealth access is disallow, the GetSteps method will cause the app to crash
    so i think need a method to get permission status
    also IsInitialize method
     
  3. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    hummm.. ok, let me check today and I will tell you
     
  4. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

  5. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Hello again,

    I've been checked the code and since the version ios 10, one method is not returning any error, but you can check with this new version ok?

    and please send me the log of your code, to check where is crashing, because I tried on 3 devices and no one have this error.

    This is the line I put in this new version to check the permissions
    Code:
    [self.healthStore requestAuthorizationToShareTypes:nil readTypes:[NSSet setWithArray:readTypes]
              completion:^(BOOL success, NSError *error)
     

    Attached Files:

  6. mkh_fx

    mkh_fx Member Licensed User

    thank you my friend
    let me check

    the steps refresh every 10 min ? its so bad
    i need get steps real time

    how can i get steps real time ?
     
  7. mkh_fx

    mkh_fx Member Licensed User

    if isAuthorized = false , how to show ihealkit permission pop up ?
     
  8. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    hello, whit this framework provided by apple , we cant control the refresh time, when we request the steps, the framework decide which steps send!

    is apple things... :-(
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice