Converting Odata to use ARC???

Dec 6, 2011 at 5:28 PM

I am trying to convert my IOS app to use Odata with ARC/IOS 5...I am getting a few error messages.  Please see the code below...


-(void) addNameSpace:(NSDictionary *)attributeDict inXMLDocument:(ODataXMLElements*)theXMLDocument
            NSInteger count = [attributeDict count];
            if(count > 0)
                NSString *objects[count];
                NSString *keys[count];

               [attributeDict getObjects:(id*)&objects andKeys:(id*)&keys];
                NSString *xmlns=@"xmlns:";
                for (int i = 0; i < count; i++)
                    NSString *str = keys[i];
                    NSRange range=[[str lowercaseString] rangeOfString:xmlns];
                    if(range.length > 0 )
                        NSString *strNameSpace = [str substringFromIndex:[xmlns length]];
                            ODataNameSpace *odataNameSpace = [[ODataNameSpace alloc]initWithNameSpace:strNameSpace nameSpaceURI:objects[i]];
                            [theXMLDocument setNameSpace:odataNameSpace];
                            [odataNameSpace release];


The error the compiler gives me is:  Sending '__strong id*' to parameter of type '__unsafe_unretained id*' changes retain/release properties of pointer.


I'm not sure what to do with this.  Any ideas?





Dec 22, 2011 at 2:18 PM

Hello, if you manually manage memory in your files, you can still compile sources with the "-fno-objc-arc" flag next to each file that you don't want to be managed by ARC


Hope it helps