Renaming folder and Moving folder in FTP via iOS - ios

I am trying to rename a folder in FTP via ios.
I have implemented Black Raccoon library for FTP. Like all other libraries I've com across, it has options for creating, deleting and uploading files to a specific ftp. However renaming a folder or moving a folder are absent.
I've read the CFNetworking doc provided in Apple developer site. here also they have completely avoided the question of renaming a folder or moving a folder.
The question is how can I approach this problem? Should I try to use FTP commands? If so, how should I use these commands in objective C?

Black Raccoon doesn't do anything more than what Apple provides - and you are correct they DO avoid renaming or moving folders. There are other libraries that do provide a more comprehensive FTP protocol, however they are not for the faint of heart.
Black Raccoon was designed purely for systems which have already been set up - not as an ftp management tool. It is a "light" ftp library as opposed to a full-fledged "heavy" ftp library.

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.

Transfer file from iOS app to computer while debugging

For a native iOS application we are integrating a C++ library which is writing some logs to disk to json file.
During debugging, we would like to access to this logs, but currently we can only do it by downloading the whole app container to the macOS machine and searching for the file there.
Since this a very time consuming operation we were hoping that there would be some solution that would allows us to get this file quickly. I did take a look to the lldb commands, but none of them seem to let you extract a file from the phone.
Is there anyway to do this in a quick way?
Thank you
Couple options...
1 - Add debug-only code in your app to share the log file (via AirDrop would probably be a good option).
or
2 - During debug, set these two keys (in project settings / info) to Yes:
Application supports iTunes file sharing
Supports opening documents in place
Once you've done that, you can open / copy files from your app's Documents directory (assuming that's where the logs are being written) from Finder on your Mac.

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.

Open a CBZ/CBR file in IOS

I am looking to integrate opening/viewing CBZ/CBR file in iOS6 (A simple viewer like UIWebView that reads PDF file will be fine as well).
Are are there any libraries (Commercial or free) that are available for opening these file types?
Thanks in Advance
CBR files are renamed .rar files and CBZ files are renamed .zip files, so you can look for a solution from there. I've never come across a library file specifically targeted for them, but that might not exclude the possibility of one existing, but as they're just standard compression files renamed to make them more portable between CBR/CBZ readers you should be okay with standard decompression libraries.
The library will spit out a number of image files when the decompression has finished, if you extract one with a standard decompression tool you'll see how they'll be presented.

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