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

Using React Native iOS Release Build doesn't load new code but the version does

$
0
0

My React Native App do not respond to my changes of code in the Release mode of iOS. I don't know why but I cannot upload a new version with my changes. However, the version changes, is the only thing it changes when I apply a change in my code.

What can I do to fix it?

No matter if I build the app from XCode or by using the snippet react-native run-ios --configuration Release --device "iPhone of Charles" or if I just archive it and upload to the App Store.


Is there solution for phones communicating via bluetooth in React Native? [closed]

$
0
0

Now I am developing a project in React Native, in which two phones need to communicate with each other via Bluetooth.

I've searched the Internet and found the two most popular libraries for RN Bluetooth: https://github.com/innoveit/react-native-ble-managerhttps://github.com/Polidea/react-native-ble-plx

But unfortunately, neither of them can turn phone to peripheral mode, which means two phones can't communicate via Bluetooth using them.

Is there a solution to that? Or I have to develop the native module myself?

React-native run-ios command - Could not find iphone simulator

$
0
0

Trying to run an existing react-native app using ios simulator: react-native run-ios

I have looked here and tried all of the helpful answers: react-native run-ios can not find any simulator

I have also checked other github issues for react-native here: https://github.com/react-native-community/cli/issues/418 and here: https://www.bram.us/2019/09/04/react-native-could-not-find-iphone-x-simulator/ and nothing that was said has worked for me.

This is the full error log:

LO60188:appfolder mac$ react-native run-ios
Scanning folders for symlinks in /Users/mac/../../node_modules (10ms)
Found Xcode workspace MyAppName.xcworkspace
CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'

Could not find iPhone 6 simulator

I have ran npm audit fix as per suggested solutions to this, now I'm getting a build error, although the simulator runs with no app inside it.

The following build commands failed:
    CompileC /Users/../../../appfolder/ios/build/CC/Build/Intermediates.noindex/ReactNativeConfig.build/Debug-iphonesimulator/ReactNativeConfig.build/Objects-normal/x86_64/ReactNativeConfig.o /Users/../../../appfolder/node_modules/react-native-config/ios/ReactNativeConfig/ReactNativeConfig.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

I then tried a specific iphone simulator, to no avail either (same build error as above):

react-native run-ios --simulator="iPhone SE"

React native version for the project is: 0.55 but changed to 0.61.4 after running npm audit fix

Is it something to do with the podfile? As I had to run pod init and pod install to install the podfile

Any guidance greatly appreciated

Expo build:ios Something went wrong when trying to ensure App ID exists on Apple Developer Portal

$
0
0

I'm trying to run build:ios on expo, when I select the

? Will you provide your own Apple Push Notifications service key? Let Expo handle the process

It throws an error tells me I don't have access on membership resource. I'm not the owner of the team. I'm just a developer with an App manager Role.

× Something went wrong when trying to ensure App ID exists on Apple Developer Portal! Reason: Unexpected response, raw: {"responseId":"","resultCode":1200,"resultString":"Access Unavailable","userString":"You currently don't have access to this membership resource. Contact your team's Account Holder, Account holder, or an Admin.","creationTimestamp":"2019-09-27T07:56:56Z","protocolVersion":"QH65B2","userLocale":"en_US","requestUrl":"https://developer.apple.com/services-account/QH65B2/account/ios/identifiers/listAppIds.action","httpCode":200}

Can I just skip this question? or there's alternative way.

Is there a solution for phones communicating via bluetooth in React Native?

$
0
0

Now I am developing a project in React Native, in which two phones need to communicate with each other via Bluetooth.

I've searched the Internet and found the two most popular libraries for RN Bluetooth:react-native-ble-manager, react-native-ble-plx.

But unfortunately, neither of them can turn phone to peripheral mode, which means two phones can't communicate via Bluetooth using them.

So is there a solution for phones communicating via Bluetooth in React Native?

My react native encountered a problem while building tvOS but iOS succeeded

$
0
0

I followed the link below to install new reactNative App ..

https://facebook.github.io/react-native/docs/getting-started

After Successfully Installed I am able to run the iOS target but not tvOS while running tvOS I am getting below error ..

Library not found for -lPods-AwesomeProject-tvOS

It seems in podfile cocoapods not included for tvos target .. So I added cocoaPods for tvos target and then build again but getting below warning and errors..

enter image description here

I am also adding my Podfile here please suggest any changes

  # Pods for ReactNativeSample
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

  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'

  target 'ReactNativeSampleTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'ReactNativeSample-tvOS' do
  # Pods for ReactNativeSample-tvOS
