how would i move a folder or the contents from one place to another Via code in Xcode? - objective-c

Im trying to make a mac app that copies and pastes a folder to another location but i can find a tutorial on how i go along and make an app for the mac what its per pose is A app that makes it easy to move mod files to a games file system. Yes i know theres lots of apps that goes the same but i want to make my own. The structure is theres six NSTextFields three for the mods folders and three for the games folder system like (Mod's Parts Path, Mod's Plugin Path, Mod's Plugin Data Path, Game's Parts Path, Game's Plugin Path and Games's Plugin Data Path). Ive looked on stackflow and Google and couldn't find on tutorial on how to do this maybe im looking in the wrong places. The game that its manly for is for KSP (Kerbal Space Program)

What did you googled? You will need a simple gui application with 6 Labels, 6 TextFields and one Button. There will be one function linked with that button. That function will use data from TextFields and NSFileManager's copyItemAtPath:toPath:error: method.
Google something like "osx first app" or "xcode TextField tutorial" for the details on how to create an app with TextField and Button.

Related

Does anyone know how do i get the list of all the applications installed in phone that can run audio files in react-native?

I want to create a functionality in react-native app such that on pressing a particular button, it should get me to the "open with" window, and that window should fetch me the list of all the installed applications in the phone which can run audio files. How can i get such list?
On a Android system, that "Open with" screen pops up when:
The user have more than one application that can play that specific audio format(Because it's not every app that can run every audio format).
The user did not set-up a default app to open the audio format.
So, You should just use a library like rn-fetch-blob to open the file for you, like as follow:
RNFetchBlob.android.actionViewIntent(fileLocation, mimeType)
And android will take care of picking the right app for you.
In case this answer does not satisfy you, you can get a list of apps using react-native-android-installed-apps-unblocking, but there's no information about wich ones can run an audio file, and maybe IOS will have some restrictions about what can be done, so your best option is to let the system do that for you!

How to load a video permanently into a project

If you add a picture into a project, then remove the picture from it's original source, the picture is still in the project even though it doesn't exist in its original location.
I want to do the same thing with a video.
How can I add a video to a project in such a way that it can be deleted from its original location and it will still exist in the project?
I guess what you are looking for is dynamic ressources and not static(local) ones. You can input them by drag&drop into your solution explorer or if you double click on your project in the solution explorer the project properties open - there you have a tab called ressources where you can input any kind of ressources.
If you dont know how to play a movie within a VB Form - here is a tutorial on YouTube.

How do I add my own option to Finder's right click menu?

I have an app that basically takes a file path(s) and copies the data name and extension from it to be used in my app. I was wondering how to add on to the Finder right click menu (like Dropbox does) and do run some Objective-C code when clicked. (I need to get the path(s) of the selected file). Is there any way to do this? All the answers I've seen are very vague and unhelpful. I do not want to use mach_inject because my app might go onto the appstore, and I can probably get FinderSync API to work.
Take a look at the FinderSync API in Yosemite; I'm fairly sure you don't need to sync anything, but you can use the API to install a toolbar and sidebar item as well.

Add more one button on Attach menu of Whatsapp

I've an idea to develop a modification to WhatsApp, for example now when I click attachment symbol it shows only 6 I want to add one more option to it. If it's possible let me know. I want to add more one button on Attach menu.
It is not clear what exactly you are asking.
You have an option to launch other applications from your app.
If you want to change the way a certain app looks, or behaves you have to write something similar to it for people to use, but you cannot change the original app (no one will let you)
Here you go! it's possible, as #Jef said in comments.
using documentation interaction controller.
https://www.whatsapp.com/faq/iphone/23559013
you need to work on how to hook into attachment menu.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDocumentInteractionController_class/
There is an assumption in your question that these other apps are put there by the whatsApp developers, or by a third party who was somehow able to modify their code. I suspect that what is happening is that they (whatsApp) simply export a document/file of a certain type (UTI) If your application supports that same UTI it should appear here. So there is six buttons for you, on your phone, but another user might see a different number, it depends entirely what they have installed on their device.
CONCEPTUAL.. if you double click on a file on your computer then the file browser (OS) opens that file with some application or other. Perhaps it is a .doc file and the OS pushes that file to word or pages. Or it may be a .psd file and it gets pushed to photoshop. How does this happen? The OS has a registry (database) of applications for each file type, applications sign up on this when they install/update. If you right click on a file you see an 'open in..' option that lists all your applications which can handle that file type, this is the menu that you are wanting to get onto (for whatsApp's file type) imho.
So you need to
1 ascertain what file type (UTI) WhatsApp is exporting
2 declare support for that file type in your application (this is the bit which will be platform specific solution) (iOS docs https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1 )
**edit/addition
3. add the code to actually handle the file when your app receives it. On iOs this is in the appDelegate in
-(void) application: openURL: sourceApplication:annotation:
If the Whatsapp people have published an API then thats where you want to look. Good luck

'Open In' functionality after downloading document?

I am developing an iOS app that allows users to download documents off a server. I have gotten this to work fine and they can even view the document. What I want, though, is for the document to have an 'Open In' action so, when a button is pressed, the user is able to select another application that allows you to look at PDF documents -- for example, the Kindle App. Is this possible?
Darn, I was wishing you were going to say "MacOS" because that would have made the answer a lot more fun (and do-able).
As far as I know, iOS still does not have an official SDK-legal way to have one app (your app) arbitrarily launch other app and specify an arbitrary document to open with it. This is part of the magic (?) of having to live within your own app sandbox.
On the Macintosh, this would be easy with Apple Events (among other things).