Errors with Vungle and google-play-services plugins iOS

Hi,

I am very new to enterprise trying to get a hang of it.

I am following this tutorial

https://coronalabs.com/blog/2015/03/10/tutorial-corona-sdk-to-corona-enterprise/

I have dragged and dropped the .a files to Xcode and tried to build. Build is failed. 

Here are the errors I am getting

Undefined symbols for architecture x86\_64: "\_OBJC\_CLASS\_$\_EKEvent", referenced from: objc-class-ref in libgoogle-play-services.a(GADOpener.o) "\_OBJC\_CLASS\_$\_EKEventEditViewController", referenced from: objc-class-ref in libgoogle-play-services.a(GADOpener.o) "\_crc32", referenced from: \_vungle\_zipWriteInFileInZip in libads-vungle.a(vungle\_zip.o) \_vungle\_unzReadCurrentFile in libads-vungle.a(vungle\_unzip.o) "\_deflate", referenced from: \_vungle\_zipWriteInFileInZip in libads-vungle.a(vungle\_zip.o) \_vungle\_zipCloseFileInZipRaw64 in libads-vungle.a(vungle\_zip.o) "\_deflateEnd", referenced from: \_vungle\_zipCloseFileInZipRaw64 in libads-vungle.a(vungle\_zip.o) "\_deflateInit2\_", referenced from: \_vungle\_zipOpenNewFileInZip4\_64 in libads-vungle.a(vungle\_zip.o) "\_get\_crc\_table", referenced from: \_vungle\_zipOpenNewFileInZip4\_64 in libads-vungle.a(vungle\_zip.o) \_vungle\_unzOpenCurrentFile3 in libads-vungle.a(vungle\_unzip.o) "\_inflate", referenced from: \_vungle\_unzReadCurrentFile in libads-vungle.a(vungle\_unzip.o) "\_inflateEnd", referenced from: \_vungle\_unzCloseCurrentFile in libads-vungle.a(vungle\_unzip.o) "\_inflateInit2\_", referenced from: \_vungle\_unzOpenCurrentFile3 in libads-vungle.a(vungle\_unzip.o) ld: symbol(s) not found for architecture x86\_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

And here is my build.settings file

plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle", }, ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, ["plugin.notifications"] = { publisherId = "com.coronalabs", }, },

I have added the 4 .a files and the plugins and corona enterprise are both version 2016.2994.

I have not modified any files from my Corona SDK project including build.settings. The project works fine on corona simulator but not on Xcode.

When I remove the jungle and google-play-services plugins the app builds.

How can I fix these errors?

For an Enterprise project you can remove the plugins section from build.settings, as it’s not used at all. The errors you are seeing are because you are missing a few Frameworks in your Xcode project.
 
When adding plugins to an Enterprise project (by adding the .a files), it’s important to look at each plugin’s metadata.lua file and make sure that all the frameworks and any extra static libraries listed there are included in your Xcode project as well.
 
metadata.lua (google-play-services):

plugin = { format = 'staticLibrary', staticLibs = { 'google-play-services', }, frameworks = { 'CoreTelephony', 'AdSupport', 'EventKit', 'EventKitUI'}, frameworksOptional = {}, }

In this file you should make sure the frameworks listed above are included in your Xcode project. The staticLibs section here is just listing the plugin which you already have. From the linker errors you are getting you are missing the EventKit and EventKitUI frameworks, but please check that you have the other frameworks mentioned to avoid future problems.
 
 
metadata.lua (vungle)

plugin = { format = 'staticLibrary', staticLibs = { 'ads-vungle', 'z'}, frameworks = {'AVFoundation', 'CFNetwork', 'CoreGraphics', 'AudioToolbox', 'Accounts', 'AdSupport', 'CoreMedia', 'Foundation', 'MediaPlayer', 'QuartzCore', 'SystemConfiguration', 'StoreKit', 'Photos', 'AssetsLibrary'}, frameworksOptional = {'CoreLocation', 'WebKit'}, },

In this file file you also have a static library that you need to include in your project: ‘z’. You add it in the same way as a framework, but search for libz, and add the libz.tbd file to your project. Again check that all the other frameworks listed above are included in your project.
 
After you add the missing libraries/frameworks, you should be able to compile without any issues.

For an Enterprise project you can remove the plugins section from build.settings, as it’s not used at all. The errors you are seeing are because you are missing a few Frameworks in your Xcode project.
 
When adding plugins to an Enterprise project (by adding the .a files), it’s important to look at each plugin’s metadata.lua file and make sure that all the frameworks and any extra static libraries listed there are included in your Xcode project as well.
 
metadata.lua (google-play-services):

plugin = { format = 'staticLibrary', staticLibs = { 'google-play-services', }, frameworks = { 'CoreTelephony', 'AdSupport', 'EventKit', 'EventKitUI'}, frameworksOptional = {}, }

In this file you should make sure the frameworks listed above are included in your Xcode project. The staticLibs section here is just listing the plugin which you already have. From the linker errors you are getting you are missing the EventKit and EventKitUI frameworks, but please check that you have the other frameworks mentioned to avoid future problems.
 
 
metadata.lua (vungle)

plugin = { format = 'staticLibrary', staticLibs = { 'ads-vungle', 'z'}, frameworks = {'AVFoundation', 'CFNetwork', 'CoreGraphics', 'AudioToolbox', 'Accounts', 'AdSupport', 'CoreMedia', 'Foundation', 'MediaPlayer', 'QuartzCore', 'SystemConfiguration', 'StoreKit', 'Photos', 'AssetsLibrary'}, frameworksOptional = {'CoreLocation', 'WebKit'}, },

In this file file you also have a static library that you need to include in your project: ‘z’. You add it in the same way as a framework, but search for libz, and add the libz.tbd file to your project. Again check that all the other frameworks listed above are included in your project.
 
After you add the missing libraries/frameworks, you should be able to compile without any issues.