Skip to content

Releases

5.0.0.1

Choose a tag to compare

@github-actions github-actions released this 29 Nov 06:12
ac5f8c9

What's changed

Re-pins the façade onto the current generation of both native cores, and makes iOS
initialization wait for the SDK instead of a clock.

Native Binding package
iOS SFMCSDK 5.0.0 (was 4.0.1) SFMCSDK.Net.iOS 5.0.0.1 (was 4.0.1.2)
Android sfmcsdk 3.3.0 (was 3.1.1) SFMCSDK.Net.Android 3.3.0.1 (was 3.1.1.1)

Both stay pinned exactly. Target frameworks (net8.0, net9.0, net10.0, each with its
-android and -ios head) and the floors (iOS 12.2, Android API 26) are unchanged. The façade's
public API is unchanged: a reflection diff against 4.0.1.2 finds no member added or removed on any
target framework.

Breaking changes

  • This generation pairs with MobilePush 12. The iOS core enforces it: SFMCSdk.State on 5.0.0
    accepts the MobilePush module only in the 12.0.0 - 12.9.9 range, and native MobilePush 12.0.0
    in turn needs sfmcsdk 3.3.0 and SFMCSDK 5.0.0. An app that also references the MobilePush
    bindings directly stays on
    SFMCSDK.Net 4.0.1.2 until it
    moves to their 12.x packages. On iOS NuGet refuses the mix, because MarketingCloudSDK.Net.iOS
    11.0.2.x pins the core exactly; on Android it does not, because MarketingCloudSDK.Net.Android
    11.0.1.x only sets a minimum, so it would restore sfmcsdk 3.3.0 under MobilePush 11, a pairing
    nobody has run. Apps on the MarketingCloudSDK.Net
    umbrella are not affected: its current release, 11.0.2.3, pins this package at exactly 4.0.1.2.
  • On iOS, InitializeAsync now fails when the SDK does not initialize. It used to call
    initializeSdk without a completion, wait a fixed two seconds and report success whatever had
    happened. It now awaits the completion and throws TimeoutException after
    SfmcSdkOptions.InitializationTimeout (30 seconds by default) when none arrives. The case
    where none arrives is an app without keychain access, and in practice that is a simulator build
    with no entitlements; see the next section. Such an app used to see IsInitialized == true on
    an SDK that was not running.
  • Changes in the raw namespaces. The bindings underneath arrive with this package, so their own
    breaks reach code that uses SFMCSDK or Com.Salesforce.Marketingcloud.Sfmcsdk directly. On iOS:
    SFMCSdkEventCategory.FlushEvents is 7 (was 6), ISFMCSdkInAppMessageDetails has two more
    required members, four enums gained cases, and 26 parameterless constructors that could only abort
    the process are removed. On Android: IImageCacheApi gained Evict, which matters only to code
    that implements it. The platform release notes linked above have the details. Code that goes
    through the façade alone needs no change.

Fixed

  • iOS initialization waits for the SDK. InitializeAsync used to report success after two
    seconds without asking the SDK, on the belief that with no modules configured initializeSdk's
    completion never fires. That belief was wrong. The completion reports one status per configured
    module, so here it reports none, but it does fire: once, a few milliseconds after the call,
    measured on SFMCSDK 4.0.1 and 5.0.0. What had looked like an SDK quirk was the keychain. The SDK
    keeps its keys there and, refused it, neither initializes nor reports, and a simulator app
    without entitlements is refused (errSecMissingEntitlement, -34018). The .NET 8 and .NET 9 iOS
    workloads build simulator apps that way, while the .NET 10 workload embeds simulated entitlements,
    which is why the behaviour seemed to depend on the target framework. InitializeAsync on iOS now
    returns in milliseconds instead of two seconds, IsInitialized means the SDK reported, and the
    timeout message names the keychain. A device build is signed with a provisioning profile and has
    keychain access. For a simulator build, the
    README shows the one entitlement to add.
    The README, the XML documentation and the code comments no longer repeat the wrong explanation.
  • An InitializationTimeout longer than int.MaxValue milliseconds (about 24.8 days, so
    TimeSpan.MaxValue included) is refused with ArgumentOutOfRangeException before the one-shot
    initialization is claimed. The wait runs on a CancellationTokenSource timer, which cannot hold
    more. On Android such a value used to fail inside the platform call with the one initialization
    already spent; on iOS the timeout was ignored before, so such a value now throws there.
  • The sample app and the device tests carry that entitlement, for simulator runtime identifiers
    only. The iOS device tests check the keychain before anything else and record how long
    InitializeAsync took, and both heads now check IsInitialized before and after it. The sample
    also writes its log lines to stdout, so a run can be checked from logcat or the simulator console.

