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

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.

Related

Will IOS HTML5 offline app be listed in appstore?

I am new to IOS development (currently, I'm developing websites in ASP.NET) and I found out that one can create an IOS app using just html 5 and javascript.
Well that is great news for me since I don't have the time to learn Obj-C and xCode way of writing apps.
I have heard some opposing statements, though, on whether I will be able to submit my app into the app store.
Will I be able to submit such app in the app store?
If not, is there a way to 'wrap it up' somehow, so it could be submitted?
Thanks!
No, only native app will be listed in the App store. To submit apps to the appstore you will always need a paid Apple Developers account.
Native in this case meaning real apps that can be installed.
You can build an app in HTML and Javascript in tools like Phonegap and Titanium. These tools will create a native app which loads the local HTML and try to make it feel like a native app.
You will need to use a wrapper, like AppMobi (where I work). This lets you write your app in html, javascript and CSS only.
You need to wrap your application in a UIWebView container. As far as I know, there's no way to package an HTML5 only app for the App Store. I have four apps in there that are HTML5/Javascript apps, wrapped in a UIWebView. There are also third-party frameworks available for this.

Is it possible to create a widget for iOS?

I'm a little bit confused now. There is a weather and stock widget on the iPhone. Is it possible to create such a widget yourself? I don't want to talk about new features in iOS 5 here. I only want to know it in general (iOS < 5).
Here I found the introduction guide with the help of Dashcode.
Wikipedia also states that this is not possible. I always thought it would be.
So are there only web apps and native apps possible?
PS: What is a widget exactly? A combination of native app and HTML, CSS, Javascript? Only HTML, CSS, Javascript? A cocoa application?
No, iOS does not currently allow the creation of widgets. The weather and stock widgets you're talking about were created by Apple. There are no APIs to write your own.
As of iOS8, its possible. 3rd party apps will be able to create widgets for the notification center.
http://www.apple.com/pr/library/2014/06/02Apple-Releases-iOS-8-SDK-With-Over-4-000-New-APIs.html
This isn't a Guide for iOS Widgets, it's Guide for Mac Dashboard Widgets.
You can't
create iOS Widgets
change how the iOS Notifications Appear
With Dashcode you can create Web Applications for both iOS and Mac. It's a combination of HTML, CSS and JavaScript. Those Web Applications are only available on the Web (e.g. Safari). If you wan't to create a native App you have two possibilities:
Create a real native Application in ObjC
Create a Web Application (e.g. with Dashcode) and load it into a UIWebView, this requires also ObjC.
Advantages
Web-only Application (Browser-App)
You don't need a Apple Developer Account
Easy to port to Mac and other Smartphones
Unreal-native Application (Browser-App in a native App)
Easy to port to other Smartphones
It feels like a real native app
Your app is on the App Store
Native Application (Real iOS-App)
You have full access to the iPhone Frameworks (e.g. Contacts.app)
Your app is on the App Store
Disadvantages
Web-only Application (Browser-App)
The user needs to know your URL
You're not in the App Store
Unreal-native Application (Browser-App in a native App)
You need to pay 99$/year for an Apple Developer Account
It could feel like it's not a native app
You have not the full access to the iPhone Frameworks except you use something like PhoneGap or ObjC
Native Application (Real iOS-App)
You need to pay 99$/year for an Apple Developer Account
You can't port your app easy to other Smartphone
You need to learn ObjC
No, currently thats not possible. But you can, and should, file a feature request at bugreport.apple.com so that this issue gets some attention.
There is no reason you can't create a widget like component using javascript and display it in a uiwebview. This works equally well in android and iOS
A few years ago when I was involved with java server pages development I put together a tutorial of using dashcode to wrap java or javascript components.
http://www.jsfcentral.com/listings/A21034;jsessionid=A15086803ABF96A63DB1AB5405C9A329?link

How To Make iPhone App Into A Web App

If I make a iPhone app, like a grade manager. What technologies are necessary to make it into a web app.
This includes reading the data from iPhone app in the web app portal (not necessarily editing from web app as of now).
I think I need to transition from using plists to using MYSQL?
Probably you need to this:
http://www.phonegap.com/
it's an Open Source Mobile Framework That Supports iOS and other platforms.
Hope it will give you a guide.
The best approach would probably be to write a web app that can communicate with the iPhone app, not "converting" the iPhone app to run on the web.

Can I successfully do iPhone/iPad website development/testing on Windows?

Can I successfully do iPhone/iPad web development (not native apps) on Windows, and without having an iPhone/iPad device?
I.e. work like PSD-to-iPhone-optimized XHTML/CSS layout.
I’m interested to learn about and make iPhone/iPad optimized websites. Any tips? How different will it be from desktop? What’s different other than the smaller screen?
From experience I will say the only true way to test for the iPad is to test on an iPad. I have been developing a site in html5 specifically for an iPad and we initially used the iPhone to test. The drag function we had implemented with jQuery had worked almost perfectly on the iPhone but after the client had tested on the iPad they came back to us and said the function did not work period and they were correct.
I guess this could change depending on what type of development you are doing. From experience I would say either A. Make some trips to the apple store B. Make friends with iPad owner C. Buy and iPad
yes for an ipohne emulator... try MobiOne.
It's a good application to test the pages in iphone like environment.
http://www.genuitec.com/mobile/
I don’t think you can really do iPhone/iPad development successfully without an iPhone/iPad at all, whether on Windows, Mac or Commodore 64.
If you’re serious about iPhone/iPad development, how could you not try your software out yourself on the devices it’s going to run on? Your clients are going to want code that works on the iPhone/iPad. You need an iPhone/iPad to check that it works.
if your developing a web app then i think you can use this: http://ipadpeek.com/
The answer is: Yes you can absolutely do iPhone and iPad website development on a Windows PC.
However, you really should/must test the result on an actual iPhone/iPod Touch/iPad. Especially if you are integrating in any way with special device features like the dialing feature of the phone. (Yes you can have phone numbers in a webpage trigger dialing when you tap on them.)
However, you can do the bulk of the development on Windows, testing the WebApp in Safari or Chrome, which are the most fully compliant HTML5 WebKit based browsers out there.
Also highly recommend using an HTML5 touch framework like jQuery Mobile or Sencha Touch. This will go a long way to ensuring that your WebApp is optimized for the screen size and touch gestures of the mobile devices.
Remember that you can't deploy a pure WebApp to the app store, only download it from a website. You'll need a native wrapper like PhoneGap for that. And to compile a PhoneGap wrapped WebApp you'll need XCode on a Mac.
But there's a lot of power in adding your WebApp to the home screen on iOS. No native code involved and you get a full screen webapp with a home screen icon, loading image and no browser toolbars. Highly recommended.

What are the limitations of coding web apps for the iPhone?

For instance, could a web app access the mic on an iPhone and transmit voice back to a server?
Or is it possible to build Safari extensions for the iPhone that can operate transparently on a web page? For instance, is it possible to build an extension that removed ads from Google result pages for the iPhone, without the user clicking any buttons to activate the ad-removal functionality?
You pretty much hit the main limitations.
You have no access to hardware that's not supported by HTML5 (geolocation is, but things such as acceleration and audio/video recording are not).
You can't build Safari extensions for the iPhone at this time, you can only use JavaScript like usual.
Some frameworks like PhoneGap make attempts to provide more hardware features via a native app container, but it appears Apple is trying to prevent those apps from going on the App Store, to some extent.