Starting in iOS 5.0.1, Apple has introduced a new "do not back up" extended file attribute that will allow an app to store downloaded data into the application folder. Is there any planned support for setting this attribute within an AIR application or is there currently a way to set this attribute using the existing AIR SDK.
Yes, this is exactly what I'm wondering too. Without it, we can't build any apps that download content without the risk of the content being deleted.
Here's the background before Apple introduced the new "do not back up" attribute:
http://www.marco.org/2011/10/13/ios5-caches-cleaning
Fortunately, Apple addressed it after that blog post in 5.0.1. See bullet #4 here, quoted below
https://developer.apple.com/icloud/documentation/data-storage/
Q: My app has a number of files that need to be stored on the device permanently for my app to function properly offline. However, those files do not contain user data and don't need to be backed up. How should I store those files in iOS 5?
A: Starting in iOS 5.0.1 a new "do not back up" file attribute has been introduced allowing developers to clearly specify which files should be backed up, which files are local caches only and subject to purge, and which files should not be backed up but should also not be purged. In addition, setting this attribute on a folder will prevent the folder and all of its contents from being backed up.
Important: The new "do not back up" attribute will only be used by iOS 5.0.1 or later. On iOS 5.0 and earlier, applications will need to store their data in <Application_Home>/Library/Caches to avoid having it backed up. Since this attribute is ignored on older systems, you will need to insure your app complies with the iOS Data Storage Guidelines on all versions of iOS that your application supports.
Now we just need Adobe to support the attribute in the AIR SDK. What do you say Adobe?
The addition to the AIR SDK wouldn't have to be specific to the "do not backup" attribute for iOS. If there were simply a way to change a file's attribute in general on any OS, then that method could be used to set this value in order to adhere to Apple's developement guidelines among other things.
palmg00 wrote:
The addition to the AIR SDK wouldn't have to be specific to the "do not backup" attribute for iOS. If there were simply a way to change a file's attribute in general on any OS, then that method could be used to set this value in order to adhere to Apple's developement guidelines among other things.
Great idea. I'm sure this won't be the last time we'll want to change a file's attribute.
You might want to check out our ANE (Adobe Native Extension) solution that enables your FB projects to abide by the Apple's Data Storage guidelines.
https://developer.apple.com/library/ios/#qa/qa1719/_index.html
Do Not Backup project:
http://www.jampot.ie/ane/ane-ios-data-storage-set-donotbackup-attribut e-for-ios5-native-extension/
David
JamPot.ie
JamPotTech,
I tried using your ANE. But because I am building my app in Flash Pro the highest version I can compile the swf to is 13. When I try to build the app with adt I get this error: Included native extension 'ie.jampot.MobileBackup' includes a SWF version 14 which is greater than the version of the root SWF of this application: 13
Would it be possible for you to recompile your ANE so the resulting SWF is version 10? That way it can be used with projects developed in Flash Professional.
Matthew
Hi all,
Any current info as to the status of this issue? I did find the jampot solution, but that appears to be for Flash Builder only and it'd be nice to have a simpler solution.
Will AIR 3.2 address this issue?
Would be nice if Adobe integrated a method to flag document directory/user accessible files, as per Apple's requirements, that should not be backed up to iCloud.
Thanks.
I appreciate the ANE JamPot, it got my app approved because I download assets I don't want to be cleared in the system caches folder. I also wanted my assets to be shared via itunes in the Documents directory. Worked like a top ![]()
That said, I did try the "stay in Flash CS5.5, use the command line adt" route to get it to work and got jammed up on the SWF version 14. If you add support to flash to export a version 14 by installing the player profile and playerglobal.swc then you can export a version 14 from Flash CS5.5. It's the same process of overlaying AIR3.x over Flash CS5.5 so everyone here should be familiar with it, but this time it's overlaying a newer flash player.
Where you'll spend most of your time perhaps is getting adt to compile a proper ipa. It wasn't worth my time, Flash Builder solved the issue completely (albeit with some project tweaking, and I had no idea what flex was prior).
Thanks for the info, sinious.
sinious wrote:
Where you'll spend most of your time perhaps is getting adt to compile a proper ipa. It wasn't worth my time, Flash Builder solved the issue completely (albeit with some project tweaking, and I had no idea what flex was prior).
There's the problem. It doesn't work (effectively) for those of us with Flash CS 5.5.
Need a solution, Adobe.
Thanks!
It works fine, but you need to learn the adt command line tool. All Flash or Flash Builder is doing is running that line "for you". There's no magic. The code I use in Flash Builder is no different than Flash CS5.5. I can just do it via a GUI rather than command line.
I was in your shoes, the 5.0.1 update screwed me and got my app denied. I held a fist up (my posts are all over here about it) and griped about Flash CS5.5s overall lack of updates and the need to overlay things manually.
CS6 is around the corner, so you can tell why they're not patching. A built-in solution is inevitable, but it might be called CS6.
BTW you can also look into FDT and eclipse as a free option. YMMV. Either way I will never use Flash CS5.5 again after using Flash Builder. It's a far superior tool for those who have no ability to profile apps (no mac) or configure advanced options, project workflow, etc. Just my $0.02.
I don't understand.
sinious wrote:I did try the "stay in Flash CS5.5, use the command line adt" route to get it to work and got jammed up on the SWF version 14.
This doesn't sound like it "works fine" to me.
I'm a new app developer (though previous experience with AS), a one-man team. So the $700 Flash Builder as a solution is simply not an option.
sinious wrote:I was in your shoes, the 5.0.1 update screwed me and got my app denied. I held a fist up (my posts are all over here about it) and griped about Flash CS5.5s overall lack of updates and the need to overlay things manually.
I understand Adobe wishes to provide cross-platform support, but how soon they respond to compatibility issues like this with iOS will directly influence how long I remain an Flash/AIR developer versus looking towards learning a different language (already making sure all my code is object-oriented to prepare for a possible transition). Apple's app store is where the money's at and I don't see this changing anytime in the near future.
It is easy to export version 14, just overlay the latest flash player on Flash CS5.5 and you'll get an export option for flash player 11 and you can set the version to 14. Done. You have to do the same overlay with AIR to get 3.1 so this isn't rocket science.
Here's a link to a MXP that'll overlay flash 11 for you. Hello V13 SWF... Doesn't get much easier. Now just do the same for 11.1 and you have V14.
Time being money and many people using the adt command line tool religously, I'm sure it's easy to figure out. I did use it successfully but it became so time consuming I just bought Flash Builder, more to the point of desiring profiling and the advanced debugging which helped me change an app from denied to accepted.
Regardless, the reason AIR makes sense is you write one codebase and have the ability to port it to desktop, web, android mobile, android tablet, ios mobile, ios tablet and (lol) blackberry tablet. You can't honestly think it was easy for Adobe to accomplish this. No, it doesn't have a "native app" feel in speed, yet, but developing natively would take you easily 3x the cost in time. It's more like you can't afford not to develop in AIR.
CS6 timeline is around beginning of summer so May/Juneish is what I was told from a sales person on sales chat before I bought Flash Builder. I asked him if CS6 was coming out soon because if it was I wanted to qualify for a free suite upgrade and just upgrade myself from Production Premium to Master (which comes with Flash Builder anyhow). Unfortunately we need to wait till summer.
Anyhow you really should download the free trial of Flash Builder. It's as close to Xcode with flash as you can get. A lot of WYSIWYG drag and drop components as well as built in ANE support and a much, much better debugger. I used Flash Develop and/or flash itself to code since tellTarget was popular. Once I tried Flash Builder I would never go back to using Flash Pro..
Can I get instructions for how to use this with Mac Flash Pro? Do I need both Mobile Backup and Data Storage to be listed as extensions in the app xml file? Also how do I use the Data Storage and Mobile Backup classes? Any help is appreciated. I just finished a big app that requires offline access of files and this is holding me back from publishing.
North America
Europe, Middle East and Africa
Asia Pacific