Skip to content

Commit

Permalink
add ios app settings link in settings
Browse files Browse the repository at this point in the history
resolves #82
  • Loading branch information
maxisme committed May 2, 2021
1 parent 57c1498 commit 6ad65f3
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
PODS:
- "app_settings (3.0.0+1)":
- Flutter
- Firebase/CoreOnly (7.3.0):
- FirebaseCore (= 7.3.0)
- Firebase/Messaging (7.3.0):
Expand Down Expand Up @@ -89,6 +91,7 @@ PODS:
- Flutter

DEPENDENCIES:
- app_settings (from `.symlinks/plugins/app_settings/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
Expand Down Expand Up @@ -117,6 +120,8 @@ SPEC REPOS:
- PromisesObjC

EXTERNAL SOURCES:
app_settings:
:path: ".symlinks/plugins/app_settings/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_messaging:
Expand All @@ -143,6 +148,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher/ios"

SPEC CHECKSUMS:
app_settings: d103828c9f5d515c4df9ee754dabd443f7cedcf3
Firebase: 26223c695fe322633274198cb19dca8cb7e54416
firebase_core: 91b27774a52f41f8b58484a75edf71197ac01c59
firebase_messaging: caf0273c76e54f0a10dfe5048ac47b89e75bb78a
Expand Down
30 changes: 15 additions & 15 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>it.notifi.notifi</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand All @@ -23,27 +27,27 @@
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppleMusicUsageDescription</key>
<string>We don&apos;t access apple music</string>
<string>We don't access apple music</string>
<key>NSBonjourServices</key>
<array>
<string>_dartobservatory._tcp</string>
</array>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>FLogs would like to save photos from the app to your gallery</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>FLogs would like to access your photo gallery for uploading images to the app</string>
<key>NSCalendarsUsageDescription</key>
<string>We don&apos;t access your calendar</string>
<string>We don't access your calendar</string>
<key>NSContactsUsageDescription</key>
<string>We don&apos;t access your contacts</string>
<string>We don't access your contacts</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>We don&apos;t use location data</string>
<string>We don't use location data</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We don&apos;t use location data</string>
<string>We don't use location data</string>
<key>NSMotionUsageDescription</key>
<string>We don&apos;t access motion</string>
<string>We don't access motion</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>FLogs would like to save photos from the app to your gallery</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>FLogs would like to access your photo gallery for uploading images to the app</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>We don&apos;t access speech recognition</string>
<string>We don't access speech recognition</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
Expand All @@ -67,9 +71,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>it.notifi.notifi</string>
</array>
</dict>
</plist>
4 changes: 4 additions & 0 deletions lib/screens/settings.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:io' show Platform;

import 'package:app_settings/app_settings.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
Expand Down Expand Up @@ -119,6 +120,9 @@ class SettingsScreenState extends State<SettingsScreen> {
}
});
}),
if (Platform.isIOS)
SettingOption('iOS App Settings...', Akaricons.gear,
onTapCallback: AppSettings.openNotificationSettings),
SettingOption('About...', Akaricons.info, onTapCallback: () {
openUrl('https://notifi.it');
}),
Expand Down
7 changes: 7 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.41.2"
app_settings:
dependency: "direct main"
description:
name: app_settings
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
archive:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ environment:
sdk: ">=2.7.0 <3.0.0"

dependencies:
app_settings: ^4.1.0
cached_network_image: ^2.2.0+1
cupertino_icons: ^1.0.2
dio: ^3.0.10
Expand Down

0 comments on commit 6ad65f3

Please sign in to comment.