ERROR when run a sub class


#1

Hi

i read the third edition of the book and when i tried to run the following code

#import <Foundation/Foundation.h>
#import "BNRItem.h"

int main(int argc, const char * argv[])
{

    @autoreleasepool {
        
        //creation of the the array
        NSMutableArray *items = [[NSMutableArray alloc]init];
        
        for (int i=0; i < 10; i++){
            BNRItem *p = [BNRItem randomItem];
            [items addObject:p];
        }
        
        for (int i = 0; i < [items count]; i++) {
            NSLog(@"%@",[items objectAtIndex:i]);
        }
        
        //Destroy the array
        items = nil;
        
    }
    return 0;
}

the error is :

error: failed to launch '/Users/boomerang/Library/Developer/Xcode/DerivedData/RandomPossessions-ftozumawhbrriodvslycjsamqkid/Build/Products/Debug/RandomPossessions' -- error: ::posix_spawnp ( pid => 68815, path = '/Users/boomerang/Library/Developer/Xcode/DerivedData/RandomPossessions-ftozumawhbrriodvslycjsamqkid/Build/Products/Debug/RandomPossessions', file_actions = 0x11a26ee08, attr = 0x11a26ee60, argv = 0x7f9b9dd6d8b0, envp = 0x7f9b9abab140 ) err = Permission denied (0x0000000d)

The randomItem method is:

+ (id)randomItem {
    //Cree un tableau de noms
    NSArray *randomAdjectiveList = [NSArray arrayWithObjects:@"Grand",@"Petit",@"Vieux", nil];
    //Cree u second tableau de noms
    NSArray *randomNounList = [NSArray arrayWithObjects:@"cheval",@"lamentin",@"epagneul", nil];
    //Recupere l'indice d'un couple de noms choisi au hasard
    //Note:l'operateur % renvoi un reste
    //adjectiveIndex est une valeur aléatoire comprise enre 0 et 2
    NSInteger adjectiveIndex = rand() % [randomAdjectiveList count];
    NSInteger nounIndex = rand() % [randomNounList count];
    
    NSString *randomName = [NSString stringWithFormat:@"%@ %@", [randomAdjectiveList objectAtIndex:adjectiveIndex],[randomNounList objectAtIndex:nounIndex]];
    
    int randomValue = rand() %100;
    
    NSString *randomSerialNumber = [NSString stringWithFormat:@"%c%c%c%c%c", '0' + rand() % 10, 'A' + rand() % 26,'0' + rand() % 10, 'A' + rand() % 26,'0' + rand() % 10];
    
    BNRItem *newItem = [[self alloc]initWithItemName:randomName valueInDollars:randomValue serialNumber:randomSerialNumber];
    
    return newItem;
}

What does the error mean?
How to fix?

Thanks