I have added a new issue with a new cover art. But it is not appearing in the newsstand shelf. I don't want to update my app. How long will it take for the new cover art to appear on the newsstand shelf? Should I add a new version of the app to update the cover?
You don't need to update your application. You need to send a push notification with a very specific format.
The details can be found in the Newstand FAQ found
How is the push notification that initiates the Newsstand background download different from other push notifications? Will I have to change or modify my backend infrastructure?
It appeared today in the newsstand, it was just the matter of time. Thank you all!
You can use some URL to get cover image. And when it is necessary to change cover, you can just change the image on that URL. For example:
NSURL *getURL = [NSURL URLWithString:#"http://youURL/main.png"];
ASIHTTPRequest * getRequest = [ASIHTTPRequest requestWithURL:getURL];
[getRequest startSynchronous];
NSError *error = [getRequest error];
if (!error) {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:#"main.png"];
NSData* responseString = [getRequest responseData];
[responseString writeToFile:filePath atomically:YES];
UIImage *result = [UIImage imageWithContentsOfFile:filePath];
UIApplication *app = [UIApplication sharedApplication];
[app setNewsstandIconImage:result];
}
Everytime you only need to change image on http: //youURL/main.png. That is all.
I used here AsiHTTPRequest to download the image.
It is clear from several sources including Apple’s own specification that the atom feed in newsstand is used for updating the App Icon and description found on the app store only and not used for updating the app icon in the newsstand folder on the device.
https://itunesconnect.apple.com/docs/NewsstandAtomFeedSpecification.pdf
"Newsstand is a feature of iOS 5 that allows your readers to access the latest issue of your newspaper or magazine. You host your content on your web server and provide the App Store with an Atom feed that provides updated metadata and cover art for each issue as it becomes available. The Newsstand Atom Feed XML (described in this document) is used to enable the App Store to display your app with the cover art and metadata that is relevant to the latest issue.
This document specifies the Newsstand Atom Feed XML format for managing Newsstand issue metadata.
Newsstand issue metadata is displayed on your Newsstand app’s product page in the App Store. The metadata provided should accurately reflect the issues and content that are available within your app.
Newsstand issue metadata can be managed via the Newsstand Atom Feed or directly in iTunes Connect. The
Newsstand Atom Feed allows you to create new issues and update existing issues. The Newsstand Atom Feed
is processed daily. The Newsstand Atom Feed is based on the Atom 1.0 format."
Related
I have an application, when I sent Apple review then my app is rejected
2.23 Details
On launch and content download, your app stores 9.94 MB on the user's iCloud, which does not comply with the iOS Data Storage Guidelines.
Next Steps
Please verify that only the content that the user creates using your app, e.g., documents, new files, edits, etc. is backed up by iCloud as required by the iOS Data Storage Guidelines. Also, check that any temporary files used by your app are only stored in the /tmp directory; please remember to remove or delete the files stored in this location when it is determined they are no longer needed.
Data that can be recreated but must persist for proper functioning of your app - or because users expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCRUFLIsExcludedFromBackupKey attribute.
Resources
To check how much data your app is storing:
- Install and launch your app
- Go to Settings > iCloud > Storage > Manage Storage
- Select your device
- If necessary, tap "Show all apps"
- Check your app's storage
For additional information on preventing files from being backed up to iCloud and iTunes, see Technical Q&A 1719: How do I prevent files from being backed up to iCloud and iTunes.
If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions.
If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
complete details of your rejection issue(s)
screenshots
steps to reproduce the issue(s)
symbolicated crash logs - if your issue results in a crash log
In my app, I excluded files from iCloud backup using this code:
File AppDelegate.m, I added the following code in application:didFinishLaunchingWithOptions: to exclude all files and directories:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
NSArray *documents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:basePath error:nil];
NSURL *URL;
NSString *completeFilePath;
for (NSString *file in documents) {
completeFilePath = [NSString stringWithFormat:#"%#/%#", basePath, file];
URL = [NSURL fileURLWithPath:completeFilePath];
NSDictionary *values = [URL resourceValuesForKeys:#[NSURLIsExcludedFromBackupKey] error:nil];
if ([values[NSURLIsExcludedFromBackupKey] boolValue] == NO) {
NSLog(#"To exclude from iCloud backup: %#", completeFilePath);
[URL setResourceValue:#(YES) forKey:NSURLIsExcludedFromBackupKey error:nil];
}
}
Can any one suggest where my mistake is in this? Thanks!
My app got rejected from apple for three times for the below issue,
My app was using offline purpose, so am storing the downloaded files in our document directory, so as per Apple suggestion am calling the method for backup key disabling process for an every document directory calling process, even though my app got rejected from apple now also,
Apple Statement for my app rejection is as follows,
2.23 - Apps must follow the iOS Data Storage Guidelines or they will be rejected
Thank you for making these modifications. Upon further review, we found that your app is not in compliance with our guidelines.
2.23 Details
On launch and content download, your app stores 27.78 MB, which does not comply with the iOS Data Storage Guidelines.
Next Steps
Please verify that only the content that the user creates using your app, e.g., documents, new files, edits, etc. is backed up by iCloud as required by the iOS Data Storage Guidelines. Also, check that any temporary files used by your app are only stored in the /tmp directory; please remember to remove or delete the files stored in this location when it is determined they are no longer needed.
Data that can be recreated but must persist for proper functioning of your app - or because users expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCRUFLIsExcludedFromBackupKey attribute.
Please help me on this.
Please find my code for back up key process enabling from below.
Please find my below code ( which is using for back up key disabling process )
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL {
if (&NSURLIsExcludedFromBackupKey == nil) { // iOS <= 5.0.1 const char*
filePath = [[URL path] fileSystemRepresentation];
const char*attrName = "com.apple.MobileBackup";
u_int8_t attrValue = 1;
int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
return result == 0;
}
else { // iOS >= 5.1
NSLog(#"DB Back up called : DB path : %#",URL);
NSError *error = nil;
[URL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&error];
return error == nil;
}
}
The document directory is intended to be used for user-generated files (ie, documents). You can put your data in a few different places, but if you're downloading a chunk of content that you want to keep around while offline, consider using the caches area, which isn't backed up by default anyway, and the system can purge if it needs to, so be prepared to redownload as necessary. (The temp directory is prone to much more frequent purging, so I wouldn't recommend it unless the data is downloaded on every app launch anyway.)
You can get the path to it with:
NSString * cacheRoot =
(NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES))[0];
More on app filesystem here. You may also want to put it somewhere else in the Library area if it has a more permanent nature.
As per my knowledge your downloaded file should be store other then Document Directory,You have to download files in cache or somewhere else instead of Document Directory, Because Document directory data would be store in iCloud so that means all your downloaded data stored in user iCloud account and reduce iCloud storage space this is an one of the reason that your application was rejected by apple.
I have been browsing the Apple Documentation for hours now and there is so little on the Today Extension, so I just can't get to the bottom of this problem...
I am trying to access a plist file stored in the NSDocumentDirectory but am having no luck. The today extension is all set up correctly with a separate target in the project and my bundle identifier starts with 'group.' but I get a null value every time?
This is my code...
NSURL *storeURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:#"group.com.ORGANISATION.APPNAME.wigit"];
NSString *string = [storeURL.path stringByAppendingPathComponent:#"DataFile.plist"];
NSMutableArray *content = [NSMutableArray arrayWithContentsOfFile:filePath];
Thank you for your help in advance!
If I understand your question correctly, you are trying to share data between the AppExtension and the containing app. By default your extension and its containing app have no direct access to each other’s containers. So the NSDocumentDirectory of your app will not be accessible form the extension. You could use NSUserDefaults to share the data.
Read it here Sharing Data with Your Containing App
I have an iOS app that has been in the app store for over a year. The most recent version was posted April 17. The purpose of this app is to allow the user to create a chess portable game notation (PGN) file and email it from their iPhone or iPad to their desktop computer. Then the email attachment can be read by any number of chess database applications.
Within the last week I have had two users give me feedback that the attachment is not included in their emails. One has shown me a screenshot of the mail composer showing that it is composed with the attachment.
Not being able to send the PGN attachment is a serious issue for this app, so if it was a widespread problem, I would hear from more than two users.
One of the users is sending to a gmail account, the other to an iCloud account. One user reported that a friend using the same WiFi connection was able to send the email attachment without issues from his iPad. He has also been able to send screen shots and reply to messages from me where I have attached PGN (mimeType:#"text/pgn") files.
My mail composer code is from Apple examples and has worked for over a year for users all over the world.
Has anyone had a similar experience? I'm concerned that I have had two issues within a week on code that has been in the app for over a year.
Thanks!
Attached is some of the code to add the attachment data.
Note that the attachment is not a "file".
PgnGenerator *generator = [[PgnGenerator alloc] init];
generator.game = inGame;
NSString *pgn = [generator pgnString];
NSData *myData = [pgn dataUsingEncoding:NSASCIIStringEncoding];
NSString* fileName = [NSString stringWithFormat:#"%#.pgn", [inGame eventAndRound]];
[picker addAttachmentData:myData mimeType:#"text/pgn" fileName:fileName];
Using
NSData *myData = [pgn dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
Solved the issue.
"For example, in converting a character from NSUnicodeStringEncoding to NSASCIIStringEncoding, the character ‘Á’ becomes ‘A’, losing the accent."
Many of the chess applications that would be reading the PGN file cannot handle the accented characters anyhow, so losing the accent is is the best solution until the specification is updated.
I have noticed before that even if the file I'm attaching doesn't exist on the device the mail composer will still show as if the file is going to attach. Then when the email gets sent the attachment is not there.
Is it possible that this situation is occurring?
In my case when I used NSASCIIStringEncoding NSString was returning nil on iOS7 (it works good on iOS6), NSUTF8StringEncoding works fine
i have developed an app that can download mp3 files (nearly 6 to 8 mb of size) from online and stored in NSDocumentDirectory. my app get rejected today and says that
"Apps must follow the iOS Data Storage Guidelines or they will be rejected"
We found that your app does not follow the iOS Data Storage Guidelines, which is
required per the App Store Review Guidelines. The iOS Data Storage Guidelines
indicate that only content that the user creates using your app, e.g., documents,
new files, edits, etc., may be stored in the /Documents directory - and backed up
by iCloud.
Temporary files used by your app should only be stored in the /tmp directory;
please remember to delete the files stored in this location when the user exits
the app. "
i used to store the music files in NSDocumentDirectory .
so, this is the first time am doing this, i cant figure out the actual problem. what should i do to resubmit my app for acception.
here is my code
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [[paths objectAtIndex:0]stringByAppendingPathComponent:[NSString stringWithFormat:#"psalmsMusic%d.mp3",i]];
NSLog(#"ddddddd psalmsMusic%d.mp3",i);
i++;
NSLog(#"path %#",documentsDirectoryPath);
[receivedData writeToFile:documentsDirectoryPath atomically:YES];
really need some help.
i got my app rejected for the same reason , the solution is really simple instead of saving your downloaded files to the Documents directory you have to save them to the Cache directory which is a temp directory that don't get backed up to iCloud and can be randomly deleted by the OS on certain occasions ... this is how you save a file to the cache directory
NSString *filePath = [[self applicationCachesDirectory] stringByAppendingPathComponent:fileName];
BOOL flag = [[NSFileManager defaultManager] createFileAtPath:filePath contents: receivedData attributes:nil];
EDIT
NSString *filePath = [[self applicationCachesDirectory] stringByAppendingPathComponent:[NSString stringWithFormat:#"psalmsMusic%d.mp3",i]];
NSLog(#"ddddddd psalmsMusic%d.mp3",i);
i++;
BOOL flag = [[NSFileManager defaultManager] createFileAtPath:filePath contents: receivedData attributes:nil];
if ( flag )
NSLog("success");
Once the iCloud is implemented in Apple, The Document directory data is somehow related with iCloud Storage. Hence Apple is now rejecting the applications using heavy data storage in document directory.
You need to store the data at some other location. Store MP3 files At some other location.
This link May Help You.
http://www.techotopia.com/index.php/Working_with_Directories_on_iOS_4_%28iPhone%29
I Hope it'll Solve your problem.
Another is following..........
The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., may be stored in the /Documents directory - and backed up by iCloud.
Temporary files used by your app should only be stored in the /tmp directory; please remember to delete the files stored in this location when the user exits the app.
Data that can be recreated but must persist for proper functioning of your app - or because customers expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCFURLIsExcludedFromBackupKey attribute.
See http://developer.appcelerator.com/question/134926/ipad-app-rejected-ios-data-storage-guidelines for details.
Apple wants to reduce the size of your backup footprint.
First, stop using Documents. It's not appropriate.
If you are able to download the files again reasonably easy, you should store them in a place they won't be backed up. I suggest Caches. If they're purged, you should just download them again.
If it is difficult to download them again, you should store them somewhere else in the Library folder.
You can find the Caches directory using:
NSArray *paths = NSSearchPathForDirectoriesInDomains(
NSCachesDirectory, NSUserDomainMask, YES);
Basically, this is what you have now, but instead of NSDocumentDirectory you use NSCachesDirectory.
If you control the filenames, this is fine as is. If you don't, you should probably create a subdirectory and work from there so you don't collide with anything.
You can not store in NSDocumentDirectory because this directory is for syncing with iCloud now. But you can use NSCachesDirectory or use temp directory as apple comment states for store music file.
the guidelines says that only important files that can't be recreated ( downloaded ) from the internet should go to the Documents Directory because this is t
As per the iOS Storage Guidelines (which can be found at http://developer.apple.com/icloud/documentation/data-storage/) you should put all user-generated content in the Documents directory and all re-downloadable content in the Caches directory. So you should be fine putting the sqLite database there.
The background on this is that starting with iOS 5 the Documents directory is backed up to iCloud. As a lot of apps tend to store their complete data there the iCloud backups get rather large, which uses up the free space and creates network traffic, both of which in turn anger the user because he/she wonders why. To mitigate this Apple now seems to take a much closer look on what is saved into the Documents directory and if this is possibly regeneratable content (e.g. downloadable files).
Beware, that the Caches directory can and will be purged on iOS 5 by the operating system at times when the free space on the device gets low. Thus your app cannot longer just assume that everything is there as it was before but you rather have to re-check every time you access something out of your cache.
Hope this helps...!
my app also got rejected because of same reason - (2.3)
try this -
NSString *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
The advantage of this whenever your device will Sync with cloud , at that time the application data will not synch because its in NSCachesDirectory instead of NSDocumentDirectory.
And Disadvantage is that whenever you will use your device and if you have less memory in your device. then CPU will might be clear cache for getting free space. so if you have any data for offline use, you might be loss.
2) If you can't use NSCachesDirectory (may be because your data is too important) then you can go with this way -
use this method and give your database path - 'addskipbackupattributetoitematurl'
go through this link - How to use addSkipBackupAttributeToItemAtURL API?