SwiftUI CoreData template ContentView's EditButton not working properly

Originator:indiekiduk
Number:rdar://FB8458939 Date Originated:19/8/20
Status:Open Resolved:No
Product:Xcode Product Version:12b5
Classification:Bug Reproducible:Always
 
Please describe the issue:

EditButton's title doesn't change to Done when tapped. I believe ContentView is missing this:

@Environment(\.editMode) private var editMode

Please list the steps you took to reproduce the issue:
Launch Xcode 12b5.
New Project.
iOS, App, Interface SwiftUI, LifeCycle SwiftUI App, Language Swift, Use Core data checked.
Launch in iPhone SE 2nd Gen simulator.
Click Edit button in the toolbar.

What did you expect to happen?
Button title should change to Done

What actually happened?
Nothing. Adding the environment line mentioned above makes it work.

Comments

Apple Feedback

Thanks for submitting this report, and for your patience. Apologies for the delay. We need to know whether this issue has been addressed for you in updates to Xcode. We no longer see this in newer beta builds.

Please test with Xcode 14 beta 4 and update your feedback report with your results by logging into the Feedback Assistant web site or by using the app. You may also need to update to newer iOS and macOS, please see the "Betas and Releases" page linked below for the latest builds.

Please close if resolved, or let us know if still an issue for you. Please add fresh diagnostics from bata 4 if you still see an issue.

Thank you.

To install Betas and Releases: https://developer.apple.com/download/

To update your report: https://feedbackassistant.apple.com/

To close, on the Feedback site, click the Actions button, choose Close Feedback and click Close.

To collect logging or screen recording: https://developer.apple.com/bug-reporting/profiles-and-logs/

By indiekiduk at July 28, 2022, 11:56 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!