Baseflow / flutter-permission-handler

Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
https://baseflow.com
MIT License
2.03k stars 844 forks source link

Removing iOS permissions is not working #266

Closed ialhashim closed 4 years ago

ialhashim commented 4 years ago

๐Ÿ› Bug Report

Following the readme and trying to remove the permissions I don't need but it doesn't seem to work. The app store complains about those missing permissions. The last step says 'Clean & Rebuild', is their something extra I need to do that?

Expected behavior

App store submissions with some permissions are removed should not be a problem.

Reproduction steps

Following the readme trying to remove permissions on iOS.

Version: 5.0.0

Platform:

mvanbeusekom commented 4 years ago

Could you post the contents of your Podfile and Info.plist file?

The step Clean & Rebuild can be done by running the commands below. Also before running the commands you can delete the ios/Pods folder and the ios/Podfile.lock file.

flutter clean
flutter build ios 
ialhashim commented 4 years ago

Here is the Podfile. The Info.plist doesn't have the permissions I don't need and the app store is complaining about (i.e. contacts, speech, sensor, media).

I am trying to build from within Xcode, would that be the issue?

Podfile.txt

danysz commented 4 years ago

๐Ÿ‘

ialhashim commented 4 years ago

How to do it within Xcode. I want to submit my app to the app store and to my knowledge I need to upload an IPA archive which flutter CLI does not produce.

danysz commented 4 years ago

How to do it within Xcode. I want to submit my app to the app store and to my knowledge I need to upload an IPA archive which flutter CLI does not produce.

To create the file which is supposed to be uploaded to Apple Developer Account the easiest way is to open the project in Xcode and create the archive and after to upload it from the Organizer

ialhashim commented 4 years ago

And here is the issue, if this customization to remove certain permissions can only be done via flutter CLI we cannot then use it in production. So this feature is still missing / incomplete.

mvanbeusekom commented 4 years ago

You can generate an IPA using Xcode but much more easy would be using the Flutter command (assuming you have configured your signing in Xcode):

flutter build ios

After running this command, your IPA file will be located in the build folder in the root of your project.

Although all of this also works using Xcode. If havenโ€™t tested the macro code to filter the permissions myself but I have had multiple reports that is works as it should (no matter if you build through Xcode or Flutter CLI).

mvanbeusekom commented 4 years ago

And here is the issue, if this customization to remove certain permissions can only be done via flutter CLI we cannot then use it in production. So this feature is still missing / incomplete.

Just to make things clear, this customization it based on objective-c macros which will be taken into account by the xcodebuild command which has nothing to do with Flutter it self.

ialhashim commented 4 years ago

Ok, I will try it some more. The problem is Apple servers are involved, making this really slow and frustrating.

But thanks for the feedback.

ialhashim commented 4 years ago

I managed to make it submit without the permissions I don't need. What I did was manually adding the macro lines one by one in the 'Apple Clang - Preprocessing' for the 'Release' build.

@mvanbeusekom you mentioned that "your IPA file will be located in the build folder". Unfortunately, that was not the case in my machine. I only get a '.app' file.