Appearance
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
effectis a peer dependency.@igpapi/core,@igpapi/mobile,@igpapi/android,@igpapi/iosand@igpapi/pigeon-nestdeclareeffect(^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(orpnpm 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 untileffectis a dependency of your project. A project that already depends oneffect@4.0.6or 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()andExportSnapshotwait for it before they read. A session-fatal answer to it rejects the call with the same typed error (The app process). MobileProcessBackgroundchanged shape:startTimer,armedTimersandrestoreTimersare gone. A program that waited for the process's background work usesawaitMobileProcessBackground, 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 shortcodewhen 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.
TypeaheadResultandTypeaheadRow, andTimelineFeedResponseFeedItemsItemandFeedTimelineEntry, have one more member (the typeahead result's discriminant iskind: 'unknown'; the timeline entry hastype: 'unknown'; the typeahead row has__typename: 'unknown'). Narrow before you read a member, and add a branch for the unknown one. effectis the stable 4.0.6. Programs that compose the Simulator's services with their own Effect code useContext.ServiceandContext.Referencewhere the beta hadServiceMap.- Three exports of
@igpapi/core/mobilechanged with the snapshot restore:legacySnapshotNetworkOftakes the stored value,settleDeviceAdsOptOuttakes the stored value instead of the session, andsettleSessionNavigationis removed. A caller passes the stored value or drops the call:MobileSnapshotSchemareads the stored fields itself.
4.11: program is main
- Rename
programtomain. The callback option ofAndroidIgpapi.install,launch,resumeSilently,resumeFromBackground,resumeByReentering, and ofIosIgpapi.installandlaunch, ismain. A caller that still passesprogramfails at run time withTypeError: main is not a function. The type names follow:AndroidIgpapiProgramisAndroidIgpapiMain, andIosIgpapiProgramisIosIgpapiMain. mainnever receives a challenge. Code that caughtIgCheckpointErrorinsidemainand calledOpenChallengemoves into anotherwisebranch (Answer a challenge withotherwise).OpenChallengestays for a program that composesAndroidAppitself.IosIgpapihas the rename alone, because iOS has no screens.- Publish through the screens. The one-call posting bricks are removed (
TimelinePhotoPost,AlbumPost,ClipPost,UploadPhoto,UploadVideoand their inputs). UseFeedTimelineScreen.openCreation(mode), pick, edit,share, in a launched process (Publishing). openCreation(mode)takes'post' | 'story' | 'reel'and answers exactly that mode's first screen.PostingPhotoInputandPostingVideoInputlosetakenAtandfolder; the device's media store answers them through the gallery's second argument.PostingMusicSearchResultis a union with akinddiscriminant ('track'or'originalAudio'), andPostingMusicProducthaskind: 'story-sticker'andkind: 'reel'.ClipMusicOptionslosesassetId,clusterId,songName,artistNameandsessionId; all are derived fromtrack. Passtrack(aReelSongTrack) and the two volumes.jsonBigStringisjsonWithLongIdsAsText. It returnsunknown; rename the import and read the value through the Simulator's schemas.ScreenNotOnTopError.reason:coveredonly while the screen is still open under another; a handle whose screen was closed, opened again or replaced isnavigation-moved.- A checkpoint written by an earlier release is refused; log in again and take a new one.