Build

  • The Android CI jobs (emulator checks, sample, Release link check) set up Temurin JDK 17
    themselves. ubuntu-latest is now Ubuntu 26.04, whose default JDK 25 no .NET for Android band
    accepts. The .NET 8 band then falls back to JDK 11, which cannot read the sfmcsdk .aar (Java 17
    bytecode) and fails with JAVAC0000 … wrong version 61.0, should be 55.0, as the same leg did in
    SFMCSDK.Net.Android. An app on net8.0-android34.0 can hit the same error; the README's
    Troubleshooting says how to build it with JDK 17.

Tested

Locally, with Xcode 26.0.1 and .NET 8.0.427, 9.0.320 and 10.0.403, against the packed package and
the two binding packages from nuget.org:

  • the unit tests on the neutral build and the package tests on the packed .nupkg (target
    frameworks, exact pins, licence, symbols);
  • the device checks on an iPhone 17 Pro simulator (iOS 26.5) on net8.0-ios18.0,
    net9.0-ios18.0 and net10.0-ios26.0: the keychain is usable, InitializeAsync completes in
    about 20 ms, IsInitialized follows it, the SDK reports 5.0.0, identity and tracking reach
    native code, and the one-shot guard holds;
  • the same build without the entitlement, as a negative control: the keychain answers -34018 and
    InitializeAsync throws TimeoutException naming the keychain, where 4.0.1.2 would have
    reported success;
  • the device checks on an Android 15 (API 35) emulator on net8.0-android34.0,
    net9.0-android35.0 and net10.0-android36.0: InitializeAsync completes in 120 to 190 ms,
    the state is READY and the SDK logs version 3.3.0;
  • the MAUI sample on both heads (net10.0-android36.0 on the emulator, net10.0-ios26.0 on the
    simulator): initialization, a profile id and custom events, with the app kept in use on Android
    for over a minute;
  • the simulator entitlement's scope: a simulator build without -r gets it, while a device
    publish without -r and an ios-arm64 build do not.

Not tested here: a real device, a MobilePush module of either generation loaded against this core,
and a tenant, since the device checks and the sample use no credentials by design.

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

Packages

Built against SFMCSDK.Net.iOS 5.0.0.1 and SFMCSDK.Net.Android 3.3.0.1 — SFMCSDK 5.0.0 on iOS and sfmcsdk 3.3.0 on Android.

The version names the iOS line, because Salesforce releases the two native
SDKs on separate cadences and they never share a version number. The fourth
component is this repository's own revision.

Package Target frameworks NuGet
SFMCSDK.Net net8.0, net8.0-android34.0, net8.0-ios18.0, net9.0, net9.0-android35.0, net9.0-ios18.0, net10.0, net10.0-android36.0, net10.0-ios26.0 5.0.0.1
dotnet add package SFMCSDK.Net --version 5.0.0.1

Licensing

The code in this repository is MIT, and that is the whole package. It depends
on SFMCSDK.Net.Android and SFMCSDK.Net.iOS, whose packages ship native SFMC
SDK artifacts built by Salesforce; each of those declares
MIT AND BSD-3-Clause and ships both texts under licenses/.

4.0.1.2

Choose a tag to compare

@github-actions github-actions released this 30 Jul 15:58
d858679

What's changed

A façade-only revision on the same native line: SFMCSDK stays 4.0.1 on iOS and sfmcsdk 3.1.1
on Android, and the pinned bindings are unchanged (SFMCSDK.Net.iOS 4.0.1.2,
SFMCSDK.Net.Android 3.1.1.1).

Added

  • IsSupported and IsInitialized on ISfmcSdkClient — the two members that answer on every
    target framework instead of throwing, so shared code has something to branch on. Previously the
    only readback was DiagnosticState, which the docs forbid parsing and which throws on the neutral
    heads, so "is it up yet?" could not be answered from shared code at all. Neither is the one-shot
    guard: after a failed initialization IsInitialized stays false while the guard stays claimed.
  • NullSfmcSdkClient — the no-op implementation the README used to tell consumers to write
    themselves, for MAUI heads with no SDK and for tests. Its argument validation mirrors the real
    façade member for member, so it hides platforms without hiding caller bugs.
  • build/RepinPackages.sh — the re-pin helper the upstream-drift issue template has been
    pointing at under a name that did not exist (BumpNativeVersion.sh). It rewrites the props and
    reports what the README still owes, leaving CheckReadmeVersions.sh as the gate.

