question

SrinivasTM-9562 avatar image
0 Votes"
SrinivasTM-9562 asked ·

Rejected App due to HealthKit (HealthKit is not referenced)

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





dotnet-xamarinessentials
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered ·

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.



capture.png (16.8 KiB)
· 4 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ColeXia-MSFT I cannot set Linker options to "Link SDK Only" as my app crashes with this linker behaviour.

And I could find the HealthKit functionality in the sample Hello World Application also without any third party libraries. So please provide any other solution for "Don't Link" linker behaviour.

0 Votes 0 ·

Do you mean your app is still Rejected by apple even if you set Don't Link and used additional mtouch arguments --linkskip=HealthKit

0 Votes 0 ·

@ColeXia-MSFT , Yes.

And I have also tried with Simple hello world application without any third party libraries, still I could find those HealthKit references even after using Don't Link and --linkskip=HealthKit.
I have attached the screenshot of HealthKit references.

72056-screenshot-2021-02-20-at-51003-pm.png


0 Votes 0 ·
Show more comments