Skip to content

Commit

Permalink
Fix compile warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Nov 21, 2020
1 parent 25c8a72 commit 9636cbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ios/Classes/AudioSessionPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
if (!plugins) {
plugins = [NSHashTable weakObjectsHashTable];
}
[[AudioSessionPlugin alloc] initWithRegistrar:registrar];
AudioSessionPlugin *plugin = [[AudioSessionPlugin alloc] initWithRegistrar:registrar];
[plugins addObject:plugin];
}

- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
Expand All @@ -23,7 +24,6 @@ - (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar
methodChannelWithName:@"com.ryanheise.audio_session"
binaryMessenger:[registrar messenger]];
[registrar addMethodCallDelegate:self channel:_channel];
[plugins addObject:self];

_darwinAudioSession = [[DarwinAudioSession alloc] initWithRegistrar:registrar];
return self;
Expand Down
4 changes: 2 additions & 2 deletions ios/Classes/DarwinAudioSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ - (NSObject *)policyToFlutter:(NSUInteger)policy {
if (policy == AVAudioSessionRouteSharingPolicyDefault) return @(0);
else return @(3);
} else {
return [NSNull null];
return (id)[NSNull null];
}
}

Expand Down Expand Up @@ -399,7 +399,7 @@ - (void) audioInterrupt:(NSNotification*)notification {
wasSuspended = [notification.userInfo valueForKey:AVAudioSessionInterruptionWasSuspendedKey];
}
if (wasSuspended == nil) {
wasSuspended = [NSNull null];
wasSuspended = (id)[NSNull null];
}

NSLog(@"audioInterrupt");
Expand Down

0 comments on commit 9636cbb

Please sign in to comment.