Skip to content

Commit

Permalink
fix(ios): remove deprecated Ti.Media methods
Browse files Browse the repository at this point in the history
BREAKING CHANGES: removes Ti.Media requestAuthorization and requestCameraAccess methods (in favor of requestAudioRecorderPermissions and requestCameraPermissions)
  • Loading branch information
sgtcoolguy committed Dec 16, 2019
1 parent fa53d08 commit b3bd05e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
18 changes: 2 additions & 16 deletions iphone/Classes/MediaModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -618,14 +618,6 @@ - (void)vibrate:(id)args
/**
Microphone And Recording Support. These make no sense here and should be moved to Audiorecorder
**/
#ifdef USE_TI_MEDIAREQUESTAUTHORIZATION
- (void)requestAuthorization:(id)args
{
DEPRECATED_REPLACED(@"Media.requestAudioPermissions", @"5.1.0", @"Media.requestAudioRecorderPermissions");
[self requestAudioRecorderPermissions:args];
}
#endif

#ifdef USE_TI_MEDIAHASAUDIOPERMISSIONS
- (id)hasAudioPermissions:(id)unused
{
Expand Down Expand Up @@ -655,7 +647,7 @@ - (void)requestAudioPermissions:(id)args
}
#endif

#if defined(USE_TI_MEDIAREQUESTAUDIORECORDERPERMISSIONS) || defined(USE_TI_MEDIAREQUESTAUDIOPERMISSIONS) || defined(USE_TI_MEDIAREQUESTAUTHORIZATION)
#if defined(USE_TI_MEDIAREQUESTAUDIORECORDERPERMISSIONS) || defined(USE_TI_MEDIAREQUESTAUDIOPERMISSIONS)
- (void)requestAudioRecorderPermissions:(id)args
{
ENSURE_SINGLE_ARG(args, KrollCallback);
Expand Down Expand Up @@ -1039,13 +1031,7 @@ - (id)camera
}
#endif

#if defined(USE_TI_MEDIAREQUESTCAMERAPERMISSIONS) || defined(USE_TI_MEDIAREQUESTCAMERAACCESS)
- (void)requestCameraAccess:(id)arg
{
DEPRECATED_REPLACED(@"Media.requestCameraAccess", @"5.1.0", @"Media.requestCameraPermissions");
[self requestCameraPermissions:arg];
}

#if defined(USE_TI_MEDIAREQUESTCAMERAPERMISSIONS)
//request camera access. for >= IOS7
- (void)requestCameraPermissions:(id)arg
{
Expand Down
2 changes: 0 additions & 2 deletions iphone/Classes/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
#define USE_TI_MEDIASTARTVIDEOCAPTURE
#define USE_TI_MEDIASTOPVIDEOCAPTURE
#define USE_TI_MEDIASWITCHCAMERA
#define USE_TI_MEDIAREQUESTCAMERAACCESS
#define USE_TI_MEDIAREQUESTCAMERAPERMISSIONS
#define USE_TI_MEDIAHASCAMERAPERMISSIONS
#define USE_TI_MEDIAHASPHOTOGALLERYPERMISSIONS
Expand All @@ -143,7 +142,6 @@
#define USE_TI_MEDIAREQUESTAUDIORECORDERPERMISSIONS
#define USE_TI_MEDIAHASAUDIORECORDERPERMISSIONS
#define USE_TI_MEDIAHASAUDIOPERMISSIONS
#define USE_TI_MEDIAREQUESTAUTHORIZATION
#define USE_TI_MEDIAHASMUSICLIBRARYPERMISSIONS
#define USE_TI_MEDIAREQUESTMUSICLIBRARYPERMISSIONS
#define USE_TI_MEDIACANRECORD
Expand Down

0 comments on commit b3bd05e

Please sign in to comment.