PhoneGap Build: is it possible to use PhoneGap SDK without Xcode to get UDID, pre-populate SMS messages, or integrate with Urban Airship? - iphone

Because PhoneGap now offers PhoneGap Build, a way to compile iPhone apps without Xcode, we're wondering if there's also a way to access the SDK without Xcode?
In particular, we need PhoneGap to allow our HTML5 app to access a device's UDID, to pre-populate a SMS message, and to integrate with Urban Airship for push notifications.
We want to convert our HTML5 app into a native iPhone app.
Thanks!

Generally if it's part of the JS wrapped PhoneGap SDK then yes you have access to some limited subset of the native SDK calls, and can use Build to do whatever's supported.
As for the UDID, while it's been deprecated in iOS5, it is supported through PhoneGap:
http://docs.phonegap.com/en/1.1.0/phonegap_device_device.md.html#device.uuid
For SMS, you would have to build your project with XCode to include the SMS plugin, as it's not part of the default PhoneGap SDK any longer (used to be, don't know when it got dropped).
https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/SMSComposer
Local notifications are supported well but I'm pretty sure you would also have to build in some additional code and build with XCode to get push notifications supported.
Apparently they are working plugins into the Build pipeline but last I checked it wasn't ready yet.

Related

Check if my ionic app has a new version on AppStore and PlayStore

I would like to add functionality to my Ionic based application to check the respective app store for a newer version, and if present, prompt the user to download once (not repeatedly- they should be able to skip and not be nagged). Similar to Siren, but for Ionic and both Google Play and Apple App Store. I see this similar request for native apps and AppStore and this similar request for Play Store, but nothing specific to Ionic. I feel like I could stitch it together using App Version and ajax calls listed from those requests, but that there has to be other people who have done this already and have existing Cordova/Capacitor plugins for this. Also that there may be nuance that a naive solution could fail (ie ajax call fails, app stores change API, newer version is not supported on device, etc).
Is there an existing plugin or code that will implement the behavior described above?
You can use Market plugin in addition to the App version plugin..
I haven't come across a solution which directly checks the app store, instead i have to maintain the app version in my server db and check it at app start.
Here is the flow that can be used..
App Launches
Checks the current app version using APP VERSION plugin
Calls an API endpoint to my server to compare for the deployed app store version (which is maintained in the db)
If the app version is outdated, use the MARKET plugin to take the user to the app store.
A Capacitor alternative to the market plugin is there, but didn't test it out.
Follow Capacitor plugins proposals, for an upcoming solution.

Iphone app using Phonegap and the OS and IDE I can use

I have a requirement from client to develop an iPhone application. As I am a dot net developer I thought it will be bit challenging for me. So I thought of developing it using phone gap. So before suggesting something to the client I need to make sure of certain points.
Do I really need a mac machine to develop this?
Since I am using only html5, css and js, can I develop it in Visual studio/Eclipse? I have already tried some samples in both these IDE. And once the app is ready I have read about using PhoneGap Build I can make it ready to use in iPhone...
But from the following link, what I understood is I need an apple computer, mac os and Xocde to develop it even though it is not a native mobile app.
http://mobile.tutsplus.com/tutorials/phonegap/phonegap-development/
Please guide me with some insights before talking to the client.
Thanks.
PhoneGap Build is a cloud-based service built on top of the PhoneGap
framework. It allows you to easily build those same mobile apps in the
cloud. To get your application build just what you need is to simply
upload your web assets - a ZIP file of HTML, CSS and JavaScript, to
PhoneGap Build, after some time you’ll receive the download URLs for
all mobile platforms.
I read it from here , they also mentioned about installing SDKs
you might want to install some of the SDK emulators if you don’t own a
particular device that you want to test a build for.
Here in this link they have put a note
Since PhoneGap Build uses Apple's standard development process to
build applications, you will need to sign up for their developer
program to build iOS applications on PhoneGap Build. You will also
need a Mac to configure your certificate and provisioning profile.
Consider using a Mac Virtual machine.
You mainly need a mac to create key value chain pairs to sign your app and test it on a device. You can just get a Mac VM to do this is my recommendation. You can then use the phonegap build service to compile your www folder for iOS
Here is a good demo for multiple index files to have one solution base
http://blog.safaribooksonline.com/2012/07/13/mcrooster-a-phonegap-application-with-a-single-codebase/
I think you should do a bit more research before jumping into bed with PhoneGap for the sake of not being an Objective-C developer. PhoneGap has its limitations, and my experience of it compared with native app development is pretty poor.

