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

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 ?


MultiSelect React native app not working on search

$
0
0

I am new to React Native. My MultiSelect search not working only if inputed *, for others text working. App crashes on * input.

Help will be appreciated.

Here is my code-

<MultiSelect                                hideTags={true}                                ref={(component) => { this.multiSelect = component }}                                items={this.state.organizations}                                uniqueKey="id"                                onSelectedItemsChange={this.onSelectedItemsChange}                                selectedItems={this.state.selectedItems}                                selectText="   Select organizations"                                searchInputPlaceholderText="Search organization..."                                onChangeInput={ (text)=> console.log(text)}                                itemFontFamily="OpenSans-SemiBold"                                selectedItemTextColor={COLORS.proposal}                                selectedItemIconColor={COLORS.proposal}                                displayKey="name"                                fixedHeight={true}                                styleInputGroup={{height:40}}                                submitButtonColor={COLORS.new}                                submitButtonText="Ok"                                styleItemsContainer={{borderTopWidth:0.3}}                                styleMainWrapper={{margin:5}}                            />

react-native-webview commands failed to compile, how to fix?

$
0
0

someone has fixed or saw this issue?

I'm using last version of (react-native) and also macOS Catalina.I did install react-native-webview by yarn and after into the (./ios) folder I had install the pods.

So build failed, after react-native run-ios.

    The following build commands failed:            CompileC /Users/mymac/Library/Developer/Xcode/DerivedData/Project-cnketoyhxyitfqbbcdkdvhpuajey/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-webview.build/Objects-normal/x86_64/RNCWebView.o /Users/mymac/Desktop/React/project/node_modules/react-native-webview/apple/RNCWebView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler    (1 failure)

React Native Responsive Font Size

$
0
0

I would like to ask how react native handle or do the responsive font. For example in iphone 4s i Have fontSize: 14, while in iphone 6 I have fontSize: 18.

React native execute code before phone shuts down (app in foreground)

$
0
0

I am currently developing a React Native app. I need to execute some code before the phone shuts down (powered off/out of battery while my app is in foreground), is it possible? and how i do that? Thank you in advance

Should I commit App.xcarchive, DistributionSummary.plist, ExportOptions.plist, Packaging.log to a public repository?

$
0
0

I am developing a React Native app. I have started the app with react-native init and it auto-generated the .gitignore file in the project root.

After some time, I have tried to create a release and this action automatically created some files and a folder in the directory ios:

  • App.xcarchive
  • DistributionSummary.plist
  • ExportOptions.plist
  • Packaging.log

These files and this folder are not included in .gitignore, Git shows them as untracked, so I need to decide whether to add and commit them to Git or not.

I am sure I don't need to commit Packaging.log to Git because it contains the log of the local build of the iOS app.

But what about the other files and the App.xcarchive folder? As I see, the DistributionSummary.plist contains the information about my development certificate and my app identifier. Is it safe to share this?

expo push notification iOS APNS

$
0
0

I am using expo push notifications to send notifications in my native app. For Android, I have to use FCM by setting it up in the Firebase console. Right now, I don't have an iOS device for testing. My question is whether I need to do some similar setup for notifications on iOS devices too or is it handled by expo itself? Because, the documentation only has the guide for setting up FCM and not APNS.

Xcode 11 Module AppRegistry is not a registered callable module (calling runApplication)

$
0
0

I recently upgraded (painfully) from react-native 0.59.10 to 0.61.2 and when I build and run thru Xcode 11 the splash screen loads but then errors show up in the console and the app doesn't load.

I've tried:

cd ios && rm -rf Pods && pod cache clean --all && pod install && cd ..

react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios

and done another clean install of react-native but to no avail.

package.json

