Native linking failed, undefined Objective-C class: SWTableViewCellDelegate

KeithBoyntonKeithBoynton GBMember ✭✭

I've just upgraded to the latest stable build.

Xamarin.iOS
Version: 11.12.0.4 (Visual Studio Community)

Apple Developer Tools
Xcode 9.4 (14160)
Build 9F1027a

And now building for AppStore with Link Framework SDKs Only selected is failing with the following:

MTOUCH: Error MT5211: Native linking failed, undefined Objective-C class: SWTableViewCellDelegate. The symbol '_OBJC_CLASS_$_SWTableViewCellDelegate' could not be found in any of the libraries or frameworks linked with your application.

The relevant build output is the following:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -framework Security -framework MediaPlayer -framework CoreMedia -framework CoreGraphics -framework QuartzCore -framework UIKit -framework Foundation -framework AVFoundation -weak_framework CoreFoundation -weak_framework CFNetwork /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/registrar.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/main.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/MyApp.exe.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/mscorlib.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Mono.Security.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Xml.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/log4net.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Xamarin.iOS.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Core.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Newtonsoft.Json.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Numerics.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Xml.Linq.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Runtime.Serialization.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Microsoft.CSharp.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Data.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Transactions.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Mono.Data.Sqlite.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/taglib-sharp.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/HtmlAgilityPack.Xamarin.iOS.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Json.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/ICSharpCode.SharpZipLib.Portable.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/SendBird.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/websocket-sharp.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/MonoTouch.Dialog-1.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/SWTableViewCell.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Xamarin-Sidebar-Unified.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Splat.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/System.Web.Services.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Microsoft.AppCenter.Analytics.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Microsoft.AppCenter.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Microsoft.AppCenter.iOS.Bindings.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Microsoft.AppCenter.Analytics.iOS.Bindings.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Microsoft.AppCenter.Crashes.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/Microsoft.AppCenter.Crashes.iOS.Bindings.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/arm64/BTProgressHUD.dll.o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/AppCenter.a /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/AppCenterAnalytics.a /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.a /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libxamarin.a -force_load /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/libSWTableViewCell.a -force_load /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/AppCenterCrashes.a -force_load /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libapp.a -lsqlite3 -lc++ -Wl,-pie -arch arm64 -miphoneos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -lz -liconv -o /Users/FlareDesign/Documents/MyApp-ios-application/MyApp.iOS/obj/iPhone/AppStore/mtouch-cache/64/Output/MyApp -u _xamarin_find_protocol_wrapper_type -u _xamarin_get_block_descriptor -u _UIApplicationMain
    Undefined symbols for architecture arm64:
      "_OBJC_CLASS_$_SWTableViewCellDelegate", referenced from:
          objc-class-ref in registrar.o
    ld: symbol(s) not found for architecture arm64
    clang : error : linker command failed with exit code 1 (use -v to see invocation)

Switching to Don't Link doesn't resolve the error and it does run successfully and the SWTableViewCell functionality works fine in debug mode targeted at x86_64.

Best Answer

  • KeithBoyntonKeithBoynton GB ✭✭
    Accepted Answer

    I've resolved this.

    I was using the old Xamarin Components version of SWTableViewCell, switching to the latest Nuget package version 0.3.7.1 resolved it and it now builds successfully.

Answers

  • KeithBoyntonKeithBoynton GBMember ✭✭
    Accepted Answer

    I've resolved this.

    I was using the old Xamarin Components version of SWTableViewCell, switching to the latest Nuget package version 0.3.7.1 resolved it and it now builds successfully.

Sign In or Register to comment.