Skip to content

Commit

Permalink
Removing the call to observeValueForKeyPath:ofObject:change:context: …
Browse files Browse the repository at this point in the history
…on super from RCTVideo.

If the super class is not actually observing the key, the app will crash. Checking to see if
the super class responds to this selector doesn't solve this issue.

react-native-video github issue: TheWidlarzGroup/react-native-video#1515

Discussion about this particular problem: https://stackoverflow.com/questions/6574714/whats-wrong-with-this-observevalueforkeypathofobjectchangecontext-implement
  • Loading branch information
Nahuel Marisi committed Aug 20, 2019
1 parent 6792249 commit f29cd1c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ios/Video/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,6 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N

return;
}
} else if ([super respondsToSelector:@selector(observeValueForKeyPath:ofObject:change:context:)]) {
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
}

Expand Down

0 comments on commit f29cd1c

Please # to comment.