Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rn-apple-healthkit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ym
rn-apple-healthkit
Commits
44c7c21f
Commit
44c7c21f
authored
Jun 30, 2016
by
Greg Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding constants to the package index.js HealthKit export object and updating permissions
parent
9372ca36
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
128 additions
and
34 deletions
+128
-34
RCTAppleHealthKit/RCTAppleHealthKit+Queries.m
RCTAppleHealthKit/RCTAppleHealthKit+Queries.m
+1
-5
RCTAppleHealthKit/RCTAppleHealthKit+TypesAndPermissions.m
RCTAppleHealthKit/RCTAppleHealthKit+TypesAndPermissions.m
+27
-10
RCTAppleHealthKit/RCTAppleHealthKit+Utils.h
RCTAppleHealthKit/RCTAppleHealthKit+Utils.h
+1
-1
RCTAppleHealthKit/RCTAppleHealthKit+Utils.m
RCTAppleHealthKit/RCTAppleHealthKit+Utils.m
+1
-1
constants.js
constants.js
+67
-0
examples/StepsDemo/app/components/home/index.js
examples/StepsDemo/app/components/home/index.js
+10
-4
examples/StepsDemo/ios/StepsDemo.xcodeproj/project.pbxproj
examples/StepsDemo/ios/StepsDemo.xcodeproj/project.pbxproj
+12
-12
index.js
index.js
+9
-1
No files found.
RCTAppleHealthKit/RCTAppleHealthKit+Queries.m
View file @
44c7c21f
...
@@ -260,8 +260,6 @@
...
@@ -260,8 +260,6 @@
NSDate
*
endDate
=
result
.
endDate
;
NSDate
*
endDate
=
result
.
endDate
;
double
value
=
[
quantity
doubleValueForUnit
:
unit
];
double
value
=
[
quantity
doubleValueForUnit
:
unit
];
// NSLog(@"%@: %f", date, value);
NSString
*
startDateString
=
[
RCTAppleHealthKit
buildISO8601StringFromDate
:
startDate
];
NSString
*
startDateString
=
[
RCTAppleHealthKit
buildISO8601StringFromDate
:
startDate
];
NSString
*
endDateString
=
[
RCTAppleHealthKit
buildISO8601StringFromDate
:
endDate
];
NSString
*
endDateString
=
[
RCTAppleHealthKit
buildISO8601StringFromDate
:
endDate
];
...
@@ -271,15 +269,13 @@
...
@@ -271,15 +269,13 @@
@"endDate"
:
endDateString
,
@"endDate"
:
endDateString
,
};
};
// NSArray *elem = @[dateString, @(value)];
[
data
addObject
:
elem
];
[
data
addObject
:
elem
];
}
}
}];
}];
// is ascending by default
// is ascending by default
if
(
asc
==
false
)
{
if
(
asc
==
false
)
{
[
self
reverseNSMutableArray
:
data
];
[
RCTAppleHealthKit
reverseNSMutableArray
:
data
];
}
}
if
(
lim
>
0
)
{
if
(
lim
>
0
)
{
...
...
RCTAppleHealthKit/RCTAppleHealthKit+TypesAndPermissions.m
View file @
44c7c21f
...
@@ -14,34 +14,51 @@
...
@@ -14,34 +14,51 @@
-
(
NSDictionary
*
)
readPermsDict
{
-
(
NSDictionary
*
)
readPermsDict
{
NSDictionary
*
readPerms
=
@{
NSDictionary
*
readPerms
=
@{
@"DietaryEnergy"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDietaryEnergyConsumed
],
// Characteristic Identifiers
@"ActiveEnergy"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierActiveEnergyBurned
],
@"DateOfBirth"
:
[
HKObjectType
characteristicTypeForIdentifier
:
HKCharacteristicTypeIdentifierDateOfBirth
],
@"BiologicalSex"
:
[
HKObjectType
characteristicTypeForIdentifier
:
HKCharacteristicTypeIdentifierBiologicalSex
],
// Body Measurements
@"Height"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierHeight
],
@"Height"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierHeight
],
@"Weight"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMass
],
@"Weight"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMass
],
@"BodyMass"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMass
],
@"BodyFatPercentage"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyFatPercentage
],
@"BodyFatPercentage"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyFatPercentage
],
@"BodyMassIndex"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMassIndex
],
@"BodyMassIndex"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMassIndex
],
@"LeanBodyMass"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierLeanBodyMass
],
@"LeanBodyMass"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierLeanBodyMass
],
// Fitness Identifiers
@"Steps"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierStepCount
],
@"Steps"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierStepCount
],
@"DateOfBirth"
:
[
HKObjectType
characteristicTypeForIdentifier
:
HKCharacteristicTypeIdentifierDateOfBirth
],
@"StepCount"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierStepCount
],
@"BiologicalSex"
:
[
HKObjectType
characteristicTypeForIdentifier
:
HKCharacteristicTypeIdentifierBiologicalSex
],
@"DistanceWalkingRunning"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDistanceWalkingRunning
],
@"DistanceCycling"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDistanceCycling
],
@"BasalEnergyBurned"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBasalEnergyBurned
],
@"ActiveEnergyBurned"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierActiveEnergyBurned
],
@"FlightsClimbed"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierFlightsClimbed
],
@"NikeFuel"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierNikeFuel
],
@"AppleExerciseTime"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierAppleExerciseTime
],
// Nutrition Identifiers
@"DietaryEnergy"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDietaryEnergyConsumed
],
};
};
return
readPerms
;
return
readPerms
;
}
}
-
(
NSDictionary
*
)
writePermsDict
{
-
(
NSDictionary
*
)
writePermsDict
{
NSDictionary
*
writePerms
=
@{
NSDictionary
*
writePerms
=
@{
@"DietaryEnergy"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDietaryEnergyConsumed
],
// Body Measurements
@"ActiveEnergy"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierActiveEnergyBurned
],
@"Height"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierHeight
],
@"Height"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierHeight
],
@"Weight"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMass
],
@"Weight"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMass
],
@"BodyMass"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMass
],
@"BodyFatPercentage"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyFatPercentage
],
@"BodyFatPercentage"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyFatPercentage
],
@"BodyMassIndex"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMassIndex
],
@"BodyMassIndex"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBodyMassIndex
],
@"LeanBodyMass"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierLeanBodyMass
],
@"LeanBodyMass"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierLeanBodyMass
],
// Fitness Identifiers
@"Steps"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierStepCount
],
@"Steps"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierStepCount
],
@"StepCount"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierStepCount
],
@"DistanceWalkingRunning"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDistanceWalkingRunning
],
@"DistanceCycling"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDistanceCycling
],
@"BasalEnergyBurned"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierBasalEnergyBurned
],
@"ActiveEnergyBurned"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierActiveEnergyBurned
],
@"FlightsClimbed"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierFlightsClimbed
],
// Nutrition Identifiers
@"DietaryEnergy"
:
[
HKObjectType
quantityTypeForIdentifier
:
HKQuantityTypeIdentifierDietaryEnergyConsumed
],
};
};
return
writePerms
;
return
writePerms
;
}
}
...
...
RCTAppleHealthKit/RCTAppleHealthKit+Utils.h
View file @
44c7c21f
...
@@ -31,6 +31,6 @@
...
@@ -31,6 +31,6 @@
+
(
NSString
*
)
stringFromOptions
:(
NSDictionary
*
)
options
key
:(
NSString
*
)
key
withDefault
:(
NSString
*
)
defaultValue
;
+
(
NSString
*
)
stringFromOptions
:(
NSDictionary
*
)
options
key
:(
NSString
*
)
key
withDefault
:(
NSString
*
)
defaultValue
;
+
(
bool
)
boolFromOptions
:(
NSDictionary
*
)
options
key
:(
NSString
*
)
key
withDefault
:(
bool
)
defaultValue
;
+
(
bool
)
boolFromOptions
:(
NSDictionary
*
)
options
key
:(
NSString
*
)
key
withDefault
:(
bool
)
defaultValue
;
-
(
NSMutableArray
*
)
reverseNSMutableArray
:(
NSMutableArray
*
)
array
;
+
(
NSMutableArray
*
)
reverseNSMutableArray
:(
NSMutableArray
*
)
array
;
@end
@end
RCTAppleHealthKit/RCTAppleHealthKit+Utils.m
View file @
44c7c21f
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
-
(
NSMutableArray
*
)
reverseNSMutableArray
:(
NSMutableArray
*
)
array
{
+
(
NSMutableArray
*
)
reverseNSMutableArray
:(
NSMutableArray
*
)
array
{
if
([
array
count
]
<=
1
)
if
([
array
count
]
<=
1
)
return
array
;
return
array
;
NSUInteger
i
=
0
;
NSUInteger
i
=
0
;
...
...
constants.js
0 → 100644
View file @
44c7c21f
'
use strict
'
const
PERMISSIONS
=
{
READ
:
{
DateOfBirth
:
'
DateOfBirth
'
,
BiologicalSex
:
'
BiologicalSex
'
,
Height
:
'
Height
'
,
Weight
:
'
Weight
'
,
BodyMass
:
'
BodyMass
'
,
BodyFatPercentage
:
'
BodyFatPercentage
'
,
BodyMassIndex
:
'
BodyMassIndex
'
,
LeanBodyMass
:
'
LeanBodyMass
'
,
Steps
:
'
Steps
'
,
StepCount
:
'
StepCount
'
,
DistanceWalkingRunning
:
'
DistanceWalkingRunning
'
,
DistanceCycling
:
'
DistanceCycling
'
,
BasalEnergyBurned
:
'
BasalEnergyBurned
'
,
ActiveEnergyBurned
:
'
ActiveEnergyBurned
'
,
FlightsClimbed
:
'
FlightsClimbed
'
,
NikeFuel
:
'
NikeFuel
'
,
AppleExerciseTime
:
'
AppleExerciseTime
'
,
DietaryEnergy
:
'
DietaryEnergy
'
,
},
WRITE
:
{
Height
:
'
Height
'
,
Weight
:
'
Weight
'
,
BodyMass
:
'
BodyMass
'
,
BodyFatPercentage
:
'
BodyFatPercentage
'
,
BodyMassIndex
:
'
BodyMassIndex
'
,
LeanBodyMass
:
'
LeanBodyMass
'
,
Steps
:
'
Steps
'
,
StepCount
:
'
StepCount
'
,
DistanceWalkingRunning
:
'
DistanceWalkingRunning
'
,
DistanceCycling
:
'
DistanceCycling
'
,
BasalEnergyBurned
:
'
BasalEnergyBurned
'
,
ActiveEnergyBurned
:
'
ActiveEnergyBurned
'
,
FlightsClimbed
:
'
FlightsClimbed
'
,
DietaryEnergy
:
'
DietaryEnergy
'
,
}
};
const
UNITS
=
{
gram
:
'
gram
'
,
pound
:
'
pound
'
,
meter
:
'
meter
'
,
inch
:
'
inch
'
,
foot
:
'
foot
'
,
second
:
'
second
'
,
minute
:
'
minute
'
,
hour
:
'
hour
'
,
day
:
'
day
'
,
joule
:
'
joule
'
,
calorie
:
'
calorie
'
,
count
:
'
count
'
,
percent
:
'
percent
'
};
const
CONSTANTS
=
{
Permissions
:
PERMISSIONS
,
Units
:
UNITS
,
};
export
default
CONSTANTS
;
export
const
Constants
=
CONSTANTS
;
examples/StepsDemo/app/components/home/index.js
View file @
44c7c21f
...
@@ -15,16 +15,18 @@ import TimerMixin from 'react-timer-mixin';
...
@@ -15,16 +15,18 @@ import TimerMixin from 'react-timer-mixin';
var
reactMixin
=
require
(
'
react-mixin
'
);
var
reactMixin
=
require
(
'
react-mixin
'
);
import
styles
from
'
../../styles/styles
'
;
import
styles
from
'
../../styles/styles
'
;
var
AppleHealthKit
=
require
(
'
react-native-apple-healthkit
'
);
//
var AppleHealthKit = require('react-native-apple-healthkit');
import
AppleHealthKit
from
'
react-native-apple-healthkit
'
;
import
History
from
'
./history
'
;
import
History
from
'
./history
'
;
const
WPERMS
=
AppleHealthKit
.
CONSTANTS
.
PERMISSIONS
.
WRITE
;
const
RPERMS
=
AppleHealthKit
.
CONSTANTS
.
PERMISSIONS
.
READ
;
const
HKOPTIONS
=
{
const
HKOPTIONS
=
{
permissions
:
{
permissions
:
{
read
:
[
'
Steps
'
],
read
:
[
RPERMS
.
StepCount
],
write
:
[
'
Steps
'
],
write
:
[
WPERMS
.
StepCount
],
}
}
};
};
...
@@ -40,6 +42,10 @@ class Home extends Component {
...
@@ -40,6 +42,10 @@ class Home extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
console
.
log
(
'
CONSTANTS:
'
,
AppleHealthKit
.
CONSTANTS
);
//console.log('balls: ', ahk);
AppleHealthKit
.
isAvailable
((
err
,
available
)
=>
{
AppleHealthKit
.
isAvailable
((
err
,
available
)
=>
{
if
(
available
){
if
(
available
){
AppleHealthKit
.
initHealthKit
(
HKOPTIONS
,
(
err
,
res
)
=>
{
AppleHealthKit
.
initHealthKit
(
HKOPTIONS
,
(
err
,
res
)
=>
{
...
...
examples/StepsDemo/ios/StepsDemo.xcodeproj/project.pbxproj
View file @
44c7c21f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
140ED2AC1D01E1AD002B40FF
/* libReact.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
146834041AC3E56700842450
/* libReact.a */
;
};
140ED2AC1D01E1AD002B40FF
/* libReact.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
146834041AC3E56700842450
/* libReact.a */
;
};
146834051AC3E58100842450
/* libReact.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
146834041AC3E56700842450
/* libReact.a */
;
};
146834051AC3E58100842450
/* libReact.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
146834041AC3E56700842450
/* libReact.a */
;
};
378616B61D257B040027C300
/* HealthKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
378616B51D257B040027C300
/* HealthKit.framework */
;
};
378616B61D257B040027C300
/* HealthKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
378616B51D257B040027C300
/* HealthKit.framework */
;
};
378
616C51D259EE50027C300
/* libRCTAppleHealthKit.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
378616C41D259EE10027C300
/* libRCTAppleHealthKit.a */
;
};
378
7CCA91D25E10E0080733E
/* libRCTAppleHealthKit.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3787CCA81D25E10A0080733E
/* libRCTAppleHealthKit.a */
;
};
832341BD1AAA6AB300B99B32
/* libRCTText.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
832341B51AAA6A8300B99B32
/* libRCTText.a */
;
};
832341BD1AAA6AB300B99B32
/* libRCTText.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
832341B51AAA6A8300B99B32
/* libRCTText.a */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
...
@@ -91,9 +91,9 @@
...
@@ -91,9 +91,9 @@
remoteGlobalIDString
=
83CBBA2E1A601D0E00E9B192
;
remoteGlobalIDString
=
83CBBA2E1A601D0E00E9B192
;
remoteInfo
=
React
;
remoteInfo
=
React
;
};
};
378
616C31D259EE10027C300
/* PBXContainerItemProxy */
=
{
378
7CCA71D25E10A0080733E
/* PBXContainerItemProxy */
=
{
isa
=
PBXContainerItemProxy
;
isa
=
PBXContainerItemProxy
;
containerPortal
=
378
616BF1D259EE00027C300
/* RCTAppleHealthKit.xcodeproj */
;
containerPortal
=
378
7CCA31D25E10A0080733E
/* RCTAppleHealthKit.xcodeproj */
;
proxyType
=
2
;
proxyType
=
2
;
remoteGlobalIDString
=
3774C88D1D2092F20000B3F3
;
remoteGlobalIDString
=
3774C88D1D2092F20000B3F3
;
remoteInfo
=
RCTAppleHealthKit
;
remoteInfo
=
RCTAppleHealthKit
;
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
146833FF1AC3E56700842450
/* React.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
React.xcodeproj
;
path
=
"../node_modules/react-native/React/React.xcodeproj"
;
sourceTree
=
"<group>"
;
};
146833FF1AC3E56700842450
/* React.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
React.xcodeproj
;
path
=
"../node_modules/react-native/React/React.xcodeproj"
;
sourceTree
=
"<group>"
;
};
378616B51D257B040027C300
/* HealthKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
HealthKit.framework
;
path
=
System/Library/Frameworks/HealthKit.framework
;
sourceTree
=
SDKROOT
;
};
378616B51D257B040027C300
/* HealthKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
HealthKit.framework
;
path
=
System/Library/Frameworks/HealthKit.framework
;
sourceTree
=
SDKROOT
;
};
378616B71D257B040027C300
/* StepsDemo.entitlements */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.xml
;
name
=
StepsDemo.entitlements
;
path
=
StepsDemo/StepsDemo.entitlements
;
sourceTree
=
"<group>"
;
};
378616B71D257B040027C300
/* StepsDemo.entitlements */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.xml
;
name
=
StepsDemo.entitlements
;
path
=
StepsDemo/StepsDemo.entitlements
;
sourceTree
=
"<group>"
;
};
378
616BF1D259EE00027C300
/* RCTAppleHealthKit.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
RCTAppleHealthKit.xcodeproj
;
path
=
"../node_modules/react-native-apple-healthkit/RCTAppleHealthKit.xcodeproj"
;
sourceTree
=
"<group>"
;
};
378
7CCA31D25E10A0080733E
/* RCTAppleHealthKit.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
RCTAppleHealthKit.xcodeproj
;
path
=
"../node_modules/react-native-apple-healthkit/RCTAppleHealthKit.xcodeproj"
;
sourceTree
=
"<group>"
;
};
78C398B01ACF4ADC00677621
/* RCTLinking.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
RCTLinking.xcodeproj
;
path
=
"../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"
;
sourceTree
=
"<group>"
;
};
78C398B01ACF4ADC00677621
/* RCTLinking.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
RCTLinking.xcodeproj
;
path
=
"../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"
;
sourceTree
=
"<group>"
;
};
832341B01AAA6A8300B99B32
/* RCTText.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
RCTText.xcodeproj
;
path
=
"../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"
;
sourceTree
=
"<group>"
;
};
832341B01AAA6A8300B99B32
/* RCTText.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
RCTText.xcodeproj
;
path
=
"../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
isa
=
PBXFrameworksBuildPhase
;
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
378
616C51D259EE50027C300
/* libRCTAppleHealthKit.a in Frameworks */
,
378
7CCA91D25E10E0080733E
/* libRCTAppleHealthKit.a in Frameworks */
,
146834051AC3E58100842450
/* libReact.a in Frameworks */
,
146834051AC3E58100842450
/* libReact.a in Frameworks */
,
00C302E51ABCBA2D00DB3ED1
/* libRCTActionSheet.a in Frameworks */
,
00C302E51ABCBA2D00DB3ED1
/* libRCTActionSheet.a in Frameworks */
,
378616B61D257B040027C300
/* HealthKit.framework in Frameworks */
,
378616B61D257B040027C300
/* HealthKit.framework in Frameworks */
,
...
@@ -268,10 +268,10 @@
...
@@ -268,10 +268,10 @@
name
=
Products
;
name
=
Products
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
378
616C01D259EE00027C300
/* Products */
=
{
378
7CCA41D25E10A0080733E
/* Products */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
378
616C41D259EE10027C300
/* libRCTAppleHealthKit.a */
,
378
7CCA81D25E10A0080733E
/* libRCTAppleHealthKit.a */
,
);
);
name
=
Products
;
name
=
Products
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
832341AE1AAA6A7D00B99B32
/* Libraries */
=
{
832341AE1AAA6A7D00B99B32
/* Libraries */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
378
616BF1D259EE00027C300
/* RCTAppleHealthKit.xcodeproj */
,
378
7CCA31D25E10A0080733E
/* RCTAppleHealthKit.xcodeproj */
,
146833FF1AC3E56700842450
/* React.xcodeproj */
,
146833FF1AC3E56700842450
/* React.xcodeproj */
,
00C302A71ABCB8CE00DB3ED1
/* RCTActionSheet.xcodeproj */
,
00C302A71ABCB8CE00DB3ED1
/* RCTActionSheet.xcodeproj */
,
00C302B51ABCB90400DB3ED1
/* RCTGeolocation.xcodeproj */
,
00C302B51ABCB90400DB3ED1
/* RCTGeolocation.xcodeproj */
,
...
@@ -411,8 +411,8 @@
...
@@ -411,8 +411,8 @@
ProjectRef
=
00C302A71ABCB8CE00DB3ED1
/* RCTActionSheet.xcodeproj */
;
ProjectRef
=
00C302A71ABCB8CE00DB3ED1
/* RCTActionSheet.xcodeproj */
;
},
},
{
{
ProductGroup
=
378
616C01D259EE00027C300
/* Products */
;
ProductGroup
=
378
7CCA41D25E10A0080733E
/* Products */
;
ProjectRef
=
378
616BF1D259EE00027C300
/* RCTAppleHealthKit.xcodeproj */
;
ProjectRef
=
378
7CCA31D25E10A0080733E
/* RCTAppleHealthKit.xcodeproj */
;
},
},
{
{
ProductGroup
=
00C302B61ABCB90400DB3ED1
/* Products */
;
ProductGroup
=
00C302B61ABCB90400DB3ED1
/* Products */
;
...
@@ -516,11 +516,11 @@
...
@@ -516,11 +516,11 @@
remoteRef
=
146834031AC3E56700842450
/* PBXContainerItemProxy */
;
remoteRef
=
146834031AC3E56700842450
/* PBXContainerItemProxy */
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
};
378
616C41D259EE10027C300
/* libRCTAppleHealthKit.a */
=
{
378
7CCA81D25E10A0080733E
/* libRCTAppleHealthKit.a */
=
{
isa
=
PBXReferenceProxy
;
isa
=
PBXReferenceProxy
;
fileType
=
archive.ar
;
fileType
=
archive.ar
;
path
=
libRCTAppleHealthKit.a
;
path
=
libRCTAppleHealthKit.a
;
remoteRef
=
378
616C31D259EE10027C300
/* PBXContainerItemProxy */
;
remoteRef
=
378
7CCA71D25E10A0080733E
/* PBXContainerItemProxy */
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
};
78C398B91ACF4ADC00677621
/* libRCTLinking.a */
=
{
78C398B91ACF4ADC00677621
/* libRCTLinking.a */
=
{
...
...
index.js
View file @
44c7c21f
'
use strict
'
'
use strict
'
let
{
AppleHealthKit
}
=
require
(
'
react-native
'
).
NativeModules
;
let
{
AppleHealthKit
}
=
require
(
'
react-native
'
).
NativeModules
;
module
.
exports
=
AppleHealthKit
;
import
Constants
from
'
./constants
'
;
let
HealthKit
=
Object
.
assign
({},
AppleHealthKit
,
{
Constants
:
Constants
});
export
default
HealthKit
module
.
exports
=
HealthKit
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment