Moving to DM SDK 3.X

Integrating DM SDK 3 to a DM SDK 2.X Project

DM SDK is now available as a redistributable XCFramework instead of a framework. Developers will need to reconfigure their projects.

Removing DM SDK 2.x

The first step in moving to DM SDK 3.x is to remove DM SDK 2.x from your project. Uninstall DM SDK 2.x Guide details how to remove DM SDK 2.x from your project.

In previous versions of DM SDK, a build script phase was required to strip out the iOS Simulator version of DM SDK, otherwise the host application might be rejected from the App Store. This step is no longer necessary and can be removed. Xcode will automatically strip out unrelated architectures in an xcframework.

Adding DM SDK 3

Refer to the Installation Guide to add the DM SDK 3 framework, necessary dependencies, and your API Key to your project.


DM SDK is now initialized with an API Key. See the installation guide for more information on how to initialize DM SDK with your API Key.

In previous versions of DM SDK, a Resolver was initialized with a Digimarc provided username and password. In DM SDK 3, the developer now provides an API Key which will be used for authentication with a Resolver service, in addition to trial and commercial licensing.

Custom service URLs have also been removed. If your application was using a custom resolver URL, that functionality will now be provided as part of your API Key. Contact Digimarc for more information.

Beta - DM SDK is Now Provided as a XCFramework, With Support For More Apple Platforms

DM SDK 3 is now provided as an XCFramework, which is Apple’s preferred packaging for framework distribution. This makes it easier for developers to build DM SDK enabled applications using tools like Swift UI or Catalyst for multiple devices. Existing frameworks like UIKit and AppKit are also supported.

The following platforms are supported:

  • iOS/iPad OS (and simulator)
  • macOS
  • Mac Catalyst
  • watchOS (and simulator)
  • tvOS (and simulator)

See the DM SDK requirements for more information.

The addition platforms have increased the file size of the DM SDK developer package. Xcode will automatically strip out any platforms not used by your build, so these additional platforms will not increase the size of your existing application once built. We’ve found that DM SDK only adds several megabytes to an application’s size on disk.

Digimarc Barcode for Print and Product Packaging detection works best with an autofocus capable 1080p camera or better. We are still evaluating support for this feature with devices such as built in MacBook cameras. Built in cameras on iOS devices are still fully supported.

We’d like to know more about how developers are using DM SDK on platforms beyond iOS. Contact Digimarc with any questions or feedback on this feature.

Failable initializers

Some classes have been changed so their initializers now provide an error. This now provides feedback if a set of options or an API key are not compatible. The following classes have had their initializers changed to return/throw errors.

  • DMSImageReader
  • DMSVideoCaptureReader
  • DMSAudioReader
  • DMSAudioCaptureReader
  • DMSResolver

These initializers follow standard NSError convention in Obj-C, and are throwable in Swift.

Payload Representation Changes

Representations values are now provided as a best-fit type and are no longer always strings. For examples, dates are now provided as Date/NSDate, and weights are now provided as numbers. See the documentation on Representation types for more information.

The GS1 Application Identifier Representations have been renamed in DM SDK 3. Check the PayloadRepresentationType documentation for more details.

DMSPayloadRepresentationTypeAmountPayable DMSPayloadRepresentationTypeGS1AIAmountPayable
DMSPayloadRepresentationTypeWeightInPounds DMSPayloadRepresentationTypeGS1AIWeightInPounds
DMSPayloadRepresentationTypeWeightInKilograms DMSPayloadRepresentationTypeGS1AIWeightInKilograms
DMSPayloadRepresentationTypeCount DMSPayloadRepresentationTypeGS1AICount
DMSPayloadRepresentationTypeSellByDate DMSPayloadRepresentationTypeGS1AISellByDate

GS1 Data String Parsing

Parsing of GS1 Data Strings was provided by a Databar Parser class in DM SDK 2. This class has been removed in SDK 3. GS1 conforming data can now be retrieved through a Payload’s GS1Attributes property. This property is a dictionary that is keyed by GS1 AIs as strings.

The values in this dictionary are strings that conform to the GS1 encoding for their AI. Unlike representations, these values will not be parsed, and are ideal for applications that work best with standard GS1 data and types.

Options Parameters Now Required

Option dictionary parameters are no longer optional. Include an options dictionary where required. However, if no options are needed, pass an empty dictionary. In Swift, the options parameter can be omitted instead of passing an empty dictionary.