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

How to change the audio session category in iOS on React Native?

$
0
0

Using react native, I understand that in order to enable background audio playback (mainly for react-native video) I should change the audio session as detailed here in the apple development docs.

With that said, I'm a little bit confused about where exactly to do this. Considering that React is javascript, where should one place the Objective-C code in React Native application?


Unrecognized font family error in React Native 60

$
0
0

here's a screenshot for the error

enter image description here

react-native.config.js file

module.exports = {    project: {        ios: {},        android: {},    },    assets: ["./assets/fonts"]};

enter image description here

I tried to work directly through XCode , but the same

the font inside resources folder and also in Copy Bundle resources

enter image description here

it's also exist in Info.plist in Fonts provided by application

enter image description here

I confirmed on everything many times , but always fire this error

CompileSwiftSources failed with a nonzero exit code with "no such file or directory"

$
0
0

I am compiling an iOS project that is created using react-native. One library, react-native-photo-editor, fails to be built with a very odd error. It complains of "no such file or directory" on a file that clearly exists.

XCode error

However, the file definitely exists. I can use Terminal to tail that file.

Terminal output

Several things that I think might contribute to this problem is that my user directory has a space (adityasantoso 1). There is also an @ sign at the compilation message that I am not sure what it stands for.

Environment:

  1. Mac OSX Mojave 10.14.6
  2. Xcode Version 11.3.1 (11C504)
  3. Toolchain: Swift 4.1.3 Release 2018-07-27 (a). This is not the default Swift toolchain for this version of Xcode
  4. react-native: 0.59.10
  5. react-native-photo-editor: 0.0.7

Any idea what else I can try out to make it compile?

How to remove top margin from SafeViewArea | React Native | iPhoneX

$
0
0

I need to use SafeViewArea for iPhoneX, but when i have putted SafeViewArea then some unwanted extra margin from top is showing.

enter image description here

My Code snippet -

render () {    return (<SafeAreaView forceInset={{ top: 'always' }} style={styles.applicationView}><View style={styles.applicationView}><StatusBar barStyle='light-content'/><ReduxNavigation/></View></SafeAreaView>    )  }

styles.js

export default StyleSheet.create({  applicationView: {    flex: 1  },  container: {    flex: 1,    justifyContent: 'center',    backgroundColor: Colors.background  },  welcome: {    fontSize: 20,    textAlign: 'center',    fontFamily: Fonts.type.base,    margin: Metrics.baseMargin  },  myImage: {    width: 200,    height: 200,    alignSelf: 'center'  }})

EDIT: How to remove the shadow of SurfaceViewArea?

Suggestions appreciated.Thanks in advance.

react-native run-ios Build Fail: CompileC RCTBaseTextInputView.o

$
0
0

How to fix this build failure in ios?I'm using Xcode Version 9.2Mac OS Sierra

What is RCTBaseTextInputView?

CompileC /Users/bliss/Library/Developer/Xcode/DerivedData/RNJyotish-fjjxyvwbhqivjwbnwwqhmqzgfazq/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.o /Users/bliss/Documents/Coder/ReactNative/RNCLI/BITBUCKET/rnjyotish/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

Clang Error YGMarker.cpp in react-native ios app

$
0
0

