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

Library not found for -lboost_context

$
0
0

I'm building a react native mobile app and getting an error when I build the iOS project.

ld: library not found for -lboost_context

Xcode version is 12.4 and here is a list of dependencies written in package.json file.

"dependencies": {"@react-navigation/native": "^5.9.4","@react-navigation/stack": "^5.14.4","axios": "^0.21.1","react": "17.0.1","react-native": "0.64.0","react-native-camera": "^3.43.6","react-native-gesture-handler": "^1.10.3","react-native-permissions": "^3.0.2","react-native-qrcode-scanner": "^1.5.4","react-native-reanimated": "^2.1.0","react-native-responsive-screen": "^1.4.2","react-native-safe-area-context": "^3.2.0","react-native-screens": "^3.1.1","react-native-tab-view": "^2.15.2","react-native-vector-icons": "^8.1.0","react-navigation": "^4.4.4"  }

What API/SDK to print automatically to thermal printer (e.g. Brother QL) with my React Native iPhone app without interaction?

$
0
0

I've been looking into different API/SDKs that would be best and easiest to integrate with my React Native iPhone app. This is an internal employee app, that once a form is submitted I would like to automatically print out a label from a thermal printer (e.g. Brother QL1110NWB).

Some options I found are:

React Native:

Brother SDK:

Apple AirPrint:

Does anyone have experience with any of these API/SDKs and can recommend best method for easy integration and be able to print directly without interaction?

Thank you!

In React Native how can I execute action after a Push Notification without user interacted with the app is in background?

$
0
0

I have a React Native app that receives a push notification from my server.When the app is in background and the user open the notification the app prints a label.When the app is in foreground and receives the notification the app immediately prints a label.

I would like to print the label without the interaction of the user when the app is in background.

How can I achieve this?

I was thinking to use Expo Background Fetch but I need to print the label immediately after the notification and with the Expo Background Fetch I could print too late.

Thanks

APNS device token not set before retrieving FCM Token for Sender ID - React Native Firebase

$
0
0

I have been following this tutorial to set-up Remote Push notifications on my react-native application using react-native-firebase Version 5.2.0. After I configured everything and ran the application I get an error as:

APNS device token not set before retrieving FCM Token for Sender ID ''. Notifications to this FCM Token will not be delievered over APNS. Be sure to re-retrieve the FCM token once the APNS token is set.

Been trying to figure out how to solve this issue but wasn't quite successful.Running on react-native : 0.61.2, react-native-firebase: 5.2.0

Following is my AppDelegate.m

#import "AppDelegate.h"#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <RNCPushNotificationIOS.h>#import <UserNotifications/UserNotifications.h>#import <Firebase.h>@import Firebase;@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  [FIRApp configure];  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"helloworld"                                            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];  // define UNUserNotificationCenter  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];  center.delegate = self;  return YES;}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}// Required to register for notifications- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{  [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];}// Required for the register event.- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{  [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];}// Required for the notification event. You must call the completion handler after handling the remote notification.- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfofetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];}// Required for the registrationError event.- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{  [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];}// Required for the localNotification event.- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{  [RNCPushNotificationIOS didReceiveLocalNotification:notification];}//Called when a notification is delivered to a foreground app.-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{  NSLog(@"User Info : %@",notification.request.content.userInfo);  completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);}@end

and token retrieval on my App.js:

const messaging = firebase.messaging();messaging.hasPermission()  .then((enabled) => {    if (enabled) {      messaging.getToken()        .then(token => { console.log("+++++ TOKEN ++++++"+ token) })        .catch(error => { console.log("+++++ ERROR GT +++++"+ error) })    } else {      messaging.requestPermission()        .then(() => { console.log("+++ PERMISSION REQUESTED +++++") })        .catch(error => { console.log("+++++ ERROR RP ++++"+ error) })    }  })  .catch(error => { console.log("+++++ ERROR +++++"+ error) });

Any help would be much appreciated! Thanks!

Remote notification not receiving by iOS using firebase

$
0
0

I am trying to use iOS notification using firebase, I have already added APN key in firebase and added firebase configs. but I cannot receive the notification when I send a test notificatin from Firebase.

This my AppDelegate.m file:

