I am trying to incorporate this bit of code into a new (iOS 5) project ... The problem is that I use ARC and it REALLY does not like the code written.
I was able to solve most of the errors, but I was stuck in three errors that, it seems to me, they cannot understand.
Error # 1:
Existing ivar delegate for unsafe_unretained property 'delegate' must be _unsafe_unreteded
.h
@interface SKPSMTPMessage : NSObject {
NSOutputStream *outputStream;
NSInputStream *inputStream;
id <SKPSMTPMessageDelegate> delegate;
}
@property(nonatomic, assign) id <SKPSMTPMessageDelegate> delegate;
.m
@synthesize login, pass, relayHost, relayPorts, subject, fromEmail, toEmail, parts, requiresAuth, inputString, wantsSecure, \
delegate, connectTimer, connectTimeout, watchdogTimer, validateSSLChain;
Errors # 2 and # 3:
Passing the address of a non-local object to the _autoreleasing parameter for writeback
.h
@interface SKPSMTPMessage : NSObject {
NSOutputStream *outputStream;
NSInputStream *inputStream;
id <SKPSMTPMessageDelegate> delegate;
}
.m
[NSStream getStreamsToHostNamed:relayHost port:relayPort inputStream:&inputStream outputStream:&outputStream]
Any guidance is appreciated.
Thank.