Documentation

  • The MAUI target-framework guidance said "target net9 or net10" and then explained that MAUI 9
    cannot work — it is net10 for an Android head, net8/net9 fine for an iOS-only app.
  • Stated the relationship with MarketingCloudSDK.Net in both directions: an app using MobilePush
    needs only that package, and must never call this package's InitializeAsync, because the
    MobilePush façade already configures the core with its module attached.
  • Added the stale-artifacts/ troubleshooting entry: a locally packed nupkg keeps being resolved
    under a version that also exists on nuget.org, and the NuGet global-packages cache spreads it to
    every sibling repository.

Upgrading

Source-compatible for consumers. Implementers of ISfmcSdkClient — a hand-written test fake — must
add IsSupported and IsInitialized, or switch to NullSfmcSdkClient.

Full changelog: v4.0.1.1...v4.0.1.2

Packages

Built against SFMCSDK.Net.iOS 4.0.1.2 and SFMCSDK.Net.Android 3.1.1.1 — SFMCSDK 4.0.1 on iOS and sfmcsdk 3.1.1 on Android.

The version names the iOS line, because Salesforce releases the two native
SDKs on separate cadences and they never share a version number. The fourth
component is this repository's own revision.

Package Target frameworks NuGet
SFMCSDK.Net net8.0, net8.0-android34.0, net8.0-ios18.0, net9.0, net9.0-android35.0, net9.0-ios18.0, net10.0, net10.0-android36.0, net10.0-ios26.0 4.0.1.2
dotnet add package SFMCSDK.Net --version 4.0.1.2

Licensing

The code in this repository is MIT, and that is the whole package. It depends
on SFMCSDK.Net.Android and SFMCSDK.Net.iOS, whose packages ship native SFMC
SDK artifacts built by Salesforce; each of those declares
MIT AND BSD-3-Clause and ships both texts under licenses/.

4.0.1.1

Choose a tag to compare

@github-actions github-actions released this 30 Jul 09:03
cc9d066

What's changed

First release of the cross-platform façade over the SFMC SDK core bindings.

  • One API on both platforms: SfmcSdkClient with awaitable InitializeAsync, Identity
    (profile id / contact key, string attributes) and TrackCustomEvent, over
    SFMCSDK.Net.Android 3.1.1.1
    and SFMCSDK.Net.iOS 4.0.1.2,
    pinned exactly. The version names the iOS line (SFMCSDK 4.0.1); the Android side is sfmcsdk 3.1.1.
  • The platform asymmetries are absorbed, not papered over: Android's configure callback
    becomes an await with an options-driven timeout linked to the caller's CancellationToken;
    iOS completes after the state machine settles, because with zero modules configured its
    completion block never fires - measured upstream behaviour, encoded in the binding
    repository's device tests and documented in Platforms/Apple.
  • Sharp edges filed off: a custom event name the native SDK rejects throws
    ArgumentException on both platforms (raw Android returns null and drops the event; raw iOS
    returns nil), and a second InitializeAsync throws the one-shot guard instead of racing a
    native configure that upstream forbids repeating.
  • Nine target frameworks - net8.0, net9.0, net10.0, each with -android and -ios
    heads. The plain assets restore anywhere and throw PlatformNotSupportedException naming the
    platform heads, so shared class libraries, unit tests and a MAUI app's Windows head reference
    the package with no conditionals.
  • Nothing is hidden: the raw namespaces Com.Salesforce.Marketingcloud.Sfmcsdk and
    SFMCSDK arrive with the package on their platform - module configuration (MobilePush and
    friends), consent, the event bus and the rest stay one using away.
  • Licence is plain MIT: this package ships no native binaries; Salesforce's BSD-3-Clause
    arrives with the binding packages, each of which declares and packs both texts.

Packages

Built against SFMCSDK.Net.iOS 4.0.1.2 and SFMCSDK.Net.Android 3.1.1.1 — SFMCSDK 4.0.1 on iOS and sfmcsdk 3.1.1 on Android.

The version names the iOS line, because Salesforce releases the two native
SDKs on separate cadences and they never share a version number. The fourth
component is this repository's own revision.

Package Target frameworks NuGet
SFMCSDK.Net net8.0, net8.0-android34.0, net8.0-ios18.0, net9.0, net9.0-android35.0, net9.0-ios18.0, net10.0, net10.0-android36.0, net10.0-ios26.0 4.0.1.1
dotnet add package SFMCSDK.Net --version 4.0.1.1

Licensing

The code in this repository is MIT, and that is the whole package. It depends
on SFMCSDK.Net.Android and SFMCSDK.Net.iOS, whose packages ship native SFMC
SDK artifacts built by Salesforce; each of those declares
MIT AND BSD-3-Clause and ships both texts under licenses/.