Skip to content

5.0.0.1

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 19:32
· 2 commits to main since this release
8e0940a

What's changed

Binds SFMCSDK 5.0.0 (was 4.0.1), a major release of the native core. It brings the Inbox
feature and pairs with MobilePush 12. Target frameworks (net8.0-ios18.0, net9.0-ios18.0,
net10.0-ios26.0) and the iOS floor (12.2) are unchanged. No .NET member was renamed, and the
only members removed are 26 parameterless constructors that could not be called without
aborting the process.

Salesforce published no release notes for 5.0.0, and its v4 and v5 tags share no git history, so
everything below comes from the shipped framework: the SFMCSDK-Swift.h diff, ported by hand
and checked selector by selector in both directions, the framework's Info.plist and linked
libraries, and what the SDK does on a simulator.

Breaking changes

  • Needs MobilePush 12. The core accepts only the module generation it shipped with:
    SFMCSdk.State on 5.0.0 gives 12.0.0 - 12.9.9 as the range for the engagement (MobilePush)
    module, where 4.0.1 gave 11.0.0 - 11.9.9. Native MobilePush 12.0.0 in turn requires
    SFMCSDK 5.0.0 or newer. Use this package with
    MarketingCloudSDK.Net.iOS 12.x, and
    stay on 4.0.1.2 while you
    are on MobilePush 11. The other ranges moved too: push feature 3.x (was 2.x), in-app messaging
    feature 2.x (was 1.x), mobile app messaging 3.x (was 2.x); the new inbox feature is 1.x.

  • SFMCSdkEventCategory.FlushEvents is 7, not 6. The new InboxFeature case took 6. Code
    compiled against 4.0.1.x has the old constant baked in, so recompile; and don't compare the
    category against a number you stored earlier.

  • ISFMCSdkInAppMessageDetails has two more required members, MinTimeBetweenDisplay and
    CustomKeys. Reading them from the messages the SDK hands you needs no change. A class of
    your own that implements the interface, or derives from SFMCSdkInAppMessageDetails, has to
    add them.

  • Four enums gained cases, so a switch that lists every case needs a new arm:
    SFMCSdkModuleName.InboxFeature, SFMCSdkMessageProducer.InboxFeature,
    SFMCSdkEventCategory.InboxFeature and SFMCSdkBehaviorType.AppWillResignActive.

  • 26 parameterless constructors are removed. The native header marks init and new
    unavailable on SFMCSdkBehavior and SFMCSdkEngagementEvent, none of the classes below
    declares an init of its own, and the -init they inherit ends in
    swift_stdlib_reportUnimplementedInitializer, which aborts the process. That is true of 4.0.1
    as well as 5.0.0. The binding generated a public new X () for each anyway, and calling it
    could only crash. Code that called one now fails to compile instead of at run time; code that
    runs today is not affected.

    • The 17 cart, order and catalog object events keep their real constructor, the one the
      native class declares, which was bound all along:
      new SFMCSdkAddToCartEvent (lineItem) and new SFMCSdkRemoveFromCartEvent (lineItem);
      new SFMCSdkReplaceCartEvent (lineItems);
      new SFMCSdkPurchaseOrderEvent (order) and likewise SFMCSdkPreorderEvent,
      SFMCSdkCancelOrderEvent, SFMCSdkShipOrderEvent, SFMCSdkDeliverOrderEvent,
      SFMCSdkReturnOrderEvent and SFMCSdkExchangeOrderEvent;
      new SFMCSdkViewCatalogObjectEvent (catalogObject) and likewise
      SFMCSdkViewCatalogObjectDetailEvent, SFMCSdkQuickViewCatalogObjectEvent,
      SFMCSdkFavoriteCatalogObjectEvent, SFMCSdkShareCatalogObjectEvent,
      SFMCSdkReviewCatalogObjectEvent and SFMCSdkCommentCatalogObjectEvent.
    • Their three base classes, SFMCSdkCartEvent, SFMCSdkOrderEvent and
      SFMCSdkCatalogObjectEvent, declare no initializer at all: build one of the events above.
    • Six behaviours, SFMCSdkAppBackgrounded, SFMCSdkAppBecameActive,
      SFMCSdkAppForegrounded, SFMCSdkAppTerminated, SFMCSdkAppVersionChanged and
      SFMCSdkScreenEntry, are created by the SDK for its own behaviour observers. The native
      Objective-C surface has no call that registers an observer, so .NET code neither constructs
      nor receives them today. There is nothing to construct, and there never was.

    A class of your own that derives from one of the events has to call the real base
    constructor, for example : base (lineItem).

Apps that take the core through the SFMCSDK.Net
umbrella cannot move to this package until the umbrella re-pins, because the published
SFMCSDK.Net 4.0.1.2 depends on SFMCSDK.Net.iOS at exactly [4.0.1.2].

