Rejected App due to HealthKit (HealthKit is not referenced)

Srinivas T M 1 Reputation point
2021-02-24T05:02:34.557+00:00

The problem is that most of the solutions suggest to link framework SDK's only which would in fact solve the issue. However, my app crashes with this linker behaviour. Therefore, I have to use the "Don't Link" behaviour.

I have used additional mtouch arguments --linkskip=HealthKit and --xml=File.xml, but I could still see HealthKit Functionalities when checked with
strings <> | grep Health,

Also I have included the XML file with additional linker options,

<?xml version="1.0" encoding="UTF-8" ?>  
<linker>  
    <assembly fullname="Xamarin.iOS">  
        <type fullname="HealthKit" preserve="none"/>  
    </assembly>  
</linker>  

and even in the simple Sample application, without even referencing any HealthKit, all the HealthKit functionalities has been linked, I have attached the screenshot as well. Kindly provide any solution for this issue ASAP, as my iOS app is getting delayed.
.
.
71404-screenshot-2021-02-20-at-51003-pm.png

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,377 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cole Xia (Shanghai Wicresoft Co,.Ltd.) 6,751 Reputation points
    2021-02-24T07:20:58.223+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Maybe HealthKit is referenced in third-party lib or contained in Xamarin.iOS , what we could do is to set Linker as Link SDk only .

    Ensure that you set it properly in Release mode and apply for All Platforms .

    71418-capture.png

    If it does not work , try to add"--linksdkonly" in mtouch argument, refer to https://forums.xamarin.com/discussion/151862/guideline-2-5-1-performance-software-requirements-healthkit-issue .


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.