Closed socheatleang closed 5 months ago
You say you've followed the instructions but not provided any proof.
Where is your config file?
@christocracy . The issue updated with the config file.
Since you're building this locally, post your Info.plist
.
@christocracy Here is our info.plist
<?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>
<string>co.tryterra.data.post.request</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>xxxx</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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>0.5.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.xxx</string>
</array>
</dict>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>exp+defit</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>GMSApiKey</key>
<string>xxxx</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>huobiwallet</string>
<string>bitkeep</string>
<string>ledgerlive</string>
<string>cryptowallet</string>
<string>metamask</string>
<string>trust</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSCameraUsageDescription</key>
<string>X would like to access your camera for your profile photo upload. Your photos won't be shared without your permission.</string>
<key>NSHealthShareUsageDescription</key>
<string>undefined would like to access your Health Records in order to improve wellness.</string>
<key>NSHealthUpdateUsageDescription</key>
<string>undefined would like to update your Health Records in order to improve wellness.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>The X App requires location in the background</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need to access your location to locate you on the map if you need to</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your microphone</string>
<key>NSMotionUsageDescription</key>
<string>The X App uses motion-detection to determine the motion-activity of the device (walking, vehicle, bicycle, etc)</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>APP would like to access your photo gallery for your profile photo upload. Your photos won't be shared without your permission.</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
<string>fetch</string>
<string>processing</string>
<string>audio</string>
</array>
<key>UILaunchStoryboardName</key>
<string>SplashScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
Compare your BGTaskSchedulerPermittedIdentifiers
in your expo config:
BGTaskSchedulerPermittedIdentifiers: [
'com.transistorsoft.fetch',
'com.transistorsoft.customtask',
],
vs that declared in your Info.plist
(invalid):
<key>BGTaskSchedulerPermittedIdentifiers</key>
<string>co.tryterra.data.post.request</string>
The BGTaskSchedulerPermittedIdentifiers
item is required to be of type <array>
(as documented by Apple), for example:
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.transistorsoft.fetch</string>
<string>com.transistorsoft.customtask</string>
</array>
That's why the compiler emits an error "NSInvalidArgumentException
" -- it's trying to consume an <array>
while you're providing it a <string>
I have followed the install expo instruction. Everything works as expected for the android. However it always crash for the iOS on runtime (I got the build successfully).
Your Environment
react-native -v
): 0.71.14Expected Behavior
It supposes to get running as normal like android.
Actual Behavior
It crash on runtime. I got the successfully build with the
eas build
. Yet after installed the app then I get crash when the app open. So I jump in to debug the native with thenpx expo prebuild
. Then I realize that I need to comment the[[TSBackgroundFetch sharedInstance] didFinishLaunching];
out from the AppDelegate.mm in order to get it run without crashing.Steps to Reproduce
1. 2. 3. 4.
Context
I have tried to switch different version of
react-native-backgorund-fetch
but it stills.Debug logs [I run it from xcode after do
npx expo prebuild
]Config file