Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] No known instance method for selector 'shouldAutorotateToInterfaceOrientation:' #714

Closed
3 tasks done
mosabab opened this issue Jun 5, 2020 · 12 comments · Fixed by #715
Closed
3 tasks done

Comments

@mosabab
Copy link
Contributor

mosabab commented Jun 5, 2020

Bug Report

Problem

Xcode v11.5 show this error:
No known instance method for selector 'shouldAutorotateToInterfaceOrientation:'

What is expected to happen?

The error should not appear in Xcode.

What does actually happen?

When you try to build your code either from command line at macOS:

cordova build ios

The following build commands failed:
CompileC /var/root/Library/Developer/Xcode/DerivedData/myapp-fwtbwlotgipnwyfynxipdyoqnfgg/Build/Intermediates.noindex/myapp.build/Debug-iphonesimulator/testapp.build/Objects-normal/x86_64/CDVWKInAppBrowser.o /Users/mosab/Documents/myapp/platforms/ios/testapp/Plugins/cordova-plugin-inappbrowser/CDVWKInAppBrowser.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild: Command failed with exit code 65

--
And if you open your project in Xcode, you will see the following error message:
/Users/mosab/Documents/myapp/platforms/ios/testapp/Plugins/cordova-plugin-inappbrowser/CDVWKInAppBrowser.m:1250:42: No known instance method for selector 'shouldAutorotateToInterfaceOrientation:'

Information

Command or Code

cordova build ios

Environment, Platform, Device

iOS

Version information

cordova cli 9.0.0
cordova-ios 6.0.0
cordova-plugin-inappbrowser (master version) or 3.2.0
Xcode 11.5
macOS 10.15.5

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@breautek
Copy link
Contributor

breautek commented Jun 5, 2020

cordova-plugin-inappbrowser (master version) or 3.2.0

Did you test both master (4.0.0-dev) and 3.2.0?

I believe this is a known issue that 4.0.0-dev is suppose to resolve.

@mosabab
Copy link
Contributor Author

mosabab commented Jun 5, 2020

cordova-plugin-inappbrowser (master version) or 3.2.0

Did you test both master (4.0.0-dev) and 3.2.0?

I believe this is a known issue that 4.0.0-dev is suppose to resolve.

I test it in this versions:

First test:
https://github.com/apache/cordova-plugin-inappbrowser.git#master

Second test
https://github.com/apache/cordova-plugin-inappbrowser.git#3.2.0

I think the problem from line:

return [self.orientationDelegate shouldAutorotateToInterfaceOrientation:interfaceOrientation];

Because I am using Xcode 11.5

Maybe the other users not testing in new versions of Xcode.

@asgeo1
Copy link

asgeo1 commented Jun 5, 2020

Having this issue too on master. It's because shouldAutorotateToInterfaceOrientation is depreciated and doesn't work with cordova-ios 6.0.0

The issue was originally fixed in this PR: #666

Then for some reason in this PR the change was reversed: #656

Suggest that the original fix is reinstated.

@breautek
Copy link
Contributor

breautek commented Jun 5, 2020

Thanks @asgeo1 for pointing that out.

@mosabab
Copy link
Contributor Author

mosabab commented Jun 5, 2020

Having this issue too on master. It's because shouldAutorotateToInterfaceOrientation is depreciated and doesn't work with cordova-ios 6.0.0

The issue was originally fixed in this PR: #666

Then for some reason in this PR the change was reversed: #656

Suggest that the original fix is reinstated.

You are right
Thanks for info

NiklasMerz added a commit that referenced this issue Jun 5, 2020
Merging issue from #656

Closes #714
@NiklasMerz
Copy link
Member

I just submitted a PR that should fix that again. Thank you for spotting the issue.

Reviews are welcome https://github.com/apache/cordova-plugin-inappbrowser.git#fix-regression-656

@mosabab
Copy link
Contributor Author

mosabab commented Jun 5, 2020

I just submitted a PR that should fix that again. Thank you for spotting the issue.

Reviews are welcome https://github.com/apache/cordova-plugin-inappbrowser.git#fix-regression-656

Thank you

@antikalk
Copy link

antikalk commented Jun 5, 2020

I am having the same issue. Using the PR solves the error for me. :)

NiklasMerz added a commit that referenced this issue Jun 5, 2020
Fix merging issue from #656

Closes #714
@DaedalusAB
Copy link

I still have this issue on xCode 11.7 and plugin version 4.0.0
I assume the PR with fix was merged?

@isipisi89
Copy link

Same here.

@zulkarnainshah
Copy link

Whats is the solution now?

@NiklasMerz
Copy link
Member

Please use the latest versions of the plugin, cordova-ios and Xcode if possible. If you still got any issues please open a new issues with a complete error log.

@apache apache locked as resolved and limited conversation to collaborators Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants