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

Failed authentication in Apple Developer Portal when execute expo build:ios

$
0
0

I'm trying to config automatically build iOS apps using Expo through Gitlab-CI. This are the commands that I am using:

expo login -u expo_user -p expo_pass
expo build:ios --non-interactive --apple-id my_id@domain.com --clear-dist-cert --clear-provisioning-profile --dist-p12-path "path_to_file.p12" --provisioning-profile-path "path_to_file.mobileprovision"

I am already passing the respective values of this env vars:

EXPO_APPLE_PASSWORD
EXPO_IOS_DIST_P12_PASSWORD

During the 2nd command execution it launch this logs:

[14:24:23] Trying to authenticate with Apple Developer Portal...
[14:24:25] Authentication with Apple Developer Portal failed!
[14:24:25] Error: Reason: Unknown reason, raw: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>Apple</center>\r\n</body>\r\n</html>\r\n\n"
    at runAction (/expo-cli@3.13.1/src/appleApi/fastlane.ts:28:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Object.authenticate (/expo-cli@3.13.1/src/appleApi/authenticate.ts:46:40)
    at IOSBuilder.getAppleCtx (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:47:23)
    at IOSBuilder.produceMissingCredentials (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:123:22)
    at IOSBuilder.prepareCredentials (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:65:7)
    at IOSBuilder.run (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:19:7)
    at IOSBuilder.command (/expo-cli@3.13.1/src/commands/build/BaseBuilder.js:55:7)
    at Command.<anonymous> (/expo-cli@3.13.1/src/exp.ts:81:7)

The Apple Developer account that I am using have configured the Two Factor Authentication (2FA).

Is this the reason why the expo build:ios command is failing the auth against Apple Portal? What am I missing in this commands?

PS: These commands on my laptop works fine!


React Native PDF Signature

$
0
0

I’m trying to implement a pdf digital signature component for a react-native app.

I am using react-native-pdf for rendering the pdf on the screen and react-native-draggable for dragging the signature on top of the pdf view.

With react-native-draggable I can get the position of the signature on the screen but not related to the position on the pdf document.

Is there a way I can get/calculate the vertical position on the pdf?

I have to take into account different screen sizes, different pdf sizes, and different and variable margins. It looks more or less like this Refer to this image

Any formula/algorithm you can point as help is appreciated.

Styling React Native Picker

$
0
0

I'm attempting to style the text color of the items in a React Native picker. I've only been working in iOS so far, but if I could find a cross-platform solution that'd be awesome.

I've tried the following things:

Styling color on Picker

<Picker style={{color:'white'}} ...etc >

Styling color on Picker Items

<Picker.Item style={{color:'#fff'}} label={'Toronto'} value={'Toronto'} />

I've also seen some examples of adding a color property, so I tried this

<Picker.Item color='white' label={'Toronto'} value={'Toronto'} />

At a total loss here. Thanks for any insight!

EDIT: Here's a solution - use itemStyle prop in the Picker element. I believe this is iOS only.

<Picker itemStyle={{color:'white'}} >
      <Picker.Item color='white' label={'Toronto'} value={'Toronto'} />
      <Picker.Item  label={'Calgary'} value={'Calgary'} />
</Picker>

Is there any case that some backend apis are not working on some devices?

$
0
0

I have built an entire app(including backend, admin panel, a mobile app using react native). And I deployed backend and admin panel on the VPS server. It was working well. In recent days, I ran into a really weird problem. The app does not work correctly on some devices, not every device. For example, Samsung a70 and one plus 6t. On the other devices, it works well. In the app, I fetch data from the backend and show it on the app. And also there is a login/signup feature. Login and signup feature is working well, but fetching data is not working. This happens on some devices, not every device as I mentioned above. It mainly happens on android devices. I am really weird and can't find any key to the problem. Can anyone help me to find the issue?

I'm not able to get images to load into an Image component

$
0
0

Hi i'm new to JS and React Native. I cannot seem to get any images to load into the Image component. Im using all secure uri's and testing them in a browser first. they load in a browser but not in my ios simulator. there also seems to be no errors. Hoping someone has seen this before

here's a code extract :

<Image    
      source = { {uri:"https://images.freeimages.com/images/large-previews/f37/cloudy-scotland-1392088.jpg" }}
      resizeMode = {"contain"}
      onLoadStart = { () => alert("start")}
      onLoadEnd = { () => alert("loaded") }
      onError = {(e)=> alert(e.nativeEvent.error)}
    />

info.plist extract:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>

How to lock device orientation for React Native

$
0
0

Hi I want to know how to lock device orientation for React Native for both android and iOS. I need to lock the orientation once user rotate the device and application will lock with portrait or lanscape

React-native cannot create cookie

$
0
0

I'am learnin react-native and I need create cookie but I can't. when I doing android app I create cookie This CookieMAnager.getInstance().setCookie(Url,"pushtoken="+Token); And webpage request this response.write Request.Cookies("pushtoken") and showing my token on page. but react-native cannot set cookie I try all cookie manager for ios this is react-native code CookieManager.set({ name: 'myCookie', value: 'myValue', domain: 'some domain', origin: 'some origin', path: '/', version: '1', expiration: '2030-05-30T12:30:00.00-05:00' }).then((res) => { console.log('CookieManager.set =>', res); }); if I import this community cookies this code error RNCookieManagerIOS.set was called with 2 arguments but expect 1 arguments.

if import this react-native-cookies this is not error but my web page cannot showing cookies but react native console showing get all cookies

"myCookie": {"domain": "some domain", "name": "myCookie", "path": "/", "value": "myValue"}} this