#import "AppDelegate.h"#import <UserNotifications/UserNotifications.h>#import <RNCPushNotificationIOS.h>#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#ifdef FB_SONARKIT_ENABLED#import <FlipperKit/FlipperClient.h>#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>#import "RNFirebaseNotifications.h"#import "RNFirebaseMessaging.h"@interface AppDelegate () <UNUserNotificationCenterDelegate>@endstatic void InitializeFlipper(UIApplication *application) {  FlipperClient *client = [FlipperClient sharedClient];  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];  [client addPlugin:[FlipperKitReactPlugin new]];  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];  [client start];}#endif@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{#ifdef FB_SONARKIT_ENABLED  InitializeFlipper(application);#endif  [FIRApp configure];  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"fitux"                                            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];// Define UNUserNotificationCenter  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];  center.delegate = self;  if ([UNUserNotificationCenter class] != nil) {    // iOS 10 or later    // For iOS 10 display notification (sent via APNS)    [UNUserNotificationCenter currentNotificationCenter].delegate = self;    UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert |        UNAuthorizationOptionSound | UNAuthorizationOptionBadge;    [[UNUserNotificationCenter currentNotificationCenter]        requestAuthorizationWithOptions:authOptions        completionHandler:^(BOOL granted, NSError * _Nullable error) {          // ...        }];  } else {    // iOS 10 notifications aren't available; fall back to iOS 8-9 notifications.    UIUserNotificationType allNotificationTypes =    (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);    UIUserNotificationSettings *settings =    [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];    [application registerUserNotificationSettings:settings];  }  [application registerForRemoteNotifications];  return YES;}//Called when a notification is delivered to a foreground app.-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{  completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge);}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}// Required for the register event.- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{ [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];}// Required for the notification event. You must call the completion handler after handling the remote notification.- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfofetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];}// Required for the registrationError event.- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{ [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];}// Required for localNotification event- (void)userNotificationCenter:(UNUserNotificationCenter *)centerdidReceiveNotificationResponse:(UNNotificationResponse *)response         withCompletionHandler:(void (^)(void))completionHandler{  [RNCPushNotificationIOS didReceiveNotificationResponse:response];}@end

This my AppDelegate.h file :

#import <React/RCTBridgeDelegate.h>#import <UIKit/UIKit.h>#import <UserNotifications/UNUserNotificationCenter.h>#import <Firebase.h>@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, FIRMessagingDelegate>@property (nonatomic, strong) UIWindow *window;@end

I added pod 'Firebase/Messaging' to my podfile.

Thanks a lot for your help.

Error: Undefined symbols for architecture x86_64: “_OBJC_CLASS_$_RNPermissionHandlerPhotoLibrary” in react-native (iOS)

$
0
0

I get the above error when trying to build the project via Xcode.

I know that there are some threads about this issue already, but I tried everything and it is still not working. Cocoapods update, the pre install thing with static linking etc.

My podfile looks like this:

    require_relative '../node_modules/react-native/scripts/react_native_pods'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'platform :ios, '10.0'target 'gymlabs_mobile_client' do  config = use_native_modules!  use_react_native!(    :path => config[:reactNativePath],    # to enable hermes on iOS, change `false` to `true` and then install pods    :hermes_enabled => false  )  target 'gymlabs_mobile_clientTests' do    inherit! :complete    # Pods for testing    permissions_path = '../node_modules/react-native-permissions/ios'    pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"  end  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable the next line.  # use_flipper!()  post_install do |installer|    react_native_post_install(installer)    installer.pods_project.targets.each do |target|      target.build_configurations.each do |config|        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.12'      end    end  endend

I also added the following thing to my Info.plist:

<key>NSPhotoLibraryUsageDescription</key><string>App Name would like access to your photo gallery</string>

It feels like I have searched the whole Internet for it and still dont find a solution, thanks in advance guys!

Failed to run react native on iOS after upgrading Xcode 12.5

$
0
0

Trying to start react native project on iOS simulator whit MacBook Air M1 failed with this error

:0: error: module map file '/Users/userName/Library/Developer/Xcode/DerivedData/projectName-czhmfookabhyqzdsutttonzlxnsi/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap'not found
:0: error: module map file'/Users/erName/Library/Developer/Xcode/DerivedData/projectName-czhmfookabhyqzdsutttonzlxnsi/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap'not found
:0: error: missing required module 'SwiftShims'

** BUILD FAILED **