When trying to build an IOS version of a react native app I seem to get a clang error with the yoga module. Can you help me diagnose and solve this?

     clang: error: no such file or directory: '/Users/ravi/iosechojoy/mobileapp/node_modules/react-native/ReactCommon/yoga/yoga/YGMarker.cpp'    clang: error: no input files    CompileC /Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/Objects-normal/x86_64/YGMarker.o /Users/ravi/iosechojoy/mobileapp/node_modules/react-native/ReactCommon/yoga/yoga/YGMarker.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler        cd /Users/ravi/iosechojoy/mobileapp/ios/Pods        export LANG=en_US.US-ASCII        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++14 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/ravi/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/ravi/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Index/DataStore -iquote /Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/yoga-generated-files.hmap -I/Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/yoga-own-target-headers.hmap -I/Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/yoga-all-target-headers.hmap -iquote /Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/yoga-project-headers.hmap -I/Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Products/Debug-iphonesimulator/yoga/include -I/Users/ravi/iosechojoy/mobileapp/ios/Pods/Headers/Private -I/Users/ravi/iosechojoy/mobileapp/ios/Pods/Headers/Private/yoga -I/Users/ravi/iosechojoy/mobileapp/ios/Pods/Headers/Public -I/Users/ravi/iosechojoy/mobileapp/ios/Pods/Headers/Public/yoga -I/Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/DerivedSources-normal/x86_64 -I/Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/DerivedSources/x86_64 -I/Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/DerivedSources -F/Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Products/Debug-iphonesimulator/yoga -fno-omit-frame-pointer -fexceptions -Wall -Werror -std=c++1y -fPIC -fno-objc-arc -include /Users/ravi/iosechojoy/mobileapp/ios/Pods/Target\ Support\ Files/yoga/yoga-prefix.pch -MMD -MT dependencies -MF /Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/Objects-normal/x86_64/YGMarker.d --serialize-diagnostics /Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/Objects-normal/x86_64/YGMarker.dia -c /Users/ravi/iosechojoy/mobileapp/node_modules/react-native/ReactCommon/yoga/yoga/YGMarker.cpp -o /Users/ravi/Library/Developer/Xcode/DerivedData/Echojoy-ghbnshelsfnjeffydgcmseonbqii/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/yoga.build/Objects-normal/x86_64/YGMarker.o

Application tried to present a nil modal view controller on target in React Native Objective-C extension

$
0
0

I am trying to port an iOS app over to React Native.

In this iOS app, one of the functions that needs to be done is to integrate it with a PayPal library (which is currently deprecated - we want to move away from it at some point later this year, but do not have the resources to do so now).

All we're doing with this library is obtaining a unique code from PayPal - that requires a View Controller to pop up, accept client credentials and return a code giving access.

I am extremely new to Objective-C.

I've got this so far (note: I have not included all the methods/properties but can include any missing):

COMPLETE PaypalSdk.h and PaypalSdk.m are at the bottom now

I am basing this off of this library:

https://github.com/paypal/PayPal-iOS-SDK/blob/master/SampleApp/PayPal-iOS-SDK-Sample-App/ZZMainViewController.m

And this documentation:

https://github.com/paypal/PayPal-iOS-SDK/blob/master/docs/profile_sharing_mobile.md

However when trying what I am above, I get the following error:

React Native error screen

How exactly should I resolve this? It seems to need a View Controller but I'm not totally sure how to launch one from React Native in this context.

All we're trying to get is the shared profile information.

Here is one of the stack traces:

callstack: (    0   CoreFoundation                      0x00007fff23c7127e __exceptionPreprocess + 350    1   libobjc.A.dylib                     0x00007fff513fbb20 objc_exception_throw + 48    2   UIKitCore                           0x00007fff47a25b1a -[UIViewController _presentViewController:withAnimationController:completion:] + 5247    3   UIKitCore                           0x00007fff47a2801b __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 98    4   UIKitCore                           0x00007fff47a28533 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 511    5   UIKitCore                           0x00007fff47a27f79 -[UIViewController _presentViewController:animated:completion:] + 187    6   UIKitCore                           0x00007fff47a281e0 -[UIViewController presentViewController:animated:completion:] + 150    7   myappname                   0x000000010f92f8ac -[PaypalSdk getUserAuthorizationForProfileSharing] + 348    8   myappname                   0x000000010f92fd99 -[PaypalSdk generateCode:] + 233    9   CoreFoundation                      0x00007fff23c7820c __invoking___ + 140    10  CoreFoundation                      0x00007fff23c753af -[NSInvocation invoke] + 319    11  CoreFoundation                      0x00007fff23c75684 -[NSInvocation invokeWithTarget:] + 68    12  myappname                   0x000000010f6e3902 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2658    13  myappname                   0x000000010f6e7a37 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 791    14  myappname                   0x000000010f6e7543 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 131    15  myappname                   0x000000010f6e74b9 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25    16  libdispatch.dylib                   0x0000000110caddd4 _dispatch_call_block_and_release + 12    17  libdispatch.dylib                   0x0000000110caed48 _dispatch_client_callout + 8    18  libdispatch.dylib                   0x0000000110cb55ef _dispatch_lane_serial_drain + 788    19  libdispatch.dylib                   0x0000000110cb617f _dispatch_lane_invoke + 422    20  libdispatch.dylib                   0x0000000110cc1a4e _dispatch_workloop_worker_thread + 719    21  libsystem_pthread.dylib             0x00007fff5246371b _pthread_wqthread + 290    22  libsystem_pthread.dylib             0x00007fff5246357b start_wqthread + 15)

