Pedometer App for a phone - iphone

Where could someone get the code or guidelines to create a universal pedometer app for various phones?
or would you have to create a different app for each phone?
or could you just create an app for android & iphone?
How would a coder go about doing the task? where to look for help?

Titanium Mobile is a cross-platform dev environment that lets you write apps in javascript that are then compiled into native apps for iPhone/iPad and Android. I haven't used it myself, but I've heard that it does not completely suck. I do not know whether it supports the accelerometers in these devices (which would be necessary for a pedometer app), but it probably does.
However, since you'd have to learn a bunch of new stuff just to use Titanium, it might make more sense to just pick a platform and spend your time learning to program it natively (Android has more marketshare now - maybe - so I'd recommend just learning that; Android is much easier to work with than iPhone).

Titanium Mobile does support Accelerometer.
For iPhone, there is an offical library in the framework that will detect steps, but it will only work from iOS7.
Look here: /System/Library/Frameworks/CoreMotion.framework
Please be aware there are restrictions for what kind of Apps can run in the background on an iPhone.

Related

iOS XCode native vs PhoneGap for speed of development

I'm aiming to do an app like Badoo:
http://itunes.apple.com/us/app/meet-new-people-chat-socialize/id351331194?mt=8
Basically it involves chatting with people and GPS geo-location.
Question is - I have two options:
A. Have this developed in native XCode for iOS
OR
B. Have this developed in HTML5 + PhoneGap
Assuming either route is with an experienced developer, how much time does B save over route A in terms of getting a viable product out?
Performance, speed, and UI are all important for this, so obviously native is ideal... but how much time would PhoneGap save in getting it out?
Thanks so much!
Have this developed in PhoneGap, as you can target multiple platforms. And also phonegap also supports geo location functionality. so its a win win with phonegap.
if you are going to target ONE platform, do the Xcode route. if you are going to target android and ios together, then please Phonegap.
I'm a fan of native development even if you are deploying to multiple platforms.
However, the main point is if you have skills in html/css/javascript and potentially want to support multiple platforms then by all means go with PhoneGap.
If you have skills in iOS development then go native and reconsider what to do if you want to support other platforms later.
IMO, once you've developed an application in one language, then the amount of effort required to do another version in Android, PhoneGap, or whatever is greatly reduced. If you know the target platform well it is painting by numbers.
If you are building for iPhone/iPad (JUST IOS), then xcode will be your best friend and it will be much faster to develop in xcode in that case, as documentation and sites like this one (stack over flow) have many code snippets around and it will make your life easier. And not to mention that storyboards are also excellent in making your User interface. If you take the xcode route, it will still take you roughly the same amount of time as phonegap.
HOWEVER, if you want to make the SAME app for iphone and android, then phonegap will save you 50% project time, and this only applies when you are talking about one app for both android and iphone
Just out of curiosity, where do your skills lie in? ios or html/css?

Programming iOS apps with PhoneGap and/or QuickConnect

A friend of mine told me that some frameworks (PhoneGap and/or QuickConnect) can transform my HTML/JS/CSS code to an iOS App.
Personally, I hate this kind of frameworks because when you get a bug, it's very hard to debug. But, on the other hand, as i'm starting learning iOS programming, I find Objective-C hard to learn.
Did anyone tried these tools? What are their limits? What about performances?
Thank you,
Regards.
These frameworks are handy if you are coming from web development world. Since they allow you to develop using HTML/CSS/Js you'll be able to get going quite rapidly.
Even though they offer more interaction with the native capabilities of the device (contacts, camera, accelerometer, etc.) than pure web development (using Sencha Touch or jQuery Mobile for example) they are still more limited than a native application.
Webkit
Most of these solution are focused on devices using a WebKit based browser for the rendering. Which is used by many of the main mobile OS :
Symbian, iOS, Android, BlackBerry, Bada, etc.
Main exception being Windows Phone which uses Internet Explorer
Cross-platform
Their goal is to enable cross-platform development ever by wrapping your web development into a native app (PhoneGap, Titanium) or by "translating" to the appropriate language for the targeted device (RhoMobile Rhodes, MoSync).
iPhone specific
Aiming several platforms implies that some phone specific features might not be so easily supported. And the UI won't look as native since it's targeting different OS. So if you are only aiming iOS4 you could maybe try some of the more specific solutions such as:
iWebKit
Ansca Corona
Performances
For standard apps you should'nt notice much difference. But if you are planning to develop games some of these frameworks are probably not the best solution. Corona claims to be appropriate...
Caution
If you plan to develop a commercial application beware of Apple's policy.
Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine
Many applications using these tools/frameworks are still accepted but there is nothing official.
Edit: As stated by Rydell the policy has changed since September 9.

developing iphone apps on windows is it worth the hassel

