Closed HarshMB closed 1 year ago
Same issue
Important Pods:
OS libraries:
MacOS: Big Sur 11.6 (Mac mini (2018)) Arch: i386
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, '15.2'
install! 'cocoapods', :deterministic_uuids => false
target 'App' do
config = use_native_modules!
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
:app_path => "#{Pod::Config.instance.installation_root}/.."
# :flipper_configuration => FlipperConfiguration.enabled,
)
target 'AppTest' do
inherit! :complete
end
use_flipper!()
# use_flipper!({'Flipper' => '0.125.0', 'Flipper-Folly' => '2.6.10', 'Flipper-RSocket' => '1.4.3'})
post_install do |installer|
react_native_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.2'
# config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
# config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
end
end
end
end
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
@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:@"WellnessMonitor"
initialProperties:nil];
if (@available(iOS 13.0, *)) {
rootView.backgroundColor = [UIColor systemBackgroundColor];
} else {
rootView.backgroundColor = [UIColor whiteColor];
}
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
Traceback:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/coprocoder/Library/Developer/Xcode/DerivedData/TestApp-gsrrkgvftyqsutdxqyhazvkvwjim/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/coprocoder/med_rn_web/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(1 failure)
Facing the same issue.
@sonimeister, @HarshMB Well, I managed to fix this error
This and this (and many others) topic helped me solve part of the problem. The solution is not the best, but only Facebook can do better. The problem is in 2 lines of the Time.h file in the RTC-Folly pod. You need to edit the source code.
When compiling the config, I relied on the rn_pods.
Fix
post_install do |installer|
...
# Change __IPHONE_OS_VERSION_MIN_REQUIRED from 10 to 14 in RCT-Folly source file Time.h
`sed -i -e $'s/__IPHONE_10_0/__IPHONE_14_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h`
# Remove typedef line in RCT-Folly source file Time.h
`sed -i -e $'s/typedef uint8_t clockid_t;//' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h`
end
But after that the following error appeared: "Can't find variable: require" This problem, as far as I understood from the forums of other libraries with such an error, is fixed by the developers of the library and lies in their source code. So it looks like we'll have to open a new issue. If you have the same error after and you manage to solve it, please help me to solve it
Hey all. I just spent 4 days on this. In doing alot of googling around, I realized that my containing directory had a space in it (eg. '/Contain Folder/RNProjectFolder'). Once I removed the spaces from the containing folder, I was able to build. Looking at the very top of this thread there is a folder named 'Practice Folder' in the path which contains a space. Seems RN doesn't do escaped paths well from what I have read. Also, I am not on an M1 Mac. Hope this helps. Or, feel free to remove if this is not the issue. Used some info from a few answers down in this SO: https://stackoverflow.com/questions/66742033/phasescriptexecution-cp-user-error-in-react-native
Hi there.
Same issue for every project under >= 0.68.0 version.
My colleague and I both use an MBP. Everything works fine for him.
Here's my configuration : 2,6 GHz 6-Core Intel Core i7 <--- NOT BUILDING
Here's his configuration : 2,3 GHz 8-Core Intel Core i9 <--- BUILDING
Anyone helps me to understand ?
Hello all, anyone find any solution for this?
On my side it was the nvm alias default
which was not set properly, had to do this:
$ nvm alias default v16.14.0
then it started to build 🎉
I don't know how I managed to fix it, but it works.
The problem is exactly in the transition to a new architecture, it appeared after the update. In an attempt to think out and update on my own, I broke everything.
The problem was solved after migration according to the guide.
Commands that helped me after migrating the configuration code:
Cleared all caches (just in case) (same as react-native-clean-project)
Reinstalled everything
In a nutshell:
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Description
I created new project using react native CLI. react-native init SampleRunTest
After that i did pod install in ios folder and opened SampleRunTest.xcworkspace and tried to run in iPhone 12 but i got below erros. I am trying for 3 days but nothing is helpful from stackoverflow and other sites.
Error:-
Below versions i am using:- react-native : v0.68.2 react : v17.0.2
Please suggest some solutions.
Version
0.68.2
Output of
npx react-native info
System: OS: macOS 10.15.5 CPU: (4) x64 Intel(R) Core(TM) i7-4578U CPU @ 3.00GHz Memory: 909.02 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.10.0 - /usr/local/bin/node Yarn: 1.22.5 - /usr/local/bin/yarn npm: 7.24.0 - /usr/local/bin/npm Watchman: 4.9.0 - /opt/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 12.4/12D4e - /usr/bin/xcodebuild Languages: Java: 11.0.13 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Snack, code example, screenshot, or link to a repository