Skip to content

Commit fc0d51d

Browse files
committed
Fixing more warnings
1 parent c13a5e7 commit fc0d51d

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

iOS_SDK/OneSignalSDK/OneSignalNotifications/OSNotificationsManager.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ + (OSPermissionStateInternal*)lastPermissionState {
184184
+ (void)setPushSubscriptionId:(NSString *)pushSubscriptionId {
185185
_pushSubscriptionId = pushSubscriptionId;
186186
}
187-
187+
#pragma clang diagnostic push
188+
#pragma clang diagnostic ignored "-Wundeclared-selector"
188189
+ (void)start {
189190
// Swizzle - UIApplication delegate
190191
//TODO: do the equivalent in the notificaitons module
@@ -203,6 +204,7 @@ + (void)start {
203204
);
204205
[OneSignalNotificationsUNUserNotificationCenter setup];
205206
}
207+
#pragma clang diagnostic pop
206208

207209
+ (void)resetLocals {
208210
_lastMessageReceived = nil;

iOS_SDK/OneSignalSDK/OneSignalNotifications/OSPermission.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ - (void)setHasPrompted:(BOOL)inHasPrompted {
8585
BOOL last = self.hasPrompted;
8686
_hasPrompted = inHasPrompted;
8787
if (last != self.hasPrompted)
88-
[self.observable notifyChange:self];
88+
[self.observable notifyChange:(OSPermissionState*)self];
8989
}
9090

9191
- (BOOL)hasPrompted {
@@ -104,7 +104,7 @@ - (void)setProvisional:(BOOL)provisional {
104104
_provisional = provisional;
105105

106106
if (previous != _provisional)
107-
[self.observable notifyChange:self];
107+
[self.observable notifyChange:(OSPermissionState*)self];
108108
}
109109

110110
- (BOOL)isProvisional {
@@ -115,7 +115,7 @@ - (void)setAnsweredPrompt:(BOOL)inansweredPrompt {
115115
BOOL last = self.answeredPrompt;
116116
_answeredPrompt = inansweredPrompt;
117117
if (last != self.answeredPrompt)
118-
[self.observable notifyChange:self];
118+
[self.observable notifyChange:(OSPermissionState*)self];
119119
}
120120

121121
- (BOOL)answeredPrompt {
@@ -129,14 +129,14 @@ - (void)setAccepted:(BOOL)accepted {
129129
BOOL changed = _accepted != accepted;
130130
_accepted = accepted;
131131
if (changed)
132-
[self.observable notifyChange:self];
132+
[self.observable notifyChange:(OSPermissionState*)self];
133133
}
134134

135135
- (void)setEphemeral:(BOOL)ephemeral {
136136
BOOL changed = _ephemeral != ephemeral;
137137
_ephemeral = ephemeral;
138138
if (changed)
139-
[self.observable notifyChange:self];
139+
[self.observable notifyChange:(OSPermissionState*)self];
140140
}
141141

142142
- (void)setProvidesAppNotificationSettings:(BOOL)providesAppNotificationSettings {

iOS_SDK/OneSignalSDK/Source/OSMessagingController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ + (void)removeInstance {
112112

113113
+ (void)start {
114114
OSMessagingController *shared = OSMessagingController.sharedInstance;
115+
#pragma clang diagnostic push
116+
#pragma clang diagnostic ignored "-Wunused-variable"
115117
OSPushSubscriptionState *_ = [OneSignalUserManagerImpl.sharedInstance addObserver:shared];
118+
#pragma clang diagnostic pop
116119
}
117120

118121
static BOOL _isInAppMessagingPaused = false;

0 commit comments

Comments
 (0)