platform :tvos, '9.2'

All same pods in above target included here as well..

  target 'ReactNativeSample-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end ```

Is there a popular technique or language to make a Website and IOS and Android and Desktop apps at same time? [closed]

$
0
0

I know there is react-native for IOS and Android but what about building a website at same time also with a ready to go desktop code , like in unity we can make IOS and Android and Desktop apps with few tweaks on code is that available now for other APPS ? i asked cause i dont wanna waste more time focusing in one language or technique , this last years i started some android studio programming and stopped cause most projects want an IOS and Android app also , i learned some php ,java script ,sql,java SE, and unity (did some games with it). but when i search for work i found that each company wanted a special techniques or languages and i dont think someone will know all programming (& network,Operating systems) technologies at same time , so is there some popular technology to do that at same time (ios+android+website+desktop) ?

Horizontal scrollview snapping react native

$
0
0

Hi I am trying to achieve scrollview snap to center like below gif link

Check This Gif

But unable to do so. Following is my react native code to achieve this.

or is there any method to scroll to particular index of scrollview elements like android ?

Any help would be appreciated. Thanks in advance

<ScrollView
  style={[styles.imgContainer,{backgroundColor:colorBg,paddingLeft:20}]}
  automaticallyAdjustInsets={false}
  horizontal={true}
  pagingEnabled={true}
  scrollEnabled={true}
  decelerationRate={0}
  snapToAlignment='center'
  snapToInterval={DEVICE_WIDTH-100}
  scrollEventThrottle={16}
  onScroll={(event) => {
    var contentOffsetX=event.nativeEvent.contentOffset.x;
    var contentOffsetY=event.nativeEvent.contentOffset.y;

    var  cellWidth = (DEVICE_WIDTH-100).toFixed(2);
    var cellHeight=(DEVICE_HEIGHT-200).toFixed(2);

    var  cellIndex = Math.floor(contentOffsetX/ cellWidth);

    // Round to the next cell if the scrolling will stop over halfway to the next cell.
    if ((contentOffsetX- (Math.floor(contentOffsetX / cellWidth) * cellWidth)) > cellWidth) {
      cellIndex++;
    }

    // Adjust stopping point to exact beginning of cell.
    contentOffsetX = cellIndex * cellWidth;
    contentOffsetY= cellIndex * cellHeight;

    event.nativeEvent.contentOffsetX=contentOffsetX;
    event.nativeEvent.contentOffsetY=contentOffsetY;

    // this.setState({contentOffsetX:contentOffsetX,contentOffsetY:contentOffsetY});
    console.log('cellIndex:'+cellIndex);

    console.log("contentOffsetX:"+contentOffsetX);
      // contentOffset={{x:this.state.contentOffsetX,y:0}}
  }}
>
  {rows}

</ScrollView>

Firebase signup with phone and email and then set password at first login

$
0
0

I have a mobile app with user signup by email and password working correctly. I want to change it as mentioned below.


I want to signup a user with his email and phone number without specifying the password. This is done by a system admin. Then at the first signing in, the user should be able to do a phone auth and then set the password. Do firebase support this? If yes, can someone point me out how to do it?

How to resolve ios crash app based react native in prod?

$
0
0

I have published a react app in apple store but it was rejetected with two crash files attached to the review :

enter image description here

and here the first crash file content :

{"app_name":"MaliPub","timestamp":"2019-11-20 10:44:24.73 -0800","app_version":"1.3","slice_uuid":"2e247ecb-f18e-3d80-a51a-d29eea0374f5","adam_id":1480606033,"build_version":"5","bundleID":"com.malipub","share_with_app_devs":true,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 13.2.2 (17B102)","incident_id":"5BFBF7D1-A78E-457D-9A7E-7291DC7A6C2B","name":"MaliPub"}

.....................

Any help pleassse !!!!!!!!!!!!!

Chat application development with flutter/react-native for Android and IOS, Will it support all the features? [closed]

$
0
0

I am Android developer, I am new in flutter/react-native application development. Need help about development possibility regarding below requirements,

I am developing chat application like Slack with all the features including, single, group chat, media sharing, read receipt, typing intimation, add/remove participants, admin assignments (for group chat), video and voice calling (single and conference calls), screen sharing, integration with external apps etc.

Is this all possible with Flutter/react-native? What are the libraries provided for the communication with chat servers like Mongooseim - XMPP, Socket.io etc.?

Questions:

  • The performance of application in Android and IOS as compare to Native developed apps.
  • Is there background service works for Android/IOS?
  • Notification supports
  • Video and audio calling performance.
  • Database handling (like export database file and push over cloud for backup form app)
  • Alarm manager support for task execution in particular time.

which framework is better native or cross-platform for this kind of app development?

React Native iOS Release build stuck on old code but Debug build works fine

$
0
0

When I try to build my React Native App from XCode in Release mode to check before launch it to production it get stuck in old code. No matter what change I do in my JS file that it won't do it. In Debug mode it doesn't happen, just works fine like it should.

Example:

I change a label in any of my JS files like a title of some menu and it will work when I use react-native run-ios or if I press on "Play" button of XCode if in the scheme "Debug" is checked. If instead, I check "Release" it charge an old version of my app I don't even know with certainly which version is.

I have tried to launch to production but still being the old version.

So, now a day I can't upload new version due to no matter what changes I do, the release mode ignores it.

I have tried to generate a new main.jsbundle, I have cleaned build with Shift + CMD + K and I aso have reinstalled my npm with no solution.

Do you have any idea?

EDIT:

Does the file "AppDelegate.m" have anything to do with it?

This is my AppDelegate:

#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.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:@"BottomNavigation"
                                            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];
  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

Fresh React Native project failing: Entry, ":CFBundleIdentifier", Does Not Exist

$
0
0

I'm trying to set up a fresh React Native project by simply following the guide here: https://facebook.github.io/react-native/docs/getting-started

I can build and run it from Xcode just fine, only getting a few "semantic warnings".

When I run yarn react-native run-ios though, I get the following error:

Leos-MacBook-Pro:citymysteryrn leo$ yarn react-native run-ios
yarn run v1.19.1
$ /Users/leo/Projekt/ReactNative/CityMysteryRN/node_modules/.bin/react-native run-ios
info Found Xcode workspace "CityMysteryRN.xcworkspace"
info Building (using "xcodebuild -workspace CityMysteryRN.xcworkspace -configuration Debug -scheme CityMysteryRN -destination id=85422E57-5311-43D4-9292-E02982FB7B67 -derivedDataPath build/CityMysteryRN")
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
info Installing "DerivedData/Build/Products/Debug-iphonesimulator/CityMysteryRN.app"
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/CityMysteryRN.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
. Run CLI with --verbose flag for more details.
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/CityMysteryRN.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:621:11)
    at Object.execFileSync (child_process.js:639:15)
    at runOnSimulator (/Users/leo/Projekt/ReactNative/CityMysteryRN/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:189:45)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Command.handleAction (/Users/leo/Projekt/ReactNative/CityMysteryRN/node_modules/@react-native-community/cli/build/cliEntry.js:160:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I know there are tons of questions (and answers) related to this, but it seems to be a very broad issue that I can't solve. I've tried most things on Print: Entry, ":CFBundleIdentifier", Does Not Exist without any luck.

I've also tried comparing this project to older React Native projects that I know are running and have identified the following differences, but don't know if they are of any importance:

  • Missing folder third-party in node_modules/react-native/
  • Build folder contains folder ios/build/MyProjectName containing Logs, info.plist etc, while older projects have these files and folders directly in ios/build/

Here's the output of yarn react-native info

System:
    OS: macOS 10.15.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 296.96 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.13.1 - /var/folders/5k/d42fx4ms6pv83hp9q0f9xvh40000gn/T/yarn--1574448680125-0.03761777189202431/node
    Yarn: 1.19.1 - /var/folders/5k/d42fx4ms6pv83hp9q0f9xvh40000gn/T/yarn--1574448680125-0.03761777189202431/yarn
    npm: 6.12.1 - /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
  IDEs:
    Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
  npmPackages:
    @react-native-community/cli: ^2.9.0 => 2.10.0 
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.5 => 0.60.5 
  npmGlobalPackages:
    react-native-git-upgrade: 0.2.7
    react-native: 0.53.3

No podspec found for `React-Core` in `../node_modules/react-native/React`

$
0
0

I'm using React Native. I get this issue when I try to upload pods. I've successfully installed node_modules, but I'm getting this problem. What is the problem? If we delete the package-lock.json and node_modules folder, I reinstalled npm. But I'm having this problem when I'm doing pod install.

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target '...' do

  # use_frameworks!

  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  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-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
  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 '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'

  # Required by RNFirebase
  pod 'Firebase/Core', '~> 6.8.1'

  # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
  # pod 'Firebase/AdMob', '~> 6.8.1'
  pod 'Firebase/Auth', '~> 6.8.1'
  pod 'Firebase/Database', '~> 6.8.1'
  pod 'Firebase/Functions', '~> 6.8.1'
  pod 'Firebase/DynamicLinks', '~> 6.8.1'
  pod 'Firebase/Firestore', '~> 6.8.1'
  pod 'Firebase/Messaging', '~> 6.8.1'
  pod 'Firebase/RemoteConfig', '~> 6.8.1'
  pod 'Firebase/Storage', '~> 6.8.1'
  pod 'Firebase/Performance', '~> 6.8.1'
  pod 'Fabric', '~> 1.10.2'
  pod 'Crashlytics', '~> 3.14.0'


  target '..' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!

end

target '...-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for ..-tvOS

  target 'DeliveryApp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

how to disable rotation in React Native?

$
0
0

I would like to support only portrait view. How can I make a React Native app not to autorotate? I tried searching documentation and Github issues, but I didn't find anything helpful.


React Native IAP Auto Renewal Subscription check Expiration

$
0
0

I am trying to restore and detect the end of auto renewal subscriptions on iOS using https://www.npmjs.com/package/react-native-iap/v/4.0.8 By calling getAvailablePurchases() I get a different number of purchases everytime I invoke this function (e.g 7, next time 23, then 4..). This makes no sense to me. I know the subscription renews any 5 minutes for monthly subscription. My idea is to get the latest purchase and just check the expired dates in the receipt from this one. (at the moment I am parsing over all of them, this cannot be best practice). Another thing is that I detect several active purchases with different transactionReceipts eventhough there is just one active.

RNIap.getAvailablePurchases().then((purchases) => {
            if(purchases != undefined && purchases.length > 0){
                alert(purchases.length + ' purchases');
                purchases.forEach((purchase) => {
                    const receiptBody = {
                        'receipt-data': purchase.transactionReceipt,
                        'password': appSubscriptionId
                    };
                    RNIap.validateReceiptIos(receiptBody, true).then((result) => { // false for production
                        let from, to, lastRenewal = '';
                        if(result.status == 0){ // 0 means receipt is correct..
                            result.latest_receipt_info.forEach((info) => { 
                                if(this.dateIsInFuture(info.expires_date)){
                                    to = moment.utc(info.expires_date, "YYYY-MM-DD HH:mm:ss").toString();
                                    from = moment.utc(info.original_purchase_date, "YYYY-MM-DD HH:mm:ss").toString();
                                    lastRenewal = moment.utc(info.purchase_date, "YYYY-MM-DD HH:mm:ss").toString();
                                    this.setState({ premium: true, from: from, to: to, lastRenewal: lastRenewal});
                                }else{
                                    alert('nicht aktiv');
                                }
                            });
                        }
                    }); 
                }); 
            }else{
                alert('No purchases found');
            }
        });

Build Failing for React Native iOS, "Multiple commands produce" Error

$
0
0

We were working on a react native project. One of my team members added some native modules on Linux and linked android. By then I am trying to link things in iOS but the build is always failing with this kind of error trace. The Android project is building normally.

I deleted xyz.xcworkspace and Podfile.lock then tried pod install.
Also, I tried to delete my node_modules and then yarn install followed by yarn link.

react-native-cli: 2.0.1  
react-native: 0.61.4  
yarn 1.19.1
Pod 1.8.4
XCode Version 11.2.1 (11B500)
macOS Catalina 10.15.1 (19B88)

xyz warning

duplicate output file '/Users/user/Library/Developer/Xcode/DerivedData/xyz-hhesslamjsqmbobykhskliclusph/Build/Products/Debug-iphonesimulator/xyz.app/AntDesign.ttf' on task: PhaseScriptExecution [CP] Copy Pods Resources /Users/faisal/Library/Developer/Xcode/DerivedData/xyz-hhesslamjsqmbobykhskliclusph/Build/Intermediates.noindex/xyz.build/Debug-iphonesimulator/xyz.build/Script-47F818C57EEC47EA3303EA1B.sh

xyz workspace errors

Multiple commands produce '/Users/user/Library/Developer/Xcode/DerivedData/xyz-hhesslamjsqmbobykhskliclusph/Build/Products/Debug-iphonesimulator/xyz.app/Zocial.ttf':
1) Target 'xyz' (project 'xyz') has copy command from '/Users/user/Desktop/xyz/native/node_modules/react-native-vector-icons/Fonts/Zocial.ttf' to '/Users/user/Library/Developer/Xcode/DerivedData/xyz-hhesslamjsqmbobykhskliclusph/Build/Products/Debug-iphonesimulator/xyz.app/Zocial.ttf'
2) That command depends on command in Target 'xyz' (project 'xyz'): script phase “[CP] Copy Pods Resources”

There are multiple errors and warnings like this but have same format with different file names.

Selecting Firebase platform for react native application

$
0
0

I'm starting out on a project that will user react native and firebase, and I'm wondering what benefits there would be to using Firebase for Android and Firebase for IOS rather than just using Firebase for the web.

My inclination is to use the web implementation to simplify and standardize the data model API, but I'm wondering if there are great performance gains when using Firebase for Android / IOS. Any insights into this question would be greatly appreciated.

Edit: I'm not looking for recommendations on which platform to use. I'm trying to understand the specific features and performance stats made available by Firebase for Android/IOS vs Firebase for web. I've been using Firebase for web for several years now but haven't used Firebase for Android/IOS--are there specific features or performance related reasons to use the latter?

CocoaPods could not find compatible versions for pod "React"

$
0
0

After months of working my React Native project has just stopped building.

I'm getting this error message in Cocoapods (and in Xcode):

ios % pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "React":
  In Podfile:
    RNDeviceInfo (from `../node_modules/react-native-device-info`) was resolved to 2.3.2, which depends on
  React

react-native-onesignal (from `../node_modules/react-native-onesignal/react-native-onesignal.podspec`) was resolved to 3.5.0, which depends on
  React (< 1.0.0, >= 0.13.0)

Specs satisfying the `React, React (< 1.0.0, >= 0.13.0)` dependency were found, but they required a higher minimum deployment target.

Here are the versions I am using:

% cat package.json | grep \"react\""react": "16.8.3",
% cat package.json | grep \"react-native\""react-native": "0.59.5",
% cat package.json | grep \"react-native-onesignal\""react-native-onesignal": "^3.5.0",

In Xcode the deployment target for my project is 11.0 and 10.2 for my NotificationServiceExtension (for OneSignal). The error message suggests this deployment target should be higher now, but what?

The important parts of my Podfile look like this:

ios % cat Podfile 
# Uncomment the next line to define a global platform for your project
platform :ios, '10.3'

target 'NotificationServiceExtension' do
  # Comment the next line if you don't want to use dynamic frameworks
  # use_frameworks!

  # Pods for NotificationServiceExtension
  pod 'OneSignal', '>= 2.7.1', '< 3.0'

end

target 'myproject' do
  # Comment the next line if you don't want to use dynamic frameworks
  # use_frameworks!

  pod 'OneSignal', '>= 2.7.1', '< 3.0'

I'm not sure how to resolve this and if it is related but this all went wrong after the last iOS/Xcode update.

React Native Swipeable (Swipe to delete) not closing

$
0
0

I'm using Swipeable from React-Native-Gesture-Handler to incorporate swipe to delete on my page. When I press delete, the contact gets deleted however the swipeable remains open.

I want it to close after it gets pressed but I can't seem to figure out how to do it.

This is my code:

const RightActions = (progress, dragX) => { 
return (
<TouchableOpacity onPress={()=>{DeleteContact(i)}}>
  <View style={[ContactsStyles.rightAction]}>
    <Text style={ContactsStyles.actionText}>Delete</Text>
  </View>
</TouchableOpacity>
) 
}

Here is where I have Swipeable:

<Swipeable renderRightActions={RightActions} >

     <View style={ContactsStyles.UserContainer}>

         <Text numberOfLines={1} style={[Fonts.Name]}> {obj.firstname} {obj.lastname} </Text>


         {/* Message/Call Container */}
          <View style={ContactsStyles.ImageCont}>
                    {/* Message */}
                    <TouchableOpacity onPress={()  => Communications.text(obj.phone, 'Hey ' + obj.firstname + ', im in need of a Ryde. Are you able to pick me up? This is my current location: ' + location)} >
                      <View style={ContactsStyles.ImageBox}>
                        <Image style={ContactsStyles.Image} source={require('../../assets/icons/message.png')} />
                      </View>
                    </TouchableOpacity>

                    {/* Call */}
                    <TouchableOpacity onPress = {() => Communications.phonecall( obj.phone , true)}>
                      <View style={ContactsStyles.ImageBox}>
                        <Image style={ContactsStyles.Image} source={require('../../assets/icons/phone.png')} />
                      </View>
                    </TouchableOpacity>
                  </View>
                  {/* End of Message/Call Container */}
      </View>
</Swipeable>

Swipeable button doesnt disappear after on press

Viewing all 16566 articles
Browse latest View live


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