Unable to build for IOS when using GPGS plugin

Trying to build for IOS with the new GPGS plugin but it won’t complete building, just keep getting error saying “There was a problem linking the app.”.

Below is just a fraction of what appears in the console window, it actually goes on and on with the same error for many many more items. I am using corona build 2970, building for iOS sdk 9.3, my xcode is 7.3.1.

Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(GTLGamesManagementHiddenPlayer.o)) was built for newer iOS version (9.0) than being linked (6.0)

                    ld: warning: object file (/Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(GTLGamesManagementHiddenPlayerList.o)) was built for newer iOS version (9.0) than being linked (6.0)

                    ld: warning: object file (/Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(GTLGamesManagementPlayer.o)) was built for newer iOS version (9.0) than being linked (6.0)

                    ld: warning: object file (/Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(GTLGamesManagementPlayerScoreResetResponse.o)) was built for newer iOS version (9.0) than being linked (6.0)

                    ld: warning: object file (/Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(GTLGamesMetagameConfig.o)) was built for newer iOS version (9.0) than being linked (6.0)

                    ld: warning: object file (/Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(GTLGamesNetworkDiagnostics.o)) was built for newer iOS version (9.0) than being linked (6.0)

duplicate symbol _aes_decrypt in:

                        /Users/admin/Desktop/Descendants Of Earth.app/.build/CoronaProvider.ads.vungle/libads-vungle.a(aescrypt.o)

                        /Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(libgpg.a-armv7-master.o)

                    duplicate symbol _aes_encrypt in:

                        /Users/admin/Desktop/Descendants Of Earth.app/.build/CoronaProvider.ads.vungle/libads-vungle.a(aescrypt.o)

                        /Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(libgpg.a-armv7-master.o)

                    duplicate symbol _sha1 in:

                        /Users/admin/Desktop/Descendants Of Earth.app/.build/CoronaProvider.ads.vungle/libads-vungle.a(sha1.o)

                        /Users/admin/Desktop/Descendants Of Earth.app/.build/plugin.gpgs/libgpg.a(libgpg.a-armv7-master.o)

                    ld: 3 duplicate symbols for architecture armv7

                    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Below is my build.settings:

settings =

{

plugins =

{

[“CoronaProvider.ads.vungle”] = { publisherId = “com.vungle” },

[“plugin.google.iap.v3”] = { publisherId = “com.coronalabs”, supportedPlatforms = { android=true } },

[“plugin.gpgs”] = { publisherId = “com.coronalabs” }

},

orientation =

{

default = “landscapeRight”, supported = {“landscapeLeft”, “landscapeRight”}

},

iphone =

{

plist =

{

NSAppTransportSecurity = NSAllowsArbitraryLoads = true,  },

UIPrerenderedIcon = true,

UIStatusBarHidden = true,

UIApplicationExitsOnSuspend = false,

googlePlayGamesAppId = " ********* 952-anjc33g08m03qm4sm5i7qslo********.apps.googleusercontent.com",

CFBundleURLTypes = {

{CFBundleURLSchemes = {“com.googleusercontent.apps. ********* 952-anjc33g08m03qm4sm5i7qslo********”}},

{CFBundleURLSchemes = {“com.coronalabs.gpgs”}}

},

CFBundleIconFile = “Icon.png”,

CFBundleIconFiles = {

“Icon.png”,

“Icon@2x.png”,

“Icon-60.png”,

“Icon-60@2x.png”,

“Icon-60@3x.png”,

“Icon-72.png”,

“Icon-72@2x.png”,

“Icon-76.png”,

“Icon-76@2x.png”,

“Icon-167.png”,

“Icon-Small-40.png”,

“Icon-Small-40@2x.png”,

“Icon-Small-40@3x.png”,

“Icon-Small-50.png”,

“Icon-Small-50@2x.png”,

“Icon-Small.png”,

“Icon-Small@2x.png”,

“Icon-Small@3x.png”

},

CFBundleDisplayName = “DOE”,

UIAppFonts = { “doelight.ttf”, “doeregular.ttf”, “doebold.ttf” }

},

components = {}

},

android =

    {

    googlePlayGamesAppId = “*********952”,

        versionCode = “80”,

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.WRITE_EXTERNAL_STORAGE”,

            “android.permission.ACCESS_NETWORK_STATE”,

            “com.android.vending.CHECK_LICENSE”,

            “com.android.vending.BILLING”,

        },__     

    }

}

Thanks for finding that, will fix tomorrow.

Fixed. Please try.

