Xcode 6.2 Beta 2 WatchKit framework does not allow WKInterfaceTable instances with more than one row type.

Originator:owen.mathews
Number:rdar://19222325 Date Originated:12/11/14
Status:Open Resolved:No
Product:iOS SDK Product Version:iOS 8.2 Beta 2
Classification:Serious Bug Reproducible:Yes
 
Summary:
If an interface controller has a table and you specify more than one row in the storyboard, you cannot use the [WKInterfaceTable -setRowTypes:] method in [WKInterfaceController -willActivate] to create rows with more than one type.

Steps to Reproduce:
- Create a new iPhone project.
- Create a WatchKit app target.
- In InterfaceController.m, create two empty classes (@interface and @implementation declarations), Row1Controller and Row2Controller.
- In InterfaceController.m, in the class extension, add the following line of code:
@property (nonatomic, weak) IBOutlet WKInterfaceTable *table;
- In InterfaceController.m, in the -willActivate: method, add the following two lines of code:
    NSArray *rowTypes = @[@"Row1", @"Row2"];
    [self.table setRowTypes:rowTypes];
- Add a table to the empty interface controller scene.
- Set the number of rows in the table to 2.
- Set the first row's class to Row1Controller and its identifier to Row1.
- Set the second row's class to Row2Controller and its identifier to Row2.
- Hook up the "table" outlet of the InterfaceController.
- Compile and run the Watch App scheme.

Expected Results:
Console output contains no errors:
2014-12-11 14:00:26.082 TestWatchBeta2MultipleTableRowTypes WatchKit Extension[1302:32833] <InterfaceController: 0x7fe7cd200110> awakeWithContext
2014-12-11 14:00:26.083 TestWatchBeta2MultipleTableRowTypes WatchKit Extension[1302:32833] <InterfaceController: 0x7fe7cd200110> will activate
2014-12-11 14:00:26.083 TestWatchBeta2MultipleTableRowTypes

Actual Results:
Console output contains two errors:
2014-12-11 14:00:26.082 TestWatchBeta2MultipleTableRowTypes WatchKit Extension[1302:32833] <InterfaceController: 0x7fe7cd200110> awakeWithContext
2014-12-11 14:00:26.083 TestWatchBeta2MultipleTableRowTypes WatchKit Extension[1302:32833] <InterfaceController: 0x7fe7cd200110> will activate
2014-12-11 14:00:26.083 TestWatchBeta2MultipleTableRowTypes WatchKit Extension[1302:32833] Error - unable to instantiate row controller class (null) for row 0
2014-12-11 14:00:26.083 TestWatchBeta2MultipleTableRowTypes WatchKit Extension[1302:32833] Error - unable to instantiate row controller class (null) for row 1


Version:
Xcode 6.2 (6C95a)

Notes:
Attached file contains two projects. Using Xcode 6 beta 1, open TestWatchMultipleTableRowTypes and note that it works correctly. Using Xcode 6 beta 2, open TestWatchBeta2MultipleTableRowTypes and note that it does not work correctly.

Configuration:
MacBook Pro (Retina, 15-inch, Late 2013), OS X 10.10.1 (14B25)

Comments


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!