Skip to content

Xcode 16.3 shows 3 Analyzer warnings #518

@funnel20

Description

@funnel20

When running my project with latest InAppSettingsKit 3.8.5 and run Xcode 16.3 Analyzer (Product -> Analyse), the following 3 warnings are shown:

Image

The first seems to be missing the && indexPath condition in the else if statement, which is present in the if condition:

Image

The bottom 2 are caused by my new code in #504 (comment) and can be simply resolved by wrapping the raw text that doesn't need localisation within NSLocalizedString() with a comment, i.e. respectively:

self.backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@" < ", @"No translation needed, silence Xcode warning")
                                                   style:UIBarButtonItemStylePlain
                                                  target:self
                                                  action:@selector(goBack)];
self.forwardButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@" > ", @"No translation needed, silence Xcode warning")
                                                      style:UIBarButtonItemStylePlain
                                                     target:self
                                                     action:@selector(goForward)];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions