I have recently started with React-Native and wanted to try a bluetooth connectivity library (https://github.com/innoveit/react-native-ble-manager)
Steps to create app and run on device:
react-native init myBluetoothHandler
cd myBluetoothHandler
npm i --save react-native-ble-manager
When I do this I see this log:
react-native link react-native-ble-manager
Which fails with this error log:
Just for a hit and try I ran step 3 again and this printed. And after that link command also worked.:
But I am not able to run the project from Xcode on my device. I see this error:
Same happened to me when I tried a different library: https://github.com/Polidea/react-native-ble-plx/issues/388
Use react-native init <project_name> --version 0.59.0. Do not use rc versions.
Related
I'm working on an iOS app with React Native (v0.67.3) and whenever I try to build it, I'm getting an error when Xcode (V13.3) code tryes to run a scrript. Have no clue why this is happening. I have npm version 8.1.2 installed.
The error:
/Users/pmartinez/Library/Developer/Xcode/DerivedData/MobileApp-frkhaqamtpcugdcsyhasoiuhppdr/Build/Intermediates.noindex/MobileApp.build/Debug-iphonesimulator/Bravofly.build/Script-0C0D98A027E095D600B19536.sh:7: command not found: npm
Command PhaseScriptExecution failed with a nonzero exit code
I tried to build my flutter app in xcode and I got the following error - "File name too long".
I build at command line -
flutter clean
flutter pud get
go into ios folder and run pod install
flutter built ios -v
build is successful and no error found in verbose log. May I know what could be the issue.
/Users/username/Library/Developer/Xcode/DerivedData/Runner- ehbtgfrwszowthgqyvfzuynymnrk/Build/Products/Debug-iphoneos/Runner.app: File name too long
Command CodeSign failed with a nonzero exit code
Hello I'm Beginner in React Native,
I've installed everything did they said.
Now I've created application using below command
react-native init TempApp
Application is created successfully
Now I try to run application using below command
npx react-native run-ios
I got below error
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /Users/encora/Documents/Paresh\ Workspace/React\ Native\ Projects/TempApp/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift
CompileC /Users/encora/Library/Developer/Xcode/DerivedData/TempApp-fnxepatpnxxjncbfdflpymtfxxag/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/encora/Documents/Paresh\ Workspace/React\ Native\ Projects/TempApp/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Even I try to run application from Xcode also, but I still get error in Xcode also.
Can anyone help me please how to run first react application on Mac
Try this -
Close the Xcode,delete node_modules folder and then run commands in project directory
npm install / yarn install
cd ios && pod install --repo-update
npx react-native run-ios
Option 3 is optional either run project from terminal or from Xcode
enter image description hereI'm new to react native, I'm following the official React native's website to init a new project, try to run IOS. But, failed with the error below.
React-Native version 0.59
XCode 10.2
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 HelloWorld.xcodeproj
When I run react-native run-ios --simulator="iPhone 7"
Error as below:
info Command PhaseScriptExecution failed with a nonzero exit code
info
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 HelloWorld.xcodeproj
Starting the simulator : Once you have your React Native project initialized, you can run react-native run-ios inside the newly created project directory. If everything is set up correctly, you should see your new app running in the iOS Simulator shortly.
Specifying a device : You can specify the device the simulator should run with the --simulator flag, followed by the device name as a string. The default is "iPhone X". If you wish to run your app on an iPhone 4s, just run react-native run-ios --simulator="iPhone 4s".
The device names correspond to the list of devices available in Xcode. You can check your available devices by running xcrun simctllist devices from the console.
In my case, I was specifying a simulator, but I had a different simulator open. Targeting the one that was opened, or simply closing it fixed the issue.
try this and see if it works or not.
first go to to ios folder of the project in terminal.
for that you can use terminal in visual studio code.
cd ios then
pod install
go back (to app directory)
cd ..
npm install
npm start
take a new terminal then,
npx react-native run-ios
Context: I am currently on Ionic version 3.15.2. The 'ionic serve' command works. The 'ionic cordova emulate ios' and 'ionic cordova emulate android' do not work. I have tried deleting/reinstalling certain packages and dependencies from Ionic but nothing has helped. I have a feeling I need to delete/reinstall Xcode all together but I figured I would ask for help here first. This is the error message I get on my terminal when I try to use the Ionic simulator/emulator:
Command /usr/bin/codesign failed with exit code 1
** BUILD FAILED **
The following build commands failed:
CodeSign build/emulator/****app.app
(1 failure)
Error: Error code 65 for command: xcodebuild with args:
-xcconfig,/Users/*****/Desktop/*****/platforms/ios/cordova/build-debug.xcconfig,-workspace,****app.xcworkspace,-scheme,****app,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS
Simulator,name=iPhone
5s,build,CONFIGURATION_BUILD_DIR=/Users/*****/Desktop/****/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/****/Desktop/****/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova emulate ios (exit code 1).
Note: I used the asterisks in place of the path for privacy reasons
It's weird that ionic serve works but the other two commands don't...
Even ionic info should fail with the latter error.
It's because of the module #ionic/cli-plugin-proxy. As soon as I uninstalled it I could successfully run ionic info. But it detected IONIC_HTTP_PROXY in my environment and asked me to install it again.
So I did manually later, but the error returned. So I installed the missing module using npm install -g #ionic/cli-framework. After that I could successfully run ionic info again.
Therefor I guess it's an unresolved dependency issue inside the #ionic/cli-plugin-proxy module.