I'm trying to create my first in app purchase bundle, following this tutorial.
At one point it instructs me to "Using a Finder window, locate the content files that are to be hosted on the App Store and drag and drop them onto the content folder in the Xcode project navigator panel".
I'm not sure what the "content folder" is.
The tutorial has previously mentioned the content folder in the context "The folder must also contain a sub-folder named Contents in which resides the content files associated with the in-app purchase." Am I supposed to create that folder myself?
Mt project seems to have a "Products" folder. Does this replace the mentioned "Contents" folder?
Things I've looked at to find the answer:
This answer on SO that tangentially addresses the question
This page on Apple's own documentation, which links to
This other page of Apple's own docs, which still don't seem to address creating the content bundle either
If anyone has a reliable resource (ideally Apple's own documentation) that tells developers how to do this, that'd be 110% wonderful.
After experimenting a fair bit it looks like the answer is that it just doesn't matter. You can have any content you like in any format as a sibling to the .plist in my example, and uploading it to Apple's servers seems to work.
I can only conclude that the tutorial was just kidding about the 'contents' folder.
Related
I am building an iPhone app that requires preloaded content. This content is presented so that it tests the user's knowledge, but is not modified by the user. The content consists of proprietary image files and pdf files.
From what I understand, the best practice would be to store this in the app's Library or Documents directories (please inform if this assumption is not correct). In a future version of the app I might want to upload additional (not replacement) content via API, but this is not part of the initial version.
I have seen many posts and tutorials regarding obtaining paths to the Documents and Library directories of an app, and reading/writing to them. This is all good and useful, but not what I am looking for here.
I would like to preload the content into the Documents and/or Library directories, for the simulator initially, to test app in simulator; and ultimately to the release version. I would have thought this would be possible to do from XCode without writing code.
I have not been able to find a solution to this on Stack Overflow or other places on the net. Any pointers, links, solutions are welcome. I am using XCode 10.3 with Swift 4.2.
See the File System Programming Guide: File System Basics, which shows us:
The “data container” (including the Documents and the various Library folders) is for content generated/saved by the app. When, in Xcode, you mark resources as being part of the target, that becomes part of the bundle, and your app can retrieve it from there at runtime.
Theoretically, yes, you could copy data from the bundle to the Documents and/or Library folders, but, yes, you would have do that programmatically. It seems a bit wasteful to have two copies of these resources on the device, but you can do whatever you want. Generally, though, resources included in the bundle would just be be opened directly from there at runtime, not copying it to the data container (except for those cases where you would need to change it, because bundle contents are read-only).
FYI, for additional information regarding the file system, see the iOS Storage Best Practices video.
I'm writing an iOS app which needs a ~60MB resource file to work correctly. I would like to provide this file with the app itself, so it can work straight after installing it from the store without downloading extra data at the first launch.
I also want to be able to update such file by downloading a new version of it from a specific URL. I thought the most appropriate folder to store this file would be "Library/Application support", as specified in the guidelines provided by Apple itself.
My problem is that I can't find a way to provide the "Library/Application support" folder with a default population using xcode 9. I don't want to have multiple copies of this file around to avoid wasting space, and I want the possibility to update this file to a newer version, overwriting / replacing the old one.
This might be a newbie question (I'm a newbie of iOS development) but I really couldn't find anything related to pre-populating that folder.
You cannot delete anything from your distribution bundle. It's just not allowed.
So you options are:
Distribute the resource with the app, and create a copy in "Library/Application support".
Don't include the resource with the app, and download it on first run.
You didn't say what the resource is, so I don't know if this would be an option, but... Include only a portion of the resource with the app, copy it into "Library/Application support" and "update it" on first run.
Well, I received this project from a buddy that used to work with me and now I am responsible for it Internalization. I need to transform the language of the app to English, that is currently Portuguese.
Although i was researching for some tutorials but all of them include one step i cannot make. I have noticed there were no files localized in any of the languages, and no folders .Iproj too.
In the info tab > Localizations shows up, in each language added in my "Resources" Tab, "0 Files Located".
as Soon as i click "Use Base Internationalization" or the "plus" button there is no file i can reference it to.
I need to follow with this project and cannot create another one, there is lots of code and configurations that need to stay in this one. Is there any solutions?
Thanks!
PS: StackOverflow won't let me post images yet :(
Have you ever visited this panel?
I want to be able to list iTunes File Sharing contents in a list, but all the tutorials I've found aren't helpful at all. They're either extremely vague, only explain how to enable it, or are for specific files.
What I really need is how to have my UITableViewController display files in the Directory folder. I'm in the same boat as this question iTunes File Sharing - Showing Document Folder Contents, sort of, but I just need to learn how to actually implement it.
So how do I link my application directory to my UITableViewController?
If anyone can help, that would be awesome of you!!!
Well, I've learned a good place to start is the sample code DocInteraction. It demonstrates "kqueue" kernel event notifications, to monitor the contents of the Documents folder and present them in a TableViewController.
Technically not an answer, but my question is no longer (how should I say this?) relevant, active, what have you.
Somehow I can't seem to get my localized launch image to work.
In the root of my project folder I have a localized Default#2x.png with both an English and a Dutch version.
Somehow the Dutch version is shown in all situations.
I have other localised files that work all right (Root.strings, Localizable.strings, InfoPlist.strings) when using English language.
I've looked up several related questions, but found no answer. Tried deleting the file all together en adding them again. After localizing the file I added the right picture to the right folder using 'Show in Finder' on the English version.
Other answers suggest that there's another copy of Default#2x.png somewhere that's in the way, but I can't seem to find one.
When I look at my project folder in Finder, some folders seem recursive (repeat themselves) though.
Any help is appreciated.
Launch images can not be localized. See the app programming guide:
All launch images (...) must reside in the top level of your app's bundle directory.