diff --git a/System Services/Utilities/SSAccelerometerInfo.m b/System Services/Utilities/SSAccelerometerInfo.m index ef87be9..27c63bf 100755 --- a/System Services/Utilities/SSAccelerometerInfo.m +++ b/System Services/Utilities/SSAccelerometerInfo.m @@ -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