{"name": "my_app","version": "0.0.1","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","test": "jest","lint": "eslint .","clean": "react-native-clean-project"  },"dependencies": {"@react-native-community/async-storage": "^1.6.2","moment": "^2.22.1","native-base": "^2.12.1","react": "16.9.0","react-native": "0.61.2","react-native-config": "^0.11.5","react-native-clean-project": "^3.2.4","react-native-nfc-manager": "^0.4.2","react-native-pagination": "^1.2.8","react-native-permissions": "^1.2.1","react-native-splash-screen": "^3.2.0","react-navigation": "^1.5.11","react-redux": "^5.0.7","redux": "^4.0.0","redux-thunk": "^2.2.0","scheduler": "^0.16.2","urijs": "^1.19.1"  },"devDependencies": {"@babel/core": "^7.6.2","@babel/runtime": "^7.6.2","@react-native-community/eslint-config": "^0.0.5","babel-jest": "^24.9.0","eslint": "^6.5.1","jest": "^24.9.0","metro-react-native-babel-preset": "^0.56.0","react-native-clean-project": "^3.2.4","react-test-renderer": "16.9.0"  },"jest": {"preset": "react-native","transform": {"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"    }  }}

Podfile

platform :ios, '9.0'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'target 'my_app' do  use_frameworks!  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"  pod 'React', :path => '../node_modules/react-native/'  pod 'React-Core', :path => '../node_modules/react-native/'  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'  target 'my_appTests' do    inherit! :complete    # Pods for testing  end  post_install do |installer|    installer.pods_project.targets.each do |target|      if target.name == "React"        target.remove_from_project      end    end  endend

I expect that my application would load but instead I get the following errors:

    2019-10-16 10:25:06.379 [error][tid:com.facebook.react.JavaScript] Invariant Violation: Native module cannot be null.    2019-10-16 10:25:06.381 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Invariant Violation: Native module cannot be null.    2019-10-16 10:25:06.388 [error][tid:com.facebook.react.JavaScript] Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)    2019-10-16 10:25:06.390 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

How to fix Undefined is not an object error when using a trylocalSingnin function

$
0
0

In my app I have multiple screens that you get access to after you seccufuly login or sign up.Am getting an undefined is not an object error when using tryLocalSignin() which is a function I used to make sure that the user doesn't enter his login info each time by checking if they are stored in asyncstorage.how do I fix this problem and make navigation work properly

Here is the code used on the App.js file :

