IOS Build failed: unknown oid 'fs.inotify.max_user_watches' (React-Native) - ios

Trying to publish my first React Native Expo app on Apple App Store (it is already in Google Play store), I go eas build --platform ios in the terminal. From there it asks me to log in with my AppleId which I do. Then it says build failed.
In the 'Pre-install hook' build details log on Expo.dev, I get this error message:
Script 'eas-build-pre-install' is present in package.json, running
it...
yarn run v1.22.17
$ sudo sysctl -w fs.inotify.max_user_watches=524288
[stderr] sysctl: unknown oid 'fs.inotify.max_user_watches'
[stderr] error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation
about this command.
yarn exited with non-zero code: 1
Is this because Im on a Windows PC, and it can only be done on a Mac or some bs?
Files are here: https://github.com/RasmusKvejborg/SecondsTillDeadApp

Related

IOS Build failed on a Windows PC: unknown oid 'fs.inotify.max_user_watches' (React-Native)

Trying to publish my first React Native Expo app on Apple App Store (it is already in Google Play store), I go eas build --platform ios in the terminal. But the build fails...
In the 'Pre-install hook' build details log on Expo.dev, I get this error message:
Script 'eas-build-pre-install' is present in package.json, running it...
yarn run v1.22.17
$ sudo sysctl -w fs.inotify.max_user_watches=524288
[stderr] sysctl: unknown oid 'fs.inotify.max_user_watches'
[stderr] error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn exited with non-zero code: 1
According to Google, I should be able to make builds for IOS even though im on a Windows PC.
Files are here: https://github.com/RasmusKvejborg/SecondsTillDeadApp

react-native run-ios keeps on failing

after updating MacOS to Big Sur and since Legacy build is deprecated
react-native run-ios does not work anymore, I've tried so many solutions but no progress I've been suffering with this for around 3 days.
side note that build on xcode succeeded
versions:
react-native: 0.59.10
xcode: 12
and I'm using iPhone 11 simulator and I also tried a real iPhone 11 device
result of npx react-native run-ios
on simulator:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening myapp.xcworkspace
** BUILD FAILED **
The following build commands failed:
Ld /myapp/ios/build/Build/Products/Debug-iphonesimulator/myapp.app/PlugIns/myapp.xctest/myapp normal
(1 failure)
another one on the simulator:
info ** BUILD SUCCEEDED **
info Installing DerivedData/Build/Products/Debug-iphonesimulator/myapp.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/myapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
on device:
info ** BUILD SUCCEEDED **
info installing and launching your app on Menna’s iPhone...
info ** INSTALLATION SUCCEEDED **
but the application doesn't appear on the device and I don't know how is that even possible?!
any help would be appreciated
SOLVED
in xcode, go to Project Settings > change build system to new build system
click on Advanced, then choose Custom (Relative to workspace) and specify locations as following:
Products: build/Build/Products
Intermediates: build/Build/Intermediates.noindex
in vs code, open node_modules/#react-native-community/cli/build/commands/runIOS/runIOS.js
and change DerivedData/Build/Products/${configuration}-${device}/${appName}.app
to build/Build/Products/${configuration}-${device}/${appName}.app;
delete ios/build and DerivedData content
run react-native run-ios again
try:
sudo npm install -g ios-deploy --unsafe-perm
and next:
yarn ios --device "YOUR_DEVICE_NAME"

react-native run-ios: The bundle identifier of the application could not be determined

I am playing with React-Native and trying to build a Hello-world app, however, I am still unable to run the app. If I run react-native run-ios, I get this error:
...
Build system information
unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace.
Build system information
error: unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace.
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze /Users/adam/react-native_dev/JustATributeApp/node_modules/react-native/React/Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)
The following build commands failed:
Analyze /Users/adam/react-native_dev/JustATributeApp/node_modules/react-native/Libraries/Text/RCTTextAttributes.m normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/JustATributeApp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/JustATributeApp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
I found quite a few topics with this error, but none of them led to solving it.
Here is some additional information:
react-native-cli: 2.0.1
react-native: 0.56.0
xcode 10.0 beta 2 (10L177m)
How do I debug/fix this issue?
Thank you
The key piece of the error message is Ensure that the application's Info.plist contains a value for CFBundleIdentifier. Here's how we can fix that.
Open yourprojectname.xcodeproj in Xcode, and check the bundle identifier under the 'General' tab. It should have a value. Mine is com.yourprojectname.app.ios.triplets . If that field is blank, set the bundle identifier to something. Modifying this field will make the changes to your info.plist.
I suggest restarting React.
To do so, just run the following commands:
# Kill current processes
killall node -9
# Start React - Native
react-native start
# Run android
react-native run-android or react-native run-ios
That should do the trick.

New to ionic - can’t build for ios (9) on El Capitan, and sudo ionic is required, deprecated npmconf

I am a student and I just started with ionic today. I have no experience with command line usage so I am pretty stumped here.
When I try to run the basic template (tabs) with:
sudo ionic platform add ios
sudo ionic build ios
sudo ionic emulate ios
(these don't work without having the sudo there).
the last one produces this in the logs (among other stuff above):
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-6 simulator
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
ENOENT: no such file or directory, stat '/Users/Dylan/Library/Logs/CoreSimulator/D0923A6C-7738-41BA-8134-ED747069991A/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/Dylan/myApp/platforms/ios/build/emulator/myApp.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/Dylan/myApp/platforms/ios/cordova/console.log,--stdout,/Users/Dylan/myApp/platforms/ios/cordova/console.log,--exit
Error: /Users/Dylan/myApp/platforms/ios/cordova/run: Command failed with exit code 2
I have seen a few unsolved posts with the same errors but they haven't gotten anywhere. It could possibly be related to these following things here:
When running sudo npm install -g cordova ionic I get this warning:
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
Also, afterwards, if I try to run ionic I get a -bash: ionic: command not found error, but if I run sudo ionic then it logs a whole bunch of stuff to the console. Could this one be an error with security changes in El Capitan?
Thanks for your help in advance.
To prevent having to sudo almost anything you do in npm while working on MAC, my best advice is:
Install npm through Node Version Manager.

phonegap run ios --device --verbose Error

I used phonegap to install an app to an iPad yesterday simply using:
phonegap run ios
From within the project directory. I tried installing it to a second iPad today but that command did nothing. I then typed:
phonegap run ios --device --verbose
And got:
Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “***” were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.4'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Command finished with error code 65: /Users/.../.../.../MyApp/MyApp/platforms/ios/cordova/run --device
ERROR running one or more of the platforms: Error: /Users/.../.../.../MyApp/MyApp/platforms/ios/cordova/run: Command failed with exit code 65
You may not have the required environment or OS to run this project
I do not get what is different from yesterday except the device plugged in?

Resources