Skip to content

Commit 96eca7f

Browse files
committed
Add MMMRuntimeDiscoverable to help some Swift classes be visible from MMMAllClassesConformingNSObject()
1 parent 5f09ad8 commit 96eca7f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

MMMCommonCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Pod::Spec.new do |s|
77

88
s.name = "MMMCommonCore"
9-
s.version = "1.15.1"
9+
s.version = "1.16.0"
1010
s.summary = "Small bits and pieces reused in many pods from MMMTemple"
1111
s.description = s.summary
1212
s.homepage = "https://github.com/mediamonks/#{s.name}"

Sources/MMMCommonCoreObjC/MMMCommonCore.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,10 @@ extern BOOL MMMSeemsLikeEmail(NSString *email);
305305
* in `swift_dynamicCast` while working with `AnyClass`. */
306306
extern NSArray<Class> *MMMAllClassesConformingNSObject();
307307

308+
/// Adding this protocol to Swift-only subclasses of Obj-C classes makes them visible in the list of all Obj-C classes
309+
/// produced by ``MMMAllClassesConformingNSObject()``. Swift can be too smart finding subclasses that are never used
310+
/// from Obj-C and thus not registering them with the runtime.
311+
@protocol MMMRuntimeDiscoverable <NSObject>
312+
@end
313+
308314
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)