I am planning to develop hybrid application for Android and iOS using Angular,Phonegap etc.
My main query is how to maintain single code base for iOS/Android?
Q1:I execute cordova create command to create project for Android. and write one Hello World App.Do I need to do create project again in iOS and copy www?
Q2: How about maintaining single code in git ? I am confused since folder structure are different for Android and iOS ?
Any help is appreciated.
I have searched many blogs but didn't find the this concepts.
Just develop your code under project/www
cordova platform add android
cordova platform add ios
Will create both platforms, and with cordova prepare, and cordova build, it will copy the files to each platform
To maintain code, just add your project into a GIT, and both platforms project/platforms/[IOS/android] will be in the same project. You can also gitignore the platforms if you want to maintain light your project
Related
I use Phonegap CLI to make my android apps every thing works fine, but when I want to make my final .apk I face a problem
I have SDK JDK Java and all environment variables
I generated my .keystore and when i run phonegap build --release i have no error my problem is this
there is no folder called bin or any .apk file in my folder
I red all documents and questions from stackoverflow and I still have this problem
what do you think? should i switch to cordova CLI ?
PhoneGap has been discontinued.
Switching to Cordova CLI is certainly an option, but many find that installing the build toolchain is a lot of trouble to get working (and keep working).
If you prefer the convenience of a build service like you had with PhoneGap, have a look at VoltBuilder, Ionic or Monaca.
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 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