React Native: How to select the next TextInput after pressing the "next" keyboard button?

$
0
0

I defined two TextInput fields as follows:

<TextInput 
   style = {styles.titleInput}
   returnKeyType = {"next"}
   autoFocus = {true}
   placeholder = "Title" />
<TextInput
   style = {styles.descriptionInput}          
   multiline = {true}
   maxLength = {200}
   placeholder = "Description" />

But after pressing the "next" button on my keyboard, my react-native app isn't jumping to the second TextInput field. How can I achieve that?

Thanks!


What is "native" and what is not in a React Native project?

$
0
0

I'm still very confused on how React Native works. Maybe because I don't have a decent background on Mobile Development (I have tried native Android once or twice though).

If I'm not wrong, hybrid frameworks like Phonegap or Ionic will run the entire project (or most of it) in a 'WebView', am I wrong?

Whereas native frameworks such as React Native is meant to use native resources instead of purely web technology.

But we still write Javascript, and React Native does the job so quickly that it is probably still using the Javascript we just wrote (I mean, it's not parsing, translating to native code and recompiling).

The question that comes to my mind is, what exactly is a native resource and what is not in a React Native project? Where is the Javascript we write running if not in a 'webview'? There are native libraries that creates the interface of Javascript to Objective-C and Java for both platforms? In a web-solution it simply injects the entire code in the WebView?

Extra question : can we consider React Native an hybrid framework just because we write one code for many different platforms, or it is not the correct terminology?

React Native push notifications iOS - number pending notifications

$
0
0

I use React Push Notifications (https://github.com/zo0r/react-native-push-notification) with localNotificationSchedule for launch notifications, but in iOS the number of push notifications is never destroyed.

Even if I select notifications the number doesn't go down...

This number: (in icon from desktop)

enter image description here

My code:

import PushNotificationIOS from "@react-native-community/push-notification-ios";

var PushNotification = require("react-native-push-notification");

  PushNotification.configure({

    onRegister: function(token) {
      console.log("TOKEN:", token);
    },

    onNotification: function(notification) {
      console.log("NOTIFICATION:", notification);

        let num = 0;
        if (Platform.OS === 'ios') {
          num = notification.data.num;
        } else {
          num = notification.userInfo.num;
        }        

        switch(num) {

          case 1:
            NavigationService.navigate('OnePage');
            break;
          case 2:
            NavigationService.navigate('TwoPage');
            break;     
          default:
            NavigationService.navigate('Home');

      }

      if (Platform.OS === 'ios') {
        notification.finish(PushNotificationIOS.FetchResult.NoData);
      }
    },

    senderID: "YOUR GCM (OR FCM) SENDER ID",

    permissions: {
      alert: true,
      badge: true,
      sound: true
    },

    popInitialNotification: true,


    requestPermissions: true    
  });

class IndexNavigator extends React.Component {
...

Apparently, according to the documentation this code should be correct, but even if I press the notifications and redirect me to the page I want. The number in the icon never decreases, it always increases.

Anyone know why this can happen?

Splash screen GIF in react native

$
0
0

I am making an application with react native with native code of android and ios, in the application specifications a splash screen with a GiF is required, I have already inserted the required dependencies of the documentation of react native

dependencies {
  // If your app supports Android versions before Ice Cream Sandwich (API level 14)
  implementation 'com.facebook.fresco:animated-base-support:1.3.0'

  // For animated GIF support
  implementation 'com.facebook.fresco:animated-gif:2.0.0'

  // For WebP support, including animated WebP
  implementation 'com.facebook.fresco:animated-webp:2.1.0'
  implementation 'com.facebook.fresco:webpsupport:2.0.0'

  // For WebP support, without animations
  implementation 'com.facebook.fresco:webpsupport:2.0.0'
}

GIF support works correctly within the screen / components. However, when I try to place the GIF on the splash screen it doesn't work, there is a static image of the GIF

import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

public class SplashActivity extends AppCompatActivity {
     @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);

            Intent intent = new Intent(SplashActivity.this, MainActivity.class);
            startActivity(intent);
            finish();
        }
}


<?xml version="1.0" encoding="utf-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <item>
            <bitmap
                    android:gravity="center"
                    android:src="@drawable/splash_screen2"/>
        </item>
    </layer-list>

How can I place a splash screen in gif format?

getInitialLink is not working but onLink is working in react-native-firebase v6

$
0
0

I am using the following code in App.js - componentDidMount

    firebase
      .dynamicLinks()
      .getInitialLink()
      .then(link => {
        if (link) {
          if (link.url.includes('/s/')) {
            this.handleSignupURL(link.url)
          }
        }
      })


    firebase.dynamicLinks().onLink(({ url }) => {
      if (url && url.includes('/s/')) {
        this.handleSignupURL(url)
      }
    })
  }