Here is my complete PayPalSdk.m file:

#import <PayPal-iOS-SDK/PayPalMobile.h>#import <PayPal-iOS-SDK/PayPalConfiguration.h>#import <PayPal-iOS-SDK/PayPalOAuthScopes.h>#import <PayPal-iOS-SDK/PayPalProfileSharingViewController.h>#import <QuartzCore/QuartzCore.h>#import "PaypalSdk.h"@interface PaypalSdk ()@property(nonatomic, strong, readwrite) IBOutlet UIButton *payNowButton;@property(nonatomic, strong, readwrite) IBOutlet UIButton *payFutureButton;@property(nonatomic, strong, readwrite) IBOutlet UIView *successView;@property(nonatomic, strong, readwrite) PayPalConfiguration *payPalConfig;@end@implementation PaypalSdk#define kPayPalEnvironment PayPalEnvironmentProduction//int *REQUEST_CODE_PROFILE_SHARING = 3;- (void)viewDidLoad {  [super viewDidLoad];  self.title = @"Pinyada PayPal";  // Set up payPalConfig  self.payPalConfig = [[PayPalConfiguration alloc] init];  self.payPalConfig.acceptCreditCards = NO;  self.payPalConfig.merchantName = @"Pinyada PayPal";  self.payPalConfig.merchantPrivacyPolicyURL = [NSURL URLWithString:@"https://www.paypal.com/webapps/mpp/ua/privacy-full"];  self.payPalConfig.merchantUserAgreementURL = [NSURL URLWithString:@"https://www.paypal.com/webapps/mpp/ua/useragreement-full"];  NSLog(@"PayPal iOS SDK version: %@", [PayPalMobile libraryVersion]);}- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {#warning "Enter your credentials"  [PayPalMobile initializeWithClientIdsForEnvironments:@{PayPalEnvironmentProduction : @"PayPalProductionID",                                                         PayPalEnvironmentSandbox : @"YOUR_CLIENT_ID_FOR_SANDBOX"}];  return YES;}/*- (void)generateCode:()code {NSLog(@"Test");}*/- (void)viewWillAppear:(BOOL)animated {  [super viewWillAppear:animated];  // Start out working with the mock environment. When you are ready, switch to PayPalEnvironmentProduction.  [PayPalMobile preconnectWithEnvironment:PayPalEnvironmentProduction];}- (IBAction)getUserAuthorizationForProfileSharing:(id)sender {  NSSet *scopeValues = [NSSet setWithArray:@[kPayPalOAuth2ScopeOpenId, kPayPalOAuth2ScopeEmail, kPayPalOAuth2ScopeAddress, kPayPalOAuth2ScopePhone]];  PayPalProfileSharingViewController *profileSharingPaymentViewController = [[PayPalProfileSharingViewController alloc] initWithScopeValues:scopeValues configuration:self.payPalConfig delegate:self];  [self presentViewController:profileSharingPaymentViewController animated:YES completion:nil];}- (IBAction)obtainConsent {  // Choose whichever scope-values apply in your case. See `PayPalOAuthScopes.h` for a complete list of available scope-values.  NSSet *scopeValues = [NSSet setWithArray:@[kPayPalOAuth2ScopeOpenId, kPayPalOAuth2ScopeEmail, kPayPalOAuth2ScopeAddress, kPayPalOAuth2ScopePhone]];  PayPalProfileSharingViewController *psViewController;  NSLog(@"PS VIEW CONTROLLER");  NSLog(psViewController);  psViewController = [[PayPalProfileSharingViewController alloc] initWithScopeValues:scopeValues                                                                       configuration:self.payPalConfig                                                                            delegate:self];// Access the root view controller  UIViewController *rootviewcontroller= [UIApplication sharedApplication].keyWindow.rootViewController;  // Present the PayPalProfileSharingViewController  [ rootviewcontroller presentViewController:psViewController animated:YES completion:nil];}- (void)userDidCancelPayPalProfileSharingViewController:(PayPalProfileSharingViewController *)profileSharingViewController {  // User cancelled login. Dismiss the PayPalProfileSharingViewController, breathe deeply.  [self dismissViewControllerAnimated:YES completion:nil];}- (void)payPalProfileSharingViewController:(PayPalProfileSharingViewController *)profileSharingViewController             userDidLogInWithAuthorization:(NSDictionary *)profileSharingAuthorization {  // The user has successfully logged into PayPal, and has consented to profile sharing.      NSLog(@"REACT NATIVE ENV test");  // Be sure to dismiss the PayPalProfileSharingViewController.  [self dismissViewControllerAnimated:YES completion:nil];}RCT_EXPORT_MODULE()RCT_EXPORT_METHOD(generateCode: (RCTResponseSenderBlock)callback) {    [PayPalMobile initializeWithClientIdsForEnvironments:@{PayPalEnvironmentProduction : @"PayPalProductionID",                                                           PayPalEnvironmentSandbox : @"YOUR_CLIENT_ID_FOR_SANDBOX"}];    [self obtainConsent];    NSLog(@"REACT NATIVE ENV test");    //code = @"this is a test!";    // TODO: Implement some actually useful functionality    callback(@[[NSNull null], @"test"]);}@end

