Implementing deprecated method

Last time I was developing an app(linphone) through xcode 8.2. and my development target was ios 9.0 sdk. I uploaded to appstore too. There was no problem at all.


Now I want to make the same app for other customer. Then I upgraded the xcode version to 9.4 and changed the target ios version 11 sdk as per new requirements of appstore.


In my current development there is no code change. All the code is as same as my previous app. But I am getting the error when build. I have added the screenshoot for your information.


Current Configuration: macOS High Sierra 10.13.5, Xcode 9.4, ios development target 11


When I try to build ... the build became unsuccessfull with the following error


"Implementing deprecated method" at following code

location: approotfolder>classes>DialerView.m


- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation

                                         duration:(NSTimeInterval)duration {

And the avobe error was indicating to this error

location: ios 11.4>frameworks>UIkit>headers>UiViewController.h>UiViewController(UiViewController)


- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration NS_DEPRECATED_IOS(3_0,8_0, "Implement viewWillTransitionToSize:withTransitionCoordinator: instead") __TVOS_PROHIBITED;




Note: Please Find the screenshots for details understanding

I am new here If the posting format is wrong please forgive me. And let me know if you need more information.


https://drive.google.com/file/d/1twT61DH67Epz-iV8umwnDw3UrfnN0CSZ/view


https://drive.google.com/file/d/1cllESBPmxOFCxOf0jTvUWIi3wTNOmUQ3/view


https://drive.google.com/file/d/1mg4ooBZ5RFoSva1rhCZmD2OiFHZXJ7qA/view

Replies

The message is clear: those func willAnimateRotationToInterfaceOrientation do not exist anymore.


They habe been replaced by :

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator;


To tell more, it depends on what you did in willAnimateRotationToInterfaceOrientation

@Clude31 thank you for your reply. To be honest I am not an app developer. This(Linphone) is an opensource application. Just downloaded and compiled through xcode.
Then I check the latest source repository from github the "willAnimateRotationToInterfaceOrientation" still exist.


if I just replace this will it be fixed?

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator;



Could you plese advise me..I'll be very gateful to you.

Here is an example of implementation :

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator
{ 
    [coordinator animateAlongsideTransition:^(id context)
    {
        UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
        // do whatever
    } completion:^(id context)
    {
    }];

    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
}


from h ttps://stackoverflow.com/questions/24071453/rotation-methods-deprecated-equivalent-of-didrotatefrominterfaceorientation