Skip to content

Commit

Permalink
Remove warnings for pod validation
Browse files Browse the repository at this point in the history
  • Loading branch information
schaefba committed Jun 12, 2015
1 parent 920c2dd commit ae5c036
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 0 additions & 1 deletion Pod/Classes/OMHHealthKitConstantsMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@

+ (NSString*) stringForHKWorkoutActivityType:(int) enumValue;
+ (NSString*) stringForHKSleepAnalysisValue:(int) enumValue;
+ (NSDictionary*) dictionaryForTypeIdentifiersToClasses;
@end

8 changes: 8 additions & 0 deletions Pod/Classes/OMHHealthKitConstantsMapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ + (NSString*) stringForHKSleepAnalysisValue:(int) enumValue{
case HKCategoryValueSleepAnalysisAsleep:
return @"Asleep";
break;
default:{
NSException *e = [NSException
exceptionWithName:@"KCategoryValueSleepAnalysisInvalidValue"
reason:@"KCategoryValueSleepAnalysis can only have a HKCategoryValueSleepAnalysisInBed or HKCategoryValueSleepAnalysisAsleep value"
userInfo:nil];
@throw e;
}

}
}

Expand Down
8 changes: 4 additions & 4 deletions Pod/Classes/OMHSerializer.m
Original file line number Diff line number Diff line change
Expand Up @@ -832,10 +832,10 @@ @interface OMHSerializerGenericWorkout : OMHSerializer; @end
@implementation OMHSerializerGenericWorkout

+ (BOOL)canSerialize:(HKSample *)sample error:(NSError *__autoreleasing *)error {
@try{
HKWorkout *workoutSample = (HKWorkout*)sample;
if([sample isKindOfClass:[HKWorkout class]]){
return YES;
}
@catch (NSException *exception){
else{
if (error) {
NSString* errorMessage =
@"OMHSerializerGenericWorkout is used for HKWorkout samples only";
Expand All @@ -846,7 +846,7 @@ + (BOOL)canSerialize:(HKSample *)sample error:(NSError *__autoreleasing *)error
}
return NO;
}
return YES;

}

- (id)bodyData {
Expand Down

0 comments on commit ae5c036

Please sign in to comment.