futuretap/InAppSettingsKit

IOS 13 PSRadioGroupSpecifier

boblepepeur opened this issue · 4 comments

Hello,

After update POD on IOS 13 i get errors with all my PSRadioGroupSpecifier
The error is located on file IASKAppSettingsViewController.m line 687 [_selections[indexPath.section] updateSelectionInCell:cell indexPath:indexPath];

After investigations, on same file, I change that part :

- (void)createSelections {
	NSMutableArray *sectionSelection = [NSMutableArray new];
	for (int i = 0; i < _settingsReader.numberOfSections; i++) {
		IASKSpecifier *specifier = [self.settingsReader headerSpecifierForSection:i];
		if ([specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {
			IASKMultipleValueSelection *selection = [[IASKMultipleValueSelection alloc] initWithSettingsStore:self.settingsStore];
			selection.tableView = self.tableView;
			selection.specifier = specifier;
			selection.section = i;
			[sectionSelection addObject:selection];
		} else {
			[sectionSelection addObject:[NSNull null]];
		}
	}
	_selections = sectionSelection;
}

with

- (void)createSelections {
	NSMutableArray *sectionSelection = [NSMutableArray new];
        NSInteger sectionsNumber = self.settingsReader.numberOfSections;

	for (int i = 0; i < sectionsNumber; i++) {
		IASKSpecifier *specifier = [self.settingsReader headerSpecifierForSection:i];
		if ([specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {
			IASKMultipleValueSelection *selection = [[IASKMultipleValueSelection alloc] initWithSettingsStore:self.settingsStore];
			selection.tableView = self.tableView;
			selection.specifier = specifier;
			selection.section = i;
			[sectionSelection addObject:selection];
		} else {
			[sectionSelection addObject:[NSNull null]];
		}
	}
	_selections = sectionSelection;
}

Which errors do you see? Build or runtime errors?
Can you provide a sample project demonstrating the issue? The IASKSampleApp works fine and doesn't have build errors.

@boblepepeur https://travis-ci.org/futuretap/InAppSettingsKit/jobs/586970726 seems to be building the Sample App with Xcode 11, yeah

Don't see any build errors using Xcode 11.4 (11E146). Closing for now…