Repository navigation
[monotouch-test] It doesn't look like the TryCopyCurrentNetworkInfo test works in the iOS 11 simulator either. - #11764
Conversation
…est works in the iOS 11 simulator either. Partial fix for dotnet#11504.
| if (TestRuntime.CheckXcodeVersion (10, 0)) { | ||
| Assert.IsNull (dict, "Dictionary"); | ||
| } else if (TestRuntime.CheckXcodeVersion (9, 0)) { | ||
| Assert.IsNull (dict, "Dictionary"); // It doesn't seem to work in iOS 11 either, I don't know why. |
There was a problem hiding this comment.
An app linked against iOS 13 or later receives NULL.
https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo
Since we're linking with the latest SDK then it's likely always null.
There was a problem hiding this comment.
I understood that differently: "apps linked against iOS 13+ receives NULL (and this is kind of implied:) when executing on iOS 13+".
I think the previous sentence explains it: "An app linked against iOS 12 or earlier receives a dictionary with pseudo-values." - the point is that old apps would get the new behavior if re-built with the iOS 13+ SDK (and executing on an iOS 13+ OS), not that apps build with iOS 13+ SDK will get the new behavior on existing OSes (which would require OS changes).
There was a problem hiding this comment.
Yes. It's not common but it's not the first setting I've seen that behave differently depending on which SDK version it's linked with :-)
-
If you rebuild (then you re-link) then it's up to you to test your code for changes (and adapt for the null value).
-
If you don't rebuild (pre-iOS 13 SDK) and run on iOS 13+ (like updating your phone) you'll get the pseudo-values so the app doesn't crash while accessing a null dictionary.
Since our test always relink then a single
Assert.IsNull (dict, "Dictionary");is the only thing that should be required.
✅ [PR Build] Tests passed on Build. ✅Tests passed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diff✅ API Diff (from PR only) (no change) GitHub pagesResults can be found in the following github pages (it might take some time to publish): 🎉 All 81 tests passed 🎉Pipeline on Agent XAMBOT-1099.BigSur |
✅ [PR Build] Tests passed on Build. ✅Tests passed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diff✅ API Diff (from PR only) (no change) GitHub pagesResults can be found in the following github pages (it might take some time to publish): 🎉 All 81 tests passed 🎉Pipeline on Agent XAMBOT-1100.BigSur' |
Partial fix for #11504.