In 2019 , the sector attracting the highest share of foreign direct investment in Mexico was the manufacturing industry , which accounted for almost half of all the FDI received in the North American country in that year .