Skip to content

ios: rename variables cameraPicker to cdvUIImagePickerController#950

Open
GitToTheHub wants to merge 2 commits intomasterfrom
pr-ios-rename-variables-cameraPicker-to-cdvUIImagePickerController
Open

ios: rename variables cameraPicker to cdvUIImagePickerController#950
GitToTheHub wants to merge 2 commits intomasterfrom
pr-ios-rename-variables-cameraPicker-to-cdvUIImagePickerController

Conversation

@GitToTheHub
Copy link
Contributor

@GitToTheHub GitToTheHub commented Jan 30, 2026

  • Make clear, that CDVUIImagePickerController is used for these variables

Platforms affected

Motivation and Context

Description

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

- Make clear, that `CDVUIImagePickerController` is used for these variables
- When it's used as weak variable, it's renamed to `weakCDVUIImagePickerController`
@GitToTheHub GitToTheHub requested a review from dpogue January 30, 2026 18:29
@GitToTheHub GitToTheHub changed the title ios: Rename variables cameraPicker to cdvUIImagePickerController ios: rename variables cameraPicker to cdvUIImagePickerController Jan 30, 2026
@GitToTheHub GitToTheHub requested a review from breautek February 3, 2026 11:40
Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a bit like refactoring for the sake of refactoring and making the code harder to read by using more complex variable names that don't indicate their purpose.

In particular, weakCDVUIImagePickerController is a weird name to use for a variable. It doesn't matter if it's a weak reference or not, it works like any other variable. The only reason weakSelf is a convention is because you need to explicitly create a variable to hold the weak reference.

@GitToTheHub
Copy link
Contributor Author

GitToTheHub commented Feb 4, 2026

I know sometimes the variables get longer during refactoring. This is always something to distinguish what is better. I just wanted to be complete with the renaming of cdvCamera sind it is a UIImagePickerController and not a Camera class. I thought it's a convention to prefix a variable when it's a weak variable. But when you say it's not i will remove it.

- Rename `weakCDVUIImagePickerController` to `cdvUIImagePickerController`
- It doesn't matter if it's a weak reference or not, it works like any other variable. The only reason `weakSelf` is a convention is because you need to explicitly create a variable to hold the weak reference.
@GitToTheHub
Copy link
Contributor Author

I renamed weakCDVUIImagePickerController to cdvUIImagePickerController

@GitToTheHub GitToTheHub requested a review from dpogue February 4, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants