Two warnings (`-[NSMutableArray addObjectsFromArray:]: array argument is not an NSArray warning`) when setting bar button items on a ViewController

Number:rdar://FB8442314 Date Originated:
Status:Open Resolved:
Product: Product Version:
Classification: Reproducible:
While using Xcode 12 beta 4 I noticed that setting a bar button on the navigation bar is triggering two identical warnings: "-[NSMutableArray addObjectsFromArray:]: array argument is not an NSArray warning".

Here's how to reproduce this issue:

- Code-based navigation (so, no Storyboards)
- Make the first UIViewController's Navigation Controller push the second UIViewController
- Inside the second UIViewController's "viewDidLoad" method try to set a button in the nav bar like this:

 navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .save, target: self, action: #selector(saveTapped))

- When running the app, two warnigs should appear.

Here's a sample project in which this behavior is clearly visible:

Thank you for your time,


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!