Skip to content

Commit 7e4e3a6

Browse files
committedFeb 9, 2016
#65 [requestAuthorization] calls always success
1 parent c0f29e2 commit 7e4e3a6

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Using the Cordova CLI?
5050
cordova plugin add com.telerik.plugins.healthkit
5151
```
5252

53-
Using PGB?
53+
Using PhoneGap Build?
5454

5555
```xml
56-
<gap:plugin name="com.telerik.plugins.healthkit" source="npm" />
56+
<plugin name="com.telerik.plugins.healthkit" source="npm" />
5757
```

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.4.1",
2+
"version": "0.4.2",
33
"name": "com.telerik.plugins.healthkit",
44
"cordova_name": "HealthKit",
55
"description": "Interact with the iOS HealthKit SDK.",

‎plugin.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
33
id="com.telerik.plugins.healthkit"
4-
version="0.4.1">
4+
version="0.4.2">
55

66
<name>HealthKit</name>
77

‎src/ios/HealthKit.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ - (void) requestAuthorization:(CDVInvokedUrlCommand*)command {
4949
HKObjectType *type = nil;
5050

5151
if([elem isEqual: @"HKWorkoutTypeIdentifier"]) {
52+
type = [HKObjectType workoutType];
53+
} else{
5254
type = [self getHKObjectType:elem];
53-
}else{
54-
type = [HKObjectType workoutType];
5555
}
5656

5757
if (type == nil) {
@@ -73,9 +73,9 @@ - (void) requestAuthorization:(CDVInvokedUrlCommand*)command {
7373
HKObjectType *type = nil;
7474

7575
if([elem isEqual: @"HKWorkoutTypeIdentifier"]) {
76+
type = [HKObjectType workoutType];
77+
} else{
7678
type = [self getHKObjectType:elem];
77-
}else{
78-
type = [HKObjectType workoutType];
7979
}
8080

8181
if (type == nil) {

0 commit comments

Comments
 (0)
Please sign in to comment.