import React, { useEffect, useContext } from "react";import "react-native-gesture-handler";import { NavigationContainer } from "@react-navigation/native";import { createMaterialBottomTabNavigator } from "@react-navigation/material-bottom-tabs";import AccountScreen from "./app/screens/AccountScreen";import SearchScreen from "./app/screens/SearchScreen";import SaveScreen from "./app/screens/SaveScreen";import { SimpleLineIcons } from "@expo/vector-icons";import { Feather } from "@expo/vector-icons";import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";import colors from "./app/config/colors";import { createStackNavigator } from "@react-navigation/stack";import { createSharedElementStackNavigator } from "react-navigation-shared-element";import MainScreen from "./app/screens/MainScreen";import DetailScreen from "./app/screens/DetailScreen";import Signin from "./app/screens/login/SigninScreen";import Signup from "./app/screens/login/SignupScreen";import { Provider as AuthProvider } from "./app/context/AuthContext";import { Context as AuthContext } from "./app/context/AuthContext";import { setNavigator } from "./app/navigationRef";const Tab = createMaterialBottomTabNavigator();const Stack = createSharedElementStackNavigator();const WelcomeStack = createStackNavigator();const MainStack = createStackNavigator();function Welcome() {  return (<WelcomeStack.Navigator><WelcomeStack.screen name="SignIn" component={Signin} /><WelcomeStack.screen name="SignUp" component={Signup} /></WelcomeStack.Navigator>  );}function MainTabScreen() {  return (<Stack.Navigator      initialRouteName="MainScreen"      screenOptions={{ headerShown: false }}><Stack.Screen name="MainScreen" component={MainScreen} /><Stack.Screen        name="DetailScreen"        component={DetailScreen}        options={(navigation) => ({          headerBackTitleVisible: false,          cardStyleInterpolator: ({ current: { progress } }) => {            return {              cardStyle: {                opacity: progress,              },            };          },        })}        sharedElements={(route) => {          const { data } = route.params;          return [            {              id: `item.${data.id}.photo`,              animation: "move",              resize: "clip",              align: "center-top",            },            {              id: `item.${data.id}.text`,              animation: "fade",              resize: "clip",              align: "left-center",            },            {              id: `item.${data.id}.profilePic`,              animation: "move",              resize: "clip",              align: "left-center",            },            {              id: `item.${data.id}.username`,              animation: "fade",              resize: "clip",              align: "left-center",            },            {              id: `item.${data.id}.readtime`,              animation: "fade",              resize: "clip",              align: "left-center",            },          ];        }}      /></Stack.Navigator>  );}function TabNav() {  return (<Tab.Navigator      initialRouteName="MainTabScreen"      activeColor={colors.shade1}      style={{ backgroundColor: "tomato" }}><Tab.Screen        name="Home"        component={MainTabScreen}        options={{          tabBarColor: "#292B34",          tabBarIcon: ({ color }) => (<SimpleLineIcons name="home" size={24} color={colors.shade2} />          ),        }}      /><Tab.Screen        name="SearchScreen"        component={SearchScreen}        options={{          tabBarLabel: "Search",          tabBarColor: "#292B34",          tabBarIcon: ({ color }) => (<Feather name="search" size={24} color={colors.shade2} />          ),        }}      /><Tab.Screen        name="SaveScreen"        component={SaveScreen}        options={{          tabBarLabel: "Save",          tabBarColor: "#292B34",          tabBarIcon: ({ color }) => (<MaterialCommunityIcons              name="bookmark"              size={24}              color={colors.shade2}            />          ),        }}      /><Tab.Screen        name="AccountScreen"        component={AccountScreen}        options={{          tabBarLabel: "Account",          tabBarColor: "#292B34",          tabBarIcon: ({ color }) => (<MaterialCommunityIcons              name="account"              size={24}              color={colors.shade2}            />          ),        }}      /></Tab.Navigator>  );}function App() {  const { tryLocalSignin } = useContext(AuthContext);  const [isLoading, setIsLoading] = React.useState(false);  useEffect(() => {    setTimeout(() => {      tryLocalSignin();      setIsLoading(!isLoading);    }, 500);  }, []);  return (<AuthProvider><NavigationContainer><MainStack.Navigator          ref={(navigator) => {            setNavigator(navigator);          }}>          {isLoading ? (<MainStack.Screen name="Tab" component={TabNav} />          ) : (<MainStack.Screen name="WelcomeStack" component={Welcome} />          )}</MainStack.Navigator></NavigationContainer></AuthProvider>  );}export default App;

Cocoapods cannot install Trunk

$
0
0

I'm trying to develop a React Native mobile app for iOS on Windows 10. Using the react native cli, I've generated a RN iOS project with the standard file structure, including a "Podfile" file with the default RN pods.

However, when I try to use "pod install" in order to add other pods of my own, I get the following error code:

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: SSL peer certificate or SSH remote key was not OK

I've been googling this error but I've run into a dead end. I've tried using pod update, I've changed my cURL version, I've gone over the setup instructions for Ruby, curl, and others, and I'm at a loss. What can I do?

Note: I haven't run the app yet, and am trying to install the react-native-mapbox-gl pod first, but I can't even properly install Trunk.

cURL Version:7.70.0

CocoaPods Version: 1.9.3

How to develop Chat functionality in react native app [closed]

$
0
0

Want to develop real time Chat/Messaging functionality in react native app. in which user can send videos,pictures,voice messages and emojis.

as well as require functionality to delete messages and manage message time stamps.

What are the best methods/ways/framework to achive this?

[!]Invalid `Podfile` file: Unable to locate the executable `node`

$
0
0

I've been searching high and low for a solution to this error. When I run: pod install, I get:[!] Invalid Podfile file: [!] Unable to locate the executable node.

# from /Users/admin/Desktop/myapp2/myapp/ios/Podfile:85 # ------------------------------------------- #

use_native_modules! #
# -------------------------------------------

