Correct, when you have SDK-only, the linker will not remove other external assembly code. I have a couple other options you can look into to see if it helps to go back to LinkAll.
1. XAML Compilation
Make sure you enable XamlC at the assembly level
. This will prevent compilation from stripping out any code that is defined in XAML that doesn't have an x:Name. Although I do not think this will solve your problem, it's one line of code
to rule it out and is good practice anyways.
Without XamlC enabled, any element defined in XAML without an x:Name to have a reference to the class, it will be stripped by the linker. For example, if you have a RadBarcode with an x:Name, but the nested elements do not have one, it will get stripped out:
After you've enabled XamlC, do a Clean and Rebuild to ensure everything in the bin is refreshed, then try a Release build with LinkAll enabled.
2. Linker Manipulation
A more likely solution is to configure the linker. You could try to prevent the linker from removing the code that your app relies on, see the following articles about advanced linking.
- Linking on iOS: Controlling the Linker
- Custom Linker configuration
Looking at the error, it actually looks like the Linker is removing SkiaSharp classes that the Telerik drawing libraries need, not a Telerik class. You could try making dummy instances of the classes you see in any errors.
For example, using the class I see in the screenshot:
App : Application
// dummy instance to prevent iOS Linker from stripping out SkiaSharp classes
That trick forces the linker to keep the class because there is a direct reference to it.
I have tested a Release build with just the RadBarcode XAML seen above, with XamlC
enabled. It build and deploys successfully, here's a screenshot of the results:
It's highly likely that my test code is not representative of your project. If you still have issues after applying my suggestions, we will need to take a closer look to see if there are any suggestions we can offer.
Take the following steps:
1. Prepare a small isolated test project with your code that reproduces the error (you can use the File > New > Telerik Xamarin UI project template to quickly get started
2. Go to the Contact Support Team
3. Open a new UI for Xamarin
Support Ticket, attach the project and summarize the issue (you can paste a URL to this thread to help describe the issue
Though ultimately, like Petar mentions at this time we don't support full linking, I would recommend using the Link Framework SDKs Only
option or setting up the Linker with custom options not to strip out the code causing the error.
Lance | Technical Support Engineer, Principal
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items