iOS SDK Undefined Symbols: BroadcastStreamClient & MPMediaDecoder

When using the latest iOS SDK to setup a project as per the documentation, the following error occurs:

Undefined symbols for architecture x86_64:

OBJC_CLASS$_BroadcastStreamClient”, referenced from:

  objc-class-ref in backendless.a(MediaPublisher.o)

OBJC_CLASS$_MPMediaDecoder”, referenced from:

  objc-class-ref in backendless.a(MediaPlayer.o)

CommLibiOS.a and MediaLibiOS.a are both linked

Ok I can create a new project, add CommLibiOS.a and Backendless.a and it works fine. But if I add any cocoa pods then I get an undefined symbol error on MPMediaDecoder and BroadcastStreamClient. Linking with MediaLibiOS.a does not resolve the issue.

Thanks for clarifying it. Looks like there is an issue with the build referenced in CocoaPods.

The line “Undefined symbols for architecture x86_64:” means that you was building your project target for simulator, but you can execute an app using backendless.mediaService on the device only (arm64, arm7s, arm7 architectures):

http://support.backendless.com/public/attachments/73937976bdf2b53781ba422bda107578.png</img>

73937976bdf2b53781ba422bda107578.png

No that is not the issue at all.

But the line “Undefined symbols for architecture x86_64:” means what? ))

Can you add the same screenshot for device arch?

That is irrelevant. It works fine without cocoa pods, it fails when adding cocoa pods. The issue is the pods settings.

To be clear, Im not even trying to use media services. It attempts to link media services when pods are used.

If you don’t need to use MediaService, but you would like to run the app on simulator, you should change the Build Settings option “Linking” -> “Other Linking Flags” (OTHER_LDFLAGS) to:
“-lCommLibiOS -lbackendless -lsqlite3 -framework SystemConfiguration”

what if i want to use media service and want to run it on simulator?

also i have lots more elements there … which is the one that i actually need to remove? MediaLibiOS?

If you use CocoaPods and you would like to run your app on the simulator, you should change the Build Settings option “Linking” → “Other Linking Flags” (OTHER_LDFLAGS) to:
“-lCommLibiOS -lbackendless -lsqlite3 -framework SystemConfiguration”
You cannot use the Backendless MediaService on simulator - only on the iOS devices.

If you don’t use CocoaPods (i.e. you add the backendless libs manually) - the common rules are:

  1. For building the target for Mac OS X you should include only backendless libs for Mac: libCommLibMac.a and libbackendless-mac.a. You cannot use the Backendless MediaService on Mac OS X.

  2. For building the target for iOS simulator you should include only backendless libs for iOS without media libs: CommLibiOS.a and backendless.a (see on the picture below). You cannot use the Backendless MediaService on simulator - only on the iOS devices.

http://support.backendless.com/public/attachments/38ac8634b9ae6401e1611abe1c54b031.png</img>

  1. For building the target for iOS device, and if you don’t need the Backendless MediaService, you should include only backendless libs for iOS without media libs: CommLibiOS.a and backendless.a (see on the picture above).

  2. For building the target for iOS device, and if you need the Backendless MediaService, you should include all backendless libs for iOS (see on the picture below).

http://support.backendless.com/public/attachments/7cad3389ffa526624cd741fe646c4afd.png</img>