System:    OS: OS X El Capitan 10.11.6    CPU: (2) x64 Intel(R) Core(TM)2 Duo CPU     T9600  @ 2.80GHz    Memory: 19.69 MB / 4.00 GB    Shell: 3.2.57 - /bin/bash  Binaries:    Node: 8.9.0 - /usr/local/bin/node    Yarn: Not Found    npm: 5.5.1 - /usr/local/bin/npm    Watchman: Not Found  Managers:    CocoaPods: 1.5.2 - /usr/local/bin/pod  SDKs:    iOS SDK:      Platforms: X 10.11, iOS 9.3, tvOS 9.2, watchOS 2.2    Android SDK: Not Found  IDEs:    Android Studio: Not Found    Xcode: 7.3/7D129n - /usr/bin/xcodebuild  Languages:    Java: Not Found    Python: 2.7.10 - /usr/bin/python  npmPackages:    @react-native-community/cli: Not Found    react: 16.11.0 => 16.11.0     react-native: 0.62.2 => 0.62.2   npmGlobalPackages:    *react-native*: Not Found

cocoapods: 1.5.2 react native: 0.62 node: 8.9.0

podfile:

platform :ios, '9.0'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'def add_flipper_pods!(versions = {})  versions['Flipper'] ||= '~> 0.33.1'  versions['DoubleConversion'] ||= '1.1.7'  versions['Flipper-Folly'] ||= '~> 2.1'  versions['Flipper-Glog'] ||= '0.3.6'  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'  versions['Flipper-RSocket'] ||= '~> 1.0'  pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'  # List all transitive dependencies for FlipperKit pods  # to avoid them being linked in Release builds  pod 'Flipper', versions['Flipper'], :configuration => 'Debug'  pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'  pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'  pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'  pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'  pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'  pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'end# Post Install processing for Flipperdef flipper_post_install(installer)  installer.pods_project.targets.each do |target|    if target.name == 'YogaKit'      target.build_configurations.each do |config|        config.build_settings['SWIFT_VERSION'] = '4.1'      end    end  endendtarget 'MyApp' do  # Pods for MyApp  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"  pod 'React', :path => '../node_modules/react-native/'  pod 'React-Core', :path => '../node_modules/react-native/'  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'  target 'MyAppTests' do    inherit! :complete    # Pods for testing  end  use_native_modules!  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable these next few lines.  add_flipper_pods!  post_install do |installer|    flipper_post_install(installer)  endendtarget 'MyApp-tvOS' do  # Pods for MyApp-tvOS  target 'MyApp-tvOSTests' do    inherit! :search_paths    # Pods for testing  endend

react-native statusBar with expo on iOS

$
0
0

I was trying to change the color of the statusBar on my react-native app.

I am working with expo and on their documentation they are just specifying to add :"androidStatusBar": {"backgroundColor": "#2E1D59" }

that works fine with android, but they did not mention how to do so with iOS statusBar.

Anyone has an idea about this ?

Open Settings App from another App in iOS - React Native

$
0
0

I'm going through the docs in React Native and can only find navigating to external links from the app I am in.

I want to be able to navigate to the Settings app (more specifically to the privacy > location services page) but, can not seem to find the necessary information on it. There is the native iOS way of doing it which I am trying to replicate through React Native.

Is this possible?

I have tried the following to detect if there is a Settings URL. The console logs that the Settings url works however, it does not navigate to that page.

Update: thanks to @zvona I am now navigating to the settings page but not sure how to get to a specific deep link.

