Hello,
I’m very new to Corona and I’m trying to get a basic application (the flashlight tutorial) to work for iOS. I am getting the following error when I try to run the app (both on a real device and a simulator):
2018-04-13 09:20:40.853912-0700 App[890:325836] ERROR: Runtime error
/Users/useradmin/Desktop/App/ios/…/Corona/main.lua:2: module ‘widget’ not found:
no field package.preload[‘widget’]
no file '/var/containers/Bundle/Application/AE8A8A81-334D-46E8-A733-F873B3C7C00A/App.app/corona-plugins/widget.lua’
no file '/var/containers/Bundle/Application/AE8A8A81-334D-46E8-A733-F873B3C7C00A/App.app/widget.lua’
no file '/var/containers/Bundle/Application/AE8A8A81-334D-46E8-A733-F873B3C7C00A/App.app/widget.lua’
no file '/var/containers/Bundle/Application/AE8A8A81-334D-46E8-A733-F873B3C7C00A/App.app/corona-plugins/widget.so’
no file './widget.so’
no file '/var/containers/Bundle/Application/AE8A8A81-334D-46E8-A733-F873B3C7C00A/App.app/widget.so’
stack traceback:
[C]: in function 'require’
/Users/useradmin/Desktop/App/ios/…/Corona/main.lua:2: in main chunk
I’ve tried including plugin.widget in build.settings as a plugin, but that didn’t work. I redownloaded Corona, thinking something went wrong with my install, but that made no difference. I am not able to find widget in my Mac. I’ve also looked at various forum explanations and rechecked the tutorial for answers. I am able to build this same application on Android just fine with no errors or special changes to get widget to work. Here is the line in question:
local widget = require( “widget” )
I copy pasted this from Corona itself and I see this exact line in many lua files, so I don’t believe there’s anything wrong with the code itself. My Xcode version is 9.3 and I have the latest Corona.