The following build commands failed:

CompileSwift normal x86_64 [path-to-project-folder]/ios/File.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler

I've already tried to

  • open .xcworkspace with Xcode
  • delete node_modules, package-lock.json, and podfile.lock;
  • npm install;
  • pod install inside iOS folder
  • clean DerivedData folder
  • rebuild project

INFO #

System:    OS: macOS 11.3     CPU: (8) arm64 Apple M1     Memory: 177.69 MB / 8.00 GB     Shell: 5.8 - /bin/zsh   Binaries:     Node: 15.14.0 - /opt/homebrew/bin/node     npm: 7.7.6 - /opt/homebrew/bin/npm     Watchman: 4.9.0 - /opt/homebrew/bin/watchman   SDKs:     iOS SDK:       Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4     Android SDK:       API Levels: 27, 28, 29, 30      Build Tools: 28.0.3, 29.0.2, 30.0.3       System Images: android-29 | Automotive with Play Store Intel x86 Atom, android-29 | Android TV Intel x86 Atom, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom   IDEs:     Android Studio: 4.1 AI-201.8743.12.41.7199119     Xcode: 12.5/12E262 - /usr/bin/xcodebuild   npmPackages:     react: 16.9.0 => 16.9.0      react-native: ^0.61.5 => 0.61.5    npmGlobalPackages:     react-native-cli: 2.0.1 

Pod file

platform :ios, '10.0'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'target '[tName]' do  permissions_path = '../node_modules/react-native-permissions/ios'  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"  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 'GoogleSignIn', '~> 5.0.2'  # react-native-geolocation-service  pod 'react-native-geolocation', path: '../node_modules/@react-native-community/geolocation'  # use_frameworks!  pod 'TwitterKit5'#  google idfa support  pod 'GoogleIDFASupport', '~> 3.14'  target '[tNameTests]' do    inherit! :search_paths    # Pods for testing  end  use_native_modules!#  GOOGLE MAPS REQUIRE  rn_maps_path = '../node_modules/react-native-maps'   pod 'react-native-google-maps', :path => rn_maps_path   pod 'GoogleMaps'   pod 'Google-Maps-iOS-Utils'end  target '[tName]-tvOS' do   # Pods for [tName]-tvOS   target '[tName]-tvOSTests' do     inherit! :search_paths     # Pods for testing   endend post_install do |installer|     ## Fix for XCode 12.5 beta     find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm", "_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")     find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm","RCTBridgeModuleNameForClass(module))", "RCTBridgeModuleNameForClass(Class(module)))") end def find_and_replace(dir, findstr, replacestr)   Dir[dir].each do |name|      text = File.read(name)      replace = text.gsub(findstr,replacestr)       if text != replace           puts "Fix: " + name           File.open(name, "w") { |file| file.puts replace }           STDOUT.flush       end   end   Dir[dir +'*/'].each(&method(:find_and_replace)) end

Build hanging with "npx react-native run-ios" but not when building with Xcode

$
0
0

I recently installed and uninstalled some dependencies, but I reinstalled node modules (removed node_modules folder and ran npm install and have re-installed pods with pod install). Building through the Xcode UI works fine and the app gives no errors, but when I build through the react-native cli using npx react-native run-ios, the build just hangs forever with no error (see screenshot below):

Console after running build command

Again, I've reinstalled node modules, reinstalled pods, restarted my computer, tried running on different simulator devices, but no matter what the build hangs everytime. I need to build this way for debugging and this is costing me a lot of time. Any help would be greatly appreciated.


Unable to compile React Native Share Extension iOS 12.5

$
0
0

When upgrading to iOS 12.5, I am getting the compile error that: "Application extensions and any libraries they link to must be built with the APPLICATION_EXTENSION_API_ONLY build setting set to YES."

However, I am explicitly setting it to false in my Podfile:

post_install do |installer|  installer.pods_project.targets.each do |target|    target.build_configurations.each do |config|      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'    end  endend

Because this is required as a work-around for another issue.

If I set config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'YES', then I get even more issues.

Does anyone know how to fix this issue?

React Native - npx react-native run-ios doesn't work after initializing the project

$
0
0

After reading https://reactnative.dev/docs/environment-setup, I created a react-native project using npx react-native init ***.

It was successful, so, I tried to run the project using npx react-native run-ios, and got the below error:

