Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all 16907 articles
Browse latest View live

CocoaPods could not find compatible versions for pod "FBSDKCoreKit"

$
0
0

I am having trouble using this library, I followed the instructions with the facebook guide that appears on the readMe and did all the steps.

Before this, I used the react-native-fbsdk library which is now deprecated due to facebook releasing a newer version (0.9) of the SDK. In the instructions here says that you can add the pod that you need in the podfile of ios but when I add them and then pod install I get this error:

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":  In snapshot (Podfile.lock):    FBSDKCoreKit (= 9.0.1, ~> 9.0.1)  In Podfile:    FacebookShare was resolved to 0.1.1, which depends on      FBSDKCoreKit (~> 4.14)react-native-fbsdk-next (from `../node_modules/react-native-fbsdk-next`) was resolved to 4.0.0, which depends on  react-native-fbsdk-next/Core (= 4.0.0) was resolved to 4.0.0, which depends on    FBSDKCoreKit (~> 9.0.1)You have either: * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`. * changed the constraints of dependency `FBSDKCoreKit` inside your development pod `react-native-fbsdk-next`.You should run `pod update FBSDKCoreKit` to apply changes you've made.

Also, with this library you need to modify the appDelegate.m here but when I add that code it says I am missing an import, I know the import missing is FBSDKCoreKit or at least I think it is because the previous SDK used that one. To fix that you need to add the pod but when I add it the error above shows up.I don't know if I need the other library because of that dependency. please help!


Problems with paths of websql package and Ant design font within expo project

$
0
0

I am newbie discovering the workflow of expo framework and I recently found this problem.

The errors in expo metro bundler console.

Failed building JavaScript bundle.Error: While resolving module `@expo/vector-icons/AntDesign`, the Haste package `@expo/vector-icons` was found. However the module `AntDesign` could not be found within the package. Indeed, none of these files exist: * `\my-app\src\Expo\vector-icons\AntDesign(.native|.android.expo.ts|.native.expo.ts|.expo.ts|.android.expo.tsx|.native.expo.tsx|.expo.tsx|.android.expo.js|.native.expo.js|.expo.js|.android.expo.jsx|.native.expo.jsx|.expo.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)`* `\my-app\src\Expo\vector-icons\AntDesign\index(.native|.android.expo.ts|.native.expo.ts|.expo.ts|.android.expo.tsx|.native.expo.tsx|.expo.tsx|.android.expo.js|.native.expo.js|.expo.js|.android.expo.jsx|.native.expo.jsx|.expo.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)`
Failed building JavaScript bundle.While resolving module `@expo/websql/custom`, the Haste package `@expo` was found. However the module `websql/custom` could not be found within the package. Indeed, none of these files exist:* `\my-app\src\Expo\websql\custom(.native|.android.expo.ts|.native.expo.ts|.expo.ts|.android.expo.tsx|.native.expo.tsx|.expo.tsx|.android.expo.js|.native.expo.js|.expo.js|.android.expo.jsx|.native.expo.jsx|.expo.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)`* `\my-app\src\Expo\websql\custom\index(.native|.android.expo.ts|.native.expo.ts|.expo.ts|.android.expo.tsx|.native.expo.tsx|.expo.tsx|.android.expo.js|.native.expo.js|.expo.js|.android.expo.jsx|.native.expo.jsx|.expo.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)`

Both packages are present in node_modules/@expo/ directory, but the project doesn't recognize then. If I take the package websql and the files related to AntDesign from node_modules/ and paste them in src/Expo/ everything works perfect, but I don't understand why I have this problems related to paths within the proyect.

I installed all dependencies with yarn install --network-timeout 100000. And these are my expo diagnostics result:

Expo CLI 4.3.2 environment info:    System:      OS: Windows 10 10.0.19042    Binaries:      Node: 10.16.0 - C:\Program Files\nodejs\node.EXE      Yarn: 1.21.1 - C:\Users\Diego Sevilla\AppData\Roaming\npm\yarn.CMD      npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD    IDEs:      Android Studio: Version  4.1.0.0 AI-201.8743.12.41.6953283    npmPackages:      expo: ^39.0.2 => 39.0.5      react: 16.13.1 => 16.13.1      react-dom: 16.13.1 => 16.13.1      react-native: ^0.63.2 => 0.63.4      react-native-web: ^0.12.0-rc.1 => 0.12.3      react-navigation: ^3.12.0 => 3.13.0    Expo Workflow: bare

The workflow is bare and I am aware that this may be a cause of the problem as well.

Any help will be very appreciated. Thanks.

Getting a filesystem URI from assets in Expo/RN

$
0
0

