Xcode-beta (8S193k): Xcode Plugin Template Creates Bogus Schemes

Originator:designatednerd
Number:rdar://27841858 Date Originated:14-Aug-2016 09:25 PM
Status:Closed Resolved:User Error
Product:Developer Tools Product Version:Xcode-beta (8S193k)
Classification:Serious Bug Reproducible:Always
 
Summary:
When creating a new Xcode plugin with the template in 8b5, one of the schemes is invalid, and deleting it makes the project unusable. 

Steps to Reproduce:
1. Create a new Xcode plugin with Xcode 8 Beta 5, ensuring you select a team
2. Note when project creates, there is an error warning on the selected scheme (the first of two automatically generated schemes, the one which is shared)
3. Attempt to edit the sad scheme
4. Receive error dialog stating “The operation couldn’t be completed. (DVTXMLArchivingErrorDomain error 0.)”
5. Delete the sad scheme
6. Receive error (full paths replaced with ~ for user path): 

PBXCp Error:
CpResource INTERPOL.xcodeproj/xcshareddata/xcschemes/INTERPOL.xcscheme ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/INTERPOL.xcplugin/Contents/Resources/INTERPOL.xcscheme
    cd ~/Desktop/BugsForApple/Xcode8b5XcodePluginBugs/INTERPOL
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks ~/Desktop/BugsForApple/Xcode8b5XcodePluginBugs/INTERPOL/INTERPOL.xcodeproj/xcshareddata/xcschemes/INTERPOL.xcscheme ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/INTERPOL.xcplugin/Contents/Resources

7. Be unable to continue working on project. 
8. Watch olympic gymnastics (optional)

Expected Results:
a) Creating a new Xcode Plugin project with a properly selected team should generate valid provisioning profiles, preventing you from needing to delete an invalid scheme
b) Deleting an invalid scheme should not cause the project to become completely unusable without any kind of suggestion of how to remedy. Either better error messaging that tells me how to fix this, or preventing deletion of the scheme if it’ll totally hose my project would be very helpful. 

Actual Results:
Spend evening filing radars instead of working on a talk about Xcode Plugins. :P

Regression:
Hadn’t tried this in earlier betas because I am a horrendous procrastinator. 

Notes:
I included the git history so you can both go back to the state where I hadn’t deleted the offending profile and see what I changed.

Comments

Just posted this to apple:

Closing as "Holy shit, I'm an idiot." I was selecting a template for an old plugin rather than the actual extension, because I'd forgotten you had to create a mac app first.

Sorry to waste your time!

By designatednerd at Sept. 6, 2016, 10:36 a.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!