Integrating iTunes File Sharing - ios

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.

Related

How to create an in-app purchase bundle in Xcode 10

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.

Steps to develop an iOS app to open PSL files?

In this project I've to develop an iOS application which reads the .psl files and arranges the data in the relevant section. For eg: the inbox messages from the psl file into the app's inbox folder and so on.
Can anyone guide me regarding the steps? And how would my project proceed also tell the workflow of this whole process.
The first thing you're going to have to tackle is to figure out how to get the file onto the phone. If you're getting it from the web; you could register as a sharable-target for that file type, or you could potentially integrate the DropBox api or something similar.
Once you have the file; you'll have to develop something to parse the file and use it as a datafile. Depending on the size and complexity of the file there will be different possible approaches to this, and you'll need to figure out what's going to be performant for you.
Then you'll build view controllers that leverage your model and make awesome things happen on the phone.
Your question is extremely general; so this is a very general answer. To me; the immediate critical questions are: how to get the file to the phone; and how to read the file format without loading the whole thing into RAM at one time?

iOS custom framework, libraries, and bundles

I have a general question regarding bundles, libraries and custom frameworks on the iOS. I've seen many topics about this on SO and searched far and wide on the net, but I still can't come to an answer without finding another site or post contradicting or confusing me some more. If someone could give me a solid answer to the below questions regarding what is allowed on the iOS or what would get rejected I would be really grateful.
I've seen posts and sites say that you cannot create bundles on the iOS. Does this also apply to bundles with only images in them?
Is it possible to create a library with .xib files in them? If not then how would one go about including one if custom frameworks are not allowed?
Does using a xCode dynamic library put my application for grounds of rejection (ex. libxml2.dylib)?
Apologies if this is too general or mentioned multiple times, but this whole library and what is allowed and what isn't allowed just doesn't seem to be very clear for me. What I am trying to do is to create some apps and perhaps include some controls that I frequently use in some sort of library or bundle, but I would like to know my limitations before moving further.
1.: No, you cannot create any framework even if it contains images only, as you can't write to the root partition of the iOS filesystem (the part where /System/Library/Frameworks resides).
Of course, if jailbreaking is an option, then all this stuff becomes invalid. You do what you want with a jailbroken phone, so you can create frameworks, add libraries to the filesystem etc.
2.: Yes, it is possible to create a library with XIB/NIB files with it, but then you'll need to share both the source or a static library built from the sources AND the XIB files and guide the other developers to do so in order iOS to correctly handle your library and be able to build the UI from the InterfaceBuilder files.
3.: No, because those libraries are already on the iPhone, you don't have to hack it to get them on the filesystem. libxml2, libsqlite3, etc. are allowed and can be used in any AppStore app.

iOS calculator project free to include in apps?

I'm wondering if anyone knows of any existing calculator project or library that has a basic calculator view I can push into a navigation stack. So far I haven't found anything that doesn't look like junk.
You should find everything you need there :
http://code.google.com/p/hpcalc-iphone/
http://blog.itopchiyev.com/2008/10/09/hello-iphone/
http://chris-software.com/index.php/2009/04/25/simple-calculator/
https://github.com/rargulati/Simple-Obj-C-Calculator
http://code.google.com/p/obj-c-calculator/source/browse/?r=30#svn%2Fbranches%2FCalculator%20at%20Assignment%201%253Fstate%253Dclosed
http://www.iphonedevx.com/?p=694
You would probably have to adapt some of these in a final app. Check for copyrights, and if one get your heart but cannot be included in your project (do not hesitate to contact the authors, really), rewrite yours from scratch with that inspiration source.
Check out iPhoneCalculator on GitHub, or search for it by keyname.

Archive format suggestions for exporting iPad app data? Tarball?

I have an nascent iPad application, which stores "documents" internally on the device in the file system as a series of distinct files in a folder.
I'd like to try incorporating an import/export function through iTunes, using the features for OS 3.2 for this. I want to put all the document pieces that I keep internally into one container file for export.
So, smart folks of Stack Overflow: What's the simplest solution that will put a file hierarchy (or could be flat list in a pinch) into one file? There will not in theory need to be manipulation of the "archive"/container outside the app-- so random access isn't super important here, although it would be a bonus of course.
A tar file type thing springs to mind immediately. Roll my own? Any other thoughts or gotchas? (And if anyone can point me to code that reads/writes from a tar file, I'm all ears.)
Thanks!
Update: Made community wiki, since there's no single right answer here.
Try libarchive which is a friendly licensed, BSD derived (easier for iPhone OS) library for handling archive files.

Resources