ReplayKit loadBroadcastingApplicationInfoWithCompletion: passes incorrect parameters to completion block.
| Originator: | jboiles | ||
| Number: | rdar://29292824 | Date Originated: | 2016-11-16 |
| Status: | Open | Resolved: | No |
| Product: | ReplayKit | Product Version: | iOS 10.1.1 |
| Classification: | Bug | Reproducible: | Yes |
Area:
Something not on this list
Summary:
About half the time, the following ReplayKit API
[self.extensionContext loadBroadcastingApplicationInfoWithCompletion:^(NSString *_Nonnull bundleID, NSString *_Nonnull displayName, UIImage *_Nullable appIcon) {}];
Switches the ordering of the parameters to the completion block. When this happens a UIImage is passed into displayName, or bundleID, potentially causing a crash if this case isn't checked.
Steps to Reproduce:
1. Create a ReplayKit UI extension
2. Implement the above API
3. Add logging to above completion block that logs bundleID, displayName, and appIcon
4. Create a handful of broadcasts
5. Verify that the completion block parameters are out of order
Expected Results:
bundleID should be an NSString
displayName should be an NSString
appIcon should be a UIImage
Actual Results:
bundleID is sometimes a UIImage
displayName is sometimes a UIImage
appIcon is sometimes an NSString
Version:
iOS 10.1.1
Notes:
Seems to happen roughly half the time. We've added very defensive code that checks the types and tries to detect a bundle ID in a string as a workaround.
Configuration:
iPad Mini 4
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!