Frameworks (ConnectionKit)

2011-08-09 Thread Amy Heavey

Hi,

I'd  like to be able to use my mac app to upload an image to a server.  
From googling it seems the best way to achieve this is using the  
ConnectionKit framework to upload it via FTP.


I've downloaded the framework, but Im at a loss, the examples  
included don't build, and looking at the hillegass book there should  
be a .framework file for me to link to but I can't find one. I also  
can't find any documentation about how to use this. Can anyone point  
me in the right direction? Either for using ConnectionKit or how else  
to simply ftp a file to a server?


Many Thanks

Amy Heavey
Willow Tree Crafts
www.willowtreecrafts.co.uk



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Mike Abdullah
Why have you picked FTP?

On 9 Aug 2011, at 12:04, Amy Heavey wrote:

 Hi,
 
 I'd  like to be able to use my mac app to upload an image to a server. From 
 googling it seems the best way to achieve this is using the ConnectionKit 
 framework to upload it via FTP.
 
 I've downloaded the framework, but Im at a loss, the examples included don't 
 build, and looking at the hillegass book there should be a .framework file 
 for me to link to but I can't find one. I also can't find any documentation 
 about how to use this. Can anyone point me in the right direction? Either for 
 using ConnectionKit or how else to simply ftp a file to a server?
 
 Many Thanks
 
 Amy Heavey
 Willow Tree Crafts
 www.willowtreecrafts.co.uk
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
 
 This email sent to cocoa...@mikeabdullah.net

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Amy Gibbs
It seemed the easiest way of uploading  a file to the server?



Regards

Willow Tree Crafts
Www.willowtreecrafts.co.uk

On 9 Aug 2011, at 13:46, Mike Abdullah cocoa...@mikeabdullah.net wrote:

 Why have you picked FTP?
 
 On 9 Aug 2011, at 12:04, Amy Heavey wrote:
 
 Hi,
 
 I'd  like to be able to use my mac app to upload an image to a server. From 
 googling it seems the best way to achieve this is using the ConnectionKit 
 framework to upload it via FTP.
 
 I've downloaded the framework, but Im at a loss, the examples included 
 don't build, and looking at the hillegass book there should be a .framework 
 file for me to link to but I can't find one. I also can't find any 
 documentation about how to use this. Can anyone point me in the right 
 direction? Either for using ConnectionKit or how else to simply ftp a file 
 to a server?
 
 Many Thanks
 
 Amy Heavey
 Willow Tree Crafts
 www.willowtreecrafts.co.uk
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
 
 This email sent to cocoa...@mikeabdullah.net
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/home%40willowtreecrafts.co.uk
 
 This email sent to h...@willowtreecrafts.co.uk
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Mike Abdullah
My point is that you're not constrained to it.

ConnectionKit is almost certainly overkill for this. If you're determined to 
use FTP, check out CFWriteStreamCreateWithFTPURL(). In general, I'd advise a 
WebDAV-like system fed by NSURLConnection is best.

On 9 Aug 2011, at 14:15, Amy Gibbs wrote:

 It seemed the easiest way of uploading  a file to the server?
 
 
 
 Regards
 
 Willow Tree Crafts
 Www.willowtreecrafts.co.uk
 
 On 9 Aug 2011, at 13:46, Mike Abdullah cocoa...@mikeabdullah.net wrote:
 
 Why have you picked FTP?
 
 On 9 Aug 2011, at 12:04, Amy Heavey wrote:
 
 Hi,
 
 I'd  like to be able to use my mac app to upload an image to a server. From 
 googling it seems the best way to achieve this is using the ConnectionKit 
 framework to upload it via FTP.
 
 I've downloaded the framework, but Im at a loss, the examples included 
 don't build, and looking at the hillegass book there should be a .framework 
 file for me to link to but I can't find one. I also can't find any 
 documentation about how to use this. Can anyone point me in the right 
 direction? Either for using ConnectionKit or how else to simply ftp a file 
 to a server?
 
 Many Thanks
 
 Amy Heavey
 Willow Tree Crafts
 www.willowtreecrafts.co.uk
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
 
 This email sent to cocoa...@mikeabdullah.net
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/home%40willowtreecrafts.co.uk
 
 This email sent to h...@willowtreecrafts.co.uk

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Amy Gibbs
I'm certainly noy tied to FTP, and I'll have a go with  
NSURLConnection. I did try to use that for another part but I just  
couldn't get it to work. Is there a particular sample/tutorial you  
could recommend?