On clicking the dynamic link: When the app is active, onLink handler is fired and the app handles it correctly. But when the app is closed, getInitialLink returns a null. Any solution to get the initial link?

I am using react-native-firebase v6, react-native corresponding to expo 36. The installation is performed as per the new react-native-firebase quick start. I am using the iOS app.

How to read this iOS stacktrace?

$
0
0

I usually develop in higher level languages like Javascript and Python , so I am not that experienced when it comes to reading lower level stack traces. I am building an iOS app with React Native and my app sometimes unexpectedly crashes. Reading the crash log this is what I get:

Incident Identifier: B03D5F95-EFD1-4FEB-AE18-C8EFEF273E53
CrashReporter Key:   6049c1cc93a2e0163265631aa6cc2fd30a1af6e7
Hardware Model:      iPhone7,2
Process:             MyApp [24268]
Path:                /private/var/containers/Bundle/Application/99B2B9A1-D266-4222-A083-84C4CFFCE182/MyApp.app/MyApp
Identifier:          org.mycompany.MyApp
Version:             1 (1.0)
Code Type:           ARM-64 (Native)
Role:                Non UI
Parent Process:      launchd [1]
Coalition:           org.mycompany.MyApp [3119]


Date/Time:           2019-03-04 14:20:18.4924 +0800
Launch Time:         2019-03-04 14:09:15.2536 +0800
OS Version:          iPhone OS 11.0.3 (15A432)
Baseband Version:    6.17.00
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace <0xF>, Code 0x8badf00d
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x0000000180a60bc4 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000180a60a3c mach_msg + 72
2   BackBoardServices               0x00000001835d0de0 _BKSHIDGetCurrentDisplayBrightness + 112
3   BackBoardServices               0x00000001835de9cc BKSDisplayBrightnessGetCurrent + 32
4   FrontBoardServices              0x00000001835fffc0 -[FBSUIApplicationSystemService currentBacklightLevel] + 12
5   UIKit                           0x000000018a8a3d44 -[UIDevice _backlightLevel] + 44
6   UIKit                           0x000000018a8aced4 -[UIScreen _postBrightnessDidChangeNotificationIfAppropriate] + 168
7   CoreFoundation                  0x0000000180efa12c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
8   CoreFoundation                  0x0000000180efa090 ___CFXRegistrationPost_block_invoke + 64
9   CoreFoundation                  0x0000000180f1016c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
10  CoreFoundation                  0x0000000180f0fa3c __CFRunLoopDoBlocks + 288
11  CoreFoundation                  0x0000000180f0dca4 __CFRunLoopRun + 2436
12  CoreFoundation                  0x0000000180e2e2d8 CFRunLoopRunSpecific + 436
13  GraphicsServices                0x0000000182cbff84 GSEventRunModal + 100
14  UIKit                           0x000000018a3db880 UIApplicationMain + 208
15  MyApp                           0x00000001005833d4 main + 29652 (main.m:14)
16  libdyld.dylib                   0x000000018095256c start + 4

