Open daamsie opened 2 weeks ago
Post your Info.plist
Here we go.. interestingly, it does actually seem to be working in real use - after a day or so it starts doing the background fetches. I'd still like to be able to perform the simulated events though for my own sanity.
<?xml version="1.0" encoding="UTF-8"?>
<!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.losttravel.tracker</string>
<string>com.transistorsoft.fetch</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Wayward</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>io.Branch.Wayward</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.losttravel.tracker</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>684</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
<string/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>Wayward needs access to your Camera</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>In order to reliably track your adventures, Wayward requires location settings to be set to “Always”.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>To track your adventures</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Select photos from your library</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Select photos from your library</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>location</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.losttravel.tracker</string>
<string>com.transistorsoft.fetch</string>
</array>
What is this identifier for <string>com.losttravel.tracker</string>
?
This is the identifier of the app itself. We also do background location tracking and I believe that is why that was added in there. Though looking at it now, I'm not entirely certain it's needed.
We also do background location tracking
what has it to do with background location tracking? I’ve been managing a background location tracking plug-in for over 10 years and BGTaskSchedulerPermittedIdentifiers
has nothing to do with background location tracking.
Like I said, I'm not certain it's needed. We use Radar for iOS location tracking. They also do some syncing (which we're not using), so maybe that's how it got in there? Or maybe (probably more likely) it's just something dumb I added in at some point to try and get things working.
If having multiple identifiers in that array makes it impossible to fire the simulated event as above, I can try removing it.
How much do you pay for Radar? They have a whole page comparing themselves to my plug-in.
Nothing. We don't use any of their paid features.
Tim Hortons, a Canadian cafe chain, was found to have violated privacy laws with their app using Radar.
a contract with a U.S.-based third-party location services supplier contained language “so vague and permissive” that it left the door open for this company to sell the location data for its own purposes..
Though not named in the investigation, the app was developed with assistance from Radar Labs. Tim Hortons removed Radar Labs’ technology from the app in 2020.
We're not syncing the tracking data to Radar, which is why it doesn't cost anything. They don't have any user data to share with third parties.
I tried removing the seemingly redundant identifier. Simulating events still does nothing.
I suggest you create for yourself a simple HelloWorld app and test in isolation
Ok. Thanks for reviewing the issue. Knowing that it works now if just let run for a day, I'm not sure how much more debugging I can justify doing to find out why the simulated event doesn't work, but I'll keep that in mind as the next thing to try.
Your Environment
react-native -v
): 0.74.3Expected Behavior
I expect to see an event logged when I run the simulated task in XCode as described in the ReadMe
Actual Behavior
Nothing happens
Steps to Reproduce
I have the following function that initialises the background fetch. Very similar to the sample code.
When running app, it successfully logs the following lines:
[TSBackgroundFetch scheduleBGAppRefresh] com.transistorsoft.fetch
[BackgroundFetch] configure status is STATUS_AVAILABLE
I pause execution in xcode, then paste in the command to trigger an event
e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.transistorsoft.fetch"]
I restart execution.
Nothing happens.
What I'm expecting is this to log something
console.log('[BackgroundFetch] task: ', taskId);
Context
I have tried installing the example app as a sanity check and got simulated events firing just fine there.
Really stumped and hoping there is something else I can try to get this going. Am I misunderstanding what should be happening here?
Debug logs