phonegap cloud build with single codebase with different ios and android plugins - android

we have successfully created a decent phonegap application working on android and iphone. (using eclipse android dev environment and running phonegap cloud build)
But I have integrated a Github plugin which was specific to Android "Sharing Plugin" .For that I had included Share.java file and other javascript file. But how will I integrate ios share plugin in same codebase (eclipse project) or I will have to Copy entire code on Mac machine use xCode Dev environment and use the plugin that way I will end up making two builds (only HTML, JS ,CSS common) and I will be using two Builds on Adobe Cloud Build service.
IS there any way to keep a single Source base for iOS and Android for even plugins? (put .m .h files of ios plugin in same eclipse codebase and use adobe phonegap build and use the plugin)

If you are planning on using PhoneGap Build service, they only support a limited set of plugins. You will not be able to import this plugin with PhoneGap build.
If you switch to building locally, this will invariably split your code into two projects (one for Android and one for iOS). You can create symlinks and keep www assets in a single location, but native code will be split (including your plugins).

Related

PhoneGap Development

How easy is PhoneGap to build and deploy Android applications? The application I'm thinking of is not a beginner level app. How is the level of debugging and error handling and the support it gives?
Thanks in advance.
Deploying an app with Phonegap is quite easy. You can install Phonegap by using,
npm install -g phonegap#latest
and then create an app by,
phonegap create myApp
Refer the docs, PhoneGap Getting Started
When you create the app you will notice there is a directory called "WWW". All you have to do is copy a build of your existing web app to this directory.
All your assets and code in this directory will be used to build apps for the platforms you specify.
You can use Cordova to add the Android platform, which will be used to get an Android build out of your project.
Use,
cordova platform add android
Notice the directory "platforms". Inside it you will find another directory called "android" and this will be your Android project.
To build an Android app simply use,
phonegap build android
When you run the above command Phonegap will build an Android project using your code in WWW directory and place it in the platforms/android directory.
You can then use Android Studio to open the android directory which is an Android project now.
It's as simple as that and quite easy once you get the hang of it.
Then you can do all the regular debugging inside Android Studio using Logcat.

How to preserve native IOS and Android code changes in Ionic build process

In our Ionic project we have created a few actual native views for IOS and Android. We did this by adding them to the Xcode and Android Studio projects them selves.
We are now having portability problems getting it to run on another machine. It suggests doing a ionic platform rm ios and ionic platform add ios
By doing this all the custom views and functionality applied to the projects directly will be overwritten.
What is the proper way to correct this problem? I understand its likely a plugin, but how would you go about creating a plugin which is an actual native view?

Is it possible to build Android and iOS apps in TFS2017?

I believe the new version of TFS won't offer native support for Android and iOS (unless the code is in C++), but in what ways could that be worked around?
Let's say I have a mobile client that has a version for every platform - Android, Windows Phone, iOS. The way I make a new build for Windows Phone is: open Visual Studio, find the right build definition and queue a new build, and then the build commences on a build agent and the output is copied to the folder that's specified in the build definition.
Is it possible to have that procedure for the iOS and Android apps as well? Currently, the procedure is using a Hudson build server, but I'd like to have build definitions for iOS and Android and just queue new builds through Visual Studio and receive the output .ipa and .apk files in the folder specified in the definition.
Thanks in advance for any suggestions.
On-premise TFS supports cross-platform build since TFS 2015, in the new tasks based build system. Check Continuous integration on any platform.
To build an Android app, use Gradle task: https://www.visualstudio.com/en-us/docs/build/steps/build/gradle
To build Xcode project, use Xcode build task: https://www.visualstudio.com/en-us/docs/build/apps/mobile/xcode-ios
In addition, TFS 2017 has some default build definition you can use directly: https://www.visualstudio.com/en-us/docs/build/define/build

Build an existing PhoneGap project for iOS using PhoneGap Build

I have developed a hybrid app for android using PhoneGap in Windows environment.
This is what i did:
I added android platform after creating a cordova project and then imported it into eclipse and built it and tested it on my android phone.
Now i want to use the same code and build it for iOS using PhoneGap Build service. I can arrange an apple developer certificate but before that i want to make sure whether it is possible to build the existing project for iOS.
Can anyone suggest on this please?
for people looking for an answer to this here, is what i did :
Adobe build only requires a URL of git repo of the project. Once you have got it you can build it for any mobile platforms iOS, Android, Windows, and Blackberry.

How to compile cordova project from visual studio (Hybrid App) to android / ios apk

I try to compile my Cordova Hybrid App from visual studio to apk file
After I deploy the project to Android / iOS the project bin folder still empty.
I try to upload the "www" folder to build.phonegap.com but I get error.
What is the best and correct way to compile the project (HTML, CSS, and JS) to APK for Android and IOS?
Thanks,
Tom
Update:
I try to build from the visual studio
this is my Project folder
When I try to build project from the visual studio on "Device" mode I get this error
1- If you have used Ripple simulator as the target, nothing will be generated in the bin folder. You need to switch the build configuration to "device" in order for the binaries to be generated
2 - The www folder that is generated by the Visual Studio template has nothing special and you shouldn't have issues with PhoneGap Build. If you have errors they are coming from your JS code itself
3 - To build the binaries for Android using the Multi-Device Hybrid extension for Visual Studio, you should be good by simply switching the build configuration to "device" instead of Ripple simulator. For iOS you need to use the Remote Build and Simulation Agent for iOS (which require have a Mac as the iOS tools are NOT available for Windows and you cannot generate the iOS binary directly on your Windows machine. Otherwise, you can consider using PhoneGap Build service
From the image the error looks to be similar to the one I was getting about my device not being recognized/found.
This answer explains how to get the APK directly just by setting the solution to Release, and only Building the project rather trying to do a full deploy to a device. It pretty much is the same answer as mentioned in point 3 above, just tested on a PhoneGap App solution.

Categories

Resources