iOS Simulator Linker Problem

I have no problem in building sample code provided by Corona SDK to iOS simulator.

But when I build my code to iOS simulator. At the end the kit said, 

ld: symbol(s) not found for architecture i386

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

Corona SDK Version: 2015.2802 (Tried other older version. Problem remained.)

Xcode: 7.2 (7C68)

Any clue?

(Attached file contained full compilation error log.)

Can you post your build.settings please?

Rob

[lua]

settings = {

orientation = {

default = “portrait”,

supported = { “portrait”, }

},

iphone = {

plist = {

UIStatusBarHidden = true,

UIPrerenderedIcon = true, – set to false for “shine” overlay

CFBundleDisplayName = “O.C.D.”,

CFBundleName = “O.C.D.”,

UIAppFonts =

            {

                “ocd_light_ex.ttf”,

“bubble.ttf”,

“type_light.ttf”,

“type_bold.ttf”,

            },

–[[UILaunchImages ={

{  – iPhone 4 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 480}”

                },

                {  – iPhone 5 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default-568h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 568}”

                },

                {  – iPad Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default-Portrait”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{768, 1024}”

                },

                {  – iPhone 6 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-667h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{375, 667}”

                {  – iPhone 6 Plus Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-736h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{414, 736}”

                },

                {  – iPad Pro Portrait

                    [“UILaunchImageMinimumOSVersion”] = “9.0”,

                    [“UILaunchImageName”] = “Default-Portrait-1336”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{1024, 1366}”

                },

},–]]

            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-Small.png”, 

“Icon-Small@2x.png”,

“Icon-Small@3x.png”,

“Icon-Small-40.png”,

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

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

“Icon-Small-50.png”, 

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

},

FacebookAppID = “457988257718163”,  --replace XXXXXXXXXX with your Facebook App ID

            CFBundleURLTypes =

            {

                { CFBundleURLSchemes = { “fb457988257718163”, } }  --replace XXXXXXXXXX with your Facebook App ID

            },

            [“URL types”] =

            {

                item =

                {

                    [“URL Schemes”] = { [“Item 0”] = “fb457988257718163” },  --replace XXXXXXXXXX with your Facebook App ID

                },

            },

            – Whitelist Facebook Servers for Network Requests

            NSAppTransportSecurity = 

            {

                NSExceptionDomains = 

                {

                    [“fbcdn.net”] = 

                    {

                        NSIncludesSubdomains = true,

                        NSExceptionRequiresForwardSecrecy = false,

                    },

                    [“facebook.com”] = 

                    {

                        NSIncludesSubdomains = true,

                        NSExceptionRequiresForwardSecrecy = false,

                    },

                    [“akamaihd.net”] = 

                    {

                        NSIncludesSubdomains = true,

                        NSExceptionRequiresForwardSecrecy = false,

                    },

                },

            },

            – Whitelist Facebook Apps

            LSApplicationQueriesSchemes = 

            {

                “fb”,

                “fbapi20130214”,

                “fbapi20130410”,

                “fbapi20140410”,

                “fbapi20140116”,

                “fbapi20150313”,

                “fbapi20150629”,

                “fbauth”,

                “fbauth2”,

                “fb-messenger-api20140430”,

            },

            CFBundleShortVersionString = “2.5”,

            CFBundleVersion = “2.5”,

MinimumOSVersion = “7.0”,

}

},

– Android permissions

android =

    {

versionCode = “17”,

allowAppsReadOnlyAccessToFiles = false,

minSdkVersion = “10”,

        supportsScreens =

        {

            smallScreens  = true,

            normalScreens = true,

            largeScreens  = true,

            xlargeScreens = true,

        },

        facebookAppId = “457988257718163”,

    },

androidPermissions = {

  “android.permission.INTERNET”,

  “com.android.vending.BILLING”,

  },

plugins =

    {

        [“plugin.google.iap.v3”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        },

        [“facebook”] = {

publisherId = “com.coronalabs”

},

    },

}

[/lua]

I’m seeing this issue in 2795 as well.  Also using Xcode 72 on Mac OS X 10.10.5 - if you want my console log and build settings let me know.

@chris.matchlock I don’t see anything immediately in your build.settings that would cause this except possibly the facebook plugin. You have to use the V4 version of the plugin if you’re going to build with iOS 9.

