Getting starting with phone gap with cordova - ios

I know this is very basic question , but i want to start with phone gap ,and i have no ideas about it. so i started with phone gap official site .
but i am so confuse there is not straight forward way to start. and i also did googling and find some nice tutorial but all is so old .
I am confuse with Cordova . before it we have to only install phone gap Dmg and it show in our Xcode but now it it very confusing
there are some command on site to install like
install
$ sudo npm install -g phonegap
Usages
$ phonegap create my-app
$ cd my-app
$ phonegap run android
but cant move forward here
Please suggest some tutorial with latest SDK.

Your question is somewhat broad, but I'll try to help. Working with PhoneGap involves a few steps. You want to begin by installing a mobile SDK. This is used by PhoneGap to create applications and which you pick is up to you. Android is the most cross platform, but on Mac, iOS is a bit easier. The platform guides (http://docs.phonegap.com/en/3.5.0/guide_platforms_index.md.html#Platform%20Guides) walk you through the entire process. You should get that setup first.
Then, installing PhoneGap is as you said - one npm install. npm is a Node.js tool, but you don't have to know Node at all. Just install it so you have the npm tool, then literally just type in what they said.
At that point, you can use the PG CLI to create projects. The general process is:
make a new project - phonegap create foo
add platform support (based on what you install - phonegap local platform add android
add plugins that you may need
then send to an emulator - phonegap run android --emulator
If this doesn't make sense, then I'd recommend narrowing down your question a bit.

Related

Alternative for hybrid web app without knowledge in app/server

i used to upload my ZIP (with HTML5/CSS web app) in phonegap since 4, 5 years and create cool mobile apps. But since some months it's look like Adobe dismiss the project, no more answer on forum etc.
Is there a good solution, when you don't know everything about shift/cocoa/java and server things, to simply upload your webapp (basically a website in a zip) and get IPA/APK ?
I heard about monaco or voltbuilder. Thanks
Not really. Although I can confirm https://build.phonegap.com works for me. If you have an error related to a malformed xml, you can try to delete the project on the website and re-uplading the zip file onto a new project. That's a bug I have experienced in the past.
Otherwise, you can install Cordova and Phonegap on your pc to build it using npm on the terminal (Linux/MacOs).
$ sudo npm install -g cordova
or for windows (CMD):
C:\> npm install -g cordova
then navigate with the command line using cd to go to a folder
eg. cd myfolder.
You can see the files in your current directory with ls (Linux/MacOs) or lsdir (windows)
Once you are in your project's folder and that you can see with lsdir or ls your config.xml file of your project, then you can run those commands to add the platform you want to build:
cordova platform add ios
cordova platform add android
Finally to build the app, you need to:
cordova build
Note: To build an Ipa, you will need to use a device running MacOs since it requires XCode. I highly recommand you to get familiar with Cmd or the terminal if you are building an app.
I hope I have answered your question well

Exact steps needed to migrate a react native android app to iOS

I've written a react-native app and compiled it for android.
Now I wish to compile my app for iOS.
I've searched the internet and found a lot of documentation about adding react-native components to an existing iOS app project, but couldn't find a concrete guide/explanation on how to take an existing react-native project(with many components, packages installed etc) and add the relevant iOS configuration.
I guess that I somehow should create an iOS project through xCode,then probably copy some project files into my ios folder of my project, create a podfile corresponding to my packages in package.json, install the required stuff using pod install and then maybe I can run it using the react-native run-ios command, but I'm really not sure whether I'm correct and to do these steps.
If someone can clarify to me what are the required steps I'll be grateful! (And I think other people might find it useful as well)

Installation with Create React App

I'm sorry for asking what may be an obvious question to most, but I'm lost. I have created a react project with create-react-app. I want to add a third party library (Ant Design UI Framework) that uses .css styles. Ant will use global .css and the rest of my application can then use styleName.
After running npm install babel-plugin-react-css-modules --save what do I have to do to get this running? The documentation references the configuration but the individual steps required properly configure the app aren't clear at all—at least to me.
Can someone help with a bit of an "idiot's guide" to setting this up, and detail some of the steps?
Thanks,
Chris
Ant Design also have react native library as you can see here
You just need to run the following command on your project root to install it:
$ npm install antd-mobile --save

Build flutter app for desktops

I saw a few peoples managed to build flutter apps for other OS than the usual Android/IOS
My question here is simple : How ? What is the current process to build a flutter app for mac/windows ? There's no need for it to be production ready. Something experimental is enough
For those wondering how to :
https://github.com/google/flutter-desktop-embedding
There's an example using openGL to render a flutter app
Run a Flutter project in Desktop
Step 1:
For Flutter to run on Desktop, we must be on the master channel, with the latest release. So run from cmd,
flutter channel master
and
flutter upgrade
Step 2:
Then we have to enable flutter desktop support.
set ENABLE_FLUTTER_DESKTOP=true
Step 3:
Then clone this repo and cd example directory.
Step 4:
Then replace the lib folder inside the example directory with our existing code, and replace the pubspec.yaml file, with our existing one.
Step 5:
Then run from terminal
flutter packages get
and
flutter run
You can find more info here.
You can check this link out
https://github.com/google/flutter-desktop-embedding
Still not stable but does a good job of rendering flutter apps on desktop
Here's something I found useful, it is currently in alpha version but does the job by enabling us to develop Mac and Windows apps in Flutter :
https://feather-apps.com/
For those who want to know the current state(2021), here is the startup project to help you test It for MacOS, Linux, Windows. The project heavily modified from official ci to build cross-platform easily. You might want to check the ci.yml If you want to build on certain platform without github-action.
In additional, go-flutter is also a valid option, that used go-lang and openGL to achieve cross-platform features.
If you want to know the difference between official and go-flutter, here is the issue about the details.

Building WebRtc on iOS

I was successfully able to build WebRTC on MAC following these instructions: http://www.webrtc.org/reference/getting-started
Has anyone successfully built it on iOS? I understand that someone (arik) has successfully built it on iOS: https://groups.google.com/forum/#!msg/discuss-webrtc/VJg-fk2-i_0/dtG200DOzsgJ But the steps are not clear.
Can someone (who built on ios) summarize the steps so that it will be useful for everyone trying it in the future?
I wrote a detailed blog post with all of the instructions on how to build the WebRTC example iOS application, as well as how to run it on the iOS simulator or an actual iOS device. You can take a look here to read the details, it's a pretty lengthy process.
Yes, compiling for iOS was a very painful task... especially getting it work in Xcode.
Here's my attempt to get AppRTC Demo for ios
Clone/Pull: https://github.com/pristineio/webrtc-build-scripts
After getting the repo, then open the xcode project within the ios directory. Set the target to WebRTC Dance, then execute. At this point the scripts will update depot_tools and do all the dirty work (pull, modify, build) so that your target for AppRTCDemo will able to resolve the missing files and execute.
Once that completes, you can change the target to AppRTC Demo with a simulator or a real device, click run and it should execute. There's more detailed information in the guide linked in there and updates in the readme.
If you are wondering what gets ran under the hood, check out the build.sh file in the ios directory of the git repo. The dance function is what's actually getting executed for you when you select WebRTC Dance.
Its not really easy to describe the build process (way too much going on) but the build scripts repo should definitely point you in the right direction and help you get AppRTCDemo on ios 'just work'
There's also a google developers video posted here, where they try and break down the build process so you can build for ios (the youtube title is misleading).
Also, I just added cocoapods support for ios webrtc, add this to your Podfile,
pod "libjingle_peerconnection"
# Add this to the bottom so it won't have issues with active architecture
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['VALID_ARCHS'] = ['armv7', 'i386']
end
end
end
Not all the revisions are built, so check out the the cocoadocs for which revisions are available
I have been working in this space for the past few months now - webrtc on iOS is not easy. To help this problem I have added a github repo with a working example of and iOS app using webrtc.
https://github.com/gandg/webrtc-ios
The site references the google code site as well, so it should be a helpful starting point.
Well, it's been a long time to answer this post. But, I hope someone might
get better intuition from it.
I have been dealing with webrtc compilation processes for iOS and Android platforms. This process is really simple if you follow each step efficiently. To compile the library for iOS, follow the below-given commands and make sure you're using the same(only-1) tab of Mac terminal for WebRTC Native Compilation Setup as follows:
Prerequisites
Link Xcode with Command line
Setup depot_tools
Fetch Code for Development
Selection of Branch
Compile Library (iOS Framework)
1. Prerequisites:
First of all, make sure of the following things that you have already installed, if not then use these commands to do that:
- sudo add-apt-repository ppa:openjdk-r/ppa
- sudo apt-get install openjdk-8-jdk
- sudo apt-get install pkg-config
- sudo apt-get update
Please also install python==2.7, if it's not already installed.
2. Link Xcode with Command line:
- sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- sudo xcode-select --switch /Library/Developer/CommandLineTools
3. Setup the Depot_tools:
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- export PATH="$PATH:${HOME}/depot_tools"
After that, start the following steps one by one. Every step takes its own time based on the machine specs and internet speed, so make sure every step is completed without interruption.
4. Fetch Code:
- mkdir webrtc_ios
- cd webrtc_ios
- fetch --nohooks webrtc_ios
- gclient sync
5. Select Branch-head:
- cd src
- ./build/install-build-deps.sh
- git checkout origin/master
- git branch
6. To compile every time:
Make sure you are in the webrtc_ios/src/ directory, then simply run this command:
- ./tools_webrtc/ios/build_ios_libs.sh
It turns out that you will end up with the compilation and building of WebRtc Framework holding Webrtc Header Files. You can simply drag and drop this framework into your Xcode production environment or simply import it.
As you have set up your compilation environment, now every time you make changes into your native stack, you can simply run this command ./tools_webrtc/ios/build_ios_libs.sh to generate an updated framework.
If you end up with an issue regarding the compilation of webrtc framework. Please follow these steps. Make sure you're in this directory webrtc_ios/src/:
- git checkout origin/master
# To make sure you're using origin/master
- git branch
- gclient revert
- gclient sync
- ./tools_webrtc/ios/build_ios_libs.sh
And hopefully, you will have your issues sorted. I always recommend you guys that You can check out a branch that would be behind the origin/master and doesn't have all dependencies and modules over there which are necessary to build webrtc framework for iOS. So, Please always checkout to branch/head of webrtc native stack
Now, if you tried with these both procedures to build the WebRTC such as:
1- Using Bash Build Tools (./tools_webrtc/ios/build_ios_libs.sh)
2- Using Manual Compilation
Examples
$ # debug build for 64-bit iOS
$ gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"'
$ # debug build for simulator
$ gn gen out/ios_sim --args='target_os="ios" target_cpu="x64"'
2.1- Compiling (ninja -C out/Debug)
Both procedures will work.
This seems to build some of the modules: https://code.google.com/p/webrtc/issues/detail?id=1421#makechanges

Resources