Baseflow / Baseflow/flutter-permission-handler
[Bug]: iOS appTrackingTransparency.request() always returns PermissionStatus.permanentlyDenied
- Dominant language
- Dart
- Stars
- 2.2k
- Forks
- 970
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 2
Description
### Please check the following before submitting a new issue.
- [X] I have searched the [existing issues](https://github.com/baseflow/flutter-permission-handler/issues).
- [X] I have carefully [read the documentation](https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler/README.md) and verified I have added the required platform specific configuration.
### Please select affected platform(s)
- [ ] Android
- [X] iOS
- [ ] Windows
### Steps to reproduce
Here is my code:
info.plist
```
NSUserTrackingUsageDescription
Here is some info
```
main.dart
```
if (!kIsWeb && Platform.isIOS) {
var status = await Permission.appTrackingTransparency.status;
while (status == PermissionStatus.denied) {
status = await Permission.appTrackingTransparency.request();
await Future.delayed(const Duration(milliseconds: 200));
}
}
```
### Expected results
iOS dialog window with text from NSUserTrackingUsageDescription tag
### Actual results
appTrackingTransparency.request() always returns PermissionStatus.permanentlyDenied
### Code sample
Code sample
```dart
if (!kIsWeb && Platform.isIOS) {
var status = await Permission.appTrackingTransparency.status;
while (status == PermissionStatus.denied) {
status = await Permission.appTrackingTransparency.request();
await Future.delayed(const Duration(milliseconds: 200));
}
}
```
### Screenshots or video
_No response_
### Version
11.3.1
### Flutter Doctor output
Doctor output
```console
[✓] Flutter (Channel stable, 3.24.4, on macOS 14.4 23E214 darwin-x64, locale ru-RU)
• Flutter version 3.24.4 on channel stable at /usr/local/Caskroom/flutter/3.19.5/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 603104015d (8 weeks ago), 2024-10-24 08:01:25 -0700
• Engine revision db49896cf2
• Dart version 3.5.4
• DevTools version 2.37.3
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/fittin/Library/Android/sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.15.2
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] Connected device (2 available)
• iPhone Arkhip (mobile) • 00008030-0003445E1EEA402E • ios • iOS 17.1.2 21B101
• macOS (desktop) • macos • darwin-x64 • macOS 14.4 23E214 darwin-x64
! Error: Browsing on the local area network for iPhone (Евгений). Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 2 categories.
```
Contributor guide
Assessment
This issue has not been assessed yet.