How/where do I begin reading thsi crash log? I believe it has something to do with mach_msg_trap but I haven't been able to find anything about it. For some context, my app is an app which tracks the users Geolocation with background geolocation tracking. I am unable to figure out what causes the crash.

React-Native iOS - How to show a view controller after Launch screen, before initialising react native bridge (iOS)

$
0
0

I have an animation (splash screen animation) that is in a native iOS view controller(swift), and I want to show that animation's view vontroller after the launch screen for 3 seconds before launching the react-native bridge.

I tried to play around with the appdelegate.m file, here's what I came up with😩.

RN version 0.61

#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

     UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"AnimationView" bundle:[NSBundle mainBundle]];
     UIViewController *vc =[storyboard instantiateInitialViewController];


  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"SplashScreenFinal"
                                            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]];
     self.window.rootViewController = vc;
     [self.window makeKeyAndVisible];


  if (after 3 secs) {
      self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
      UIViewController *rootViewController = [UIViewController new];
      rootViewController.view = rootView;
      self.window.rootViewController = rootViewController;
      [self.window makeKeyAndVisible];

  }
  return YES;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

@end

Thanks.

react-native: command not found

$
0
0

I am getting -bash: react-native: command not found error while creating react-native project.

Below are the additional info

1. brew --version
   homebrew 0.9.9
2  brew info watchman
   watchman `enter code here`stable 4.50
   /usr/local/Cellar/watchman/4.4.0
3. brew info flow
   stable 0.24.1
   /usr/local/Cellar/flow/0.24.1
4. brew info node
   stable 6.1.0
   /usr/local/Cellar/node/6.1.0
5. npm -version
   3.8.6
6. echo $PATH
/Users/Ashok/.rbenv/shims:/Users/Ashok/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I tried suggested steps from the below link but still i am getting same error.

  1. react-native-command-not-found

I don't have any "npm" directory which they have specified in the solution

Ashoks-MacBook-Pro:share Ashok$ ls
aclocal     doc     info        ruby-build  zsh
autoconf    emacs       man     systemtap

But i found npm file exist in below location.

/usr/local/Cellar/node/6.1.0/etc/bash_completion.d

I uninstalled react-native and installed again but still i am facing same issue.


TypeError: undefined is not an object (evaluating '_rxjs.queueScheduler.constructor')

$
0
0

We have developed a react-native application using react-redux in ubuntu. We are trying to build an IPA from a mac system using the same code.but we are unable to run the application and getting an error in the simulator

enter image description here

How to install react-native-track-player

$
0
0

I tried to install the react-native-track-player in a bare (just react-native init) App.

After

yarn add react-native-track-player
yarn add react-native-swift
cd ios
pod instal

I got the message:

  • [!] CocoaPods could not find compatible versions for pod "react-native-track-player": In Podfile: react-native-track-player (from ../node_modules/react-native-track-player) Specs satisfying the react-native-track-player (from../node_modules/react-native-track-player) dependency were found, but they required a higher minimum deployment target.

So I changed in the podfile

platform :ios, '9.0' to: platform :ios, '10.0'

and again

pod install

This results to the message:

  • [!] Unable to determine Swift version for the following pods: react-native-track-player does not specify a Swift version and none of the targets (mist) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

In the next step I added s.swift_version = '4.0' to the react-native-track-player.podspec file in the node_modules.