On iOS, using MediaLibrary.getAssetsAsync() returns assets with assets-library://.... uri.

But a lot of the Expo/ReactNative APIs require a file:// uri, e.g. face detector module and sharing module

To solve this, I ended up just copying the asset using FileSystem.copyAsset() to the apps cache directory. Is there a better way? Why is this necessary?

const localUri = FileSystem.copyAsset(FileSystem.cacheDirectory +'/'+ asset.filename)

How to integrate stripe with react-native expo sdk36 without ejecting?

$
0
0

I am reading:

I want to integrate stripe payment within a react-native app build with expo sdk 36.

My project is not ejected and I would like to keep it so I can still run and debug iOS app without needing apple hardware. (it's for developer experience, but I want to see if there's a way before squeezing that.)

  1. To me, it seems that stripe just need an HTTP client to communicate, while I have fetch, am I correct?
  2. Why exactly do I need to eject, what native library do I need to plug and why the http client is not sufficient?
    • How can I integrate stripe to target all of the platforms (web/ios/native) with the less effort (what library should I get started with to resolve my goal.)

Change the status bar color on iOS

$
0
0

I'm trying to change the statusBar background color, but the property only works on Android. I tried all kinds of examples to try to modify it on iOS, but nothing has worked so far.The last thing I tried is the best answer from this question. Needless to say, it didn't worked either.

I'm currently working on Xcode 12 with the iOS 14 SDK.

Exiting because upload-symbols was run in validation mode

$
0
0

Im trying to add Fabric to my xcode project. I've done so succesfully in the past but now facing issues with a react-native project. Having looked around, i've tried pretty much all combinations suggested out there. My setup looks like so:

enter image description here

I've also tried the Pods version using "${PODS_ROOT}/Fabric/run" however no matter what i do im unable to proceed from the Add Run Script step.

In attempt to try and debug i've directed the output of what the Fabric command produces to a file. It yields the following:

Running upload-symbols in Build Phase mode Validating buildenvironment for Crashlytics... Validation succeeded. Exiting becauseupload-symbols was run in validation mode

Any help much appreciated. Im very unsure as to how to take it from here

ADDITIONAL_INFO:

I've reinstalled the Fabric Mac app from scratch, restarted both xcode,fabric app and the whole system in general. Tried building in release mode and have pretty much tried everything here:

Crashlytics in iOS won't proceed past "Build Your Project" in Fabric app

How to set iOS status bar background color in React Native?

expo-image-picker gives network request failed when i upload an image in ios but it works fine on android

$
0
0

This is the code that i used to upload images on IOS

  let result = await ImagePicker.launchImageLibraryAsync({                    mediaTypes: ImagePicker.MediaTypeOptions.Image,                    allowsEditing: true,                    quality: 1,                });

And in the output i got,

Object {"cancelled": false,"height": 2001,"type": "image","uri": "file:///Users/sajid/Library/Developer/CoreSimulator/Devices/A48F2141-D9AF-457A-9D14-D2F2D4B6336B/data/Containers/Data/Application/803F58D8-0CF9-43CA-8972-599C460687B1/Library/Caches/ExponentExperienceData/%2540sajid_542%252FGoTrillo/ImagePicker/19952322-2D5E-495B-A4AF-427EA23663A6.jpg","width": 3000,}

Till this point it works fine, later when i call fetch on result.uri, it gives me following error on ios ,

const response = await fetch(result.uri);

Output Error: TypeError: Network request failed

This Error is not beinng raise on Android where as in IOS its giving this error when i use the above functions for the second time.Someone please sugggest a fix for this issue.


React native 0.63.4 ios 14 no static images

$
0
0

I try to build a release with Xcode 12.4 (12D4e) and react native 0.63.4 and local images are not shown but url images are.

I found many topics and solutions about that but nothing work, i'm stuck for 3 days.

  • I have this warning for each images of my project:

    [framework] CUICatalog: Invalid asset name supplied: '(null)'

  • My main.jsbundle and assets folder are in the same folder and listed in Xcode -> Build phases -> Copy Bundle Ressources

  • The bug with RCTUIImageViewAnimated.m on ios 14 is supposed to be resolved due to my react native version > 0.62.2 (i checked the file too and everythings ok)

  • I tried

    <Image source={{ uri: Image.resolveAssetSource(Logo)}}

But i'm unable to correctly build a release on real device, simulator or archiving it on testflight. Debug mode is working fine. What i'm missing ??

React Native 0.64 won't build iOS app after updating Xcode to 12.5 and iOS to 14.5

$
0
0

After upgrading Xcode to 12.5 and iOS to 14.5, I can't run the iOS app on a real device nor in the simulator.

