I want to ask a question about the objective C. I have create a .csv file and I want to upload to a server. However, I have no idea on how to do it. Can anyone provide any example or library for me to do? Thank you very much.
I think you will have an easier time doing this with ASIHTTPRequest, specifically, take a look at this sample code that shows how to upload a file.
Then, for actually initiating the request, take a look at creating an asynchronous request.
Related
I just wanted to get clarification on the approach I'm taking with my program. I'm making a program with custom interface for achiving folders. I would like to use 7zip if possible. In the past I have written batch scripts to that use 7zip command line for archiving. If I want to use my VB tool on a system that doesn't have this available, I would like for this to be embedded in my app.
My question is that know how to embed an exe in a VB app, but does this make it immediately available for use in the program no matter where I use it? Or it make the exe available to be deployed somewhere on the station, then I would have to call it from the disk and then possibly delete it when I'm done?
I've done some searching online for similar applications, but am still unsure of how to use embedded files. I'm not looking for example code. Just clarification on whether I can immediately call the exe from within my app, or I embedding just means I can place that file somewhere on the station that I move my app to and then use it? Clarification on this would be most welcome. Thanks!!!
I know its a bit of a far fetched question.
But is it possible to import code from online, like say I had a .h and .m file on my website server and in the code I wanted to use it would I be able to import it? And How?
I ask this because it makes it loads easier to update an app if all they need to do is reload the app and the app changes to the latest version.
If you're talking about a Mac OS X application, then yes it's possible. No need to share your source code, just compile on the server and have the app download the new binary.
However, if your App needs to go through the App Store, which is necessary for iOS apps, then this surely is not possible. The only thing you can do is streamline the submission process as much as possible (see this question).
If you love the idea of being able to push new code at any time, consider making a web app. There's lots of stuff you can do these days.
I'm not 100% (maybe 95%) sure but I think storing objc code online to keep it auto-upgradable is not possible since the app isn't able to rebuild itself.
But if you want you could do a generic app that firstly fetches an XML/plist (for example) stored online to retrieve data and the app is set to read it and present different behaviours depending on that, but you'll have to code it previously in a generic way to support dynamic changes.
Hope this helps.
I want to ask a question about the objective C on iPhone. I want to upload a file (actually I store all the data in a NSString) to a server. However, I have not idea of how to do, I have checked the website of the Apple Developer, and I know there are a function called connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:, but it seems wrong. Can anyone help me and provide some sample code to me? Thank you very much.
I found this is the answer
http://cocoadev.com/index.pl?HTTPFileUpload
Are there some particular library files available on OS/X that are relevant, I am just not sure where to start.
You'd probably want to use the QuickTime for that. There is some sample code that does this. However, it's not the nicest way to access metadata. The newer QTKit Framework somehow still requires you to fall back to the C-based APIs. There is another example from Apple embedding meta data writing into a Objective-C method. This might be the best starting point for you.
What is the simplest way (preferably without using third party frameworks) in objective c, to setup a simple server that listens for socket connections, and reads data from the clients on a line by line basis.
ie Ideally you would just need to create an instance of a "server" object, that would pass "client" objects back to which receive incoming data messages.
Have a look here How to Write a Cocoa Web Server
Maybe not the simplest solution but it gives a good insight of needed logic for a server
Well, there are classes out there, with which, in a couple of lines of code, you could write a simple socket server.
For eg, search for TcpListener() on Google and see if that works for you. I am sure there are examples for Java as well.
This question has been open for a long time. There appears to be no standard way to do this. I ended up just writing my own Objective C code to wrap C
There are some other "libraries" out there, but I find a couple of .m and .h files much easier to work with than tracking some third party library thats big and complicated and possibly has undiscovered bugs in features I don't want to use anyway.