New API

  • Inbox. SFMCSdkConfigBuilder.SetInboxFeature; the message model as protocols
    (ISFMCSdkInboxMessage, ISFMCSdkInboxText, ISFMCSdkInboxMedia, ISFMCSdkInboxButton,
    ISFMCSdkInboxAction); SFMCSdkInboxMessageInteraction; the string constants in
    SFMCSdkInboxActionType, SFMCSdkInboxAudienceType and SFMCSdkInboxMediaType; the event
    classes under SFMCSdkInboxEvent and SFMCSdkInboxPrivacyStatusChangeEvent; and
    InboxFeatureProtocol for module authors. The Inbox feature itself is a separate native
    module (InboxFeatureSDK) with no .NET binding yet; this package carries the models and
    events the core shares with it.
  • SFMCSdk.GetStatus (SFMCSdkModuleName) returns one module's status at any time.
  • SFMCSdkURLType names the type strings passed to ISFMCSdkURLHandlingDelegate.HandleURL.
  • SFMCSdkBadgeAggregator, SFMCSdkAppWillResignActive, and SFMCSdk.SetHostRuntime, which
    upstream reserves for its own hybrid wrappers.
  • SFMCSdkInAppMessageCloseAction can now be constructed and read (DismissReason, Id);
    SFMCSdkPrivacyStatusChangeEvent exposes IsBlocked and ShouldDeleteData;
    SFMCSdkInAppPrivacyStatusChangeEvent exposes Source.
  • New enums: SFMCSdkAppState, SFMCSdkBadgeChannel, SFMCInboxAnalyticsType,
    SFMCSdkInboxMessageType, SFMCSdkInboxInteractionType, SFMCSdkInboxDataFailedReason,
    SFMCSdkInboxDataRequestTrigger, SFMCWrapperName.

Behaviour, measured

  • InitializeSdk's completion fires with zero modules. It is called once per call to
    InitializeSdk, a few milliseconds after that call returns, on a background thread, with an
    empty array. The same app, built against the published 4.0.1.2, shows that 4.0.1 does the
    same. The README and the device tests used to say the block never fires in this case. That
    was wrong, and so was putting it down to the SDK: see the next point.
  • Without keychain access the SDK does not initialize, and says nothing. No completion
    block, no identity edits, while SFMCSdk.State still answers. On a simulator, an app with no
    entitlements is refused the keychain (errSecMissingEntitlement, -34018), and the .NET 8 and
    .NET 9 iOS workloads build simulator apps that way; the .NET 10 workload embeds simulated
    entitlements by itself. So the same code initialized on net10.0-ios26.0 and silently did not
    on net8.0-ios18.0 and net9.0-ios18.0. Give a simulator build an Entitlements.plist with
    a keychain-access-groups entry; the
    README has the details and the
    sample
    shows it. A device build is signed with a provisioning profile and is not affected. This is
    not new in 5.0.0, only newly understood.
  • On an initialized SDK, SFMCSdk.Identity.Edit runs its updater before it returns.

Native framework

  • Slices are unchanged (ios-arm64, ios-arm64_x86_64-simulator), and so is the minimum iOS
    version (12.0 in the framework; this package keeps its 12.2 floor).
  • Built by Salesforce against the iOS 26.5 SDK with Swift 6.3.3 (4.0.1: iOS 26.2 SDK, Swift
    6.2.3). The binary now also weak-links libswiftSpatial and libswiftsimd; both come from
    the system and need nothing from an app. The frameworks it links are the same.

Tested

On an iPhone 17 Pro simulator (iOS 26.5), with Xcode 26.0.1:

  • the package tests, on the packed .nupkg;
  • the simulator smoke tests on net8.0-ios18.0, net9.0-ios18.0 and net10.0-ios26.0: the SDK
    reports 5.0.0, the keychain is usable, initialization completes with no module statuses, every
    module reports inactive, Identity.Edit runs its updater, a native FlushEvent and a native
    Inbox event report categories 7 and 6, the new Inbox, privacy and close-action objects are
    built and read back, and each of the 17 cart, order and catalog object events is built through
    its constructor and read back;
  • the sample app on net10.0-ios26.0 and net9.0-ios18.0: initialization, a profile id, a
    custom event.

Not tested here: a real device; MobilePush 11 or 12 loaded against this core (the pairing above
is read from SFMCSdk.State and from upstream's Package.swift, not from a run); and the Inbox
feature with its own module and a tenant.

Full changelog: v4.0.1.2...v5.0.0.1

Packages

Bound against sfmc-sdk-ios 5.0.0, targeting net8.0-ios18.0, net9.0-ios18.0 and net10.0-ios26.0.

The first three components of 5.0.0.1 are the sfmc-sdk-ios version; the fourth is this
repository's binding revision, which advances when the bindings or packaging change while
the native binaries stay put.

Package Wraps NuGet
SFMCSDK.Net.iOS SFMCSDK 5.0.0.1
dotnet add package SFMCSDK.Net.iOS --version 5.0.0.1

Licensing

The binding code is MIT; the bundled native binaries are BSD-3-Clause, as built and
published by Salesforce. Each package ships both texts under licenses/.