After running npm run ios, I get this message:

The following build commands failed:        CompileC .../Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/DistributedMutex.o /Users/guilherme/Documents/Dood/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

If I try to run the app on a real device using Xcode, this is the error I get (related to Flipper-Folly):

.../ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one<unsigned long>' is unavailable

Ideas? Thanks!

UPDATE:

React native has been updated to 0.64.1. You can now just change your react-native dependency to this version within your package.json file, then run npm install

Is FCM token refreshed on OS update?

$
0
0

We are integrating firebase in one of our mobile app. This is our doubt 'Is FCM token refreshed on OS update?', we know about these scenarios:

The registration token may change when:

  1. The app is restored on a new device
  2. The user uninstalls/reinstall the app
  3. The user clears app data.

iOS App Icon keeping square and not rounded corners

$
0
0

I am building a react native iOS app using expo. Here is the top part of App.json

{"expo": {"name": "CORT","icon": "./assets/icon.png",

As per the Apple documentation, i.e.

https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/

Keep icon corners square. The system applies a mask that rounds icon corners automatically.

I am keeping square icon. However when I build and publish icon to App store it shows square icon within a rounded cornered gray box everywhere. See https://www.dropbox.com/s/iee0we9ktr0tjvg/CortSqureLogoAtAppStoreReview.jpg?dl=0

Also the the App Store Installation page https://www.dropbox.com/s/yoeb2q7cy4rjggh/Skype_Picture_2021_05_13T05_59_20_238Z.jpeg?dl=0

It does not let the app build if I try a manual rounded cornered square icon. the expo build:ios fails with:

Your app icon can't have transparency if you wish to upload your app Apple's App Store. Read more here: https://expo.fyi/remove-alpha-channel

I am not sure what wrong I am doing. An help is appreciated!

User uploaded FontFamily for React-native App

$
0
0

I am working on a react-native project, in which I have to implement a functionality in which user can set a custom theme for the app, the theme includes Theme color, font color and font family. The problem I'm facing right now is that the requirement for font family is that user can upload a custom font family from the application that will implemented throughout the application. I have searched about it but i haven't been able to find anything about how I can take a font family that user uploads and link it with my assets and then use it in my application.

expo-notifications - Error encountered while updating the device push token with the server

$
0
0

I'm using Expo's bare-workflow for my react-native project. I'm using expo's push notification service. I keep getting the following error whenever I try to get my expo push token:

[expo-notifications] Error encountered while updating the device push token with the server: {"error":"invalid_token","error_description":"The bearer token is invalid"}

I'm running the app directly on my device so should be able to get notifications.

I'm using basically the same registerForPushNotificationsAsync() that is provided in the documentation.

import Constants from 'expo-constants';import * as Notifications from 'expo-notifications';import { Platform } from 'react-native';export const registerForPushNotificationsAsync = async () => {  try {    if (Constants.isDevice) {      const experienceId = '@{username}/{slug}';      const {        status: existingStatus      } = await Notifications.getPermissionsAsync();      let finalStatus = existingStatus;      if (existingStatus !== 'granted') {        const { status } = await Notifications.requestPermissionsAsync();        finalStatus = status;      }      if (finalStatus !== 'granted') {        alert('Failed to get push token for push notification!');        return;      }      const token = (        await Notifications.getExpoPushTokenAsync({ experienceId })      ).data;      console.log('🏷🏷   Token :', token);      return token;    } else {      alert('Must use physical device for Push Notifications');    }    if (Platform.OS === 'android') {      Notifications.setNotificationChannelAsync('default', {        name: 'default',        importance: Notifications.AndroidImportance.MAX,        vibrationPattern: [0, 250, 250, 250],        lightColor: '#FF231F7C'      });    }    return undefined;  } catch (error) {    console.error('Error in registerForPushNotificationsAsync()', error);    return undefined;  }};

I can't see anything about setting a bearer token, so I'm unsure what it could be after or where to even set it assuming I was able to determine what bearer token it is after.

Does anyone know what might be causing the problem?

Fastlane lane uploading application to testflight

$
0
0

I am trying to build an ios application and upload it to Testflight using Fastlane but I'm getting these errors. appName is the name of my application.

[04:32:03]: $ set -o pipefail && xcodebuild -workspace ./appName.xcworkspace -scheme appName -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2020-05-01/appName\ 2020-05-01\ 04.32.03.xcarchive archive | tee /Users/distiller/Library/Logs/gym/appName-appName.log | xcpretty[04:32:05]: ▸❌  error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')[04:32:05]: ▸❌  error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')[04:32:05]: ▸❌  error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')[04:32:05]: ▸❌  error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')[04:32:05]: ▸ ** ARCHIVE FAILED **❌  error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')❌  error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')❌  error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')❌  error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')** ARCHIVE FAILED **[04:32:05]: Exit status: 65[04:32:05]: [04:32:05]: Maybe the error shown is caused by using the wrong version of Xcode[04:32:05]: Found multiple versions of Xcode in '/Applications/'[04:32:05]: Make sure you selected the right version for your project[04:32:05]: This build process was executed using '/Applications/Xcode-10.1.app'[04:32:05]: If you want to update your Xcode path, either[04:32:05]: [04:32:05]: - Specify the Xcode version in your Fastfile[04:32:05]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0[04:32:05]: [04:32:05]: - Specify an absolute path to your Xcode installation in your Fastfile[04:32:05]: ▸ xcode_select "/Applications/Xcode8.app"[04:32:05]: [04:32:05]: - Manually update the path using[04:32:05]: ▸ sudo xcode-select -s /Applications/Xcode.app[04:32:05]: +---------------+------------------------------+|              Build environment               |+---------------+------------------------------+| xcode_path    | /Applications/Xcode-10.1.app || gym_version   | 2.146.1                      || export_method | app-store                    || sdk           | iPhoneOS12.1.sdk             |+---------------+------------------------------+[04:32:05]: ▸ Build system information[04:32:05]: ▸ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')[04:32:05]: ▸ Build system information[04:32:05]: ▸ error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')[04:32:05]: [04:32:05]: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error[04:32:05]: 📋  For the complete and more detailed error log, check the full log at:[04:32:05]: 📋  /Users/distiller/Library/Logs/gym/appName-appName.log[04:32:05]: [04:32:05]: Looks like fastlane ran into a build/archive error with your project[04:32:05]: It's hard to tell what's causing the error, so we wrote some guides on how[04:32:05]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/[04:32:05]: Before submitting an issue on GitHub, please follow the guide above and make[04:32:05]: sure your project is set up correctly.[04:32:05]: fastlane uses `xcodebuild` commands to generate your binary, you can see the[04:32:05]: the full commands printed out in yellow in the above log.[04:32:05]: Make sure to inspect the output above, as usually you'll find more error information there

