Director Error

This is the code in the main.lua file

local director = require("director")  
  
local mainGroup = display.newGroup()  
  
local main = function()  
  
 mainGroup:insert(director.directorView)  
 director:changeScene("mainscreen","fade")  
  
  
return true  
end  
main()  

And the following error occurred

When I run the file in the XCode simulator, the following error occurred

Director ERROR: Failed to execute function 0x73401e0(params)

The program was working in the Corona Simulator, but failed to load in the XCode Simulator.

Is there any solution? [import]uid: 96608 topic_id: 18869 reply_id: 318869[/import]