I am building my first ReactNative iOS and Android app. I am an iOS coder with Swift and Obj-C. How do I fetch the current date using ReactNative.
Shall I use Native Modules or is there an ReactNative API from which I can get this data ?
I am building my first ReactNative iOS and Android app. I am an iOS coder with Swift and Obj-C. How do I fetch the current date using ReactNative.
Shall I use Native Modules or is there an ReactNative API from which I can get this data ?
Getting error in react-native project as ahead.
Cycle in dependencies between targets 'BVLinearGradient' and 'FBReactNativeSpec'; building could produce unreliable results.Cycle path: BVLinearGradient → React → React-RCTAnimation → FBReactNativeSpec → BVLinearGradientCycle details:→ Target 'BVLinearGradient' has link command with output '/Users/imac/Library/Developer/Xcode/DerivedData/NOFOS-gdkwrmnotgdstiglulxxrepqzeci/Build/Products/Debug-iphonesimulator/BVLinearGradient/BVLinearGradient.framework/BVLinearGradient'○ Target 'BVLinearGradient' has compile command with input '/Volumes/WorkSpace/NOFOS/nofosApp/ios/Pods/Target Support Files/BVLinearGradient/BVLinearGradient-dummy.m'○ Target 'BVLinearGradient' has write command with output /Users/imac/Library/Developer/Xcode/DerivedData/NOFOS-gdkwrmnotgdstiglulxxrepqzeci/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/BVLinearGradient.build/module.modulemap→ Target 'React' has target dependency on Target 'React-RCTAnimation'→ Target 'React-RCTAnimation' has write command with output /Users/imac/Library/Developer/Xcode/DerivedData/NOFOS-gdkwrmnotgdstiglulxxrepqzeci/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTAnimation.build/module.modulemap○ Target 'React-RCTAnimation' has target dependency on Target 'FBReactNativeSpec'○ That command depends on command in Target 'FBReactNativeSpec': script phase “[CP-User] Generate Specs”→ Target 'FBReactNativeSpec' has copy command from '/Volumes/WorkSpace/NOFOS/nofosApp/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h' to '/Users/imac/Library/Developer/Xcode/DerivedData/NOFOS-gdkwrmnotgdstiglulxxrepqzeci/Build/Products/Debug-iphonesimulator/FBReactNativeSpec/FBReactNativeSpec.framework/Headers/FBReactNativeSpec.h'○ That command depends on command in Target 'FBReactNativeSpec': script phase “[CP-User] Generate Specs”
I have tried with many patterns as mentioned below.
I have also restart the system before doing the above trials. And I have used swift in the project.Please provide me a proper solution for this.
There is custom domain created as a url prefix and added dynamic links for screen navigation,it's working fine for Android but not on ios using react native.
Did following steps
1.Project setting in firebase w.r.t app store id, team id and bundle id.
2.Checked hosting in firebase.
4.Added firebase dynamic link key in info.plist file with dynamic links.
I was trying to install React Native on my system, and found that it failed to install CocoaPods dependencies which is required by that template error.
sudo arch -x86_64 gem install ffi
fixed this issue but ended up with event-config.h" file not found
error.
I changed the changed the flipper version in pod file to use_flipper!({'Flipper'=>'0.76.0'})
and then I reached to the error mentioned above. Any help on this issue would be appreciated.
node version : 15.10.0react-native version: 0.63.4Xcode version: 12.4
Error description below:
Showing Recent MessagesCould not find or use auto-linked library 'swiftCoreGraphics'Could not find or use auto-linked library 'swiftUIKit'Could not find or use auto-linked library 'swiftDarwin'Could not find or use auto-linked library 'swiftFoundation'Could not find or use auto-linked library 'swiftMetal'Could not find or use auto-linked library 'swiftObjectiveC'Could not find or use auto-linked library 'swiftCoreFoundation'Could not find or use auto-linked library 'swiftDispatch'Could not find or use auto-linked library 'swiftCoreImage'Could not find or use auto-linked library 'swiftQuartzCore'Could not find or use auto-linked library 'swiftCore'Could not find or use auto-linked library 'swiftSwiftOnoneSupport'Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteralUndefined symbol: associated type descriptor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralTypeUndefined symbol: associated conformance descriptor for Swift.ExpressibleByIntegerLiteral.Swift.ExpressibleByIntegerLiteral.IntegerLiteralType: Swift._ExpressibleByBuiltinIntegerLiteralUndefined symbol: method descriptor for Swift.ExpressibleByFloatLiteral.init(floatLiteral: A.FloatLiteralType) -> AUndefined symbol: protocol descriptor for Swift.ExpressibleByIntegerLiteralUndefined symbol: value witness table for Builtin.Int32Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreImageUndefined symbol: associated type descriptor for Swift.ExpressibleByFloatLiteral.FloatLiteralTypeUndefined symbol: __swift_FORCE_LOAD_$_swiftQuartzCoreUndefined symbol: __swift_FORCE_LOAD_$_swiftDispatchUndefined symbol: method descriptor for Swift.ExpressibleByIntegerLiteral.init(integerLiteral: A.IntegerLiteralType) -> AUndefined symbol: __swift_FORCE_LOAD_$_swiftCoreFoundationUndefined symbol: protocol witness table for Swift.Int : Swift._ExpressibleByBuiltinIntegerLiteral in SwiftUndefined symbol: __swift_FORCE_LOAD_$_swiftObjectiveCUndefined symbol: __swift_FORCE_LOAD_$_swiftCoreGraphicsUndefined symbol: _swift_getForeignTypeMetadataUndefined symbol: __swift_FORCE_LOAD_$_swiftFoundationUndefined symbol: associated conformance descriptor for Swift.ExpressibleByFloatLiteral.Swift.ExpressibleByFloatLiteral.FloatLiteralType: Swift._ExpressibleByBuiltinFloatLiteralUndefined symbol: __swift_FORCE_LOAD_$_swiftUIKitUndefined symbol: __swift_FORCE_LOAD_$_swiftMetalUndefined symbol: Swift.Float.init(Swift.Double) -> Swift.FloatUndefined symbol: __swift_FORCE_LOAD_$_swiftDarwinUndefined symbol: protocol witness table for Swift.Float : Swift._ExpressibleByBuiltinFloatLiteral in Swift
Getting the following error and not 100% sure why. Currently getting this issue when I run my app in ios simulator
I've tried to do npm install watchman, But I just saw the latest update on the npm packages and it seems like it's been depreciated.
events.js:292 throw er; // Unhandled 'error' event ^Error: EMFILE: too many open files, watch at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)Emitted 'error' event on NodeWatcher instance at: at NodeWatcher.checkedEmitError at FSWatcher.emit (events.js:315:20) at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:133:12) { errno: -24, syscall: 'watch', code: 'EMFILE', filename: null}
I am creating a new React Native app but facing errors like "No bundle URL present" while running it on iOS Simulator.
Command to Run App on iOS:
react-native run-ios --port=8089
I tried every possible solution suggested on the below links.
What is the meaning of 'No bundle URL present' in react-native?
https://www.andrewcbancroft.com/2017/04/22/solving-react-natives-no-bundle-url-present-error/
and lots of other references but no luck at all.
Solution 1: I tried to add AppTranportSecurity
flags in info.plist
.
<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/><key>NSAllowsArbitraryLoadsInWebContent</key><true/><key>NSExceptionDomains</key><dict><key>localhost</key><dict><key>NSAllowsLocalNetworking</key><true/><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict>
Solution 2: Try to remove the build from the iOS folder and build it again.
rm -r build
react-native run-ios
againSolution 3: Added below the line in Package.json file
"build:ios": "react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle"
No luck at all.
Even my metro builder running on port 8089 as 8081 uses by MacFee firewall app.
Hey Stackoverflow community,
I am completely new to React Native and already struggling in the first step. I have done everything according to this site: https://reactnative.dev/docs/environment-setup
I have installed node and watchmanI have X Code running for the simulationI have installed cocoa podsThe editor I am using is VS Code and the terminal is iTerm.
I created a test project like described in the doc.
npx react-native init AwesomeProject
After that, I went inside the folder and ran in two different terminals.
npx react-native start
npx react-native run-ios
When I watch people doing this on Youtube it always works, but what I get is the following:
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'YogaKit' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-PeerTalk' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-Glog' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-DoubleConversion' from project 'Pods')warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the AwesomeProject editor. (in target 'AwesomeProject' from project 'AwesomeProject')** BUILD FAILED **The following build commands failed: CompileC /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/mw/Desktop/AwesomeProject/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler(1 failure)
I would be super happy if someone could help me with this problem. I have seen some other posts on Stackoverflow, but nothing helped.
Thank you very much
UPDATE
After I have make I have changed
cd AwesomeProject/iosa) Comment this line in Podfile # use_flipper!()b) pod install
With running:
npx react-native run-ios
I am getting this error message:
/bin/sh -c /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-90F0FABA0342DD788075D851B9320B7C.shN/A: version "N/A -> N/A" is not yet installed.You need to run "nvm install N/A" to install it before using it.Command PhaseScriptExecution failed with a nonzero exit codewarning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the AwesomeProject editor. (in target 'AwesomeProject' from project 'AwesomeProject')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')** BUILD FAILED **The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-90F0FABA0342DD788075D851B9320B7C.sh(1 failure)
Researching about this error message I came along that it could have something to do with NodeJS, but Node is installed.
Using react-native-push-notification-ios, I would like the notification to arrive, not be shown and the notification data to be passed to the React Native layer to the onNotification function.
To do this I have removed UNNotificationPresentationOptionAlert from the userNotificationCenter: willPresentNotification: withCompletionHandler function. However, I am not sure how to proceed for the object of the notification to be handled automatically delivered to React Native.
How can I do that?
The code presented below is what I am currently using. It works when notifications arrive, but they are not passed to React Native.
//Called when a notification is delivered to a foreground app.-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{ NSLog(@"🟢 Notification received!"); completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionBadge);}
I am trying to upload an app to the App Store and every time I upload a binary Apple insists that my app is using ads when I have never implemented such a thing. I reviewed the docs and removed all code involving ASIdentifier
and adIdentifier
I'm not quite sure what I'm missing. What can I do to resolve this issue?
I am setting up IOS dev for React Native (0.61) app which has the working android version. What I did was to copy src of components and package.json file after react native environment is setup by following online post (installed xcode command line tool 10.2). But launching run-ios failed:
$ react-native run-ioserror Could not find "Podfile.lock" at /Users/mine/Documents/code/js/emps_fe6/ios/Podfile.lock. Did you run "pod install" in iOS directory?error Could not find the following native modules: RNCAsyncStorage, RNDeviceInfo, RNGestureHandler, RNKeychain, BVLinearGradient, RNLocalize, RNReanimated, RNVectorIcons, react-native-video. Did you forget to run "pod install" ?info Found Xcode project "emps_fe6.xcodeproj"xcrun: error: unable to find utility "simctl", not a developer tool or in PATHerror Could not parse the simulator list output. Run CLI with --verbose flag for more details.Error: Command failed: xcrun simctl list --json devicesxcrun: error: unable to find utility "simctl", not a developer tool or in PATH at checkExecSyncError (child_process.js:629:11) at Object.execFileSync (child_process.js:647:13) at runOnSimulator (/Usersamine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:130:54) at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:100:12) at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:164:23) at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8) at Command.emit (events.js:198:13) at Command.parseArgs (/Users/amine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12) at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21) at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:237:24)
Here is the output of react native info:
$ react-native infoinfo Fetching system and libraries information...System: OS: macOS High Sierra 10.13.6 CPU: (8) x64 Intel(R) Core(TM) i7-2675QM CPU @ 2.20GHz Memory: 194.93 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.17.0 - /usr/local/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.11.3 - /usr/local/bin/npm IDEs: Xcode: /undefined - /usr/bin/xcodebuild npmPackages: react: 16.11.0 => 16.11.0 react-native: 0.61.2 => 0.61.2 npmGlobalPackages: react-native-cli: 2.0.1
Here is the package.json:
"dependencies": {"@react-native-community/async-storage": "^1.6.2","moment": "^2.24.0","react": "16.11.0","react-native": "0.61.2","react-native-cli": "^2.0.1","react-native-confirmation-code-field": "^4.1.0","react-native-device-info": "^4.0.1","react-native-elements": "^1.2.6","react-native-gesture-handler": "^1.4.1","react-native-gifted-chat": "^0.11.3","react-native-keychain": "^4.0.1","react-native-linear-gradient": "^2.5.6","react-native-localize": "^1.3.1","react-native-modal": "^11.4.0","react-native-modal-datetime-picker": "^7.6.0","react-native-reanimated": "^1.3.0","react-native-segmented-control-tab": "^3.4.1","react-native-vector-icons": "^6.6.0","react-native-video": "^5.0.2","react-navigation": "^4.0.10","react-navigation-stack": "^1.10.2","react-navigation-tabs": "^2.5.6","simctl": "^2.0.0","socket.io-client": "2.1.1","xcode": "^2.0.0" },
In the error message, there mentioned quite a few modules which are missing. But those modules have been installed as it shows in the package.json. I am not sure about what the error message means. Also I installed the simctl
but scrum simctl
still can not find it. I am using VS Code as IDE.
UPDATE:
created an empty Podfile.lock
under /ios, the error becomes when run-ios:
error Cannot read property 'SPEC CHECKSUMS' of undefined. Run CLI with --verbose flag for more details.TypeError: Cannot read property 'SPEC CHECKSUMS' of undefined at getDependenciesFromPodfileLock (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/link-pods/getDependenciesFromPodfileLock.js:63:58) at warnAboutPodInstall (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/link/warnAboutPodInstall.js:43:67) at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:80:36) at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:164:23) at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8) at Command.emit (events.js:198:13) at Command.parseArgs (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12) at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21) at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:237:24) at Object.run (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:184:11)
I'm developing an react-native application on M1 Mac.
I recently updated my mac os to beta version Monterey(version 12.0 beta)
After installing the beta version of the mac os i also installed the Xcode(13.0 beta)
Now my app is installed to the iPad simulator but when i open the app, i get the following error.
Can someone help me.
Thanks in advance!
I noticed that none of the video calling apps except Facetime allows you to do a video call/chat when in background through PIP.
How did Facetime achieve it? Is it a private API that we can’t use?
I have tried to search blogs, forums, StackOverflow, the official documentation, but I haven't seen a definitive answer.
I'm skeptical because this official doc mentions the following, but it didn't specify PIP there:
Camera usage is prohibited while in the background. If you attempt to start running a camera while in the background, the capture session sends an AVCaptureSessionWasInterruptedNotification with this interruption reason. If you don't explicitly call the stopRunning method, your startRunning request is preserved, and when your app comes back to foreground, you receive AVCaptureSessionInterruptionEndedNotification and your session starts running.
We are facing one issue, where as soon as we get the push notification on IOS, safari opens up. We are sending push notification with deep link. If we send 'https://www.google.com' as deeplink, as soon as the notification is received, Safari opens. We want that deeplink to work only once the user will click on push notification and not once the push notification is received.
Please suggest if you know how this could be resolved.
I have been using react-native-modal-datetime-picker package for my react native mobile application and and came across an issue like the below. In the date picker I need to have a default selected date as '1985-08-17' and when the time zone is America/Mexico_City (-05:00) the default selected date becomes the previous day which is '1985-08-16'. Is there any thing that I have done wrong in the below code sample?
<DateTimePicker isVisible={true} date={new Date('1985-01-17')} onConfirm={()=>()} onCancel={()=>()} mode={'date'} />
In the same CDT time zone when I change the device timezone to America/Chicago this issue is not reproducible.
I am attempting to make the images scroll horizontally. I downloaded some UI, and added ScrollView horizontal. But instead of it looking the same just with the ability to scroll horizontally, it shrank the image (and also gave it the ability to scroll horizontally). What should I change to make it stretch all the way across (still with the padding)?
Posts.js
import React from "react";import { View, Text, Image, ImagBackground, ImageBackground,} from "react-native";import Icon from "@expo/vector-icons/Entypo";import { ScrollView, TouchableOpacity } from "react-native-gesture-handler";export default class Posts extends React.Component { state = { liked: false, }; onLike = () => { this.setState({ liked: !this.state.liked }); }; render() { const { name, profile, photo, onPress } = this.props; return (<View><View style={{ flexDirection: "row", paddingTop: 25, alignItems: "center", }}><View style={{ width: "20%" }}><Image source={profile} style={{ width: 45, height: 45, borderRadius: 13, }} /></View><View style={{ width: "60%", }}><Text style={{ fontFamily: "Bold", fontSize: 14, color: "#044244", }}> {name}</Text><Text style={{ fontFamily: "Medium", fontSize: 12, color: "#9ca1a2", }}> 2 mins ago</Text></View><View style={{ width: "20%", alignItems: "flex-end", }}><Icon name="sound-mix" color="#044244" size={20} /></View></View><View style={{ flexDirection: "row", width: "100%", paddingTop: 20, }}><ScrollView horizontal><ImageBackground source={photo} style={{ width: "100%", height: 220, }} imageStyle={{ borderRadius: 30, }}><View style={{ height: "100%", flexDirection: "row", alignItems: "flex-end", justifyContent: "flex-end", }}><TouchableOpacity onPress={onPress} style={{ marginBottom: 20, borderRadius: 5, padding: 5, backgroundColor: "#e8e8e8", }}><Icon name="forward" color="#044244" size={20} /></TouchableOpacity><TouchableOpacity onPress={this.onLike} style={{ marginBottom: 20, borderRadius: 5, padding: 5, backgroundColor: "#e8e8e8", marginLeft: 10, marginRight: 20, }}><Icon name={ this.state.liked === true ? "heart" : "heart-outlined" } color={this.state.liked === true ? "red" : "#044244"} size={20} /></TouchableOpacity></View></ImageBackground></ScrollView></View></View> ); }}
Here's me adding more words because the post doesn't have enough words on it's own. When will they finally remove this pointless feature? I feel as if I clearly expressed my question with the few words I used.
I am trying to run React native iOS project with Xcode, upon trying to build am getting the following error:
Unable to execute command: Segmentation fault: 11Clang frontend command failed due to signal (use -v to see invocation)
I tried uninstalling the pods and reinstalled again, clean build but no help
Below is my AppDelegate file:
#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@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{#ifdef FB_SONARKIT_ENABLED InitializeFlipper(application);#endif RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"sheolife" 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
Below is podFile:
require_relative '../node_modules/react-native/scripts/react_native_pods'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'platform :ios, '13.0'target 'sheolife' do config = use_native_modules! use_react_native!(:path => config["reactNativePath"]) pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' pod 'RNLocalize', :path => '../node_modules/react-native-localize' pod 'SRSPickerView', :path => '../node_modules/react-native-picker-view/ios' pod 'TextToSpeech', :path => '../node_modules/react-native-tts' pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob' pod 'RNAudioRecorderPlayer', :path => '../node_modules/react-native-audio-recorder-player' pod 'react-native-video', :path => '../node_modules/react-native-video' pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient' target 'sheolifeTests' 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 these next few lines. use_flipper!({ 'Flipper' => '0.87.0', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1' }) post_install do |installer| flipper_post_install(installer) endendtarget 'sheolife-tvOS' do # Pods for sheolife-tvOS target 'sheolife-tvOSTests' do inherit! :search_paths # Pods for testing endend
Kindly help me out here, any leads would be great. also let me know if anything is required for better understanding
I have integrated React Native Navigation package for my React Native application.I need to update my old React Native Navigation version to latest version.I am following it's official docs for setup:: check this link https://wix.github.io/react-native-navigation/#/docs/Installing?id=ios
I am facing an issue in iOS linking.
Error:: 'ReactNativeNavigation/ReactNativeNavigation.h' file not found
Error:: Semantic issue: Use of undeclared identifier ReactNativeNavigation
I have also followed this previous post but it's not works for me linkI'm setting up React Native Navigation for my application, for iOS using Xcode.
I've made modifications in the AppDelegate.m file as followed by it's official link:
#import "AppDelegate.h"#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <ReactNativeNavigation/ReactNativeNavigation.h>@implementation AppDelegate- (BOOL)application:(UIΩApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; [ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions]; return YES;}@end
Please suggest how to resolve this issue for iOS platform.
My setup:
I am basically new to programming, just starting to learn React Native. Trying to get my development environment set up on an old MacBook Pro.
I am following the process described here https://reactnative.dev/docs/environment-setup on the React Native site.
And I have also been trying to do this learning project from Traversy Media here https://www.youtube.com/watch?v=Hf4MJH0jDb4 but I realized the React Native tutorial and the Traversy Media tutorial conflict when it comes to instructing me to do a global install of the react-native-cli. I believe I currently do not have a global install of the react-native-cli, but I could be wrong.
I can successfully initiate an app through the terminal (i.e. generate the files into folder locations). But I get an error when starting the iOS project build onto a virtual iOS device.
I call the directory of the project.
I run:
npx react-native start
npx react-native run-ios
And then I get:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65.
...and then a long way down the Terminal window, after lots of lines I don't understand, I am told that the CompileSwift and CompileC commands failed:
** BUILD FAILED **The following build commands failed: CompileSwift normal x86_64 /Users/[myusername]/Desktop/Dev/ShoppingList/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift CompileC /Users/[myusername]/Library/Developer/Xcode/DerivedData/ShoppingList-drihumjcjrxnoqcutvskvcmaocen/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/VirtualEventBase.o /Users/[myusername]/Desktop/Dev/ShoppingList/ios/Pods/Flipper-Folly/folly/io/async/VirtualEventBase.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler(2 failures)
Like I said, I am completely new to programming and to React Native so any input on resolving this environment setup issue would be so helpful.
I'm completely stuck with the Firebase/React Native phone auth implementation. I've followed the guidelines and documentation very closely and pretty much copy-pasted the code from this official Firebase/React-Native how-to guide.
The problem I face is the following:
iOSWhen I test the integration with the simulator or with a real device (Product Scheme
is set on Debug
in Xcode), the authentication method always starts the reCAPTCHA process. The Firebase documentation states, that the reCAPTCHA process is just a fallback, and usually (and mostly) a silent pushnotification in the background does the job of verifying the device. However, I'm always presented the reCAPTCHA process. Furthermore, after I complete the reCAPTCHA job, the WebView
goes white and stays there. When I click on "done", the Firebase integration throws a message, that the phone authentication process was cancelled by the user (because I closed the WebView
when I click on "done"). If I do not click on "done", the WebView
stays white forever.
AndroidWith Android (simulator and real device) I'm at least able to verify my test numbers (which I have configured in the Firebase dashboard) and everything works smoothly. However, when I want to test a real phone number (and I except a real SMS with a code), the Firebase integration throws an error which says the following:
[auth/missing-client-identifier] This request is missing a valid app identifier, meaning that neither SafetyNet checks nor reCAPTCHA checks succeeded. Please try again, or check the logcat for more details.
I have activated the Android Device Verification API
on Google Cloud Platform, I have uploaded the correct SHA1 values on Firebase, I have downloaded and integrated the updated google-services.json
(for Android) and GoogleService-Info.plist
(for iOS), I have created APN certificates
at Apple and uploaded those to Firebase and I also added the correct URL Schemes
to Xcode (the REVERSED_CLIEND_ID
from the GoogleService-Info.plist
file).
In the end I just want to verify if users enter a correct phone number. I don't need the authentication part.
UPDATE on 20th of May, 2021
Android is now working properly. I had to upload also the SHA-256 token to Firebase, not only the SHA-1 token. This for both, the debug.keystore
and the release.keystore
. iOS is still presenting me the reCAPTCHA method and stays blank/white after that.
I have a basic text like this in my react native app
<Text style={{color:"#000000"}}>Text on IOS</Text>
What i want to do is to switch color to white when the phone gets switched to dark mode for IOS and switch it back to black if mode changed again to light and first how to active that if possible without restarting the app and without affecting android.second how to detect that the mode has been switched to dark or light.