Xcode build error when building onto device - Library not found for -lDoubleConversion

$
0
0

So my app has run and built successfully on the Xcode simulators. The app is a react native app

However when trying to put it onto a device I get the error.

What steps do I need to take to get this to work?

Library not found for -lDoubleConversionenter image description hereenter image description here

Issue building react native project in Xcode - error: could not find auto linked libraries + undefined symbols etc

$
0
0

I am trying to get a react native app running on my new Mac mini m1.

First time trying to get everything set up. So far it's been quite painful.

The error occurs when building in Xcode. Initially I had some other errors in Xcode which were resolved by editing the flipper version in the Podfile.

Now I have a list of unlinked libraries and undefined symbols in swift

enter image description here

My searches did suggest that adding an empty swift file might help but it hasn't made a difference

enter image description here

Any idea on what I can try next?

React Native Firebase Push Notification Crash Report Problem

$
0
0

I am building an app with React Native. With React Native Firebase, I am adding push notification functionality. When I open a push notification from quit state, the app opens and hangs at the splash screen for a while, and then crashes.

Here is the crash report from the device, symbolicated. Honestly, I am new to programming and so I am having trouble in interpreting below report. I assume that there is a problem with RNSplashScreen module or AppDelegate.m, but can't be sure.

Can anyone help me out in interpreting this and point me to what might be a root cause/where to look at?

