I need to work on multitasking in Iphone SDK 4.0 - iphone

Actually I am looking for Multitasking in Iphone SDK 4.0 and want to run to apps at the same time as it does in Ipod application for Iphone like songs while u can use different apps also. Is there any idea that how to use that feature in Iphone SDK 4.0 beta.
I have tried multiple NSThread but runs on same view or differnt but cant figured out to run 2 apps at same time.

I think the spirit of the NDA needs to be honored, and details, as well as specific API calls or even links to specific docs for 4.0 should not be posted.
At the same time, in my mind, there's some leeway to talk about fundamentals like this question that have been asked in variants again and again here, since there's clearly no harm in setting fellow developers on the right track.
That said, here's my answer: 4.0's interpretation of Multitasking can't run arbitrary third party apps as full blown background processes. You can't keep any code running in the background. They have to conform to certain types of approved services that Apple has chosen for 4.0, based on common app and developer demands.
If you're asking specifically about an app that plays music in the background (similar to a new Pandora app will under 4.0), you want to support the 'audio' background mode, as discussed in the document titled 'Supporting Multitasking In Your Applications' and linked from the 4.0 SDK section of the Apple developer site. This has been discussed in public keynotes, which is why I think it's fair game to give as an answer here.
If you have further questions, and are a paying Apple developer, you can discuss the 4.0 SDK on their developer forums.

Related

App only support iOS 8.. not iPhone 6 & iPhone 6 plus

I am developing app that only support iOS 8.. not compatible for iPhone 6 & iPhone 6 plus. so i have a query related that i have to add #3x size icons in Image Assets? having confusion on it..
OK I asked the question on the Apple Developer Forum and here is an answer I got in return:
That is a given by Apple's design. Apps already in the wild perform
whatever OS magic to support those devices. You are not required to
explicitly support them (but they should still run in emulation mode).
Also you may note every second game on the App Store states things
like "will not run on anything before iPad 2" and that kind of thing
and that's merely a designer/technical choice Apple seem happy with
regardless of many customers not reading these things or understanding
them and buying anyway.
Now this is someone's opinion (much like the answers and comments here), however the answer does seem to make sense.
However the only real way to know if Apple will reject the app is to submit it (it's a hit and miss process).

Adobe Flash CS5 and iPod Touch/iPhone

As you may all know (if not, click here), Apple has finally decided to allow apps created using Adobe Flash CS5's iPod Packager on the store. Owning a PC and not a Mac, this is great news for me as I longed to give a crack to iPod development.
I did try to use a fake certificate (yes I admit it) to publish an app and test it on my brother's iPod Touch (running on iOS 4.0), but the app wouldn't install. Is it because the iPod detected the certificate, or does he need to update his device?
My real question, however, is if it's worth paying 99$ for a developper certificate or not now? I was leaning towards the idea but the restriction has just been relieved (if you'll allow me the expression).
Thanks.
-Christopher
I've done quite a bit of AS3 Hacking along with Objective-C hacking, and on a surface level, the workflows are somewhat similar. There are plenty of differences, for instance the syntax has quite a learning curve, and creating UI elements is a breeze in Xcode, and has to be done by hand in flash (unless you like the way flex looks), whereas tapping into opengl and even using core animation can be daunting to a flash developer used to animating things around the screen.
This is important, because I really don't think it's worth the $99 unless you plan on developing in Xcode. A ton of the power of being an apple developer is in that amazing IDE, and missing out on that makes iOS development sound terrible.
There is however, 1 reason I would still buy it: if you already have an app you'd like to release, and all you want to do is get it on the app store. If you have a game you'd like to try releasing, it's absolutely worth the $99. Even if you were to develop it in Obj-C, there's still no guarantee it'll make it through the apple approval process, so you're not really risking much more than any other developer. What you wouldn't want to do is pick up the certificate, then sit on it and wait for it to expire while you're working in an IDE that has no relation to the program.
Buy the certificate if:
a) You already have a mostly-complete app you'd like to release on iPhone.
or
b) You also plan on setting up a Mac dev environment (and probably not until you have it set up).
Don't buy it if:
a) You don't plan on buying a Mac, using Xcode, or releasing an Obj-C app.
or
b) You are just toying with the idea of making an iPhone app, and haven't made any steps towards it yet.
I would definitely not base your decision on if apple will rescind it's decision or not - it's unlikely that they will not allow adobe packaged apps without good reason, and even if they do, it's the same risk any developer takes when making an app for release on the apple store. Apple can just deny it if they feel like it, and there's not much you can do about it.
Think of the $99 as the cost of the privilege to submit an app to apple for review. Even if you plan on developing on a Mac, Xcode is free, and there's no real reason to get a certificate unless you plan on testing on an iPhone or releasing your app. If you're still in a planning stage, skip it until you're ready to go.
I was wondering the same thing. Looking at the way the Android vs. Apple app thing is moving, I'd say yes -- it's worth paying $99/year to be a real mac app dev.
However -- I don't think that developing on anything other than a Mac with XCode is worthwhile.
Adobe Flash Builder (used to be called Flex) 4.5 also exports to iOS apps ( http://www.adobe.com/devnet/air/articles/packaging-air-apps-ios.html), which is great and all, but the fact of the matter is
A) it requires the Adobe AIR runtime to be installed on the phone
B) memory management is a totally different story between as3 and ios
The result of an auto-conversion is bloated file size and poor performance (see comments here: http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html). and related issue here: Size of the Flash Builder 4.5 application after packaging with iTunes
Not to mention there is no reliable emulator for iOS that you can legally get your hands on... I actually just got a mac mini and XCode -- mac mini ~$500... but XCode is a great SDK, and the emulators rock.
If you're serious about developing for the iPod I would get the developer license and at least a cheap Mac Mini. If you actually develop something you want to release you'll probably want it on the app store. It takes some time to get the license so you should just start the process.
If you like to tinker and don't plan to release anything (or don't want to have to use an app store) playing with Android might be more to your liking. There's no cost to get started or to put your apps on your own device other than actually having an Android device. (The same might be true for Windows Mobile, would have to double check).
I think, yes. It is still worth paying the amount...

