Skip to content

[monotouch-test] It doesn't look like the TryCopyCurrentNetworkInfo test works in the iOS 11 simulator either. - #11764

Merged
rolfbjarne merged 2 commits into
dotnet:mainfrom
rolfbjarne:adjust-captive-network-test
Jun 2, 2021
Merged

rolfbjarne merged 2 commits into
dotnet:mainfrom
rolfbjarne:adjust-captive-network-test

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Partial fix for #11504.

…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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spouliot fixed

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

✅ API Diff (from PR only) (no change)
✅ Generator Diff (no change)

GitHub pages

Results 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
Merge 5d687d1 into 1c60b17

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

✅ API Diff (from PR only) (no change)
✅ Generator Diff (no change)

GitHub pages

Results 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'
Merge c7bd470 into 414d1eb

@rolfbjarne
rolfbjarne merged commit 3eb01e7 into dotnet:main Jun 2, 2021
@rolfbjarne
rolfbjarne deleted the adjust-captive-network-test branch June 2, 2021 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants