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

how to make right button in navigation bar using react-native-router-flux?

$
0
0

I am tring to make right button on navigation bar using react-native-router-flux.

My code is

import React from 'React';import { TouchableHighlight } from 'react-native';import { Scene, Router, Actions } from 'react-native-router-flux';...const filterIcon = () => (<TouchableHighlight onPress={()=>} style={{...}}><Icon name="filter" size={30}/></TouchableHighlight>);const MainRounter=()=>(<Router><Scenekey="main"component={mainPage}initial={true}renderRightButton={()=>filterIcon}/></Router>);

But I can't show right button on navigation bar.How can I make it?


React Native - secureTextEntry Disable IOS 13+ Strong Password behavior

$
0
0

I have an create account form in my app and now on iOS devices running 13+ I'm having an issue where if the the user presses the "done" key while entering a password the normal secure password dots are replaced with the following (see below). How to disable this behavior so it continues to work as it did on older devices?

enter image description here

XCode build error /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

$
0
0

I am trying build an IOS app written in ReactNative. The application written using XCode 11.4. Then I got a new Macbook with XCode version 12.5 installed. So I cloned the project from the git and run npm install and tried to run the project using XCode. Then I got the following error.

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

I checked any issues as suggested by the accepted answer in this link,https://stackoverflow.com/questions/10373016/command-xcode-app-contents-developer-toolchains-xcodedefault-xctoolchain-usr-bi. But there is nothing wrong with it.

Also, I tried cleaning the project and building the project again. It did not solve the problem as well.

Then I tried deleting the project targets that are for tests well and tried to clean and build the project again. But it did not work either.

I tried deleting everything in the Derived Data folder and tried building the project again as well. It did not work either.

Why am I getting that error and I can I possibly fix it?

setBackgroundMessageHandler is working on android but not on IOS in react native

$
0
0

Background notifications are received on Android but not on IOS in react native.

index.js

 messaging().setBackgroundMessageHandler(async (message)=>{  console.log(message)});

This is called before registering the component as is mentioned in a certain Github issues.

This problem arises after migrating to react native firebase v6.

Package versions:-

"@react-native-firebase/app": "^11.0.0","@react-native-firebase/messaging": "^11.0.0"

AppDelegate.m

    #import "AppDelegate.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>static 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#import <GoogleMaps/GoogleMaps.h>#import <Firebase.h>#import <React/RCTLinkingManager.h>@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  #ifdef FB_SONARKIT_ENABLED  InitializeFlipper(application);  #endif  [GMSServices provideAPIKey:@"AIzaSyA19U0nRV9PKyWHz-252DKVkShrzooWt5Q"];  [FIRApp configure];  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"Sociana"                                            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;} - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *) options {   return [RCTLinkingManager application:app openURL:url options:options];//return [self.authorizationFlowManagerDelegate resumeExternalUserAgentFlowWithURL:url]; }- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler{ return [RCTLinkingManager application:application                  continueUserActivity:userActivity                    restorationHandler:restorationHandler];}- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo                                                       fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}@end

AppDelegate.h

#import <React/RCTBridgeDelegate.h>#import <UIKit/UIKit.h>#import "RNAppAuthAuthorizationFlowManager.h"@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate,RNAppAuthAuthorizationFlowManager>@property (nonatomic, strong) UIWindow *window;@property(nonatomic, weak)id<RNAppAuthAuthorizationFlowManagerDelegate>authorizationFlowManagerDelegate;@end

The notification payload that I am sending through the REST API is:-

apns: {      payload: {        aps: {"content-available": "true"        }      },      headers: {"apns-priority": "10",      }    }

I have used an external device for testing, enabled all the background modes and push notifications in xcode and also from the apple dev account.Current xcode version is 12.4

Any help will be appreciated. Thank you!

xCode Cocoapods build fails "Undefined symbols for architecture x86_64"

$
0
0