How could I write a program for my iPod touch?

I don't want to register as Apple Developer and pay the Apple company before I know how to write a single line of code for iPod. How could I start writing a program for my iPod?
Is there a free way to write my own program and load it into my own iPod without paying the Apple company? It's so ridiculous that I bought my own iPod but cannot use it as I wish.
Thanks.
Go to http://developer.apple.com
Sign up
Download the software without paying
You only have to pay to get access to more support and for the right to ask Apple if they will put your app in their store.
You don't have to pay to download the iPhone SDK (which works on iPod touch devices as well), it's available for free on Apple's iOS SDK Developer Page (http://developer.apple.com/iphone/). You must have Mac OS X installed to run it, however.
In terms of learning, you can look through Apple's Documentation (available at http://developer.apple.com/iphone/library/navigation/index.html), but the best tools for learning are definitely books. You should look into purchasing Programming in Objective-C 2.0 by Stephen Kochan and The iPhone Developer's Cookbook by Erica Sadun.
Download the iPhone/iPod/iOS SDK.
Develop your application, test using the simulator.
You only need to pay for access to the App Store and for rights to load your application on a real device.
You can register for free as a developer here. Without the tools and resources provided exclusively to members, you're going to have a very hard time getting started.
This is exactly what I wanted to do! I found the solution here:
http://ipodtoucher55.blogspot.com/2010/06/how-to-create-iphone-apps-in-flash-cs5.html
No need to pay Apple, no need to have a Mac, but you do need to know how to code in AS3 (which is too hard if you know some other languages)

iPhone OS 4.0 backwards compatible with 3.1/.2