I see the latest build 2989 can only build for IOS SDK 10.1 and now requires xCode 8.1? So this means everyone needs to update their mac OSX to at least version 10.11.5? Is it not possible to keep support for older versions of IOS SDK each time you fix a crucial bug?

Ok it builds for IOS now. Looking forward to some actual documentation on implementing gpgs soon (both for android/ios). You guys mentioned gpgps is still backwards compatible, meaning i can still use all the previous game network.request coding used for the legacy version?

Taking into consideration that I put local gameNetwork = require( “plugin.gpgs” ) at the start of main.lua, so for example:

gameNetwork.request( “loadLocalPlayer”, { listener=loadLocalPlayerCallback } )

can that remain? Or does it have to change to something like:

gameNetwork.players.load( { source=“connected”, listener=loadLocalPlayerCallback } )

And what values does that return? The same as the legacy:

event.data.playerID, event.data.alias 

or something completely different?

This is what I mean by more documentation required (we don’t need sample apps , just simply more detailed documentation), otherwise I don’t see how anyone can even figure out how to use gpgs without wasting many many hours of trial and error.

jacques1, legacy support supports legacy code so you don’t have to modify your gameNetwork.* code. So the old code can stay as is.

Somehow doesn’t work.

local gameNetwork = require( “plugin.gpgs” )

local function initCallback( event )

    if not event.isError then

         print(“event.type:”…tostring(event.type)…", event.data:"…tostring(event.data))

         if event.type == “init” then

             gameNetwork.request(“login”, {userInitiated = true, listener = initCallback})

         else if event.type == “login” then

            gameNetwork.request( “loadLocalPlayer”, { listener=loadLocalPlayerCallback } )

         end

    else

          print(“Error, unable to log in”)

    end

end

gameNetwork.init( “google”, initCallback )

If I use existing code above for both android and IOS it doesn’t even go to initCallback when testing on IOS device:

If i use code below it goes to initCallback but returns nil for both event.type and event.data when testing on IOS device:

gameNetwork.init( initCallback )

jacques1, do you still have the issue using the legacy API in the new plugin?

Hi Lerg, I gave up on using the new gpgs, as its more hassle then its worth. I will wait until there’s some proper documentation for it.

Thanks for finding that, will fix tomorrow.

Fixed. Please try.

I see the latest build 2989 can only build for IOS SDK 10.1 and now requires xCode 8.1? So this means everyone needs to update their mac OSX to at least version 10.11.5? Is it not possible to keep support for older versions of IOS SDK each time you fix a crucial bug?

Ok it builds for IOS now. Looking forward to some actual documentation on implementing gpgs soon (both for android/ios). You guys mentioned gpgps is still backwards compatible, meaning i can still use all the previous game network.request coding used for the legacy version?

Taking into consideration that I put local gameNetwork = require( “plugin.gpgs” ) at the start of main.lua, so for example:

gameNetwork.request( “loadLocalPlayer”, { listener=loadLocalPlayerCallback } )

can that remain? Or does it have to change to something like:

gameNetwork.players.load( { source=“connected”, listener=loadLocalPlayerCallback } )

And what values does that return? The same as the legacy:

event.data.playerID, event.data.alias 

or something completely different?

This is what I mean by more documentation required (we don’t need sample apps , just simply more detailed documentation), otherwise I don’t see how anyone can even figure out how to use gpgs without wasting many many hours of trial and error.

jacques1, legacy support supports legacy code so you don’t have to modify your gameNetwork.* code. So the old code can stay as is.

Somehow doesn’t work.

local gameNetwork = require( “plugin.gpgs” )

local function initCallback( event )

    if not event.isError then

         print(“event.type:”…tostring(event.type)…", event.data:"…tostring(event.data))

         if event.type == “init” then

             gameNetwork.request(“login”, {userInitiated = true, listener = initCallback})

         else if event.type == “login” then

            gameNetwork.request( “loadLocalPlayer”, { listener=loadLocalPlayerCallback } )

         end

    else

          print(“Error, unable to log in”)

    end

end

gameNetwork.init( “google”, initCallback )

If I use existing code above for both android and IOS it doesn’t even go to initCallback when testing on IOS device:

If i use code below it goes to initCallback but returns nil for both event.type and event.data when testing on IOS device:

gameNetwork.init( initCallback )

jacques1, do you still have the issue using the legacy API in the new plugin?

Hi Lerg, I gave up on using the new gpgs, as its more hassle then its worth. I will wait until there’s some proper documentation for it.