Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# Changelog

Upcoming

* [iOS] fix: trigger the screen-share broadcast picker (`RPSystemBroadcastPickerView`) via public APIs instead of the private `buttonPressed:` selector.

[3.0.1] - 2026.07.10

* [iOS] Added an onAudioRouteChangeEvent that fires whenever audio output route changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,20 @@ - (void)getDisplayMedia:(NSDictionary*)constraints
} else {
NSLog(@"Not able to find the %@ key", kRTCScreenSharingExtension);
}
SEL selector = NSSelectorFromString(@"buttonPressed:");
if ([picker respondsToSelector:selector]) {
[picker performSelector:selector withObject:nil];
// Trigger the picker's internal button via public UIControl APIs only.
// Calling the private buttonPressed: selector gets apps rejected under
// App Store Guideline 2.5.1 (non-public API).
UIButton* pickerButton = nil;
for (UIView* subview in picker.subviews) {
if ([subview isKindOfClass:[UIButton class]]) {
pickerButton = (UIButton*)subview;
break;
}
}
if (pickerButton != nil) {
[pickerButton sendActionsForControlEvents:UIControlEventTouchUpInside];
} else {
NSLog(@"RPSystemBroadcastPickerView button not found, broadcast picker was not presented");
}
}
#endif
Expand Down Expand Up @@ -152,15 +163,14 @@ - (void)getDisplayMedia:(NSDictionary*)constraints
};
#endif

RTCVideoTrack* videoTrack = [nf.factory videoTrackWithSource:videoSource
trackId:trackUUID];
RTCVideoTrack* videoTrack = [nf.factory videoTrackWithSource:videoSource trackId:trackUUID];
[mediaStream addVideoTrack:videoTrack];

LocalVideoTrack* localVideoTrack = [[LocalVideoTrack alloc] initWithTrack:videoTrack
videoProcessing:videoProcessingAdapter];

[self.localTracks setObject:localVideoTrack forKey:trackUUID];

if (nf.factoryId != nil) {
self.trackFactoryId[trackUUID] = nf.factoryId;
}
Expand Down
Loading