I want to build my Xcode project (react native & swift) for the simulator and on a real device.

The simulator worked great. Today I tried to build it for my device, I selected my device in the Xcode bar and added the scheme to release (I had to do this because I'm using react native and otherwise the bundle is not packed)

Then an error during the build occurs (in this case for the dependency RNPurchases, but this is completely random. sometimes it's Expo-Keep-Awake or Facebook)

Undefined symbols for architecture x86_64:"_OBJC_CLASS_$_RCPurchases", referenced from:  objc-class-ref in RNPurchases.old: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)

Even switching the back to Build Configuration Debug in my scheme has no effect anymore.

I already tried several things:

  • clear Xcode build
  • delete pod folder
  • remove pod cache
  • remove Xcode/DerivedData
  • reboot

nothing works.

This problem is pretty new to me, it already occurred twice within the last 2 months. Somehow I got the build for the simulator running again, but never for a device. I didn't have the problems like this half a year ago ...

My Setup

  • Xcode 12.4
  • MacBook Pro (Big Sur 11.2.3)
  • Build Settings for App-Target: Build Active Architectures Only: Debug YES, Release NO)
  • Build Settings for Pod-Target: Build Active Architectures Only: Debug YES, Release NO)
  • Podfile:
    require_relative '../node_modules/react-native/scripts/react_native_pods'    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'    require_relative '../node_modules/react-native-unimodules/cocoapods.rb' # expo uni modules    use_frameworks!    install! 'cocoapods', :deterministic_uuids => false, :warn_for_unused_master_specs_repo => false    target 'TrainUrTeam' do      platform :ios, '12.0'      # ... pods xyz      use_unimodules!      config = use_native_modules!      use_react_native!(:path => config["reactNativePath"])    end    post_install do |installer| # src: https://stackoverflow.com/a/64139830/6003494      installer.pods_project.targets.each do |target|        target.build_configurations.each do |config|          config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"        end      end    end

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 ios build error 'React/RCTBridgeModule.h' file not found

$
0
0

I am unable to build react native ios build for real devices and simiulator. Facing following issue:

"'React/RCTBridgeModule.h' file not found".

Any solutions?

RCTConvert+AirMap.h file not found Error on React Native on IOS

$
0
0

enter image description here

i have this Error . RCTConvert+AirMap.h file not found Error on React Native on IOS


React Native 0.64.2 is not building properly

$
0
0

I have just moved to react native 0.64.2. I am having issues in building the ios app showing this error.

Command PhaseScriptExecution failed with a nonzero exit code

How to set the Display Name when creating a React Native project from a template?

$
0
0

According to the documentation the way to create a React Native project from the default template is as follows:

npx react-native init NewcoFrameDesign

This will set NewcoFrameDesign as the app name in several places in the project including app.json as name and displayName, which is used as the basis for app naming inside the iOS and Android projects.

I want my Display Name to be "Newco Frame Design" (with the spaces) in all relevant locations, as this is used for example in android/app/src/main/res/values/strings.xml as well as ios/NewcoFrameDesign/Info.plist and thereby possibly shown to the user. Using a name with spaces with react-native init is not an option, as it will lead to errors.

Having to rename the Display Name in several places after creating the project from a template should not be necessary.

Therefore, what is the correct way to create a React Native project from a template with a name such as NewcoFrameDesign and a different displayName such as Newco Frame Design?

How can I regenerate ios folder in React Native project?

$
0
0