In the following code, accessing the URL  in a webView works, but the  
NSURLConnection doesn't;

[code]

NSURL *uploadURL = [[NSURL alloc] initWithString:escapedUrl];
		NSMutableURLRequest* post = [NSMutableURLRequest requestWithURL:  
uploadURL];
		//NSURLConnection *connect = [NSURLConnection initWithRequest:post   
delegate:self startImmediately:@YES];

NSLog (@uploadurl is: %@, uploadURL);


		[[uploadWeb mainFrame] loadRequest:[NSURLRequest  
requestWithURL:uploadURL]];


[/code]

On 9 Aug 2011, at 2:32PM, Mike Abdullah wrote:


My point is that you're not constrained to it.

ConnectionKit is almost certainly overkill for this. If you're  
determined to use FTP, check out CFWriteStreamCreateWithFTPURL(). In  
general, I'd advise a WebDAV-like system fed by NSURLConnection is  
best.


On 9 Aug 2011, at 14:15, Amy Gibbs wrote:


It seemed the easiest way of uploading  a file to the server?



Regards

Willow Tree Crafts
Www.willowtreecrafts.co.uk

On 9 Aug 2011, at 13:46, Mike Abdullah cocoa...@mikeabdullah.net  
wrote:



Why have you picked FTP?

On 9 Aug 2011, at 12:04, Amy Heavey wrote:


Hi,

I'd  like to be able to use my mac app to upload an image to a  
server. From googling it seems the best way to achieve this is  
using the ConnectionKit framework to upload it via FTP.


I've downloaded the framework, but Im at a loss, the examples  
included don't build, and looking at the hillegass book there  
should be a .framework file for me to link to but I can't find  
one. I also can't find any documentation about how to use this.  
Can anyone point me in the right direction? Either for using  
ConnectionKit or how else to simply ftp a file to a server?


Many Thanks

Amy Heavey
Willow Tree Crafts
www.willowtreecrafts.co.uk



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the  
list.

Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to cocoa...@mikeabdullah.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/home%40willowtreecrafts.co.uk

This email sent to h...@willowtreecrafts.co.uk




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Thomas Wetmore
The startImmediately parameter is a BOOL, not a string. Use YES instead of 
@YES and see if that helps.

Tom W.

On Aug 9, 2011, at 10:44 AM, Amy Gibbs wrote:

 I'm certainly noy tied to FTP, and I'll have a go with NSURLConnection. I did 
 try to use that for another part but I just couldn't get it to work. Is there 
 a particular sample/tutorial you could recommend?
 
 In the following code, accessing the URL  in a webView works, but the 
 NSURLConnection doesn't;
 [code]
 
 NSURL *uploadURL = [[NSURL alloc] initWithString:escapedUrl];
   NSMutableURLRequest* post = [NSMutableURLRequest 
 requestWithURL: uploadURL];
   //NSURLConnection *connect = [NSURLConnection 
 initWithRequest:post  delegate:self startImmediately:@YES];
   NSLog (@uploadurl is: %@, uploadURL);
 
   
   [[uploadWeb mainFrame] loadRequest:[NSURLRequest 
 requestWithURL:uploadURL]];
 
 [/code]

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Jens Alfke

On Aug 9, 2011, at 7:44 AM, Amy Gibbs wrote:

 NSURL *uploadURL = [[NSURL alloc] initWithString:escapedUrl];
 NSMutableURLRequest* post = [NSMutableURLRequest requestWithURL: uploadURL];

