34d1fca7f6
The existing Objective-C class to request an App Store review (SKStoreReviewController) is deprecated in Xcode 16+, and it doesn't even work on the corresponding OS versions. The replacement API is Swift-only, but luckily it's a very simple API (just a static method), so it's possible to bind it manually. This required a few other changes/improvements: * Add support for Swift code in our runtime. * Just to keep the changes to a minimum, bump the min OS version for legacy code to match the .NET min OS versions. This is because our build logic uses the legacy min versions when compiling native code (a more involved fix would be to update all the build logic to build native code to use the .NET min OS versions, but that's not the point of this PR, so I took the easy route). Fixes #10659. I've tested the method locally, and it seems to work fine, but I've still marked it as experimental for now. There are no unit tests because calling the method will put up a dialog, which won't work correctly in unit tests. Fixes https://github.com/xamarin/xamarin-macios/issues/21410. Fixes https://github.com/xamarin/xamarin-macios/issues/10659. |
||
---|---|---|
.. | ||
Mac | ||
dotnet | ||
iOS | ||
ApiAvailabilityTest.cs | ||
ApiBaseTest.cs | ||
ApiCMAttachmentTest.cs | ||
ApiClassPtrTest.cs | ||
ApiCoreImageFiltersTest.cs | ||
ApiCtorInitTest.cs | ||
ApiFieldTest.cs | ||
ApiFrameworkTest.cs | ||
ApiPInvokeTest.cs | ||
ApiProtocolTest.cs | ||
ApiSelectorTest.cs | ||
ApiSignatureTest.cs | ||
ApiStructTest.cs | ||
ApiTypeTest.cs | ||
ApiTypoTest.cs | ||
ApiWeakPropertyTest.cs | ||
CoreSelectorTest.cs | ||
EnvironmentVariable.cs | ||
README.md | ||
xamarin1.png |
README.md
Introspection Tests
Introspection tests are executed on target (both simulator and device for iOS) or a specific version of OSX. The application proceed to analyze itself using:
System.Reflection
for managed code; and- the ObjectiveC runtime library for native code
and compare the results. E.g. if using .NET reflection it can see a binding
for a NSBundle
type then it should be able to find a native NSBundle
type using the ObjC runtime functions. Otherwise an error is raised...
Since the application analyze itself it must contains everything we wish to test. That's why the introspection tests needs to be built with the managed linker disable, i.e. "Don't link".
Pros
- The tests always tell the truth, which can differ from documentation or header files;
Cons
- Incomplete - Not everything is encoded in the metadata / executable;
- Too complete - Not every truth is good to be known (or published), which requires creating special cases in the tests