So a while ago I deleted the /ios directory in my react native app (let's call it X). I've been developing and testing using the android emulator but now I'd like to make sure it works on ios with xcode simulator etc.

So my current idea is to create a new react native bare project (let's call it Y) with ios folder, then follow these steps to rename Y so that it has the name of X and then moving the /ios directory from Y into X and trying to run-ios.

I'll update here how that goes, but I wondered if there is a better way and has nobody been in this situation before?

I've googled lots of things 'regenerate ios folder''deleted ios folder''add ios folder to existing..' and nothing helpful. Maybe my googlefu isn't good enough but if anyone has any suggestions, much appreciated.

Step 2 will be making sure it compiles because of dependencies and stuff but for now my goal is to just get the /ios folder back in the project and for React Native to be aware of it's existence (it has all the necessary config).

Thanks

Undefined symbols for architecture x64_x86 XCode

$
0
0

I have a React-Native application. I did eject from expo and now trying to build my app for iOS. But always when try to run the project I have the same error: Undefined symbols for architecture x64_x86

enter image description here

What can I do to fix this problem? Is it XCode problem or some pod/packages error?

Pod file looks like this:

require_relative '../node_modules/react-native/scripts/react_native_pods'require_relative '../node_modules/react-native-unimodules/cocoapods.rb'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'platform :ios, '11.0'target '' do  use_unimodules!  config = use_native_modules!  use_react_native!(:path => config["reactNativePath"])  use_frameworks!  pod 'WebimClientLibrary', :git => 'https://github.com/webim/webim-client-sdk-ios.git', :tag => '3.34.4'  $static_framework = ['FirebaseCore', 'FirebaseCoreDiagnostics', 'GoogleDataTransportCCTSupport', 'GoogleDataTransport',  'FirebaseInstanceID'  ]  pre_install do |installer|    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}    installer.pod_targets.each do |pod|      if $static_framework.include?(pod.name)        def pod.build_type;          Pod::BuildType.static_library        end      end    end  end  post_install do |installer|    installer.pods_project.targets.each do |target|      target.build_configurations.each do |config|        config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'        end      end  end  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable these next few lines.  # use_flipper!  # post_install do |installer|  #   flipper_post_install(installer)  # endend

package.json

{"scripts": {"start": "react-native start","android": "react-native run-android","ios": "react-native run-ios","web": "expo start --web","eject": "expo eject"  },"dependencies": {"@react-native-community/viewpager": "4.2.0","@tradle/react-native-http": "^2.0.0","assert": "^1.1.1","axios": "^0.18.0","browserify-zlib": "~0.1.4","buffer": "^4.9.1","console-browserify": "^1.1.0","constants-browserify": "^1.0.0","dns.js": "^1.0.1","domain-browser": "^1.1.1","events": "^1.0.0","expo": "~40.0.0","expo-app-loading": "^1.0.1","expo-firebase-analytics": "~2.6.0","expo-firebase-core": "~1.3.0","expo-image-picker": "^10.1.4","expo-linear-gradient": "~8.4.0","expo-notifications": "~0.8.2","expo-splash-screen": "~0.10.2","expo-status-bar": "~1.0.3","global": "^4.4.0","https-browserify": "~0.0.0","mime-db": "^1.36.0","moment": "2.22.2","path-browserify": "0.0.0","prop-types": "^15.7.2","punycode": "^1.2.4","querystring-es3": "~0.2.0","react": "16.13.1","react-dom": "16.13.1","react-native": "~0.63.4","react-native-crypto": "^2.2.0","react-native-datepicker-dialog": "^0.0.9","react-native-gesture-handler": "~1.10.2","react-native-invertible-scroll-view": "^1.1.1","react-native-level-fs": "^3.0.0","react-native-maps": "0.27.1","react-native-masked-text": "1.7.2","react-native-os": "^1.0.1","react-native-randombytes": "^3.0.0","react-native-reanimated": "~2.1.0","react-native-screens": "~3.0.0","react-native-simple-dialogs": "1.2.0","react-native-size-matters": "^0.1.4","react-native-status-bar-height": "^2.3.1","react-native-tcp": "^3.2.1","react-native-udp": "^2.1.0","react-native-unimodules": "~0.13.3","react-native-web": "~0.13.12","react-navigation": "^3.13.0","react-redux": "^5.0.7","readable-stream": "1.0.33","redux": "^3.7.2","redux-logger": "^3.0.6","redux-persist": "^5.9.1","redux-thunk": "^2.2.0","rxjs": "^6.6.7","rxjs-compat": "^6.6.7","stream-browserify": "^1.0.0","string_decoder": "~0.10.25","timers-browserify": "^1.0.1","tty-browserify": "0.0.0","url": "~0.10.1","util": "~0.10.3","vm-browserify": "0.0.4"  },"devDependencies": {"@babel/core": "^7.9.0","babel-jest": "~25.2.6","jest": "~25.2.6","react-test-renderer": "~16.13.1","rn-nodeify": "tradle/rn-nodeify"  },"private": true,"name": "debtors-app","version": "1.0.0","react-native": {"zlib": "browserify-zlib","console": "console-browserify","constants": "constants-browserify","crypto": "react-native-crypto","dns": "dns.js","net": "react-native-tcp","domain": "domain-browser","http": "@tradle/react-native-http","https": "https-browserify","os": "react-native-os","path": "path-browserify","querystring": "querystring-es3","fs": "react-native-level-fs","_stream_transform": "readable-stream/transform","_stream_readable": "readable-stream/readable","_stream_writable": "readable-stream/writable","_stream_duplex": "readable-stream/duplex","_stream_passthrough": "readable-stream/passthrough","dgram": "react-native-udp","stream": "stream-browserify","timers": "timers-browserify","tty": "tty-browserify","vm": "vm-browserify","tls": false  },"browser": {"zlib": "browserify-zlib","console": "console-browserify","constants": "constants-browserify","crypto": "react-native-crypto","dns": "dns.js","net": "react-native-tcp","domain": "domain-browser","http": "@tradle/react-native-http","https": "https-browserify","os": "react-native-os","path": "path-browserify","querystring": "querystring-es3","fs": "react-native-level-fs","_stream_transform": "readable-stream/transform","_stream_readable": "readable-stream/readable","_stream_writable": "readable-stream/writable","_stream_duplex": "readable-stream/duplex","_stream_passthrough": "readable-stream/passthrough","dgram": "react-native-udp","stream": "stream-browserify","timers": "timers-browserify","tty": "tty-browserify","vm": "vm-browserify","tls": false  }}

React Native xCode huge build time

$
0
0

Every build of my project require at least 20 minutes on iOS and 4 minutes on Android.Searching on internet is not so normal.

I have a MacBook Air 1,6 GHz Dual-Core Intel Core i5, 8 GB RAM and SSD.

This is the build with timing:enter image description here

and this is my package.json dependencies:

"@alessiocancian/react-native-actionsheet": "^2.4.11","@react-native-async-storage/async-storage": "^1.15.2","@react-native-community/datetimepicker": "^3.4.6","@react-native-community/geolocation": "^2.0.2","@react-native-community/push-notification-ios": "^1.8.0","@react-native-firebase/app": "^11.4.1","@react-native-firebase/auth": "^11.4.1","@react-native-firebase/firestore": "^11.4.1","@react-native-firebase/messaging": "^11.4.1","@react-native-firebase/storage": "^11.4.1","@react-native-masked-view/masked-view": "^0.2.3","@react-native-picker/picker": "^1.15.0","@react-navigation/bottom-tabs": "^6.0.0-next.18","@react-navigation/native": "^6.0.0-next.13","@react-navigation/stack": "^6.0.0-next.25","axios": "^0.21.1","deepmerge": "^4.2.2","i18n-js": "^3.8.0","lodash": "^4.17.21","moment": "^2.29.1","moment-timezone": "^0.5.33","qs": "^6.10.1","react": "17.0.1","react-native": "0.64.2","react-native-actions-sheet": "^0.4.2","react-native-app-intro-slider": "^4.0.4","react-native-bootsplash": "^3.2.0","react-native-calendars": "^1.1255.0","react-native-date-picker": "^3.2.10","react-native-fast-image": "^8.3.4","react-native-fbsdk-next": "^4.3.0","react-native-gesture-handler": "^1.10.3","react-native-google-signin": "^2.1.1","react-native-image-picker": "^3.3.2","react-native-indicators": "^0.17.0","react-native-keyboard-aware-scroll-view": "^0.9.3","react-native-localize": "^2.0.2","react-native-maps": "^0.28.0","react-native-modal": "^11.10.0","react-native-modal-datetime-picker": "^9.2.0","react-native-modal-selector": "2.0.3","react-native-paper": "^4.7.2","react-native-picker-select": "^8.0.4","react-native-progress-steps": "^1.3.4","react-native-push-notification": "^7.3.1","react-native-reanimated": "^2.1.0","react-native-safe-area-context": "^3.2.0","react-native-screens": "^3.1.0","react-native-snap-carousel": "^3.9.1","react-native-star-rating": "^1.1.0","react-native-vector-icons": "^8.1.0","tipsi-stripe": "^9.0.0"

What can I do to reduce the xCode build time?I already tried everything on internet, but maybe there is some kind of misconfiguration/bug.

What do you suggest to check or change?

React-Native iOS hot reloading and debug mode not working in real device

$
0
0

Background:

I am working on a react-native app for a while and it was working fine till now. Currently facing some issues in the iOS on the same version that has been completely tested and verified before.

Issue:

Currently live reloading, hot reloading and even debug mode doesn't seem to work for my app. The app runs only for the first time, it wouldn't work if I try to relaunch the app from Xcode.

It stops at the splash screen always so I have to completely delete the app from the device and redeploy it from Xcode. I don't know what is causing this issue. It seems working fine on other laptops so I doubt the problem is with my Xcode.

This issue is not project-related as I have created a new app to test it out and experiencing the same outcome.Could anyone help me with this?

Please read the things I have already tried before answering with some common things. Thank you in advance.

Few things I have tried:

  • Cleaned the project.
  • Cleaned the Xcode Derived Data
  • Deleted the watchman cache.
  • Updated Xcode, iPhone, and watchman to the latest version
  • Pods re-installed.

How to update the app version in react native ios app?

$
0
0

How can I change the apple app version which is build using react native.

I got this email from apple app store -

Dear Developer,

We identified one or more issues with a recent delivery for your app, "APP_NAME" 1.0 (1.0.2). Please correct the following issues, then upload again.

ITMS-90062: This bundle is invalid - The value for key CFBundleShortVersionString [1.0] in the Info.plist file must contain a higher version than that of the previously approved version [1.1]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring

Best regards,

The App Store Team


New project on React Native 0.64.2 is not building via Xcode 12.5

$
0
0

New clear project is not running on physical device via Xcode.

But npx react-native run-ios works perfect. issue is only with Xcode when trying to build and test in physical device.

Physical device: iPhone 8 Plus iOS 14.6

Getting this error:cp: /Users/uktamhamidov/Library/Developer/Xcode/DerivedData/SQRE-arjlqbohgbkkananywponwudfhts/Build/Products/Debug-iphoneos/main.jsbundle: No such file or directoryCommand PhaseScriptExecution failed with a nonzero exit code

Screenshot

React Native 0.64.0 iOS Build Error `ld: library not found for -lAppAuth`

$
0
0

I've been stuck on this a few days now, trying to build my RN project for iOS and facing the error.

ld: library not found for -lAppAuthclang: error: linker command failed with exit code 1 (use -v to see invocation)

Here are the things I have tried so far, that have not worked:

  • Currently opening .xcworkspace file in XCode to run build from, not .xcodeproj

  • Build cleaned, with pod clean run as well as pod cache clear --all

  • Project Build Settings > Library Search Paths > currently contains:"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)""$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)""$(PROJECT_DIR)/Pods"

  • Modified Build Phases to include the libAppAuth.a library like thisimage here

  • Changed settings of Build Active Architecture to No in Build Settings

  • I've checked and the -L-L problem faced here does not occur. In fact,very little info is being specified on what the issue may be in the erroring, here

  • I have tried this on both the old and new build system

Will appreciate any help that can be given. Thanks. I'm stuck being unable to develop my iOS RN build at the moment. Both the XCode build and the React Native build are failing

React Native on M1 Air fails to build for iOS

$
0
0

I'm coming back to a project after a bit of a hiatus (like 2 months or so) and trying to run my app on my M1 Air fails to build. I've used react-native-clean-project to clean the project between changes I've tried to fix this.

I do get this when run react-native clean-project-auto

Error running 'wipe iOS build artifacts': objc[39430]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x11bab82b8). One of the two will be used. Which one is undefined.objc[39430]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x11bab8308). One of the two will be used. Which one is undefined.Error running 'wipe iOS build artifacts': objc[39432]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1136902b8). One of the two will be used. Which one is undefined.Error running 'wipe iOS build artifacts': objc[39432]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x113690308). One of the two will be used. Which one is undefined.

