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.
Related
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 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.
I am building a RN project with "create-react-native-app" and "Expo". So how it is possible to run on Android & Ios device? How i can generate APK file? I am using sublime text 3 for writing code.
If you don't mind opening your app through the Expo app on real devices, all you need is to publish it onto the Expo ecosystem. Read more about publishing.
If you do mind that extra step and want to go the normal way, you need to create a standalone app for distribution:
When you’re ready to distribute your app to end-users, you can create
a standalone app binary (an ipa or apk file) and put it in the iOS App
Store and the Google Play Store. See the full guide to building a
standalone app.
Source
There is so much conflicting information out there on this, I'm hoping we can shed some light.
Goal: Create and develop a phonegap app that will be built using phonegap build.
1) I don't want to install the android and iOS SDKs, that's why I want to use phonegap build.
2) I created an app using the cordova cli cordova create hello
3) There is no phonegap.js or cordova.js I guess because I didn't add a platform. But I don't want to add a platform as that requires installing the SDKs
4) I need to be able to debug and test this, so I downloaded ripple, which may or may not work, I need the phonegap.js file first to see.
So has anyone figured this out? Building and developing and app that will be used on Phonegap build?
Thanks!
Phonegap will let you create a UI using webview of Android, iOS, Blackberry or other platforms. That means you need to have native SDK to apply Phonegap Build. It doesn't mean that Phonegap will create an App for you and deploy it to other platforms.
Can i have this kind of set up?
I want to create a normal xcode project and just add the Cordovalib.xcodeproj to the xcode project?
Just like this one. http://mobiledan.net/2012/05/02/compile-phonegap-source-code-in-your-ios-phonegap-project/
But instead of creating a Cordova project from the start I will create a normal and standard Xcode Project.
Yes, you can, it has been available for a long time, I think since phonegap 1.5 on iOS. It's called cleaver.
To see how to use and configure, follow this link (for phonegap 2.1), in other versions it can be a bit different, and the steps were included in a pdf inside the .dmg of phonegap installation