** BUILD FAILED **The following build commands failed:    CompileC /Users/loser/Library/Developer/Xcode/DerivedData/test0205-dasunahpjpavelgmslwgmvjhesxy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/loser/Documents/projects/test0205/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler(1 failure)

Endpoints aren't eligible in amazon pinpoint campaign creation

$
0
0

When I try to create a campaign in amazon pinpoint no eligible endpoints show up in the segment creation section. Even though I have a device successfully receiving push notifications from the test messaging section.

I have implemented iOS push notifications for my react-native app exactly as shown in the documentation (https://aws-amplify.github.io/docs/js/push-notifications). Everything works without any errors on the frontend and the backend. When I run the code:

PushNotification.onRegister((token) => console.log(token)); 

I successfully receive the app token. I can even receive push notifications from the test messaging section by using the token generated from the onRegister function.

However when I try to create a campaign in amazon pinpoint. I cannot get farther than the create segment section because despite there being 6 total endpoints, there are 0 eligible endpoints. Why are my endpoints ineligible? I have tested on a device. I have tested in a simulator. I tried changing the IAM access of my auth and un auth roles to

"mobiletargeting:*"

so that they have full access to pinpoint.

What am I missing? Why are my endpoints ineligible?

In all of the tutorials that I have gone through. The segment automatically recognizes that the test device is eligible. Why is this not working for my project?

How to implement interactive bar chart in React native?

$
0
0

I am working on React Native App project where I have to display an interactive bar chart. As shown in attracted screenshot. The app is working on both iOS and Android devices. Where we are currently providing minimal iOS and Android app support as following:

1. Android 4.3.x / Jelly Bean / API level 18 2. iOS 9.0 or later3. iPadOS 9.0 or later.

Requirement:

  1. In a bar chart, every bar will be clickable. When the user clicks on any bar, the relative information will be display below the chart accordingly.
  2. Suggested chart library should match our minimal app support in both operating systems (iOS & Android).

Current dependencies

Currently, the project is running with the following React framework versions:

  1. React Native: 0.63.4
  2. React: 16.13.1

enter image description here

Android-iOS - : Getting emails from device

$
0
0

I have react native project in which i have a red button as shown in screenshot on click i want to show this type of pop-up in iOS and android only, Please help me.click to see image pop-upenter image description here

Dragging down the screen pulling the entire screen down in ios devices

$
0
0

How to get rid of this drag action in ios devices react native? It shows white space. It gives the feel of refreshing the screen.

Take the SqLite file (.db) file backup from react-native-sqlite-storage on click of back up button from the configuration file

$
0
0

I have a requirement to upload the entire SqLite.db file backup to the cloud from the device.


Build is failing for older projects for React-Native iOS XCode Version 12.5

$
0
0

It is very new to me see this problem which started happening recently. Previously my app used to work fine on the iOS simulator by running this command react-native run-ios. Now I have done a lot of research and made my app run via XCode. But somehow the metro bundler is not linked when the app runs via XCode.

I tried running the app via react-native run-ios and every time I am seeing this error. It is too big to copy paste every error here, but here are some of them:

Undefined symbols for architecture x86_64:"Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer<A>) -> (Swift.IndexingIterator<Swift._ArrayBuffer<A>>, Swift.Int)", referenced from:      generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray<A where A: Swift.Collection>(A) -> Swift.ContiguousArray<A.Element> in libMixpanel-swift.a(AutomaticProperties.o)ld: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)** BUILD FAILED **The following build commands failed:        Ld /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/CareerLabs_Elev8-gxcfanteiuxazegkgwkjkrjxbdmw/Build/Products/Debug-iphonesimulator/CareerLabs.app/CareerLabs normal(1 failure)

I have done a lot of things to make it to work. The only success I got here is, while running the command react-native run-ios, it opens up the metro bundler server. After that it fails with giving a 1000 lines of error. I picked the error which had some cream part. Some key words to pick from the error:

  • ld: symbol(s) not found for architecture x86_64
  • clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • Did not understand the word Ld, which is listed under BUILD FAILED

What I did is as follows:

  1. Deleting node_modules, Pods. Cleaning the build from XCode. Running npm install and then cd ios && pod install and then ran the command react-native run-ios
  2. Deleting Pods, Podfile.lock. Did pod install and then in the root react-native run-ios
  3. Doing these:
