Adding Existing Corona Plugins

I’m having trouble integrating the Corona plugins in an Xcode project, such as the one for notifications.

I linked the library (libnotifications.a) and also tried adding this to the plist table in build.settings:

CoronaDelegates = { "CoronaNotificationsDelegate" }

The search paths are correct and I am able to build the project just fine. However, I get the following error when running on the simulator:

ERROR: Runtime error module 'plugin.notifications' not found:resource (plugin.notifications.lu) does not exist in archive no field package.preload['plugin.notifications'] no file '/Users/username/Library/Developer/CoreSimulator/Devices/4CF720EF-7D28-40FB-9FC5-A3FF6193CCD3/data/Containers/Bundle/Application/0F76C76C-AFBB-48DE-A543-E6CD839FD146/Test App.app/plugin/notifications.lua' no file '/Users/username/Library/Developer/CoreSimulator/Devices/4CF720EF-7D28-40FB-9FC5-A3FF6193CCD3/data/Containers/Bundle/Application/0F76C76C-AFBB-48DE-A543-E6CD839FD146/Test App.app/plugin/notifications.lua' no file './plugin/notifications.so'

Is there anything else needed to properly implement the notification plugin? I’m using the latest build of Corona Enterprise and its plugins (2017.3026)

Edit:

Okay it seems only one of the versions of libnotifications.a is being recognized, either the “iphone” one or the “iphone-sim” one? Right now I can successfully build for either the simulator or a device, depending on which version I leave in. Is there any way I could have both in the project at the same time and be able to build on both simulator and device?

Sorry about this. You can attempt creating fat binary yourself with simple command from notification/2015.2542 folder:

lipo -create iphone/libnotifications.a iphone-sim/libnotifications.a -output libnotifications.a

This would create “fat” library containing symbols for simulator and device.

Works great! I stuck to developing on a device the whole time but good to know the option is there. Thanks vlads.

Sorry about this. You can attempt creating fat binary yourself with simple command from notification/2015.2542 folder:

lipo -create iphone/libnotifications.a iphone-sim/libnotifications.a -output libnotifications.a

This would create “fat” library containing symbols for simulator and device.

Works great! I stuck to developing on a device the whole time but good to know the option is there. Thanks vlads.