Rejected App due to HealthKit (HealthKit is not referenced)

Srinivas T M 1 Reputation point

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" ?>  
    <assembly fullname="Xamarin.iOS">  
        <type fullname="HealthKit" preserve="none"/>  

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.

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

1 answer

Sort by: Most helpful
  1. Cole Xia (Shanghai Wicresoft Co,.Ltd.) 6,751 Reputation points


    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 .


    If it does not work , try to add"--linksdkonly" in mtouch argument, refer to .

    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.