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

How to resolve "Animated: `useNativeDriver` is not supported because the native animated module is missing." in react-navigation?

$
0
0

I am working on expo SDK Version: 36, and on all platforms (ios/android/web)

When installing react-navigation for the first time as described in the documentation and running jest --watch while doing it, and the following warning appeared:

    console.warn node_modules/react-native/Libraries/YellowBox/YellowBox.js:71      Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. More info: https://github.com/facebook/react-native/issues/11094#issuecomment-263240420

It also happen in the browser console:

bundle.js:18272 Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. More info: https://github.com/facebook/react-native/issues/11094#issuecomment-263240420     in Card (at CardContainer.tsx:132)    in CardContainer (at CardStack.tsx:499)    in CardStack (at StackView.tsx:384)    in KeyboardManager (at StackView.tsx:382)    in Context.Consumer (at StackView.tsx:380)    in StackView (at StackView.tsx:41)    in StackView (at createStackNavigator.tsx:33)    in Anonymous (at createNavigator.js:80)    in Navigator (at createAppContainer.js:351)    in NavigationContainer (at AppCore.js:15)    in AppCore (at App.js:14)    in App (at withExpoRoot.web.js:13)    in ExpoRootComponent (at registerRootComponent.web.js:6)    in RootComponentwarn @ bundle.js:18272r @ backend.js:6shouldUseNativeDriver @ bundle.js:76326TimingAnimation @ bundle.js:76894start @ bundle.js:75709start @ bundle.js:75715Card._this.animate @ bundle.js:85843componentDidMount @ bundle.js:85980commitLifeCycles @ bundle.js:52243commitLayoutEffects @ bundle.js:55486callCallback @ bundle.js:30478invokeGuardedCallbackDev @ bundle.js:30527invokeGuardedCallback @ bundle.js:30582commitRootImpl @ bundle.js:55224unstable_runWithPriority @ bundle.js:92068runWithPriority$2 @ bundle.js:42291commitRoot @ bundle.js:55064finishSyncRender @ bundle.js:54471performSyncWorkOnRoot @ bundle.js:54449(anonymous) @ bundle.js:42341unstable_runWithPriority @ bundle.js:92068runWithPriority$2 @ bundle.js:42291flushSyncCallbackQueueImpl @ bundle.js:42336flushSyncCallbackQueue @ bundle.js:42324scheduleUpdateOnFiber @ bundle.js:53851enqueueSetState @ bundle.js:44136../../../react/cjs/react.development.js.Component.setState @ bundle.js:88125_callee2$ @ bundle.js:1353tryCatch @ bundle.js:90193invoke @ bundle.js:90419prototype.<computed> @ bundle.js:90245tryCatch @ bundle.js:90193invoke @ bundle.js:90283(anonymous) @ bundle.js:90293Promise.then (async)invoke @ bundle.js:90292(anonymous) @ bundle.js:90293Promise.then (async)invoke @ bundle.js:90292(anonymous) @ bundle.js:90318callInvokeWithMethodAndArg @ bundle.js:90317enqueue @ bundle.js:90340prototype.<computed> @ bundle.js:90245../../../regenerator-runtime/runtime.js.exports.async @ bundle.js:90364_callee2 @ bundle.js:1324SplashScreen @ bundle.js:1537constructClassInstance @ bundle.js:44346updateClassComponent @ bundle.js:48555beginWork$1 @ bundle.js:50328beginWork$$1 @ bundle.js:55898performUnitOfWork @ bundle.js:54837workLoopSync @ bundle.js:54813performSyncWorkOnRoot @ bundle.js:54412(anonymous) @ bundle.js:42341unstable_runWithPriority @ bundle.js:92068runWithPriority$2 @ bundle.js:42291flushSyncCallbackQueueImpl @ bundle.js:42336flushSyncCallbackQueue @ bundle.js:42324scheduleUpdateOnFiber @ bundle.js:53851enqueueSetState @ bundle.js:44136../../../react/cjs/react.development.js.Component.setState @ bundle.js:88125onFinish @ bundle.js:1392_callee$ @ bundle.js:18446tryCatch @ bundle.js:90193invoke @ bundle.js:90419prototype.<computed> @ bundle.js:90245tryCatch @ bundle.js:90193invoke @ bundle.js:90283(anonymous) @ bundle.js:90293Promise.then (async)invoke @ bundle.js:90292(anonymous) @ bundle.js:90318callInvokeWithMethodAndArg @ bundle.js:90317enqueue @ bundle.js:90340prototype.<computed> @ bundle.js:90245../../../regenerator-runtime/runtime.js.exports.async @ bundle.js:90364_callee @ bundle.js:18389componentDidMount @ bundle.js:18470commitLifeCycles @ bundle.js:52243commitLayoutEffects @ bundle.js:55486callCallback @ bundle.js:30478invokeGuardedCallbackDev @ bundle.js:30527invokeGuardedCallback @ bundle.js:30582commitRootImpl @ bundle.js:55224unstable_runWithPriority @ bundle.js:92068runWithPriority$2 @ bundle.js:42291commitRoot @ bundle.js:55064finishSyncRender @ bundle.js:54471performSyncWorkOnRoot @ bundle.js:54449scheduleUpdateOnFiber @ bundle.js:53840updateContainer @ bundle.js:57245(anonymous) @ bundle.js:57670unbatchedUpdates @ bundle.js:54575legacyRenderSubtreeIntoContainer @ bundle.js:57669render @ bundle.js:57750renderApplication @ bundle.js:65334run @ bundle.js:65227runApplication @ bundle.js:65266registerRootComponent @ bundle.js:18777../../../expo/AppEntry.js @ bundle.js:14474__webpack_require__ @ bundle.js:727fn @ index.js:690 @ bundle.js:101987__webpack_require__ @ bundle.js:727(anonymous) @ bundle.js:794(anonymous) @ bundle.js:797Show 40 more frames[Violation] 'requestAnimationFrame'