And here is my complete PaypalSdk.h file:

#import "RCTBridgeModule.h"#import "PayPalMobile.h"@interface PaypalSdk : UIViewController <RCTBridgeModule, PayPalProfileSharingDelegate>@property(nonatomic, strong, readwrite) NSString *environment;@property(nonatomic, strong, readwrite) NSString *resultText;@property(nonatomic, strong) UIWindow *window;@property(nonatomic, strong) UIViewController *rootViewController;@end

Is there a way to download a mp3 file from my python server to my react native IOS app?

$
0
0

i want to download a mp3 file from my server(Flask), and store it in my react native IOS app, so I can listen to the song offline.


Why status bar changes when text input / keyboard is active?

$
0
0

I have a project built in react native(v0.59), and the problem is happening on iOS 13(didn't test on lower version).

When the text input / keyboard is active, no matter if it's native input or input in webviews, the status bar will change from black to white.

I have set the status bar style to Dart Content and toggled View controller-based status bar appearance between YES and NO. But the problem is still happening.

Any suggestions are appreciated.

Get current scroll position of ScrollView in React Native

$
0
0

Is it possible to get the current scroll position, or the current page of a <ScrollView> component in React Native?

So something like:

<ScrollView  horizontal={true}  pagingEnabled={true}  onScrollAnimationEnd={() => {       // get this scrollview's current page or x/y scroll position  }}>  this.state.data.map(function(e, i) { <ImageCt key={i}></ImageCt>   })</ScrollView>

undefined symbol:_OBJC_CLASS_$_RCTModelManager error on Xcode release build -React native

$
0
0

undefined symbol:_OBJC_CLASS_$_RCTModelManager

Undefined symbols for architecture armv7:"_OBJC_CLASS_$_RCTModalManager", referenced from:      objc-class-ref in libReact-Core.a(RCTModalHostViewManager.o)ld: symbol(s) not found for architecture armv7clang: error: linker command failed with exit code 1 (use -v to see invocation)```

Access to screen height depending on the device

$
0
0

Below are various situations with the screen on the phone:

  • with Android navigation bar (bottom black bar)

  • without Android navigation bar (bottom black bar)

  • with notches (small and large)

  • without notches (small and large)

enter image description here

How can I access the height in red?

I am currently trying to use:

react-native-responsive-screen

But it doesn't always work well. When I test on the screen with notches it is OK but when I test on another device, the height does not match

When I do something on the device without Android navigation bar, when I run the application on the phone with this bar it covers part

ITMS-90809: Deprecated API Usage warning when using react-native-html-to-pdf

$
0
0

When I submit app on app store I am getting following warning:

following notification form the app-store connect: ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of new apps that use UIWebView APIs starting from April 2020.

I tried implementing solution from following link:https://github.com/christopherdro/react-native-html-to-pdf/issues/151#issuecomment-569597226

After implementing this solution warning from app-store goes but I am getting these two issues:

  1. Images from local cache are not shown in PDF
  2. Font from local cache are not shown in PDF

Also, I am not facing above issues on simulator. I tried running build in release mode and on various versions of simulator.

Thanks in advance.

App crashes on exit in InspectorImpl::getPages() on acquiring mutex

$
0
0

Having issue with React Native, my App crashes on exit(when it got swiped up to unload it), XCode debugger point to the first exception location here:

react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp: Line 68 in ede2c50

 std::lock_guard<std::mutex> lock(mutex_); 

("mutex lock failed")Then this exception is not handled and terminate() called.

Xcode: 11.4.1/11E503a - /usr/bin/xcodebuildreact: 16.9.0 => 16.9.0react-native: 0.61.5 => 0.61.5

enter image description here

Any ideas on how to find out a reason for this issue?

Waiting for a variable to be assigned before executing code in Objective C

$
0
0

I am trying to write a connection between React Native and Objective C to integrate a native view.

This mostly works at this point, however there's one final step I can't get working - passing back a generated code into React Native. I have the following code:

    RCT_EXPORT_MODULE()    RCT_EXPORT_METHOD(generateCode: (RCTResponseSenderBlock)callback) {     dispatch_async(dispatch_get_main_queue(), ^{          [PayPalMobile initializeWithClientIdsForEnvironments:@{PayPalEnvironmentProduction : @"",                                                               PayPalEnvironmentSandbox : @""}];        [self initzero];        [self initone];        [self getUserAuthorizationForProfileSharing];    });    callback(@[[NSNull null], self.code]);}

Ultimate, the getUserAuthorizationForProfileSharing gets to this function:

- (void)sendProfileSharingAuthorizationToServer:(NSDictionary *)authorization {   NSDictionary *response = [authorization objectForKey:@"response"];   NSString *code = [response objectForKey:@"code"];self.code = code;}

This also works and correctly sets the code.

However as far as I can tell, this is all asynchronous. I'm wondering what method I would use to only issue the callback once I get the code property set on the object.

Is there any good way to do this?

EDIT: Here's the stack trace:

2020-05-18 12:24:29.930 [info][tid:com.facebook.react.JavaScript] NATIVE EXCEPTION2020-05-18 12:24:29.930 [info][tid:com.facebook.react.JavaScript] *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]("4   libc++abi.dylib                     0x00007fff50256e97 _ZSt11__terminatePFvvE + 8","5   libc++abi.dylib                     0x00007fff50256e39 _ZSt9terminatev + 41","6   libdispatch.dylib                   0x000000010c12cd5c _dispatch_client_callout + 28","7   libdispatch.dylib                   0x000000010c13ade6 _dispatch_main_queue_callback_4CF + 1500","8   CoreFoundation                      0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9")

EDIT: self.code is nil on execution, even when I put it into dispatch_async. I need to ONLY execute the callback AFTER an event has happened


Exchange data simultaneously between mobile devices via NFC

$
0
0

Background

I would like to achieve a peer-to-peer connection to transmit data between two mobile devices. The amount of data to be transmitted would be around 70-200 bytes, so it is quite small. This transmission also won't be some stream-like continuous flow. It would be a one-time thing to get the acknowledgement of the devices.

TL;DR: I want to exchange data between 2 mobile phones which would be using the same app.

Requirements

  • Has to work offline
  • Has to work between IOS & Android

So Far

I have analyzed a few possible ways to achieve that and I am quite confused about what to pick.

  • NFC: I want to simultaneously send data for both phones and NFC does not work as a tag in the IOS. If there is a workaround for that let me know.
  • NFC + BLE: This approach utilizes the NFC to pair devices to use Bluetooth then the data transfer is conducted on BLE.

So, I'm humbly asking a direction about getting my head around those concepts to solve my problem. If you have another technology that might help me, please specify it. Also, I'm making the development with React Native.

Development of ReactNative iOS App using DLMS protocol of GuruxDLMS.c library [closed]

$
0
0

Several methods are being considered to develop ReactNative App for iOS using DLMS protocol.

  1. GuruxDLMS library is used in ReactNative App after ReactNative modularization.

  2. Find a DLMS library dedicated to ReactNative. However, I haven't found a DLMS library so far.

  3. I wonder if there is another way.

https://github.com/Gurux/GuruxDLMS.c

React native - build aplication

$
0
0

I downloaded the react app via npx react-native init AwesomeProject. The application ran for the first time. After stopping through the terminal, the build application pauses and thus see the screen is a few minutes and does not continue.For Android everything is OK. This "mistake" is just for ios.

Anyone have any idea?Thank you

screen shot

Screen flickering in Vuforia Unity app within React Native on iOS

$
0
0

I'm developing AR app in Unity (2019.3.0f6) using Vuforia library (9.0.12). The Unity app is integrated into React Native using https://github.com/asmadsen/react-native-unity-view

The app works works well on Android and iPhone 6s. However when tested on iPhones XS and 11 Pro after switching to Unity view the screen starts to "flicker". There's a black bar quickly appearing and disappearing at the top of the screen making the view change the size all the time which results in the flickering effect: https://youtu.be/1iiep1Bcrg4

This issue doesn't seem to occur the first time the app is launched after installing but is present in every subsequent launch.

I've tried disabling the status bar using <StatusBar hidden={true}/> within React Native. It did stop the flickering on iPhone 11 Pro. On iPhone XS it's still occurring but not immediately after switching to Unity view - it seems to start only after a user interacts with the screen. I've tried adding an offset from the top of the screen but the black bar still appears at the top of the Unity view and not the entire screen so the flickering still occurs: https://youtu.be/-b_sQegyHX4

My suspicion is that it's somehow related to the iPhone notch but I'm not sure which part of the app is causing the problem. Any help is greatly appreciated!

Change ContextMenu iOS apperance (background & highlight color)

$
0
0

I'm working on my React-Native app and I use RN ContextMenu iOS library that was written on top of Native Context Menu component, everything works fine except background & highlight color behavior.

Looks like by default highlight & background color follows iOS theme, so it could be either black or white. Althought this behavior does not fit my app's colors and I wanna change it but I'm competely newbie in objective-c so I can't understand what part should I change.

Just to make it clear I make a little demo that shows ugly white highlight & bg color: https://www.youtube.com/watch?v=AASqQXXtRwE&feature=youtu.be

I belive that I should change something in this file ->https://github.com/mpiannucci/react-native-context-menu-view/blob/master/ios/ContextMenuView.m

Ideally, I would like to make bg color transparent, can you help me guys?

Viewing all 16558 articles
Browse latest View live


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