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

MainViewController.m omit empty viewDidLoad to avoid warnings #904

Closed
3 tasks done
msmtamburro opened this issue Jun 17, 2020 · 1 comment · Fixed by #1457
Closed
3 tasks done

MainViewController.m omit empty viewDidLoad to avoid warnings #904

msmtamburro opened this issue Jun 17, 2020 · 1 comment · Fixed by #1457
Milestone

Comments

@msmtamburro
Copy link
Contributor

msmtamburro commented Jun 17, 2020

Bug Report

Problem

Thanks for removing the deprecated viewDidUnload! If you also remove some of the other empty methods (e.g., viewDidLoad) this gives developers a way to easily create an extension on MainViewController.m to implement those methods without warning.

What is expected to happen?

A developer should be able to implement viewDidLoad in MainViewController.m

What does actually happen?

Using the existing stub creates either architectural issues (e.g., changing a file that will get overwritten) or warnings (as mentioned the extension approach above).

Information

You might just remove all empty methods, and replace them with a comment like:

The best way to customize viewDidLoad is to make a Swift Extension of MainViewController and implement the method there. You can add your extension to your project by including it in a plugin.

Command or Code

Environment, Platform, Device

Version information

Checklist

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

dpogue commented Apr 16, 2023

We actually use viewDidLoad now in the MainViewController to control the visibility of the splashscreen image (since doing it in CDVViewController causes it to appear unexpectedly when embedding and using CDVViewController as one view in a larger app) 😞

@dpogue dpogue removed this from the 7.0.0 milestone Apr 16, 2023
@dpogue dpogue added this to the 8.0.0 milestone Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants