I have little bit queries about detach expo app :
Am done app requirement but i have one thing that support only react native.
So i read about detach expo app and i think its mean if you done your coding in expo app and after detach you got android or ios folder and then copy these two folder and paste into react native project and then run command npm install.
But in above query i have one question in my mind .
Is expo coding that i done is available and its working as expo app in react native app or not ?
And now am continue coding after detach expo app in react native like add native module in react native app.
Detach or in actual terms, ejecting of your expo, in a React-Native project is a one way function. You cannot go back to the original setup once you eject.
After you eject, you get vanilla react native structure, which means separate folders for iOS and Android. This also means you lose access to expo API's you previously used. You can code or keep working on your project the same way as you were working before ejecting the app. Only your expo API's will change(if you have made use of them). Rest of your work flow will remain the same.
Related
How to convert expo app to react native cli? without re-coding it? I have a old expo app which I want to run but when i am running it with new react native version its showing too much errors now it has many deprecated functions is their any way to convert that app to react native cli? or any way to run that project without expo go? because expo go dont support SDK version 37
It seems like you can convert your expo project to a react-native-cli project using expo eject.
You should check out #deadcoder0904's answer to this question: Convert Expo project to Original React Native project
But, I'd definitely make a backup of your project before trying such things. Because this is a one way fix and we should be maintaining a older version in case of disaster.
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 currently working on a react application to complement a web application, and have been tasked with implementing an self-sovereign identity solution using the Kilt.io protocol. This worked fine for the web app, however I am running some issues when it comes to the react native app. I initially wanted to use Expo, however the #kiltprotocol/sdk-js package depends on #polkadot packages to function, which in turn depends on the NodeJS crypto package. However, as it is a NodeJS package, the module cannot be found when trying to run my expo app. It seems like it is possible to load the crypto module using the rn-nodeify package when not using expo (although I have not actually tested this myself for this use case yet), however I was wondering if anyone knows of a solution that would work for an expo project.
Try
expo install expo-crypto
then create a "metro.config.js"
put in
module.exports = {
resolver: {
extraNodeModules: {
crypto: require.resolve('expo-crypto'),
}
}
};
I am setting up a new expo application and want a support in my application.
I want to know how to add the android sdk of agora.io into my expo project?
Unfortunately both the iOS and Android SDKs for agora.io require editing of native code. As Expo abstracts native code away from you meaning the only way to access native code is to either create your project using react-native init or by ejecting your Expo project.
Looking at the docs for iOS you can see that it requires you to add the SDK either by using cocoa pods or by inserting it directly into you Xcode project file. https://docs.agora.io/en/Voice/ios_audio?platform=iOS#add-the-agora-sdk-to-your-project
Similarly for Android you have to add the SDK inside the Android folder and make changes to the build.gradle files.
https://docs.agora.io/en/Voice/android_audio?platform=Android#add-the-agora-sdk-to-your-project
However you are in luck. There are a couple of wrappers around the SDKs that can be used with a full react-native project or an ejected Expo project.
https://github.com/AgoraIO/React-Native-SDK
https://github.com/syanbo/react-native-agora
The above answer is out of date now, Agora does offer expo support per the following documentation:
https://www.agora.io/en/blog/building-a-video-calling-app-using-the-agora-sdk-on-expo-react-native/
The above article mentions this, but it should be noted that you will not be able to use Expo Go to test video call functionality since it requires native modules for the microphone and camera. I can speak from first hand experience that I have been able to use Expo Go for other features in the app, just not the Agora portions.
I am building an app in react native detached and I was wondering what would happen if one day Expo is no longer available or get shut down so then my app is not able to run bc it relies on expo.
Is it possible that I have my own javascript bundle locally or running on my server so I don't have to rely on expo at all. If so what changes are needed so my .apk file is not relying on expo but rather on my own bundle.js
The eject command doesn't depend on expo, so if one day expo stops working, you can detach your project from theirs and start building your own apk.