1

First of all, I know the title matches This Question but they are very different.

I developed a TAXI app in Flutter that makes use of Wifi/Network, Google Map, Location(Geolocator) and background services for App Notifications.

The app was well accepted by Playstore but AppStore just wont accept it (3 times even with an appeal).

We noticed that your app uses HealthKit, but your app does not appear to include any primary features that require health or fitness data.

  1. My App Does not use this HealthKit
  2. My info.plist file has no record of this
  3. My App ID has not checked HealthKit

And now I am at my wits end because I have nothing else to do to this code to get it accepted.

Any help is highly appreciated.

APP ID FILE

APP ID

INFO.PLIST FILE

Info.plist

Lefty
  • 1,192
  • 13
  • 18
  • 1
    Are you using any permissions library to ask for the permissions ? If so make sure they don't ask for health kit permissions too. – danypata Feb 01 '21 at 19:02
  • 1
    Do a `Command` + `Shift` + `F` and search for "health". See if you are calling healthkit anywhere. – aheze Feb 01 '21 at 19:07
  • @aheze I have found many entries of the healthKit after doing the search... I have deleted them but on fresh build, they're coming back. It seems like there's a dependency that's relying on this HealthKit but how to know which one is no easy task – Lefty Feb 02 '21 at 04:35
  • @Lefty see which file they are in. That should point you in the right direction – aheze Feb 02 '21 at 04:48
  • 1
    @aheze, I want to thank you most sincerely, I wish you had responded as an answer because I really want to mark it as the correct answer. I did a second Command + shift + f and typed healthkit like you directed, deleted the files again then cleared the BIN ... the files in the bin were the ones reoccuring on the search. I then compiled and sent it for review. It has passed successfully. Thanks sir – Lefty Feb 03 '21 at 04:15
  • @Lefty Np, congrats on your successful launch! – aheze Feb 03 '21 at 04:26

2 Answers2

2

The app review people seem to be able to detect all APIs that you use. From this answer:

They do, however, appear to scan your application's binary for certain symbols that indicate the use of private APIs. A number of applications started crashing after iPhone OS updates because they used these private APIs, so Apple has been cracking down on this.

So if they say you are using HealthKit, it probably means somewhere in your code, you are using it. It could be in an external framework or your own code, but the easiest way to see where is to do a

Command + Shift + F

and enter "Health", which will search your entire project for it. You can then remove any problematic code.

aheze
  • 24,434
  • 8
  • 68
  • 125
  • 1
    Thank you very much @aheze, being a windows user, my normal search was not bringing up the files. Running xcode in virtualbox enabled me find those files. I did a second Command + shift + f and typed healthkit like you directed, deleted the files again then cleared the BIN ... the files in the bin were the ones reoccuring on the search. I then compiled and sent it for review. It has passed successfully. Thanks sir – Lefty Feb 03 '21 at 04:58
1

Go to Xcode and check your app's Signing & Capabilities Section. If you have Health Kit there then remove it. You might also have a dependency which uses HealthKit, and if you are using this dependency directly, then this library will not be stripped from the final ipa. As a result, HealthKit is being included in your final package.

Do all this, then get back to me, and we'll see what's next.

Dan Gerchcovich
  • 168
  • 5
  • 12
  • HealthKit is not checked even on app's Signing & Capabilities Section. However, I have found many entries of the healthKit after doing the search as directed by @aheze... I have deleted them but on fresh build, they're coming back. It seems like there's a dependency that's relying on this HealthKit but how to know which one is now the issue. Any way to identify it? – Lefty Feb 02 '21 at 04:37
  • check the Podfile.lock. There you will find any transitive dependencies to HealthKit. Then check the library that's dependent on these dependencies and remove it. – Dan Gerchcovich Feb 02 '21 at 04:53
  • after that clean up the project. If you cannot find any dependencies to HealthKit, then check the repositories in each of your pubspec & podfile dependencies, and the ones that have HealthKit set, remove them. As long as it does not brake your application then it should be fine. However if it does, then you will need to provide something basic that uses HealthKit, that will justify to Apple that you need HealthKit in the first place. – Dan Gerchcovich Feb 02 '21 at 04:55
  • possibly a dialogue, or some basic user information, etc. Nothing that is a part of your app, but just something that will make Apple think like your app needs it. The apple review team I know can be very frustrating sometimes. But you have to deal with them, so what can you do – Dan Gerchcovich Feb 02 '21 at 04:56
  • how did it go? Did you manage to remove HealthKit? – Dan Gerchcovich Feb 02 '21 at 10:43
  • I did a second Command + shift + f and typed healthkit like aheze directed, deleted the files again then cleared the BIN ... the files in the bin were the ones reoccuring on the search. I then compiled and sent it for review. I has passed succesfully. Thanks for the help – Lefty Feb 03 '21 at 04:13
  • Awesome, can you please mark up my answer and mark it as the answer? Thanks – Dan Gerchcovich Feb 03 '21 at 04:46
  • the apple guys allowed the app during testflight, now they've flagged it 3 times when we try to go production over the same healthkit issue. I am now considering adding something on the app to show that we need that healthkit. Kindly guide me on what I can add, I am not an iOS developer so I am quite in the dark on this issue. – Lefty Mar 11 '21 at 00:35
  • ...Any help on this? – Lefty Mar 16 '21 at 13:22