about summary refs log tree commit diff
path: root/ios
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-24 19:59:40 -0600
committerPaul Frazee <pfrazee@gmail.com>2023-01-24 19:59:40 -0600
commit079e1dbe180e7a1a5a58cdab90f154157ed07d23 (patch)
treedc0c34aff4d565e962fa1ac19ab9b71ebad5a3a8 /ios
parent869f6c4e0e464b7f5be9ef5676210ae8844bd834 (diff)
downloadvoidsky-079e1dbe180e7a1a5a58cdab90f154157ed07d23.tar.zst
Fix missing config for background fetch
Diffstat (limited to 'ios')
-rw-r--r--ios/app/AppDelegate.mm5
-rw-r--r--ios/app/Info.plist8
2 files changed, 13 insertions, 0 deletions
diff --git a/ios/app/AppDelegate.mm b/ios/app/AppDelegate.mm
index 7c0e1d8de..460c319c8 100644
--- a/ios/app/AppDelegate.mm
+++ b/ios/app/AppDelegate.mm
@@ -8,12 +8,17 @@
 // splash screen
 #import "RNSplashScreen.h"
 
+#import <TSBackgroundFetch/TSBackgroundFetch.h>
+
 @implementation AppDelegate
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
   // Show the splash screen
   // [RNSplashScreen show]; 
+  
+  // Register BackgroundFetch
+  [[TSBackgroundFetch sharedInstance] didFinishLaunching];
 
   self.moduleName = @"xyz.blueskyweb.app";
   return [super application:application didFinishLaunchingWithOptions:launchOptions];
diff --git a/ios/app/Info.plist b/ios/app/Info.plist
index bccc5afa0..dadcb12f4 100644
--- a/ios/app/Info.plist
+++ b/ios/app/Info.plist
@@ -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>com.transistorsoft.fetch</string>
+	</array>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleDisplayName</key>
@@ -54,6 +58,10 @@
 	<string></string>
 	<key>NSPhotoLibraryUsageDescription</key>
 	<string>Used to upload pictures and videos when composing posts, choosing avatars, and so on.</string>
+	<key>UIBackgroundModes</key>
+	<array>
+		<string>fetch</string>
+	</array>
 	<key>UILaunchStoryboardName</key>
 	<string>LaunchScreen</string>
 	<key>UIRequiredDeviceCapabilities</key>