Xcode 5.0.2: Accessibility-based Tools crash app running in iOS 7 Simulator

Number:rdar://15478255 Date Originated:15-Nov-2013 10:47 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 5.0.2 (5A3005)
Classification:Crash/Hang/Data Loss Reproducible:Always
If you enable the accessibility inspector you can cause crashes on UIViews which implement custom accessibility elements. 

Steps to Reproduce:

- Get the sample project:
   git clone --recursive https://github.com/Cocoanetics/DTCoreText.git
- enable the Accessibility inspector on the iOS 7 simulator, General - Accessibility
- Build&Run the DemoApp target of the project
- Double-Click on the first entry that says "README"
- Double-Click on the Portrait Photo
- Swipe and click wildly around on the view

Expected Results:
- No crash

Actual Results:
- Crash with the following stack trace:

2013-11-15 10:41:23.205 RTDemoApp[1502:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DTAttributedTextContentView superlayer]: unrecognized selector sent to instance 0xa3f42a0'

This occurs only on the iOS 7 simulator, not on iOS 6 simulator.

There is no method -[UIView superlayer], yet accessibility hit testing wants to call it from -[CALayer(CALayerPrivate) ancestorSharedWithLayer:]

An alternative method to reproduce this is to enable the BettterTouchTool (http://www.boastr.net) which seems to also enable some sort of Accessibility inside iOS simulator.


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!