Related issues:

The last one offers a solution, but it says to open Xcode, while I am on Linux Debian 10. I do not have Xcode. I can use a Macbook and do the step but I am wondering:

  • Should I care when working on Linux?
  • Should I care when working on Macbook (if it happens)?
  • Should I care for the health of my app while testing? Under which circumstances?

Frameworks error "normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler"

$
0
0

parse errorerror sectionsCheck errorsThe following build commands failed: CompileC /Users////Xcode/DerivedData/project-cjnpkxskhmofvscoog9qaznbuqhvs/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/DoubleConversion.build/Objects-normal/arm64/DoubleConversion-dummy.o /Users////IO-iOS/ios/Pods/Target\ Support\ Files/DoubleConversion/DoubleConversion-dummy.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler(1 failure)

Tried

  • npm install
  • pod install
  • react-native run-ios runs the application in the simulator without error.
  • react-native run-ios --device "name of device" gives me errors

Failed every time, please help

No known class method for selector error in firebase.h file when run ios build

$
0
0

No known class method for selector 'credentialWithProviderID:IDToken:rawNonce:'

try every solutions pod update,pod install , cocopods update & install, pod repo update but same error....

how to convert react.js web app to react native mobile app?

$
0
0

I have a react.js web app I need to convert to the mobile app, Is there any way to do that? I have tried to search for a solution but I did not find anything that can helpThanks.

Override Mapbox UIVIew IOS in objective C

$
0
0

I'm trying to override a UIView in Mapbox. But unfortunately the examples are all showing the override to be done only in the viewDidLoad event. I'm struggling to understand how this works. I'm using react native actually but I need to update something(annotation marker) but it can only be done natively.

I thought of updating the UIVIew only but if i need to include the UIViewController, how can i include that? I just don't understand how that would work. Any help would be great!!!!

Generate "out of view" markers indicators on a map with React Native

$
0
0

