iOS 5 Newsstandkit where does it store downloaded issues? - objective-c

I'm trying to figure out more about iOS 5 newsstand kit and where it stores the downloaded issues, I have read the documentation and can see that there is an NKLibrary class but cannot see any indication on how to handle the downloads or where they are actually stored.
Thanks

Ok, so NewstandKit works a little differently than you might expect. Take a look at this for the nitty gritty: http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/NewsstandKit_Framework/_index.html
But, Basically during the issue download the app should be passing its (the product's) information including it's NSURL an NKIssue via [NKIssue addAssetWithRequest]. Assuming the download doesn't fail and you have done the other Newstand stuff right, the product should be saved in the properly and you do not have to worry about dictating a specific location for it to be saved.
Another reason to not worry too much about where the issues are being saved, is that Newstand will delete old issues if the device's storage becomes limited.
Hope that helps.

Never worrying about the downloads's destination might not be the best way to deal with the problem. It's true that the destination is chosen automatically when downloading an asset. However, what's saved then is just a temporary file, which must be moved somewhere else and which might also need to be processed in whatever way.
Take a look at the "contentURL" property in NKIssue. This is the location which NewsstandKit recommends as the very destination of issue-related assets.
Cheers :)

Related

PHAsset - Property way to save captured PHAssets locally? (in app)

trying to understand the concept for Photos/Photos.h framework.
my goal is:
write captured video url (or asset) to app's "userDefaults".
read from "userDefaults", & fetch each saved asset data (thumbnail & url)
Since you're not providing any code (nor asking for any), I can help sort some of this out for you -- but you need to study a bit more before you can put it all together. Especially if you think you've asked a question which has one simple correct answer.
UserDefaults is not a good place to store an image. Images are big. (You should look at Apple's documentation of what UserDefaults is for/how it's intended use).
UserDefaults
There's more than one place to store images. Do you want the system to delete them if you start running out of memory? Then it belongs in cache:
let cachesPath = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true).last!
Do you want to depend on it being around the next time the app is run? There is a standard place for that as well:
let userDocumentsFolder = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
Do you want iTunes to back up the images for you automatically? It expects files to be in a certain place for automatic backup. Do you have a way to keep track of where it is (the path to the file can change if the app is re-run). For that you might require persistent storage, so CoreData or Realm might be an option for you. Or you could scan your directory and create a list of files you've already saved. Then you'll need a way to select the correct one. (What did you call it? Should the user select it?)
Apple has very clearly written and useful documentation on access to the Photos library and using PHAssets. Here's just one example:
PHAsset - Photos
There are a lot of talented people on this site, and they are willing to help you, but you need to do your homework before coming here.
I recommend you read these linked documents, start writing some code, and if you run into problems please come back and ask any specific question you have about any specific problem you've encountered. Include the code which causes the problem, as well as the exact error message you are getting. We will be glad to help.

All Documents converted to .vvv extension (TeslaCrypt)