But while looking at your build.settings, you really should not put in things that can be gotten from the build dialog screen. You will run into problems with your hard coded version values (CFBundleVersionShortString, CFBundleVersion, VersionCode. If the value can come from the dialog, you should use it.

Try using the V4 facebook plugin.

@tschussler are you using Enterprise or SDK builds? If SDK, yes seeing your build.settings and your complete console log would be helpful.

Rob

@robmiracle Yes, using SDK build.  I’ll grab the console log and build.settings and attach them here.
 
BTW last night I tried to roll back to SDK 2761 which was the first release to support iOS 9.1 iirc and I saw the same problem.
 
I have attached a fresh console dump and build.settings.

Bump - any progress on this?

Checking

Engineering thinks this may be using the Facebook plugin which is not compatible with iOS 9. You must use the Facebook V4 plugin.

Rob

@robmiracle That’s interesting because we are definitely not using the Facebook plug-in.

Dear tschussier,

  Rob might mixed up that you are my case. I think you should start on another post for this case.

Dear tschussier,

  Rob might mixed up that you are my case. I think you should start on another post for this case.

@tschussier perhaps you should try commenting out your plugins one at a time. Are you building for iOS, tvOS or Android (or a desktop platform?)

@robmiracle We were building to iOS Simulator.  We can build to iOS .ipa with no problem - in fact the app has been since submitted to Apple.  The issue is that we are unable to run the app in the iOS Simulator to test some device specific items because the build process fails.  We are able to build .ipas, onboard them to TestFlight and then load them onto the devices but clearly for testing that is a relatively arduous process compared to just building to the iOS Simulator.

We are able to use the iOS Simulator for other platforms - our configuration is all relatively current stuff as noted at the top of the thread.

Of course, I can try to comment out plug-ins one at a time to see what the issue is.  I’m wondering if the use of particle effects is relevant here.  This is the first of our Corona apps to use them.

Hi @tschussler,

I have just tried building for simulator (Xcode 7.2/ iOS 9.2) and am getting the same error/s. I have tried commenting out each plugin in a blank project so I have no dependancies but the error is happening for all plugins. Did you ever find a solution to this?

Simon

UPDATE:

I found the culprit 

If i comment out MinimumOSVersion = “7.0” in the build.settings it works/builds perfectly for the Xcode sim, it seems my specific error wasn’t a plugin issue after all. I just need to look at why I cannot specify a min iOS version now.

It may caused by the exact iOS Simulator SDKs you have installed.  You can find out which SDKs you have with the command:

xcrun --show-sdk-version --sdk iphonesimulator

Also, since you’re using plugins, the version of the SDK their underlying libraries were built against may also matter (and may be outside our control in the case of Facebook and Google IAP).

Hey Perry,

I just ran the above command and it is specifying that I am using version 9,2 of the simulator. So what you are saying is that because some of the plugins I use do not support the min version iOS 7 then this is why the simulator build might be failing? Thats interesting because I can build to a device running 9.2 with the min compatibility line included no issues at all. I will keep investigating.

That worked for me.

Thanks

Can you post your build.settings please?

Rob

[lua]

settings = {

orientation = {

default = “portrait”,

supported = { “portrait”, }

},

iphone = {

plist = {

UIStatusBarHidden = true,

UIPrerenderedIcon = true, – set to false for “shine” overlay

CFBundleDisplayName = “O.C.D.”,

CFBundleName = “O.C.D.”,

UIAppFonts =

            {

                “ocd_light_ex.ttf”,

“bubble.ttf”,

“type_light.ttf”,

“type_bold.ttf”,

            },

–[[UILaunchImages ={

{  – iPhone 4 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 480}”

                },

                {  – iPhone 5 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default-568h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 568}”

                },

                {  – iPad Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default-Portrait”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{768, 1024}”

                },

                {  – iPhone 6 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-667h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{375, 667}”

                {  – iPhone 6 Plus Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-736h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{414, 736}”

                },

                {  – iPad Pro Portrait

                    [“UILaunchImageMinimumOSVersion”] = “9.0”,

                    [“UILaunchImageName”] = “Default-Portrait-1336”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{1024, 1366}”

                },

},–]]

            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-Small.png”, 

“Icon-Small@2x.png”,

“Icon-Small@3x.png”,

“Icon-Small-40.png”,

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

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

“Icon-Small-50.png”, 

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

},

FacebookAppID = “457988257718163”,  --replace XXXXXXXXXX with your Facebook App ID

            CFBundleURLTypes =

            {

                { CFBundleURLSchemes = { “fb457988257718163”, } }  --replace XXXXXXXXXX with your Facebook App ID

            },

            [“URL types”] =

            {

                item =

                {

                    [“URL Schemes”] = { [“Item 0”] = “fb457988257718163” },  --replace XXXXXXXXXX with your Facebook App ID

                },

            },

            – Whitelist Facebook Servers for Network Requests

            NSAppTransportSecurity = 

            {

                NSExceptionDomains = 

                {

                    [“fbcdn.net”] = 

                    {

                        NSIncludesSubdomains = true,

                        NSExceptionRequiresForwardSecrecy = false,

                    },

                    [“facebook.com”] = 

                    {

                        NSIncludesSubdomains = true,

                        NSExceptionRequiresForwardSecrecy = false,

                    },

                    [“akamaihd.net”] = 

                    {

                        NSIncludesSubdomains = true,

                        NSExceptionRequiresForwardSecrecy = false,

                    },

                },

            },

            – Whitelist Facebook Apps

            LSApplicationQueriesSchemes = 

            {

                “fb”,

                “fbapi20130214”,

                “fbapi20130410”,

                “fbapi20140410”,

                “fbapi20140116”,

                “fbapi20150313”,

                “fbapi20150629”,

                “fbauth”,

                “fbauth2”,

                “fb-messenger-api20140430”,

            },

            CFBundleShortVersionString = “2.5”,

            CFBundleVersion = “2.5”,

MinimumOSVersion = “7.0”,

}

},

– Android permissions

android =

    {

versionCode = “17”,

allowAppsReadOnlyAccessToFiles = false,

minSdkVersion = “10”,

        supportsScreens =

        {

            smallScreens  = true,

            normalScreens = true,

            largeScreens  = true,

            xlargeScreens = true,

        },

        facebookAppId = “457988257718163”,

    },

androidPermissions = {

  “android.permission.INTERNET”,

  “com.android.vending.BILLING”,

  },

plugins =

    {

        [“plugin.google.iap.v3”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        },

        [“facebook”] = {

publisherId = “com.coronalabs”

},

    },

}

[/lua]