Steps to develop an iOS app to open PSL files? - ios

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?

Related

Importing a .bundle for iOS with executable code

I am trying to make an application in Objective C where a user can download a .mlmodel file from Google Drive and then dynamically load this model as a class and run its methods that come from CoreML's MLModel interface.
Looking at Apple's documentation, it appears I should be able to do this using bundles: "You can make your application extensible by designing a plug-in architecture. This way, you or third-party developers can easily add new features without recompiling the whole application or even having access to its source code."
My existing code downloads their .mlmodel file from Google Drive and saves it to the Documents folder. However, not finding a way to instantiate this as a class, I switched approaches, and will instead download a .bundle file from their Google Drive and then try to make the class from the files within it. I am struggling to find any examples of how to do this. First, I do not know how to get a .bundle file after making an App, setting the principal class, and setting the BundleID as described here. Second, I am concerned that although the documentation seems to indicate that what I want to achieve is possible, I have run across several SO posts that say that running any sort of uncompiled code, dynamically linked code is impossible on iOS. I would appreciate any clarity on the matter.

Pre-load content into Documents or Library directories from XCode

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.

Opening up an .ipa file - Piracy

How easy is it to open up an app submitted to Apple's store?
I'm going to submit a new app to the store soon, and want to protect the app file from being opened up to the source-code. So for instance, if I were to download my own app, how easy would it be to pull out all the .h and .m files and recreate it in Xcode?
Does Apple encrypt it somehow?
What steps can I take to mitigate the code being viewed?
EDIT: Allow me to rephrase the question a little better - can I take decompiled code and make it human-readable?
An IPA is just a zip. But you don't even need to access the IPA.
Just get iExplorer and access all available assets of your installed apps from your Mac.
The m files however build a compiled binary and can not be read (if you consider de-compiled code as not readable, as I do)
Adding on the answer, it is possible to decompile the binary, but the only thing that would be directly removable from the binary itself would be the headers (or to my knowledge of what I've seen). Then the application would be reverse engineered from there. That would probably be the only thing I'd be worried about when it comes to people stealing my code.

Integrating iTunes File Sharing

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.

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