I'm only after a simple solution and won't be developing anything particularly complex. But I'm wondering whether the hassals of developing an iPhone app NOT on MacOS are really that significant to avoid giving it a shot. Bearing in mind that I do have access to a mac every now and again. So I would be able to compile it using the official Apple supported SDK, but I just want to be able to develop it in my own environment (windows laptop).
I heard someone mention a while ago that there are various objective C compilers that allow writing code in various other web technologies as well. Are these really valid.
And am I alone in thinking Apple's whole attitude towards this is totally imoral. Charging $200 for the privelege of having your app unequivocally rejected etc etc and then not being allowed to look directly at Steve Jobs or his golden retrievers.
It depends on what sort of app you're developing - web app, or native iphone app. There are benefits and drawbacks to both.
You can make (and host) an iphone web app on any platform, and write it in pretty much any language. There are projects like iui to make your web app look more like an iphone app. You also don't have to pay to get into the iPhone developer program, but your app isn't available through the app store - it's just a web site. In the newest version of the iPhone OS you can bookmark a site to your site to the "desktop" - making it possible to launch your web app just like any other iPhone app.
If you're making a native iPhone app, again, it depends what sort of app you're making. If it's a game, you can develop it in C (ObjectiveC is a superset of C) and OpenGL ES, and just make a thin ObjectiveC iPhone app wrapper to launch your game. If you're making a "regular" iPhone app with widgets, etc. this is very difficult (if not impossible) without developing on a Mac - in addition to ObjectiveC you'll need the Mac and iPhone libraries - things like Cocoa, etc. that just aren't available on any other platform.
There are also some cross-compiler options here too - MonoTouch for Mono/.NET, Flash cross-compiling and probably more. You'd still need a Mac / iPhone developer account to ultimately test the result in iPhone simulators or on an actual device.
As for how 'imoral' this is of Apple/Steve Jobs - it's the difference between a closed platform and an open platform - some video game systems are also closed platforms also and you pay for the privilege of developing an app for them - and they have the option to censor / prohibit your app/game from their platform. The iPhone is just the most current and popular version of this. If you don't like it - develop an Android app instead :)
If you don't want to work on a Mac, you should look into developing a web-application for iPhone.
A) You can develop it on your pc
B) You can test everything on your iPod or iPhone
C) No, review by Apple

Titanium Developer for iPhone

Am looking into developing an iPhone native app using Titanium Developer
Since this is still in beta, I am wondering if there are any better options and/or if its a good idea using such software to develop native apps (which are not games; not graphic intensive)
If you don't want to wait, you can do what a lot of us did: develop apps in Cocoa Touch. It works perfectly well for games as well as non-graphic intensive apps.
The similar and more mature PhoneGap framework has been used in a number of iPhone apps and Apple only seems to object if the application autoupdates.
That being said, I wouldn't recommend using web frameworks unless your application is really simple--you will get a much better experience from a native application (on both Android and iPhone)
My company uses Titanium and it's working fine so far. It's also a pleasure to develop iPhone app using javascript and co. I'd recomend you give it a try, it's really simple to set up and start coding.
Some reading up: http://boldr.net/iphone-app-with-titanium-mobile/

Sharing Code between Flash Apps and iPhone Apps

I am interested in writing games for the iPhone and the Web. Ideally, there would be one language that I could write my games in and it would work on both platforms. I know this is not the case, so what is the best way to leverage code between iPhone apps (Objective-C/C++) and Flash SWFs (ActionScript)?
This maybe of some help
It uses the NME library which will allows code to mostly be written to the Flash 9 API and create the C++ for XCode to compile and run on the iPhone and Touch. This creates a path to port Flash games to iPhone/Touch.
Unfortunately, Flash and Objective-C are very, very different - and it's unlikely that a Flash player will be available for the iPhone in the near future. The native input methods used in Flash games - the keyboard and mouse - don't lend themselves well to the iPhone. While Apple could make Flash run on the iPhone, most Flash games would be totally unplayable (or feel very unnatural. They'd have to overlay a keyboard probably?). With the success of the App Store and native iPhone games, I think it's very unlikely you'll see Flash support anytime soon.
You might want to consider using a game development tool like Unity instead of Flash in the future. Unity allows you to create both 2D and 3D games, and you can program them in various .NET scripting languages. Once you've created the game, you can cross-compile it for web (their own plugin, not Flash), iPhone, or the desktop.
I know that doesn't help much since you have an existing codebase, but it might be something to consider for the future!
My company is developing a toolchain that allows compiling ActionScript3 to native code for mobile devices.
It now supports Windows Mobile and Symbian, and iPhone supported will be released in a couple of weeks.
Check it out at: http://developer.openplug.com/
BR
Guilhem
Adobe Alchemy looks promising. It is not released yet, but from their website:
Alchemy is a research project that allows users to compile C and C++ code that is targeted to run on the open source ActionScript Virtual Machine (AVM2).
This would allow iPhone apps and Web apps to share non OS-dependent C/C++ code, which is a very exciting prospect.
One option would be building everything in unity. The engine facilitates building the same game project to any of the following platforms:
Webplayer
OS X
Windows
iPhone
Wii
Actually, the iPhone supports Flash technically (see Developer creates Flash for iPhone and Flash Installer Update #2). It is just Apple's crippleware restrictions that prevent installation.
Other than that, there's really not much you can do. Flash/ActionScript and Objective-C are radically different. You can have a central server store data, but that doesn't solve the duplicated logic.
If you're already willing to use ActionScript you could go all the way over to the dark side and switch to Javascript. That's the only common language supported by your clients (web and iPhone).
How comfortable you are with either development environment certainly plays a role here. If you are a die-hard Objective C and a super star Actionscript programmer then doing both shouldn't be much of a problem. It will be lots of work of course, but not a problem.
However, if you are neither or only skilled at Actionscript then I suggest you focus on Flash/Actionscript for the time being. Eventually Flash will be available on the iPhone anyway. When that happens you can already have a number of apps ready to be quickly ported to iPhone. Also keep in mind. There are more portable devices out there than just iPhone. Getting your apps running on other devices might be worth it in the mean time.
Just keep in mind when you're developing your apps now that at one point you also want to run these apps on the iPhone. So make 'm in such a way that they can be controlled with an iPhone as well.
Updating this old QA with new information. The recently released monkey development framework deploys to both iOS and Flash: http://www.monkeycoder.co.nz/
It's so new that I wouldn't necessarily recommend it, but it has a great pedigree: the creator made Blitz3D and BlitzMax before, and those were great game development tools.
That said, I would strongly recommend a combo like Corona for iOS and Flash for web, so that you're using optimal tools for each platform.