Thanks!

    Exception Type:  EXC_CRASH (SIGKILL)    Exception Codes: 0x0000000000000000, 0x0000000000000000    Exception Note:  EXC_CORPSE_NOTIFY    Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d    Termination Description: SPRINGBOARD, <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-create watchdog transgression: application<myapp.myapp>:2661 exhausted real (wall clock) time allowance of 59.91 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Background | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 16.580 (user 16.580, system 0.000), 5% CPU", | "Elapsed application CPU time (seconds): 0.918, 0% CPU" | ) reportType:CrashLog maxTerminationResistance:Interactive>    Triggered by Thread:  0    Thread 0 name:  Dispatch queue: com.apple.main-thread    Thread 0 Crashed:    0   libsystem_kernel.dylib          0x00000001daebe2d0 mach_msg_trap + 8    1   libsystem_kernel.dylib          0x00000001daebd660 mach_msg + 76    2   CoreFoundation                  0x00000001acf08c30 __CFRunLoopServiceMachPort + 380    3   CoreFoundation                  0x00000001acf02c14 __CFRunLoopRun + 1216    4   CoreFoundation                  0x00000001acf0221c CFRunLoopRunSpecific + 600    5   Foundation                      0x00000001ae1b1df0 -[NSRunLoop+ 36336 (NSRunLoop) runMode:beforeDate:] + 232    6   Foundation                      0x00000001ae1b1cbc -[NSRunLoop+ 36028 (NSRunLoop) runUntilDate:] + 92    7   myapp                           0x00000001005d15f0 +[RNSplashScreen show] (in myapp) (RNSplashScreen.m:31) + 5641712    8   myapp                           0x0000000100075be4 -[AppDelegate application:didFinishLaunchingWithOptions:] (in myapp) (AppDelegate.m:53) + 23524    9   UIKitCore                       0x00000001af93f228 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 360    10  UIKitCore                       0x00000001af941290 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 5136    11  UIKitCore                       0x00000001af946cec -[UIApplication _runWithMainScene:transitionContext:completion:] + 1244    12  UIKitCore                       0x00000001aef9cc74 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 152    13  UIKitCore                       0x00000001af50af9c _UIScenePerformActionsWithLifecycleActionMask + 112    14  UIKitCore                       0x00000001aef9d80c __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224    15  UIKitCore                       0x00000001aef9d2cc -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 484    16  UIKitCore                       0x00000001aef9d61c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 768    17  UIKitCore                       0x00000001aef9ce58 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340    18  UIKitCore                       0x00000001aefa53a4 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 196    19  UIKitCore                       0x00000001af41760c +[BSAnimationSettings+ 6936076 (UIKit) tryAnimatingWithSettings:actions:completion:] + 892    20  UIKitCore                       0x00000001af5236c4 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 272    21  UIKitCore                       0x00000001aefa509c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384    22  UIKitCore                       0x00000001aedcc5a0 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 776    23  UIKitCore                       0x00000001aedcaf14 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256    24  UIKitCore                       0x00000001aedcc1c8 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 248    25  UIKitCore                       0x00000001af944e8c -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 572    26  UIKitCore                       0x00000001af440e38 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 388    27  FrontBoardServices              0x00000001bccf83bc -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 432    28  FrontBoardServices              0x00000001bcd23d04 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.200 + 128    29  FrontBoardServices              0x00000001bcd074a0 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240    30  FrontBoardServices              0x00000001bcd239c8 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 372    31  libdispatch.dylib               0x00000001acb81db0 _dispatch_client_callout + 20    32  libdispatch.dylib               0x00000001acb85738 _dispatch_block_invoke_direct + 268    33  FrontBoardServices              0x00000001bcd4c250 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48    34  FrontBoardServices              0x00000001bcd4bee0 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448    35  FrontBoardServices              0x00000001bcd4c434 -[FBSSerialQueue _performNextFromRunLoopSource] + 32    36  CoreFoundation                  0x00000001acf0976c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28    37  CoreFoundation                  0x00000001acf09668 __CFRunLoopDoSource0 + 208    38  CoreFoundation                  0x00000001acf08960 __CFRunLoopDoSources0 + 268    39  CoreFoundation                  0x00000001acf02a8c __CFRunLoopRun + 824    40  CoreFoundation                  0x00000001acf0221c CFRunLoopRunSpecific + 600    41  GraphicsServices                0x00000001c4ace784 GSEventRunModal + 164    42  UIKitCore                       0x00000001af942ee8 -[UIApplication _run] + 1072    43  UIKitCore                       0x00000001af94875c UIApplicationMain + 168    44  myapp                       0x0000000100075db4 main (in myapp) (main.m:7) + 23988    45  libdyld.dylib                   0x00000001acbc26b0 start + 4

How to receive notifications from Firebase Cloud Messaging in React Native

$
0
0

I have a react native project and want to be able to receive notification from FCM. I have set up the project ( generated a google-services.json file for my project, modified the build.gradle files accordingly etc ) but so far I haven't been able to run the project. I am using React Native Firebase library https://rnfirebase.io/ but the experience is just not good so far. I've been stumbling from error to error like the one below:

Error: You attempted to use a firebase module that's not installed on your Android project by calling firebase.app().Ensure you have:1) imported the 'io.invertase.firebase.app.ReactNativeFirebaseAppPackage' module in your 'MainApplication.java' file. 2) Added the 'new ReactNativeFirebaseAppPackage()' line inside of the RN 'getPackages()' method list.

I'm just done trying to get the tooling to work. Can you tell me what other approach I can take to get firebase notifications to work for a React Native project that doesn't make use of the library above ?

How to set force device orientation based on device type in React Native?

Viewing all 16907 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>