DRDifferent Requests
SDK versions

SDK versions

SDK versions, and what breaks moving between them.

Versions are tags on the public package. Pin one with from: and read what changed before you move.

0.16.0: the common changes

Every type the SDK hands you is generated from the same schema as the server's. Most apps change three lines. The full list, eleven changes with before and after, is in the changelog.

// Before
DifferentRequestsHub(
  client: DifferentRequestsClient(appKey: "your-api-key", baseURL: .production),
  appearance: .standard,
  emptyBoard: .standard,
  notificationPermission: .askedBySDK
)

// 0.16.0
DifferentRequestsHub(
  client: DifferentRequestsClient(appKey: "your-api-key", baseURL: SecureBaseURL(service: .production)),
  emptyBoard: EmptyBoard(),
  notificationPermission: .askedBySdk
)
  • Set the color and the font on the dashboard's Appearance page. appearance: is gone, and every user gets the change with no app update.
  • Await heardThatARequestChanged(requestID:) from your notification delegate. An open request and the board read again as soon as a push lands.
  • Switch on error.reason, and read the server's answer from error.apiError.

0.15.0: four changes to make

The screens are redrawn from Apple's Human Interface Guidelines.

// Before
NavigationStack {
  DifferentRequestsView(hub: requests)
}

// 0.15.0
DifferentRequestsView(hub: requests)
  .task {
    await requests.configure()
  }
  • Don't wrap DifferentRequestsView in a NavigationStack. It's a tab bar now, and each tab brings its own.
  • Call configure() when your app launches. Screens wait for it, so a color or a tab never changes after it appears.
  • SubmitRequestView is pushed, not presented, and brings no stack. Push it with .navigationDestination(isPresented:).
  • Use RoadmapView(hub:) and ChangelogView(hub:) where you passed nil for isShowingRequests:.

0.14.0: two changes to make

Two calls changed: creating the client, and signing a user in.

// Before
client: .make(appKey: "your-api-key")

// 0.14.0
client: DifferentRequestsClient(appKey: "your-api-key", baseURL: .production)

make(appKey:), make(appKey:baseURL:) and init(appKey:baseURL:session:) are gone. Pass .production, or your own SecureBaseURL for staging. The client keeps its own URLSession.

// Before
try await requests.client.createSession(
  externalID: currentUser.id, email: currentUser.email,
  displayName: currentUser.name, traits: traits, proof: nil
)

// 0.14.0
try await requests.client.createSession(
  externalID: currentUser.id, email: currentUser.email,
  displayName: currentUser.name, proof: nil
)

Delete traits:. The SDK no longer sends user traits.

0.7.0: not compatible with earlier versions

0.7.0 renamed every method and replaced every model type, and the client now takes a hub your app keeps. Nothing converts between the two, and 0.6.x can't reach today's server.

Moving is about fifteen lines: delete the old integration and follow Start here again.

What a version number means here

  • While the major version is 0, a minor release may break something. The SDK changelog says what.
  • Every SDK release works with the current server.
  • A tag never moves. The commit a version points at today is the one it pointed at when it was published.

Staying on an old version

Old versions keep working. An old build keeps calling the API it was built against, and that API URL stays up.