For a project, I have to indicate, with colored arrows, in which direction are the markers that aren't shown in the visible region.

When the user scrolls, or zoom on the map, the arrows move accordingly to where the not visible markers are compared to the current center of the visible region.

Here is a picture that demonstrate what is needed :

enter image description here

I am using react-native-mapview and added regular views over the map to show the indicators.

I've started working on this by comparing the coordinates and calculating the point of intersection between lines (border lines and line made by the 2 coordinates) at each frame. It works fine on iOS but is pretty laggy on Android, especially chan there are a lot of markers involved.

What would be the best and optimized way to do this ?

How to test Firebase Dynamic Link with TestFlight (Unpublished ios app)

$
0
0

Developing a small app in react native for both android and ios, where I need to open my app by clicking on a firebase dynamic link.

This app is not published yet in AppStore, right now it is in TestFlight environment. I never have any experience in ios so don't know how to check the dynamic link with TestFlight.

In the Android Beta Environment, it is working very well. I am able to redirect in play store if the app is not already installed. If installed then the app opens itself.

The same scenario I want to test in ios before publishing to AppStore. Currently, it is in TestFlight Environment and unable to redirect if the app is not installed.

I have gone through some post but no luck yet, posts are:

How can I test Firebase Dynamic Links if my app is not in the App Store?

Test Firebase Dynamic Links for Unpublished App

Can anyone please suggest how I can test with TestFlight or is there any other possible way to check my dynamic link working fine or not?

Universal DeepLink on iOS doesn't work through web navigator but works for basic click

$
0
0

I've a problem with deeplink on iOS. Here is the case : I've a web page with a classic button using an universal link such as https://my-app/routeA/params.

If the user directly clicked on this link through mail, note, message the deeplink to my mobile app is working. However, if he clicked with the button (on the web page), through safari or chrome, the deeplink doesn't work.

By the way, the deeplink works well on Android when the user click on the button (within the web page).

So it seems to be a problem with web navigator on iOS. Any ideas what's wrong here ?


How to dynamically load apps like Expo client

$
0
0

Is it possible to load "sub-apps" inside a mobile application? The way like Expo client does that - you start a "parent" app and inside that you dynamically load other apps.

Requirements:

  • Parent app downloadable from the store.
  • Sub-apps not published in the store
  • Sub-apps always up to date - possibility to update them independently on the parent app.
  • Android and iOS compatible

No known class method for selector error in RNFirebaseAuth.m file when run ios build

$
0
0

No known class method for selector 'credentialWithProviderID:IDToken:rawNonce:'

try every solutions pod update,pod install , cocopods update & install, pod repo update but same error....

AppCenter react native ios build fails "usr/bin/xcodebuild failed with return code: 65 "

$
0
0

** ARCHIVE FAILED **

when i try build react-native IOS on the Appcenter The error appears in these 2 files main.jsbundle and assets. Works fine on local computer (emulator and physical device)

The following build commands failed:CpResource /Users/runner/runners/2.169.1/work/1/s/ios/main.jsbundle /Users/runner/Library/Developer/Xcode/DerivedData/[APPNAME]-adrecrevrfgahhfyzlogcbrpednj/Build/Intermediates.noindex/ArchiveIntermediates/[APPNAME]/InstallationBuildProductsLocation/Applications/DGFonder.app/main.jsbundle CpResource /Users/runner/runners/2.169.1/work/1/s/ios/assets /Users/runner/Library/Developer/Xcode/DerivedData/[APPNAME]-adrecrevrfgahhfyzlogcbrpednj/Build/Intermediates.noindex/ArchiveIntermediates/DGFonder/InstallationBuildProductsLocation/Applications/[APPNAME].app/assets (2 failures)[error]Error: /usr/bin/xcodebuild failed with return code: 65 [section]Finishing: Xcode build (signed) [section]Starting: Xcode build (signed)

When i try enable to "Legacy Build System" I no longer receive this error. But I get another error like

