Is there any way to Protect Document Directory in IOS - ios

Is there any way to Protect Document Directory in IOS. Any other can not show it's data via any other software? Any encrypted method Or Password Protected for we can protect Data.
My Application is related to Music App. In My app we download songs in Document Directory.
Any user can listen songs via my application. but they can not access that song via any software.
For ex. If we use iFunbox From Mac we can get every data. We don't want to access my data from that kind of software.
Any way to protect my data?

I don't know any way to encrypt an entire directory on iOS devices but you could take a look at RNCryptor to encrypt the songs that your app downloads.
RNCryptor - Github
You can user it to enrypt the songs individually and decrypt the data before you play them in your app.

Related

How to convert YouTube offline exo file to MP4

How to convert YouTube offline exo file to MP4 or Avi format?is there any way?
I have tried on Google but no solution get.
You can't, exo is compressed and encrypted so only the same youtube App that you used to save it can obtain the video stream content.
The encryption key is specific for the youtube app installation and change from device to device in order to avoid that once you downloaded the content you can distribute it for play on another device.
Ideally if you have a rooted Android device you should find somewhere within the youtube application data the encryption key but then you will not have the required info on how to use that to decrypt the .exo which very unlikely Google will share since with that knowledge its copyright protection system would not be safe.

Can you get a song onto your iPhone thru your app?

I would like to get songs from my computer to my iPhone inside of my own app. This would be a music playing app that would have the ability to load songs into its own directory from some private source like a laptop or cloud storage.
Example: If I have 100 songs on a Google Drive and I write an iOS app that loads those files from the Google Drive into the apps directory.
iOS, iPhone, Swift.
Yes you can download files into your app's Documents directory, which will be private to your app.
Here's a SO question on downloading a file in Swift/iOS that shows some concrete code examples: How to download file in swift?
You can also find many tutorials online on saving files and making HTTP requests in Swift.
You'll need to determine specifically how to make requests to your file provider e.g. Google Drive. This might involve not only the URL itself but also authentication, SSL validation etc. which are deeper topics in themselves but fully supported in Swift/iOS.
Yes, you can definitely download songs to your phone from your computer. You just have to make a directory area in your app and have the song be fetched into that directory.

How to get the saved text file from my iOS App to PC?

I build an iOS App that collects data via BLE and saves it as text files. What I want to do now is to retrieve the saved data on my PC (Windows) for further analysis. As the developer I know I can download the App container via Xcode for accessing the saved file and it works well. However, I wonder if there’s any approach that I can get the saved files without using Xcode? Can I save the text files to a public location so I can access them directly?
In short, you can't do what you want in this exact way, as iOS devices do not support the USB mass storage protocol. The only way to get files out is using iTunes, which can access your iOS device's Documents folder.
Of course, you could reverse-engineer that protocol, but that's a bit unreliable and might break if Apple ever changes something.
Instead, find another way. E.g. you could have your PC app contain a tiny HTTP server and have your iOS app send an HTTP request to it that contains the file's data. Alternately you could even go via an actual server on the internet.
Or, given all iOS users have iCloud, you could also just save your data to iCloud, then have your PC users install Apple's iCloud for Windows stuff and then just access the file from there.
If I understand you correctly, you want to access the client's data on the PC.
You can create a file server or use a third party service like Amazon S3(https://aws.amazon.com/s3/).
Client upload that collects data through the http/https protocol.
PC download the client's data and analysis.

when implementing Dropbox API on iOS app

I just started implementing Dropbox API on my iOS app.
Last time, when I played around with iCloud a bit, I found that Apple recommended an app save the data either locally or on iCloud, not on both.
I remember the code for data transition when user switching the setting between local and iCloud was a bit difficult.
Does this apply to Dropbox, too?
So, when the user chose Dropbox option, should I save all data through Dropbox API exclusively?
or could I save one copy through Dropbox and another through native iOS code?
Thanks for your help in advance!
Which API?
For both files (Sync API) and datastores (Datastore API), the iOS SDK will cache data locally on the device as well as store it in the cloud, so there's really nothing to do aside from use the SDK.

Is it possible to sava data in an eBook on iBooks?

I have to develop an eBook for iBooks, and there's a requirement to allow the user to save data, either to local storage to be retrieved when plugged into a computer, or to upload the data to the cloud somewhere, and retrieve from a website.
I know that you can do all sorts on non-book-like things in an eBook, but I can't seem to find anything about whether this kind of data exchange is possible.

Resources