XCode version: 12.5React native version: 0.64.0

The error I'm getting:

objc[37733]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1166cc2b8). One of the two will be used. Which one is undefined.objc[37733]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1166cc308). One of the two will be used. Which one is undefined.** BUILD FAILED **The following build commands failed:    CompileC /Users/kollinfrancis/Library/Developer/Xcode/DerivedData/KanjiDraw-ggmdygefcdmywmhkmjeavmfhuhel/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Users/kollinfrancis/Documents/Projects/KanjiDraw/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler(1 failure)

The command I'm running:npm run ios

My podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'require_relative '../node_modules/react-native-unimodules/cocoapods.rb'platform :ios, '13.0'target 'X' do  use_unimodules!  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 'XTests' do    inherit! :complete    # Pods for testing  end  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable the next line.  use_flipper!({ 'Flipper' => '0.90.0', 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3' })  post_install do |installer|    react_native_post_install(installer)    installer.pods_project.build_configurations.each do |config|      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"    end    installer.pods_project.targets.each do |target|      target.build_configurations.each do |config|        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'      end    end   endend

Open alarm clock when click a button in React native app

$
0
0

I want to open a alarm settings screen from react native app when clicking a button. I have opened android map from react native button by the Data URI Scheme and When I am trying with android AlarmClock there is no Data URI Scheme

