Skip to content

Commit

Permalink
Remove Objective-C compatibility, fix #89
Browse files Browse the repository at this point in the history
  • Loading branch information
vtourraine committed Sep 17, 2021
1 parent 081cead commit 52aac60
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
- Add SwiftUI interface (supports iOS/tvOS/watchOS/macOS)


## 2.0.2 (17 September 2021)

- Update `AcknowListViewController` to remove Objective-C compatibility, fixing Xcode 13 support


## 2.0.1 (26 April 2021)

- Update `AcknowListViewController` to make initializers available with Objective-C
Expand Down
12 changes: 7 additions & 5 deletions Examples/AcknowExampleManual/AcknowExample/ObjCViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
@implementation ObjCViewController

- (void)presentAcknowListViewController {
NSString *path = @"";
AcknowListViewController *viewController = [[AcknowListViewController alloc] initWithPlistPath:path style:UITableViewStylePlain];
viewController.headerText = @"...";
viewController.footerText = @"...";
// Objective-C compatibility has been disabled, see: https://github.com/vtourraine/AcknowList/issues/89
//
// NSString *path = @"";
// AcknowListViewController *viewController = [[AcknowListViewController alloc] initWithPlistPath:path style:UITableViewStylePlain];
// viewController.headerText = @"...";
// viewController.footerText = @"...";

[self presentViewController:viewController animated:YES completion:nil];
// [self presentViewController:viewController animated:YES completion:nil];
}

@end
4 changes: 2 additions & 2 deletions Sources/AcknowList/AcknowListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ open class AcknowListViewController: UITableViewController {
- returns: The new `AcknowListViewController` instance.
*/
@objc public convenience init(fileNamed fileName: String) {
public convenience init(fileNamed fileName: String) {
if let path = AcknowListViewController.acknowledgementsPlistPath(name: fileName) {
self.init(plistPath: path)
}
Expand All @@ -94,7 +94,7 @@ open class AcknowListViewController: UITableViewController {
- returns: The new `AcknowListViewController` instance.
*/
@objc public convenience init(plistPath: String, style: UITableView.Style = .grouped) {
public convenience init(plistPath: String, style: UITableView.Style = .grouped) {
self.init(acknowledgements: [], style: style)

load(from: plistPath)
Expand Down

0 comments on commit 52aac60

Please sign in to comment.