Skip to content

Commit

Permalink
Update SSAccelerometerInfo.m
Browse files Browse the repository at this point in the history
Extension support added
  • Loading branch information
Ewg777 committed Sep 1, 2016
1 parent e6834d0 commit 61c6bd1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions System Services/Utilities/SSAccelerometerInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ @implementation SSAccelerometerInfo
+ (UIInterfaceOrientation)deviceOrientation {
// Get the device's current orientation
@try {
// Device orientation
UIInterfaceOrientation Orientation = [[UIApplication sharedApplication] statusBarOrientation];
#if !(defined(__has_feature) && __has_feature(attribute_availability_app_extension))
// Device orientation
UIInterfaceOrientation Orientation = [[UIApplication sharedApplication] statusBarOrientation];

// Successful
return Orientation;
// Successful
return Orientation;
#end
}
@catch (NSException *exception) {
// Error
return -1;
}
// Error
return -1;
}

// Start logging motion data
Expand Down

0 comments on commit 61c6bd1

Please sign in to comment.