iosphere / ISHPermissionKit

A polite and unified way of asking for permission on iOS
https://iosphere.de
Other
614 stars 44 forks source link

Allow cocoapod configuration to only install specific requests #15

Closed MPiccinato closed 10 years ago

MPiccinato commented 10 years ago

Just a heads up that our App was rejected for referencing the Health Kit API when we do not actually use it. It would be nice to either remove this from being installed from the CocoaPod or allow some sort of config.

felixLam commented 10 years ago

I am very sorry to hear that! We weren't aware of this issue as the app for which we plan on using this actually uses HealthKit.

I am not sure how much configuration CocoaPods allows. We might need a macro of some sort to enable HealthKit support in code (New default would be without HealthKit). We do the linking manually. I will check if this can be configured via CocoaPods.

Am 27.09.2014 um 04:28 schrieb Mathew Piccinato notifications@github.com:

Just a heads up that our App was rejected for referencing the Health Kit API when we do not actually use it. It would be nice to either remove this from being installed from the CocoaPod or allow some sort of config.

— Reply to this email directly or view it on GitHub.

felixLam commented 10 years ago

It's a bit odd of Apple to check the linked framework rather than the entitlements of the app. Without the entitlements the app can't use HealthKit anyway, but PermissionKit should work without issues as long as you do not request HealthKit permissions.

Am 27.09.2014 um 04:28 schrieb Mathew Piccinato notifications@github.com:

Just a heads up that our App was rejected for referencing the Health Kit API when we do not actually use it. It would be nice to either remove this from being installed from the CocoaPod or allow some sort of config.

— Reply to this email directly or view it on GitHub.

MPiccinato commented 10 years ago

I did find it a bit odd also. I don't have the HealthKit capabilities turned on in my project and I can't find any trace of referencing HealthKit in my code or any other CocoaPods. Also we don't make any calls to ISHPermissionKit regarding HealthKit. I had a version for iOS 8 approved prior to launch which contained ISHPermissionKit and the reference to HealthKit. Not sure why it was rejected this time.

Here is the rejection reason pasted below...

Reasons

27.4: Apps may not use user data gathered from the HealthKit API for advertising or other use-based data mining purposes other than improving health, medical, and fitness management, or for the purpose of medical research 27.6: Apps using the HealthKit framework must indicate integration with the Health app in their marketing text and must clearly identify the HealthKit functionality in the app's user interface 27.7: Apps using the HealthKit framework must provide a privacy policy or they will be rejected ----- 27.4 -----

We found that your app uses data gathered from the HealthKit API for purposes other than improving health, medical, and fitness management or medical research, which does not comply with the App Store Review Guidelines.

It would be appropriate to revise your app to bring it into compliance with the Guidelines.

----- 27.7 -----

We found that your app uses the HealthKit framework but does not include a privacy policy, as required by the App Store Review Guidelines.

Please update your app metadata to include a privacy policy and ensure that the privacy policy URL you provide directs the user to the intended destination.

----- 27.6 -----

We found your app uses the HealthKit API but does not indicate integration with the Health app in your Application Description and/or clearly identify the HealthKit functionality in your app’s UI, as required by the App Store Review Guidelines.

Specifically, it would be appropriate to revise your Application Description to specify that your app integrates with the Health app.

Specifically, it would be appropriate to clearly identify the HealthKit functionality in app’s UI to avoid > confusion.

felixLam commented 10 years ago

I am just walking through the project, no explicit links are made against the HealthKit Framework. We use the more modern @import statement.

We would need a macro that if not defined removes all HealthKit related code from ISHPermissionKit at compile time. However I am unsure how I could define such a macro outside of the project for it to have any effect inside it. As a quick fix a second target without HealthKit might work.

felixLam commented 10 years ago

Hey MPiccinato, I have created a new branch feature/healtKitFree (5d260e7ab5da5cd6903df724b6de41c529e6c848).

The default framework and static library target should no longer reference HealthKit. I verified this using the preprocess assistant in Xcode. Please have a look and let me know if this works for you. If so, I will update the podsec on Monday.

There are now two new targets for the framework and static library that enable support for HealthKit by defining a new macro ISHPermissionRequestHealthKitEnabled.

felixLam commented 10 years ago

You should nevertheless try to appeal the rejection on the grounds that your app missing entitlements can't technically access HealthKit or even request the user's permission to access it.

MPiccinato commented 10 years ago

Thanks felixLam! I will submit using that branch. I did appeal the rejection, will update when I hear back.

felixLam commented 10 years ago

Hi @MPiccinato I have made some minor changes to ease the transition for those that require HealthKit support and have merged the latest changes back onto Master. Let me now if you have any issues.