If MCAdvertiserAssistant or MCNearbyServiceAdvertiser discoveryInfo is too large nothing works and no warnings

Originator:kdbdallas
Number:rdar://15116709 Date Originated:30-Sep-2013 04:39 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.0.2
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
If the dictionary you pass for discoveryInfo in  
-[MCNearbyServiceAdvertiser initWithPeer:discoveryInfo:serviceType:]
or
-[MCAdvertiserAssistant initWithServiceType:discoveryInfo:session:]
NOTHING happens.

No warnings or errors and nothing happens on the device advertising as well as nothing on the browsing device.
It acts like it just never ran.

This leads to not knowing what is happening.
At very least a warning should be logged.

Steps to Reproduce:
1. Use MCNearbyServiceAdvertiser or MCAdvertiserAssistant and pass in a large dictionary (such as one containing NSData for a small image) for the discoveryInfo and create the rest of a MC NearBy project normally.
2. Run and notice nothing happens with advertising, and there is no logging of any sorts.
3. Change the discoveryInfo to nil or a small dictionary and try again, and see that it works.

Expected Results:
Either a warning or error should be logged.
Perhaps if the discoveryInfo is too large the object is not created and instead returns nil.
Perhaps is its too large it just ignores the discoveryInfo and works as if the discoveryInfo had been set as nil. This with an warning/error logged to the console would make it so things still somewhat work, while at the same time letting the developer know what the problem is.

Actual Results:
No warnings or errors and nothing happens on the device advertising as well as nothing on the browsing device.
It acts like it just never ran.

This leads to not knowing what is happening.

Version:
Xcode 5 and iOS 7.0, 7.0.1, 7.0.2

Notes:


Configuration:
Happens when the discoveryInfo is larger then is allowed (as listed in docs)

Happens in attached sample code.
Also happens in Apple's own sample code "MultipeerGroupChat" if you pass a large dictionary to the discoveryInfo 
(https://developer.apple.com/library/ios/samplecode/MultipeerGroupChat/)

Attachments:
'MultipeerConnectivity.zip' was successfully uploaded.

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!