I am trying to add <uses-permission android:name="com.android.alarm.permission.SET_ALARM" /> in AndroidManifest.xml

and this

<intent-filter><action android:name="android.intent.action.SET_ALARM" /><data android:scheme="setalarm" /><category android:name="android.intent.category.BROWSABLE" /><category android:name="android.intent.category.DEFAULT" /></intent-filter>

and for react native I just use:Linking.openURL('setalarm:'); And it can not find the app i wanna intent.

I've tried this method to open map :

<intent-filter><action android:name="android.intent.action.VIEW" /><data android:scheme="geo" /><category android:name="android.intent.category.DEFAULT" /></intent-filter>

andLinking.openURL('geo:'); and it worked. What I am doing wrong ?This is an app :alarm clock on google pixel 2thanks for helping me ~

React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template

$
0
0

While executing npx react-native init MyProject I ran into the following error:

✖ Installing CocoaPods dependencies (this may take a few minutes)error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.

Which seems to be related to an earlier error displayed:

checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot checking whether the C compiler works... noxcrun: error: SDK "iphoneos" cannot be locatedxcrun: error: SDK "iphoneos" cannot be locatedxcrun: error: SDK "iphoneos" cannot be locatedxcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'

XCode and its CLI seem to all run fine.

My configuration:

  • MacOS Catalina 10.15.1 (19B88)
  • NPM 6.11.3
  • React-Native 0.61.4
  • XCode 11.2.1 (11B500)

Any leads appreciated.

Viewing all 16912 articles
Browse latest View live


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