Skip to content

Commit

Permalink
Fixed build error: RealmSwiftObject
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Mkrtchyan committed Apr 17, 2023
1 parent a37f086 commit 6ef4a9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Unrealm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = 'Unrealm'
s.swift_version = '5.5'
s.version = '1.9.4'
s.version = '1.9.5'
s.summary = 'Unrealm is an extension on RealmCocoa, which enables Swift native types to be saved in Realm.'
s.description = <<-DESC
Unrealm enables you to easily store Swift native Classes, Structs and Enums into Realm.
Expand Down
6 changes: 4 additions & 2 deletions Unrealm/Classes/ObjC/Object+Unrealm.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import <objc/runtime.h>
#import "Object+Unrealm.h"
@import RealmSwift;
@import Realm.Swift;
@import Realm;

@implementation RealmSwiftObject (Unrealm)
Expand All @@ -27,7 +27,8 @@ + (void)prepareUnrealm
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class class = object_getClass((id)self);

_Pragma("clang diagnostic push")
_Pragma("clang diagnostic ignored \"-Wundeclared-selector\"")
SEL originalSelector = @selector(_getProperties);
SEL swizzledSelector = @selector(_unrealm_getProperties);

Expand All @@ -48,6 +49,7 @@ + (void)prepareUnrealm
} else {
method_exchangeImplementations(originalMethod, swizzledMethod);
}
_Pragma("clang diagnostic pop")
});

}
Expand Down

0 comments on commit 6ef4a9c

Please sign in to comment.