Skip to content

Upgrading ​

This page lists, release by release, what you change in your program when you move to a newer version of the Simulator. The full list of changes of every release is CHANGELOG.md. Versions follow one rule: a major version only for a large change to the Simulator's own core, a minor version for a breaking change that Instagram's remote API forces, a patch for a fix. Read every minor release between your version and the one you install.

Two things hold for every upgrade:

  • Stored sessions: see Keep a session. A checkpoint from release 4.11.0 or later starts in any later release with launch; resume only with the release that wrote it.
  • A snapshot saved by any release from 4.0.3 on restores. A field that cannot be understood is dropped and logged instead of failing the restore.

4.13 ​

  • effect is a peer dependency. @igpapi/core, @igpapi/mobile, @igpapi/android, @igpapi/ios and @igpapi/pigeon-nest declare effect (^4.0.6) as a peer instead of carrying their own copy, so your project and the packages share one copy of Effect. Install it beside the platform package: npm install @igpapi/android effect@4.0.6 (or pnpm add …, yarn add …). npm 7 and later and pnpm 8 and later install a missing peer by themselves; Yarn only warns, and the import fails until effect is a dependency of your project. A project that already depends on effect@4.0.6 or a later 4.x changes nothing. The install page has the registry setup for each package manager.
  • A launch returns as soon as the feed is on screen. The rest of the start-up runs on in the process's background; the call still waits for it before the app closes, and checkpoint() and ExportSnapshot wait for it before they read. A session-fatal answer to it rejects the call with the same typed error (The app process).
  • MobileProcessBackground changed shape: startTimer, armedTimers and restoreTimers are gone. A program that waited for the process's background work uses awaitMobileProcessBackground, which fails with the session-fatal error the background met.
  • New: totpCodeOf(secret) returns the code an authenticator app shows, so a headless login can submit it (Log in, with two-factor). share() of a post, a Reel or a story reports the media's short code when Instagram's answer carries it.

4.12 ​

  • A list whose items are a tagged union is open. An item of a kind the Simulator does not model is kept as an explicit unknown item and never fails the screen. The types of these lists are wider, so TypeScript code that read a member without narrowing, or switched exhaustively, stops compiling. TypeaheadResult and TypeaheadRow, and TimelineFeedResponseFeedItemsItem and FeedTimelineEntry, have one more member (the typeahead result's discriminant is kind: 'unknown'; the timeline entry has type: 'unknown'; the typeahead row has __typename: 'unknown'). Narrow before you read a member, and add a branch for the unknown one.
  • effect is the stable 4.0.6. Programs that compose the Simulator's services with their own Effect code use Context.Service and Context.Reference where the beta had ServiceMap.
  • Three exports of @igpapi/core/mobile changed with the snapshot restore: legacySnapshotNetworkOf takes the stored value, settleDeviceAdsOptOut takes the stored value instead of the session, and settleSessionNavigation is removed. A caller passes the stored value or drops the call: MobileSnapshotSchema reads the stored fields itself.

4.11: program is main ​

  • Rename program to main. The callback option of AndroidIgpapi.install, launch, resumeSilently, resumeFromBackground, resumeByReentering, and of IosIgpapi.install and launch, is main. A caller that still passes program fails at run time with TypeError: main is not a function. The type names follow: AndroidIgpapiProgram is AndroidIgpapiMain, and IosIgpapiProgram is IosIgpapiMain.
  • main never receives a challenge. Code that caught IgCheckpointError inside main and called OpenChallenge moves into an otherwise branch (Answer a challenge with otherwise). OpenChallenge stays for a program that composes AndroidApp itself. IosIgpapi has the rename alone, because iOS has no screens.
  • Publish through the screens. The one-call posting bricks are removed (TimelinePhotoPost, AlbumPost, ClipPost, UploadPhoto, UploadVideo and their inputs). Use FeedTimelineScreen.openCreation(mode), pick, edit, share, in a launched process (Publishing).
  • openCreation(mode) takes 'post' | 'story' | 'reel' and answers exactly that mode's first screen.
  • PostingPhotoInput and PostingVideoInput lose takenAt and folder; the device's media store answers them through the gallery's second argument.
  • PostingMusicSearchResult is a union with a kind discriminant ('track' or 'originalAudio'), and PostingMusicProduct has kind: 'story-sticker' and kind: 'reel'.
  • ClipMusicOptions loses assetId, clusterId, songName, artistName and sessionId; all are derived from track. Pass track (a ReelSongTrack) and the two volumes.
  • jsonBigString is jsonWithLongIdsAsText. It returns unknown; rename the import and read the value through the Simulator's schemas.
  • ScreenNotOnTopError.reason: covered only while the screen is still open under another; a handle whose screen was closed, opened again or replaced is navigation-moved.
  • A checkpoint written by an earlier release is refused; log in again and take a new one.

The pages of this site are the README files of the repository. The API reference is generated from the source.