If you want to upload anything, you want to send a PUT or POST request, but the 
default is a GET; sou need to set the HTTPMethod property. You also need to 
provide the data you want to upload, by setting the HTTPBody property.

 //NSURLConnection *connect = [NSURLConnection initWithRequest:post  
 delegate:self startImmediately:@YES”];

As Thomas said, the last parameter is a boolean. The compiler gave you an error 
message about the type being wrong for that parameter (and depending on which 
compiler, told you that it expected a boolean. That should have been a clue not 
to put an NSString there.

Also, this is going to send the request asynchronously. That means you’ll need 
to set a delegate, and implement the necessary delegate methods, otherwise you 
won’t get any information on the progress of the operation.

Have you read the Apple overview docs on using NSURLConnection? They describe 
all this in detail including plenty of examples.

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/9/11 6:15 AM, Amy Gibbs wrote:
 It seemed the easiest way of uploading  a file to the server?

In addition to what others have mentioned, it is worth pointing out that
FTP is a notoriously insecure protocol (or at least lends itself to
security vulnerabilities).

It doesn't support encryption out of the box, so you would have to deal
with the added headache (larger or smaller, depending on implementation)
of tunneling through an encrypted pipe or using a later variant of FTP
that supports encryption but then requires support by both client and
server.

Like most vendors I've seen, Apple implicitly discourages the use of
FTP.  Quoting page 201 of the Snow Leopard Security Configuration guide:

Avoid using this protocol to share sensitive data. If you must use this
protocol, encrypt your data using a secure encrypted image.

- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFOQWbHaOlrz5+0JdURAn4RAJ9oHZVCLmqwcv7nNShZggzNGtVDFQCfVF/e
Rny+npzOo8j55OPj6Ql1Q3E=
=UbbC
-END PGP SIGNATURE-
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Leo

You can use libcurl:

http://curl.haxx.se/

Extremely powerful library, which is a part of Mac OS X, that supports 
most protocols (FTP, SFTP, HTTP etc.) I find it very easy to use - but  
I've been using it for years in either its command line (curl) or 
library implementation.


There's also excellent Open Source polkit:

http://code.google.com/p/polkit/

which is partially based on libcurl and Mac OS X frameworks and supports 
even more protocols, such as Amazon S3, AFP and SMB.


I remember trying the ConnectionKit, and whatever I tried it just didn't 
work.


Leo

On 8/9/11 7:04:08 AM, Amy Heavey wrote:

Hi,

I'd  like to be able to use my mac app to upload an image to a server. 
From googling it seems the best way to achieve this is using the 
ConnectionKit framework to upload it via FTP.


I've downloaded the framework, but Im at a loss, the examples 
included don't build, and looking at the hillegass book there should 
be a .framework file for me to link to but I can't find one. I also 
can't find any documentation about how to use this. Can anyone point 
me in the right direction? Either for using ConnectionKit or how else 
to simply ftp a file to a server?


Many Thanks

Amy Heavey
Willow Tree Crafts
www.willowtreecrafts.co.uk



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/leo.r%40rogers.com

This email sent to le...@rogers.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Mike Abdullah

On 9 Aug 2011, at 21:36, Leo wrote:

 You can use libcurl:
 
 http://curl.haxx.se/
 
 Extremely powerful library, which is a part of Mac OS X, that supports most 
 protocols (FTP, SFTP, HTTP etc.) I find it very easy to use - but  I've been 
 using it for years in either its command line (curl) or library 
 implementation.
 
 There's also excellent Open Source polkit:
 
 http://code.google.com/p/polkit/
 
 which is partially based on libcurl and Mac OS X frameworks and supports even 
 more protocols, such as Amazon S3, AFP and SMB.

Bear in mind PolKit is GPL, unless the author gives you permission otherwise.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Frameworks (ConnectionKit)

2011-08-09 Thread Leo

On 8/9/11 6:28:54 PM, Mike Abdullah wrote:

Bear in mind PolKit is GPL, unless the author gives you permission otherwise.
Yeah actually I had to mention this but it didn't look like the original 
question referred to a commercial product.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com