Now the react-native-track-player pod were generated with the warnings:

  • [!] [Xcodeproj] Generated duplicate UUIDs: PBXBuildFile -- Pods.xcodeproj/targets/buildConfigurationList:buildConfigurations:baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,defaultConfigurationIsVisible:0,defaultConfigurationName:Release,displayName:ConfigurationList,isa:XCConfigurationList,,buildPhases:buildActionMask:2147483647,displayName:Headers,files:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,isa:PBXHeadersBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Sources,files:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,isa:PBXSourcesBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Frameworks,files:,isa:PBXFrameworksBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Copy generated compatibility header,files:,inputFileListPaths:,inputPaths:|,|,|,isa:PBXShellScriptBuildPhase,name:Copy generated compatibility header,outputFileListPaths:,outputPaths:|,|,|,runOnlyForDeploymentPostprocessing:0,shellPath:/bin/sh,shellScript:COMPATIBILITY_HEADER_PATH="${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h" MODULE_MAP_PATH="${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap" ditto "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h""${COMPATIBILITY_HEADER_PATH}" ditto "${PODS_ROOT}/Headers/Public/react_native_track_player/react-native-track-player.modulemap""${MODULE_MAP_PATH}" ditto "${PODS_ROOT}/Headers/Public/react_native_track_player/react-native-track-player-umbrella.h""${BUILT_PRODUCTS_DIR}" printf "\n\nmodule ${PRODUCT_MODULE_NAME}.Swift {\n header \"${COMPATIBILITY_HEADER_PATH}\"\n requires objc\n}\n">>"${MODULE_MAP_PATH}" ,,buildRules:,dependencies:displayName:React,isa:PBXTargetDependency,,displayName:react-native-track-player,isa:PBXNativeTarget,name:react-native-track-player,packageProductDependencies:,productName:react-native-track-player,productReference:displayName:libreact-native-track-player.a,explicitFileType:archive.ar,includeInIndex:0,isa:PBXFileReference,name:libreact-native-track-player.a,path:libreact-native-track-player.a,sourceTree:BUILT_PRODUCTS_DIR,,productType:com.apple.product-type.l ............

So I added "install! 'cocoapods', :deterministic_uuids => false" to the podfile

Now pod install runs without warnings, but the build in xcode or react-native run-ios crashes with the error

  • Command CompileSwiftSources failed with a nonzero exit code

This is my configuration:

System:
OS: macOS 10.15.3
CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
Memory: 68.81 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 13.8.0 - /usr/local/bin/node
Yarn: 1.22.0 - /usr/local/bin/yarn
npm: 6.13.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.3
System Images: android-28 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6200805
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: ^16.12.0 => 16.12.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
react-native-cli: 2.0.1

and the packages.json file

{
  "name": "first",
  "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 ."
  },
  "dependencies": {
    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-swift": "^1.2.2",
    "react-native-track-player": "^1.2.2"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^0.0.7",
    "babel-jest": "^25.1.0",
    "eslint": "^6.8.0",
    "jest": "^25.1.0",
    "metro-react-native-babel-preset": "^0.58.0",
    "react-test-renderer": "16.9.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

I am stranded! Any ideas what's wrong?

React native changing package name in iOS, missing files

$
0
0

I am trying to copy an existing app and change its name. I have changed the bundle id and project name from tcapp to iaapp.

However in xcode there are still folders called my old name (tcapp) and I get the error:

Build input file cannot be found: '/ios/tcapp/AppDelegate.m' (in target 'iaapp' from project 'iaapp')

enter image description here

How can I change the name the correct way and build the project successfully?

rn-apple-healthkit "unrecognised selector sent to instance"

$
0
0

I am using the following project to my React Native project.

https://github.com/nutrisense/rn-apple-healthkit

I want to use the getWorkout function but can not solve the following error that is being thrown

enter image description here

This is where I call the getWorkout function. I think the error is with the permissions.

enter image description here

Toggle bluetooth for ios device in react-native

$
0
0

Is there a way to toggle bluetooth connectivity for ios in react-native? What I want to achieve is- show nearby bluetooth devices in my app, and if bluetooth is switched off, then switch it on and scan for nearby bluetooth devices. I am using react-native-ble-plx library in my app for this, it is working fine in android, but doesn't seem to work in ios. I am using the below code in android for enabling it-

import { BleManager } from 'react-native-ble-plx';
this.manager = new BleManager();
this.manager.enable();

How can I achieve the above functionality in ios, if it's possible?

Viewing all 17663 articles
Browse latest View live


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