     @IBOutlet weak var tableView: UITableView!
     @IBOutlet weak var activityIndicator: UIActivityIndicatorView!
     var recetasString = [Dictionary<String,AnyObject>]()
+    var ingredients = [Ingredient]()
     //var recipes = [NSManagedObject]()
     //var idseleccionado = 0
     var sincronized = false

                    self.activityIndicator.hidden = true
                    // print("finalizado \(self.recetasString.count)")
                }else {
                    print("sin recetas agregadas")
                }
            }) { (error) -> () in

        self.recetasString = []
        let myapiClient = MyAPIClient()
        self.activityIndicator.startAnimating()
        var ingredientesString = ""
        do {
            ingredients = try IngredientDataHelper.findIngredientsInStorage()!
            
            for ing in ingredients {
                var io = ing as Ingredient
              ingredientesString  += io.name + ",";
            }
        } catch _ {
            print ("error al coger los ingredientes del almacen")
        }
        
        myapiClient.getRecipesIngredients(ingredientesString, recipes: { (receta, id) -> () in
            
            var post=Dictionary<String,AnyObject>()
            post = ["id":id,"name":receta]
            