I'm building an iPhone application with a base SDK target of 3.1.x. I've got a friend who offered to test it on the OS 4.0 beta, but I'm wondering in advance if I should bother. Will my application run under 4.0 or is it not backwards compatible? I have to imagine it will since apps built for 2.x run on 3.x just fine AFAIK. Any gotchas?
This information is still under NDA and therefore cannot be discussed here, except what was mentioned at th keynote and is thus public.
That said...
I can see the announced multitasking as a gotcha in terms of memory, performance and application state. Testing on OS 4 seems like a good idea in light of that. However, I your friend's device is not a latest-gen hardware device (iPhone 3GS or iPod touch 3rd generation), you will not get test results that deal with multitasking.
Also, remember that when installing the iPhone OS beta, you will need to add your friends UDID to your list of testing devices in your devloper portal or else the device will lock up when you upgrade.
In case you or someone reading this needs to know:
To upgrade, you can either use XCode's Organizer or simply use iTunes. Hold the "option" key and click on the "restore" button. A window will pop up asking you what firmware to use.
Again, thes kind of questions are not yet really legal outside of Apple's develope forum.
I hope this helps. Good luck and happy developing!!
I've been using 4.0 beta for a few weeks now, and haven't run into any problems with my / App Store OS 3 apps. I don't think there were any changes in OS 4 that would break existing OS 3 apps but I can't say so with complete certainty.
Most likely any features from 3.0+ will be in 4.0. Features in 2.x may be removed.
No way to know for certain unless you can use the beta or wait until the official release.
You should always test on as many devices as possible. As mentioned, OS 4 is particularly good to test with just to make sure you interact well with the new multitasking features (which is public knowledge so it's not like saying anything about that would go against the NDA).

Is Android development restrictive in any way like for the iPhone?

Is Android development restrictive in any way like the iPhone, or can you download whatever and from whoever you want?
I want to learn about development for either iPhone or Android, but from what I hear iPhone development is pretty restrictive!
There are a variety of areas to consider regarding the relative restrictiveness of the two platforms.
The Market
Android Market is undoubtedly less restrictive than the App Store when it comes to the submission process. The upside is that you can get pretty much anything you want into the Android Market. The downside is that you can get pretty much anything you want into the Android Market (a market flooded with spam "applications" is in some ways a restriction).
A big negative on the iPhone side is the fact that your options for installing applications that are not in the App Store are limited -- you can either distribute the application as a beta (limited to 100 users) or jailbreak your iPhone. Android, however, allows you to install apps from anywhere, including a web page.
The Applications
One of the core design philosophies of the Android platform is "All Applications are Created Equal", which is supposed to mean that you can freely replace applications on the phone with a third party version. In practice this is not really the case, as many of the Google applications either have special capabilities not available to most applications (see: Android Market) or use undocumented/native APIs (see: Calendar).
The iPhone on the other hand makes no such claims about equality, and the Apple stance in general is "There is only one way to do it, and that is the Apple way". Additionally third party iPhone applications may not run in the background while Android applications can. New for iPhone OS 4.0 is the ability for apps to run in the background. One thing iPhone applications can currently do that Android applications can not is receive push notifications. New for Android 2.2 is the ability for apps to receive push notifications via something called the Android Cloud.
The Source
Android is open source - mostly (some firmware components are closed source). Even so, there is some rocket science involved just in getting the Android codebase to compile. In addition Google has sent cease & desist orders for redistributing custom images that include the Android Market and Google Maps application.
The iPhone is completely closed source, and recent changes to the developer agreement have been controversial as they mandate that all apps submitted to the app store be originally written in "Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs"
The SDK
The Android SDK can be freely downloaded; the iPhone SDK requires free user registration to download. Android development can be done under Mac OS X, Windows or Linux, while iPhone development is only possible under Mac OS X. You'll also need to pay for the $99 iPhone developer account if you want to test your software on an actual device (rather than the simulator).
The Userbase
And last but certainly not least, the userbase. When this answer was originally written the iPhone had a much larger userbase and was growing much faster than Android. This is changing as Android begins to support multiple carriers and hardware platforms (see: the Open Handset Alliance). The list of devices running Android is now quite long although none yet match the popularity of the iPhone.
Some analysts are now reporting that Android is outselling the iPhone and are predicting that Android will soon overtake iPhone for market share. Other analysts think that Apple will make up ground when the iPhone 4g is released. The former seems more likely based on the parallel history of the PC industry -- Apple's design and user experience were copied by GoogleMicrosoft and opened up to run on commodity hardware.
Nope! That's the beauty of Android. Even though there is a AppStore equivalent, you can download an app from anywhere. Plus, it's programmed in Java, so you don't have to worry about all that mundane stuff like garbage collection (just at the cost of speed).
Don't mean to insult the iPhone. It is a great platform too.
EDIT: A lot of people have been noting that the iPhone APIs are not restrictive, but rather the approval process is. This is true, however the iPhone's APIs are still somewhat limited, in the way of low level hardware access, backgrounding (only notifications in 3.0), etc.
iPhone 3.0 is a step in the right direction, but there is some work left to do.
Also, have you considered making JB iPhone software? I'm not sure of it's market share, but I do know of a lot of people with Jailbroken devices.
EDIT: I have read in some more posts on similar questions that Android's Java can slow things down due to the Garbage Collector. Just something to watch out for.
If you say iPhone is restrictive, I would describe Android as immature.
There are still many bugs in Android that you will inevitably run into if you are doing some none-trivial programs. Some of those only exist on the emulator while others only on the actual phone.
Though in my experience, developing on Android with Eclipse feels just as good as developing on iPhone with Xcode, if not better. The tool set provided by Google is very complete and is cross-platform. Garbage collector does make huge difference while programming.
I'm assuming you already have a Mac otherwise the iPhone wouldn't be an option at all.
iPhone development isn't particularly restrictive. Getting the resulting app on Apple's App Store is the restrictive part.
If the app you're working on follows Apple's guidelines on what an iPhone app is allowed to do, picking that as your initial development platform seems a no-brainer. If it violates Apple's guidelines and can't be modified to follow them, your market will be restricted to jailbroken phones - a very small subset.
Well is Apple open at all? Uhm.. eh.. no. Closed hardware, closed software, closed everything. I think Alcatraz is more open then Apple, at lease you get to leave your cell there.
You can write an application for the iPhone. Will it get approved? Well not sure. They could deny it for any reason whatsoever. You may have used a blue background and Apple only likes white and gray, thus deny.
However with Android it is completely open. You can develop for it, or even develop Android itself. No fear of ever being denied.
But in all seriousness. Apple has a larger market share, millions of people use and love the iPhone and they will most likely not be leaving for quite a while. While on the other hand the Android was for T-Mobile. Does anyone even use T-Mobile?
IMO if you do not have a gPhone I would develop for the iPhone. However as much as I dislike the Apple philosophy of being such a closed nature, they are the better bet if you wish to make some money with your application.
There are some restrictions...
some functionality requires rooted phones (e.g. Wireless Tether for Root Users)
distribution via the Android marketplace is subject to the Developer Distribution Agreement. Google limited access to this tether app due to their carrier agreements.
some Android APIs are not finished (e.g. Bluetooth HID)
'Restriction' can mean two things:
The ability to install anything you want. Google is very good at that, Nokia somewhere in the middle and Apple is the worst
What you are able to do with you app. They all have arbitrary restrictions on what you can and can't do, but it seems to me Nokia is the least restrictive, Google inbetween and Apple the worst (again).
YMMV
No, you can sign the application yourself and distribute the resulting APK file via your own web server or by other means.
Yes, Android is indeed open and you can publish whatever you'd like to the Market Place
But:
you still need to learn how sign your application and mind the technical posting requirements to the market (like keeping proper version IDs etc.)
if you really want to get/send a package from/to anyone, then the receiver of the package (called an APK file will need to know how to use a command line tool called 'adb' to administer their phone to install & uninstall applications. It's pretty simple to do, but
you need to have Android drivers installed and the SDK tools.
To be fair to the iPhone development model, you can also distribute test versions of your application reasonably easily, though perhaps not as easily as with Android. Your testers need to provide you a special device ID which they get from iTunes while the device is connected, then you create a license file containing keys for all of your testers which you distribute with the release directory of your application. The users then install your application via iTunes.
In most cases no, but Google has allowed the carrier and the device manufacture the ability to restrict certain things. Carriers are allowed to block individual apps. Also carriers/manufactures can prevent certain features of the device.
One example is the Motorola Backflip, it wont let you install non Official market applications. Also some phones do not have access to the Official Market.