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.
Related
Apple's Files app treats google drive as a folder and operates files saved in google drive in the same ways as local files saved on the phone. See "Use the Files app on your iPhone, iPad, and iPod touch".
It is convenient, e.g., if want to send a file saved in google drive to a friend via iMessage, just browse into the google drive, select file and send. I sent files via another applications also.
Now the question comes: what if an app on the phone wants to steal files saved in my google drive?
I think this concern is common, as I trust google drive before because it has two-steps verification, I save some personal files in google drive. But now if I install google drive on my iphone, together with some other social communicators, it looks like the files in google drive can be easily get accessed by them. I don't feel safe anymore. There is a lot of discussion.
How does iOS prevent bad app from stealing files saved in google drive, or DropBox?
Apps cannot simply access Google Drive. They must do so through a UIDocumentPickerViewController which requires user interaction
I am currently working on an iOS app where users can watch several videos (e.g. fitness videos). The videos are all captured by my team, so I don't need access to external videos.
Now my question is, does it make more sense to store the video files offline right in the app or use some kind of online server (and which one would you recommend)? I don't want to embed Youtube videos.
Thanks in advance!
It is always better to go online. Because the size of video may vary and huge video files would scrap user device's memory. SO it is recommended to use an external server to host the video files.
You can also add an option to download the files if needed.
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.
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.
My goal is to make an iOS app that includes the ability for the user to open MP3 files that were downloaded (by the same user) within a different 3rd party app, similar to the functionality of a ringtone maker that relies on opening files that the user has already downloaded. If I understand correctly, this is easy to do if the "other" app is Apple's native iPod music player app, via the "iPod Library Access" interface. Hopefully I have at least that part right.
But what if the "other" app is a non-Apple 3rd party app, through which the user downloaded the MP3 file that we now want that user to be able to open within our app? From a high level (I'm not asking for code), how is this done? And has your analysis changed based on what was announced for iOS 7?
For this to be possible, the third-party app in question must expose some mechanism for doing this. They might implement hooks through the sharing charm, or they might expose a "documents" repository from which other applications can read (optionally, with granted permissions from the user to do so). For example, the AirShare application can read your Dropbox files. This is because Dropbox has exposed the files as a documents repository and the user has granted permission for AirShare to access Dropbox. If the third-party app doesn't implement these hooks, there is no way to access the documents from another application.
Edit:
To access the music files in the user's iTunes library, I'll refer you to the iPod Library Access Programming Guide at http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/iPodLibraryAccess_Guide/Introduction/Introduction.html