rm -rf ~/Library/Caches/CocoaPodsrm -rf Podsrm -rf ~/Library/Developer/Xcode/DerivedData/*pod deintegratepod setuppod installcd ..react-native run-ios
  1. Restarted the system, and ran the command again react-native run-ios
  2. Added arm64 in the Excluded Architecture from XCode. Please note, this enabled me to build and run the app successfully on XCode. But it doesn't get attached to the metro bundler server. Looks like it runs the release mode only.
  3. Updated my package react-native-gesture-handler to the latest one which is 1.10.3, to see if that removes my problem. But no luck :(

My Podfile look like this:

  platform :ios, '10.0'  use_flipper!({'Flipper' => '0.81.0'})  post_install do |installer|    flipper_post_install(installer)    installer.pods_project.targets.each do |target|      target.build_configurations.each do |config|        config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'      end    end  end

I am out of options now, and waiting for some insight to be given. It is indeed frustrating to see an error on something which never created a problem. I am using Apple M1 Chip Macbook. Would appreciate any kind of help on this.

Update V1.0

  • I have tried commenting down the use_flipper!(), from the /ios/Podfile, and then redid the same things, like removing Pods, Podfile.lock. Running this command, pod update && pod install && cd.. && npm run ios. Ran into multiple issues. God knows what actually the issue is with XCode and React Native on Apple M1.

Update V2.0

I have found some significant places where the developers are complaining about the same. XCode has forced updated my version to 12.5, without my notice. And now XCode is creating a problem with RN Older projects. Here are the supportive links for the same:

I hope this may give some insight to the developers who are confused like me. Please take a look, and looks like Facebook is fixing it, but don't know when. Have to keep an eye on it :/

React Native developer Menu not loading

$
0
0

Developer menu in ios simulator will not launch with either cmd + D or cmd + ctrl + z

  • things i've checked (in no order) :

    • cmd + r works properly
    • myApp and myAppTests schemes are set to debug mode
    • Slow Animations is off
    • Hardware > Keyboard > Connect Hardware Keyboard is on
    • watchman 4.7.0 is installed with brew install watchman (--HEAD needed libtoolize, in which brew changed to glibtoolize, therefore ./autogen couldn't find it )
    • Cleaned out Derived Data folder
    • Created new scheme for target
    • Upgraded XCode to 8.2.1 -> 8.3.1
    • react-native start --clear-cache starts successfully, react-native run-ios builds successfully
  • Other Issues

    • nw_connection_get_connected_socket_block_invoke 1262 Connection has no connected handler run indefinitely
    • react-native run-ios outputs

    Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/zelosApp.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not ExistCommand failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/zelosApp.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

  • Versions

    • react-native = "^0.43.3"
    • watchman = "4.7.0"
    • xcode = "8.3.1"

Any tips / questions would be greatly appreciated!

'React/RCTBridgeDelegate.h' file not found React Native and XCode

$
0
0

I get the error 'Lexical or Preprocessor Issue React/RCTBridgeDelegate.h file not found in AppDelegate.h' when attempting to build and run my react native project in Xcode 12.1.I have tried reinstalling cocoapods (sudo gem install cocoapods) in project directory and pod install in my ios folder but I am still getting the same error. I've also tried adding React to my Xcode scheme but it doesn't seem to be available in the manage schemes. I think this is where my problem is but I'm not sure how I should add React. Is this a folder? And where is it located? In the node_modules folder? I'm still fairly new to react native and Xcode.

I would really appreciate it if someone can please assist me in resolving this.

Thanks.

Block internet access for other apps [closed]

$
0
0

I want to create iOS app that blocks internet access for distracting apps(FB, Youtube etc.), what are some possible ways to do this?

I'm considering using VPN which filters traffic but it requires to have some vpn server fro this, are there any other ways?

Add custom font family in React Native iOS

$
0
0

I would like add custom font family on my React Native App on iOS. I've no problem with Android, but i've an error in iOS :

Unrecognized font family 'dinproRegular'

I've use this link for setup my font, but no result.

File name : dinproRegular.ttf

Call in react-native : fontFamily: "dinproRegular" // Test with "Dinpro Regular" too

No result :(

Anyone have idea ?

Viewing all 16907 articles
Browse latest View live


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