Can you bundle an Objective-C iPhone app and an HTML5 (PhoneGap) iPad app to make one universal app?

The apps provide the same functionality, but have different code bases.
Is this possible?
I'm not entirely sure what you mean by "bundle" in this instance. PhoneGap provides the ability to deploy your app to numerous platforms (iOS, Android, Windows Phone) by writing in just HTML5, CSS, and Javascript. Your question states that you have a functioning HTML5 version of the app written for the PhoneGap platform. If this is the case, what is the need for the Objective-C iPhone app? Simply maintaining the HTML5 app should be sufficient to deploy to both iPad and iPhone. PhoneGap currently supports iOS, iPad, and retina displays.
From the PhoneGap documentation, you can specify differences in your interface using config.xml.
You can mix phonegap and native code fairly easily - just have the startup code check the platform type and display either the native view or the phonegap webview.
However, whatever you do at this point will result in some inconvenience to users - the only way to share in app purchases across devices is to have a single universal app. If you want to keep existing purchases, you have to add an ipad view to the existing iphone app, but that will not show up as an update for anyone who has the existing iPad app.
There are other possibilities such as setting up a server to track purchases in both apps, but that gets a lot more complicated than standard in app purchase and only works if your app includes a login system.

Can I use third party PhoneGap plugin on a web page using iOS Safari browser?

I am developing an application targeted only for iOS device(for now) using PhoneGap library and HTML5. This application is going to be only a web page accessed through iOS Safari browser. I am going to use certain features like accessing accelerometer, geolocation, contacts etc of iOS device using PhoneGap library.
Will I get access to all these features without installing anything on the device.
I want to understand how does PhoneGap get access to native features
of the device by just using JavaScript only?
I see there are several useful plugins written for PhoneGap library.
Can I simply use those plugins(js files) into my page without
installing anything on the device? E.g PhoneGap ChildBrowser plugin?
Will I get access to all these features without installing anything on the device.
You will have to build as a native ios app and install it to the device.
I want to understand how does PhoneGap get access to native features of the device by just using JavaScript only?
Phonegap provides a Javascript interface to access hardware features which are actually Objective-C functions. If you look at Phonegap source you'll see a lot of Objective-C code. So it's not only Javascript.
I see there are several useful plugins written for PhoneGap library. Can I simply use those plugins(js files) into my page without installing anything on the device? E.g PhoneGap ChildBrowser plugin?
No. They have to be inside an iOS app to be able to work.
It seems like what your after is a way to access the features of an APP only through the browser.
You can access some things using HTML5 e.g.:
Geo location http://html5demos.com/geo
Accelerometer http://menscher.com/teaching/woaa/examples/html5_accelerometer.html
Video Embedding http://www.w3schools.com/html5/html5_video.asp

How to deploy a jquery-mobile web app to an Iphone store app

I have built a Jquerymobile webapp , I want to take it a step further, build additional features and deploy it as an iphone app. I am confused on connecting these two dots. I looked at Phonegap and Titanium. Phonegap does not allows to register yet and Titanium seems like I have to code everything again using Titanium apps . Any ideas on how to bridge the gap of connecting iphone app and jquerymobile.
I use phonegap for my iPhone apps and it works well. Phonegap Build will even encode the iPhone (and Android, Blackberry, etc) app for you so you don't have to use Xcode.
Phonegap download 0.9.6: http://www.phonegap.com/download-thankyou
How to start an app using Xcode and Phonegap: http://www.phonegap.com/start
signup for Phonegap Build: https://build.phonegap.com/
Can you just take your already written JS code and use it as your source for a UIWebView? Those middle-ware platforms you mentioned have their own JS libraries you need to use, but if the code you already made will work as-is on an iPhone, dumping it into a UIWebView should be all you need to do.