Skip to content

Commit

Permalink
Make initialiser for ARTPaginatedResult available - allows mocking an…
Browse files Browse the repository at this point in the history
…d subclassing in other SDKs e.g. Chat
  • Loading branch information
umair-ably committed Oct 7, 2024
1 parent 63e6f00 commit 7148957
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Source/ARTPaginatedResult.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,9 @@ + (void)executePaginated:(ARTRestInternal *)rest withRequest:(NSMutableURLReques
}];
}

- (nonnull instancetype)init {
[NSException raise:NSInternalInconsistencyException format:@"ARTPaginatedResult can't be initialized with init."];
__builtin_unreachable();
}

@end
2 changes: 1 addition & 1 deletion Source/include/Ably/ARTPaginatedResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ NS_SWIFT_SENDABLE
@property (nonatomic, readonly) BOOL isLast;

/// :nodoc:
- (instancetype)init UNAVAILABLE_ATTRIBUTE;
- (instancetype)init;

/**
* Returns a new `ARTPaginatedResult` for the first page of results.
Expand Down

0 comments on commit 7148957

Please sign in to comment.