I've found something strange with my employee document, it turns out that all files including document are being encrypted with ".vvv" extension. What I've found so far that it's called TeslaCrypt, it convert all my files to .vvv, even I rename it back to the right extension, it says that file already modified, so I can't open the files anymore. Please help, we cannot work until that document can be oppened. I can't tag this to "TeslaCrpyt" so if anyone can help me tagged it, it would be great.
content on how to recover :
What happened to your files ?
All of your files were protected by a strong encryption with RSA-4096.
More information about the encryption keys using RSA-4096 can be found here: http://en.wikipedia.org/wiki/RSA_(cryptosystem)
What does this mean ?
This means that the structure and data within your files have been irrevocably changed, you will not be able to work with them, read them or see them,
it is the same thing as losing them forever, but with our help, you can restore them.
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
How did this happen ?
---Specially for your PC was generated personal RSA-4096 KEY, both public and private.
---ALL YOUR FILES were encrypted with the public key, which has been transferred to your computer via the Internet.
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Decrypting of your files is only possible with the help of the private key and decrypt program, which is on our secret server.
What do I do ?
So, there are two ways you can choose: wait for a miracle and get your price doubled, or start obtaining BTC NOW, and restore your data easy way.
If You have really valuable data, you better not waste your time, because there is no other way to get your files, except make a payment.
For more specific instructions, please visit your personal home page, there are a few different addresses pointing to your page below:
1. http://vr6g2curb2kcidou.encpayment23.com/E03029AB7D9A9D38
2. http://vr6g2curb2kcidou.expay34.com/E03029AB7D9A9D38
3. http://psbc532jm8c.hsh73cu37n1.net/E03029AB7D9A9D38
4. https://vr6g2curb2kcidou.onion.to/E03029AB7D9A9D38
If for some reasons the addresses are not available, follow these steps:
1. Download and install tor-browser: http://www.torproject.org/projects/torbrowser.html.en
2. After a successful installation, run the browser and wait for initialization.
3. Type in the address bar: vr6g2curb2kcidou.onion/E03029AB7D9A9D38
4. Follow the instructions on the site.
IMPORTANT INFORMATION:
Your personal pages:
http://vr6g2curb2kcidou.encpayment23.com/E03029AB7D9A9D38
http://vr6g2curb2kcidou.expay34.com/E03029AB7D9A9D38
http://psbc532jm8c.hsh73cu37n1.net/E03029AB7D9A9D38
https://vr6g2curb2kcidou.onion.to/E03029AB7D9A9D38
Your personal page (using TOR-Browser): vr6g2curb2kcidou.onion/E03029AB7D9A9D38
Your personal identification number (if you open the site (or TOR-Browser's) directly): E03029AB7D9A9D38
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
I've published a decryption tool on GitHub: https://github.com/googulator/teslacrack
This tool cryptographically breaks the encryption scheme of TeslaCrypt, and so doesn't require a saved master key. However, it's quite computationally intensive, so preferably use a fast computer, and even then, expect to wait up to a week for it to recover your key (although most keys can be found in just a few hours). Also, it's more of a PoC than a user-friendly turnkey decryptor, so you will need to do many things by hand.
I got hit by TeslaCrypt and all of the solutions (Cisco's Decrypt Tool, Shadow Explorer) did not work for me. Unrelated, I was sniffing around some articles on Ubuntu and found BloodDolly's Tesla Decrypter tool that actually work and my files are being restored as I write this. So just wanted to share since it didn't come up in any of my earlier searches.
It's a handful a steps,...I had no problems whatsoever with the process. Apparently this won't work for the most recent strain,...I had .vvv and had to factor primes with Yafu,...but the documentation and the software is pretty thorough and easy to follow. Took me 15-20 minutes from start to finish.
http://www.bleepingcomputer.com/forums/t/576600/tesladecoder-released-to-decrypt-exx-ezz-ecc-files-encrypted-by-teslacrypt/
Anyway, hope this helps some folks.

Opera Next extension autoupdate via update_url

I got problem with my company internal extension. They don't want to publish it, as it does gather data on external server. So I need to host it myself... but would like not to lose ability of autoupdate.
As far as I read I need to use update_url in manifest, but nothing more is said in Opera documentation...
"update_url": "http://path/to/updateInfo.xml", - as it is said in documentation page
Ok... and what should I put in that xml? Will it autoupdate or just notify users about new updates? Where do I put rest of updated files?
I tried to concat Opera itself about this question, but they don't give any contact information except something like if you have problem, ask on stackoverflow... so here I am.
If it does not work, I was thinking about really BAD method, using unsafe-eval and keeping newest version in local storage... but would rather like to avoid that.
In general the behavior is the same as for Chrome. You can base on this document: https://developer.chrome.com/extensions/autoupdate

Using JSON to update app's content in iOS

I'm about to create an application that uses JSON to update its content.
This is how I planned it to work:
When application starts, it checks (with internet connection is available) if the JSON file set on remote server is newer than the one stored localy - if it is then it's downloaded.
Then, the application applies data from that JSON to the content. For example, to the "Contact" information - it applies data like phone numbers etc.
My question is, is it in your opinion, a good technique to update appliactions content?
Does anynone had an experience with building app with this kind of idea?
Best regards,
Zin
Of course you can do this. One thing that may lead to a better user experience would be to ask the user for his permission to download new content (if there is something new).
This is a normal thing to do. I have a phonebook app that does exactly this. On a side note, if you need a network class to handle the web-service interaction, see this SO post. I wrote a custom network class that works with AFNetworking.

ALAsset URLs have changed from iOS 4.3 to 5.0?

I've got an app where I'm taking pictures and storing them to the camera roll. I save the resultant ALAsset's URL so I can reload those specific images again later.
This seemed to be working fine until I upgraded to iOS 5.0.
Now, when I try to load the asset I'm always getting nil back.
I've enumerated the entire camera roll, checking the URLs of the images in there, and indeed the URLs seem to be different.
ie., I was able to save (and reload) an asset with URL: 'assets-library://asset/asset.JPG?id=1000001124&ext=JPG'. But, now it no longer exists. In fact, all the asset URLs are longer now, such as: 'assets-library://asset/asset.JPG?id=6BDB93FD-B94C-4F77-9ABD-26F34F06B429&ext=JPG' (perhaps those are now more unique?)
Anyway, has anyone else seen this? Am I missing something? Are all my old saved files now useless? Is there any way to map from the old URL to the new URL?
Should I be taking a different approach? I don't want to release this and then find out that the URLs have all been changed on me (and my users) again...
Thoughts?
Apple did rewrite the whole Photo-Library for iOS 5. Its now based on Core-Data rather than just SQLIte. That's why the IDs/URLs are completely different now. I think there is no way to map between the old and new IDs. I would guess that in the future the IDs will be persistent (the way core-data works).
Cheers
Hendrik