Linking.canOpenURL('app-settings:').then(supported => {    console.log(`Settings url works`)    Linking.openURL('app-settings:'}).catch(error => {    console.log(`An error has occured: ${error}`)})

Design Question: how can improve this design

$
0
0

How can i improve this modal? I tried changing the colors n spacing but it doesnt seem to look right. Are there any fonts you recommend?

the modal


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 iOS error: "clang: error: linker command failed with exit code 1"

$
0
0

I just installed react-native-appodeal and I'm receiving the following error when trying to launch of iOS:

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Does anyone know how to fix this?

I'm using the react-native-appodeal package and followed the setup instructions perfectly. Has anyone encountered this issue with appodeal specifically or iOS in general?

Environment

"react-native": "0.61.5""react-native-appodeal": "^2.6.4"

AppDelegate.m

#import "AppDelegate.h"#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <Firebase.h>#import "RNSplashScreen.h"#import <CodePush/CodePush.h>#import <Appodeal/Appodeal.h>@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"wwdbbenji"                                            initialProperties:nil];  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];  UIViewController *rootViewController = [UIViewController new];  rootViewController.view = rootView;  self.window.rootViewController = rootViewController;  [self.window makeKeyAndVisible];  if ([FIRApp defaultApp] == nil) {  [FIRApp configure];  }  [RNSplashScreen show];  [Appodeal initializeWithApiKey:@"XXXXX" types:AppodealAdTypeBanner hasConsent:true];  return YES;}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [CodePush bundleURL];#endif}@end

Podfile

platform :ios, '9.0'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'def appodeal  pod 'APDAdColonyAdapter', '2.6.4.1'  pod 'APDAmazonAdsAdapter', '2.6.4.1'  pod 'APDAppLovinAdapter', '2.6.4.1'  pod 'APDAppodealAdExchangeAdapter', '2.6.4.1'  pod 'APDChartboostAdapter', '2.6.4.1'  pod 'APDFacebookAudienceAdapter', '2.6.4.1'  pod 'APDInMobiAdapter', '2.6.4.1'  pod 'APDInnerActiveAdapter', '2.6.4.1'  pod 'APDIronSourceAdapter', '2.6.4.1'  pod 'APDMintegralAdapter', '2.6.4.1'  pod 'APDMyTargetAdapter', '2.6.4.1'  pod 'APDOguryAdapter', '2.6.4.1'  pod 'APDOpenXAdapter', '2.6.4.1'  pod 'APDPubnativeAdapter', '2.6.4.1'  pod 'APDSmaatoAdapter', '2.6.4.1'  pod 'APDStartAppAdapter', '2.6.4.1'  pod 'APDTapjoyAdapter', '2.6.4.1'  pod 'APDUnityAdapter', '2.6.4.1'  pod 'APDVungleAdapter', '2.6.4.1'  pod 'APDYandexAdapter', '2.6.4.1'endtarget 'wwdbbenji' do  # Pods for wwdbbenji  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"  pod 'React', :path => '../node_modules/react-native/'  pod 'React-Core', :path => '../node_modules/react-native/'  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'  appodeal  target 'wwdbbenjiTests' do    inherit! :search_paths    # Pods for testing  end  use_native_modules!  use_frameworks!endtarget 'wwdbbenji-tvOS' do  # Pods for wwdbbenji-tvOS  target 'wwdbbenji-tvOSTests' do    inherit! :search_paths    # Pods for testing  endend

How to link viewDidLoad when I don't have UIViewController

$
0
0

I'm trying to link a Mapbox example class to my IOS app. The example class implemented viewDidLoad method, so I assume I should instantiate this code inside a UIViewController file right?

But unfortunately I don't have that file. I'm using react native and I assume I should have at least AppDelegate and UIViewController files correct? But I don't have it. I only have the UIViewController instantiated in AppDelegate.m like so:

UIViewController *rootViewController = [UIViewController new];

rootViewController.view = rootView;
self.window.rootViewController = rootViewController;

Is this the place where I should "link" the example class so that the viewDidLoad will be triggered?

Looking for someone to integrate In app purchase in react native app

$
0
0

will anyone want to dive in to the project and help me get this done. will pay you for your time.its just 2 auto renewable subscriptions packages needs to be added.

react native - play sound after notification sound

$
0
0

I am playing with the my app using React Native for implementation.

There is a case that after receiving a push notification (using react-native-firebase), app will play sound (using react-native-sound):

  • "Hey, new music is waiting for ya". (when there is a new music)
  • "Hey, new magazine is waiting for ya". (when there is a new magazine)

The thing is:

  • In foreground, everything works.
  • In background (background audio mode is enable), I cannot play my sound after the default push notification sound "ting". If my sound plays alone, everything works.

According to react-native-firebase:

// index.jsimport { AppRegistry } from 'react-native';import messaging from '@react-native-firebase/messaging';import App from './App';// Register background handlermessaging().setBackgroundMessageHandler(async remoteMessage => {  console.log('Message handled in the background!', remoteMessage);  // ==== I play my sound here ====});AppRegistry.registerComponent('app', () => App);

If you have any suggestion, please let me know.

Thank you in advanced!

Viewing all 16564 articles
Browse latest View live


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