**ld: library not found for -lBVLinearGradient**ld: warning: directory not found for option '-L-L/Users/runner/Library/Developer/Xcode/DerivedData/DGFonder-adrecrevrfgahhfyzlogcbrpednj/Build/Intermediates.noindex/ArchiveIntermediates/DGFonder/BuildProductsPath/Release-iphoneos/BVLinearGradient'clang: error: linker command failed with exit code 1 (use -v to see invocation)`

System:

Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2OS: macOS 10.15.3CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHzMemory: 59.17 MB / 16.00 GBShell: 5.7.1 - /bin/zshBinaries:Node: 14.2.0 - /usr/local/bin/nodeYarn: Not Foundnpm: 6.14.4 - /usr/local/bin/npmWatchman: 4.9.0 - /usr/local/bin/watchmanManagers:CocoaPods: 1.9.1 - /usr/local/bin/podSDKs:iOS SDK:Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2Android SDK: Not FoundIDEs:Android Studio: 3.6 AI-192.7142.36.36.6241897Xcode: 11.4.1/11E503a - /usr/bin/xcodebuildLanguages:Java: 1.8.0_242 - /usr/bin/javacPython: 2.7.16 - /usr/bin/pythonnpmPackages:@react-native-community/cli: Not Foundreact: ^16.13.1 => 16.13.1react-native: ^0.62.2 => 0.62.2npmGlobalPackages: pod --version. 1.9.1

react native nodejs window closes after cmd react-native run-android

$
0
0

I am a beginner in react-native. When I am running the command react-native run-android, the Node.js window opens for a while and then closes immediately. Please do help me.

How can I add Confirm and Cancel buttons for Native Base Datepicker

Is there a workaround for keeping the flash on when recording starts? (iOS + Expo/Expo-camera)

$
0
0

My app needs the flash to stay on when recording a video. I'm using expo to develop and test for react-native on both Android and iOS. Android works as expected, but on iOS, setting the flashMode to 'torch' still turns off the flash when recordAsync is called. I've tried using other modules for the torch/flash function, but none work at the same time as the camera.

react-native Task :app:multiDexListDebug FAILED

$
0
0

I have installed react-native-firebase package using yarn. I've setup the code in the build.gradle, settings.gradle as well as the AndroidManifest as well. Added multiDexEnabled as true and also added the implementation line in the code, but it is still not working.

build.gradle (App Level)

apply plugin: "com.android.application"import com.android.build.OutputFile/** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets * and bundleReleaseJsAndAssets). * These basically call `react-native bundle` with the correct arguments during the Android build * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the * bundle directly from the development server. Below you can see all the possible configurations * and their defaults. If you decide to add a configuration block, make sure to add it before the * `apply from: "../../node_modules/react-native/react.gradle"` line. * * project.ext.react = [ *   // the name of the generated asset file containing your JS bundle *   bundleAssetName: "index.android.bundle", * *   // the entry file for bundle generation. If none specified and *   // "index.android.js" exists, it will be used. Otherwise "index.js" is *   // default. Can be overridden with ENTRY_FILE environment variable. *   entryFile: "index.android.js", * *   // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format *   bundleCommand: "ram-bundle", * *   // whether to bundle JS and assets in debug mode *   bundleInDebug: false, * *   // whether to bundle JS and assets in release mode *   bundleInRelease: true, * *   // whether to bundle JS and assets in another build variant (if configured). *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants *   // The configuration property can be in the following formats *   //         'bundleIn${productFlavor}${buildType}' *   //         'bundleIn${buildType}' *   // bundleInFreeDebug: true, *   // bundleInPaidRelease: true, *   // bundleInBeta: true, * *   // whether to disable dev mode in custom build variants (by default only disabled in release) *   // for example: to disable dev mode in the staging build type (if configured) *   devDisabledInStaging: true, *   // The configuration property can be in the following formats *   //         'devDisabledIn${productFlavor}${buildType}' *   //         'devDisabledIn${buildType}' * *   // the root of your project, i.e. where "package.json" lives *   root: "../../", * *   // where to put the JS bundle asset in debug mode *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug", * *   // where to put the JS bundle asset in release mode *   jsBundleDirRelease: "$buildDir/intermediates/assets/release", * *   // where to put drawable resources / React Native assets, e.g. the ones you use via *   // require('./image.png')), in debug mode *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", * *   // where to put drawable resources / React Native assets, e.g. the ones you use via *   // require('./image.png')), in release mode *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release", * *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to *   // date; if you have any other folders that you want to ignore for performance reasons (gradle *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ *   // for example, you might want to remove it from here. *   inputExcludes: ["android/**", "ios/**"], * *   // override which node gets called and with what additional arguments *   nodeExecutableAndArgs: ["node"], * *   // supply additional arguments to the packager *   extraPackagerArgs: [] * ] */project.ext.react = [    enableHermes: false,  // clean and rebuild if changing]apply from: "../../node_modules/react-native/react.gradle"/** * Set this to true to create two separate APKs instead of one: *   - An APK that only works on ARM devices *   - An APK that only works on x86 devices * The advantage is the size of the APK is reduced by about 4MB. * Upload all the APKs to the Play Store and people will download * the correct one based on the CPU architecture of their device. */def enableSeparateBuildPerCPUArchitecture = false/** * Run Proguard to shrink the Java bytecode in release builds. */def enableProguardInReleaseBuilds = false/** * The preferred build flavor of JavaScriptCore. * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US.  Note that * this variant is about 6MiB larger per architecture than default. */def jscFlavor = 'org.webkit:android-jsc:+'/** * Whether to enable the Hermes VM. * * This should be set on project.ext.react and mirrored here.  If it is not set * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */def enableHermes = project.ext.react.get("enableHermes", false);android {    compileSdkVersion rootProject.ext.compileSdkVersion    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }    defaultConfig {        applicationId "com.safetravel_100"        minSdkVersion rootProject.ext.minSdkVersion        targetSdkVersion rootProject.ext.targetSdkVersion        versionCode 1        versionName "1.0"        multiDexEnabled true    }    splits {        abi {            reset()            enable enableSeparateBuildPerCPUArchitecture            universalApk false  // If true, also generate a universal APK            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"        }    }    signingConfigs {        debug {            storeFile file('debug.keystore')            storePassword 'android'            keyAlias 'androiddebugkey'            keyPassword 'android'        }    }    buildTypes {        debug {            signingConfig signingConfigs.debug        }        release {            // Caution! In production, you need to generate your own keystore file.            // see https://facebook.github.io/react-native/docs/signed-apk-android.            signingConfig signingConfigs.debug            minifyEnabled enableProguardInReleaseBuilds            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"        }    }    packagingOptions {        pickFirst "lib/armeabi-v7a/libc++_shared.so"        pickFirst "lib/arm64-v8a/libc++_shared.so"        pickFirst "lib/x86/libc++_shared.so"        pickFirst "lib/x86_64/libc++_shared.so"    }    // applicationVariants are e.g. debug, release    applicationVariants.all { variant ->        variant.outputs.each { output ->            // For each separate APK per architecture, set a unique version code as described here:            // https://developer.android.com/studio/build/configure-apk-splits.html            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]            def abi = output.getFilter(OutputFile.ABI)            if (abi != null) {  // null for the universal-debug, universal-release variants                output.versionCodeOverride =                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode            }        }    }}dependencies {    implementation fileTree(dir: "libs", include: ["*.jar"])    //noinspection GradleDynamicVersion    implementation "com.facebook.react:react-native:+"  // From node_modules    implementation project(':react-native-geocoder')    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"    implementation 'androidx.multidex:multidex:2.0.0'    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {      exclude group:'com.facebook.fbjni'    }    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {        exclude group:'com.facebook.flipper'    }    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {        exclude group:'com.facebook.flipper'    }    if (enableHermes) {        def hermesPath = "../../node_modules/hermes-engine/android/";        debugImplementation files(hermesPath +"hermes-debug.aar")        releaseImplementation files(hermesPath +"hermes-release.aar")    } else {        implementation jscFlavor    }}// Run this once to be able to run the application with BUCK// puts all compile dependencies into folder libs for BUCK to usetask copyDownloadableDepsToLibs(type: Copy) {    from configurations.compile    into 'libs'}apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)apply plugin: 'com.google.gms.google-services'

build.gradle (Project Level)

// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    ext {        buildToolsVersion = "28.0.3"        minSdkVersion = 16        compileSdkVersion = 28        targetSdkVersion = 28    }    repositories {        google()        jcenter()    }    dependencies {        classpath('com.android.tools.build:gradle:3.6.3')        classpath 'com.google.gms:google-services:4.2.0'   //added        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        mavenLocal()        maven {            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm            url("$rootDir/../node_modules/react-native/android")        }        maven {            // Android JSC is installed from npm            url("$rootDir/../node_modules/jsc-android/dist")        }        google()        jcenter()        maven { url 'https://www.jitpack.io' }    }}

Set user agent with WebView with react-native

$
0
0

I want to modify the user agent string in a WebView so that on the server side I can detect that the request has come from my react-native app. I want to do this using the source prop in the WebView.

How do I do this for IOS and Android?

Expo ejection & channel change clears AsyncStorage

$
0
0

I recently ejected from Expo, SDK 36, into ExpoKit. I then built the application using a different channel than the previous build.

I uploaded it to TestFlight and downloaded it, but this completely cleared AsyncStorage.

Is this a problem with TestFlight/iOS clearing the data, or is it the ejection?

Thanks.

react-native-firebase: onNotificationOpenedApp and getInitialNotification not working on iOS

$
0
0

I'm using Cloud Messaging from react-native-firebase 7.0.1.

I do not want to store iOS device tokens in firebase, so I'm using getAPNSToken() method and then storing it on my backend.

I'm able to send notification on a device and after pressing it, the application opens.

But when I'm trying to get message from getInitialNotification() or onNotificationOpenedApp() it always returns null/undefined.

It works every time on Android.

PushHandler.js

import React from 'react';import messaging from '@react-native-firebase/messaging';export default class PushHandler extends React.Component {  constructor(props) {    super(props);    this.messageApp = messaging();  }  componentDidMount() {    this.messageApp.onNotificationOpenedApp(remoteMessage => {      if (remoteMessage) { // <- always null on iOS        // handle notification      }    });    this.messageApp.getInitialNotification().then(initialMessage => {      if (initialMessage) { // <- always undefined on iOS        // handle notification      }    });  }  render() {    return null;  }}

No podspec found for RNStompWS in ../node_modules/react-native-stomp-websocket [closed]

$
0
0

I am getting this issue while installing pods.react-native: "0.61.4"react-native-stomp-websocket: "^1.0.7"

Could you please help me to get out of this issue ?

How can i control in change play sound in the background - ios?

$
0
0

I am working in a react native music app.I use react-native-video in this case to play songs,and in playInBackground prop I change it conditionally based on user status subscription, If this user bought a full package, I change it to true that's mean play songs in the background if false don't play it in the background.

But the problem with iOS app it when i want to enable Audio in the background should i add this to info.Plist

<key>UIBackgroundModes</key><array><string>audio</string></array>

So in my case, every user can play a song in the background!So how can I handle it and control play song in the background based on user status?

Code Snippet:

<Video            ref={ref => {              this.player = ref;            }}            source={{              uri: this.props.songs[this.props.currentIndex].url,            }}            paused={this.props.isPause}            playInBackground={this.props.isPaid} // refere to user subscribtion. "Paid = true / Unpaid = false"            playWhenInactive={true}            onLoad={this.onLoad}            onProgress={this.onProgress.bind(this)}            onEnd={this.onEnd}            controls={false}          />
Viewing all 16564 articles
Browse latest View live


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