How to enable Hermes in React Native cli version "0.71.2"? Can anyone guide me through every step that I need to take to enable Hermes in React Native cli version "0.71.2"?
I found some resources on the internet but after following every step told it caused me build fail errors I also tried to use a library called "#react-native-community/hermes" but now in the new version of rn cli it was not found in registry
How can I enable hermes in new versions of React Native cli app?
Related
I’m trying to create an npm package for React Native.
This package would exist as a module to the already existing React Native SDK (core module).
Something like #react-native-firebase/app <—> #react-native-firebase/crashlytics relation.
I understand that I should start with create-react-native-library
and to add the core module as a peerDependencie.
The before-mentioned React Native SDK has a bridge to native SDKs for iOS and Android. Those native SDKs have additional modules that I want to include in my npm package.
And this is where I get lost, how to include those native modules in my package. Any advice is more than appreciated.
This question is in the neighborhood of what I’m asking but it doesn’t provide the explanation that I need.
iOS
Do I need to add something like this in .podspec file:
s.dependency 'iOS_MODULE_THAT_I_WANT', '1.0.0'
Are there other steps to take? If so, what would be equvelent od that for Android.
enter image description here
I am using ionic v 6 and capacitor version 3 and when trying to build ios code getting this error
You are using #capacitor/push-notifications 4.x version while still using #capacitor/ios 3.x.
Version 4.x of the plugins are meant to be used with version 4.x of platforms.
You should update #capacitor/ios to 4.x or downgrade #capacitor/push-notifications to 1.x.
Note, if you decide to upgrade to 4.x, you should also update android, cli and core packages and since it's a major version it requires some other changes, check the migration guide
My company is doing Mobile Device Management with Microsoft Intune. We've successfully deployed an internal iOS app (using the Apple Developer Enterprise Program).
With Intunes' configuration settings we're trying to make each user's individual email available to the mobile app.
https://learn.microsoft.com/en-us/mem/intune/apps/app-configuration-policies-use-ios
How do you normally access these types of settings in an app? I found this library but I'd need to eject from Expo which is not ideal for me:
https://github.com/robinpowered/react-native-mdm
You can add expo support into react-native-mdm by fork react-native-mdm and use Config Plugins
here is the PR for adding expo support into the native package https://github.com/Shobbak/react-native-compressor/pull/62
After adding support you just have to do
Managed Expo
yarn install react-native-mdm_from_your_fork
Add the react-native-mdm plugin to your Expo config (app.json, app.config.json or app.config.js):
{
"name": "my app",
"plugins": ["react-native-mdm"]
}
Finally, compile the mods:
expo prebuild
To apply the changes, build a new binary with EAS:
eas build
As the MDM has native dependencies, You'll not be able to make it with Expo. Expo projects are written only in JavaScript and don't support packages that contain Objective-C or Java (Native code/dependencies).
Expo provides an advanced SDK called ExpoKit for when you absolutely need to use custom native code. However, there are some cases where developers need native capabilities outside of what Expo offers directly. The most common situation is when a project requires a specific Native Module (like MDM) that is not supported by React Native Core or the Expo SDK. You'll have to detach the Expo project to create Xcode and Android Studio projects that contain ExpoKit. This step will generate android and ios project directories. Then you would add custom Objective-C or Java the same way as with any other Xcode or Android Studio project.
The Expo docs warn about some of the downsides of writing custom native code and discourage most of our developers from taking this route, as Expo's motive, almost everything you need to do is better accomplished in a cross-platform way with JS. Writing in JS enables you to best take advantage of code aster deployment and benefit from ongoing updates and support from Expo. You should only do this if you have a particular demand from native code which Expo won’t do a good job supporting, such as (for example) specialized CPU-intensive video processing that must happen locally on the device, Custom native libraries.
Here are only two options to support the MDM, either eject the project or create react-native-cli project and migrate your project into newly created one.
I am new on ReactJS and learning from scratch. I see some using babel and some are webpack to configure as well some use yarn package manager. So can you suggest me which is better to work with react.
I just curious about configuring reactJS environment thorugh which bundle or package manager?
babel is a transpiler, webpack is a bundler and yarn (or npm) is a package manager. These tools are for different purposes. And usually we use all of them together.
React has a very handy tool called Create React App. With this tool you don't need to configure babel and webpack by yourself so you can start to learn React easily.
You can start working with react using create react app(along with official react documentation) which will provide you app structure with no build configuration. So there is no need to worry about babel, webpack. you will get all configured with proper documentation. It's up to you to use yarn or npm as package manager.
This is best place to start up with ReactJS
In older versions you need to setup react with babel and webpack but now on current latest version you can directly start with Create React App
ReactJS Installation and startup guide
Just follows steps on this page, then run HelloWorld example which is best programs to start with any new programming language.
I am trying to release the React-Native iOS application using Microsoft's Codepush on staging. For this I followed the given instructions on the website and was able to build the bundle file and release successfully on staging but I didn't see the updated changes on mobile which I released.
Firstly I installed the application on mobile using usb (Run on device).
After that I made some changes in my application and released on staging using codepush but when I restarted the app on mobile, it's not showing the changes.
iOS Setup
version: 1.0.0
react-native: 0.17.0
react-native-code-push: 1.5.3-beta
react-native bundle --platform ios --entry-file index.ios.js --bundle-output codepush.js --dev false
code-push release AwesomeProject codepush.js 1.0.0
Can any one help please ? Thanks.
The workflow steps that you posted look correct, so I'm not entirely sure what the issue could be without seeing the logs generated by the CodePush plugin when running your app. If you take a look at our troubleshooting docs, it explains how to examine the logs, along with some common issues and workarounds.
One potential issue is that you're not calling "sync" within the componentDidMount of your root component, and therefore, the plugin thinks your update failed, and rolled it backed. To fix this you simply need to call "CodePush.notifyApplicationReady" in your root component's componentDidMount to notify the CodePush runtime that the update should be considered successful.