Release to demonstrate a problem in Expo Router
Pre-releaseBackground
This release is to demonstrate a bug in Expo Router, as follows:
Expo.Router.bug.mp4
- ✅ On the library page, after selecting an ebook, when we click on the loaded ebook to push the route
/book
, it correctly pushes the Book viewer route. - ✅ After that, when we click on the "ToC" button to push the route
/toc
, it correctly pushes the Table of Contents route. - ❌ After that, when we click on any link in the Table of Contents to navigate to
/book
, it fails to unwind back to the existing/book
route, and instead pushes a new/book
route on top. We can see this by how our back button goes to the Table of Contents rather than the Library page.
Installation
bun install
bun run ios
Usage
See the attached file, sample_epub.zip
. Unzip it into a folder inside your simulator named epubs
as follows:
epubs
└── sample_epub
Now select that epubs
folder in-app and it should detect the sample_epub
subfolder and be able to parse the epub out of it.
How do I get the files into my simulator?
Before macOS Sequoia, you can just drag-and-drop them from macOS into the iOS Simulator's Files app, or connect the iOS Simulators Files app to your iCloud Drive.
It gets far harder after macOS Sequoia. I ended up manually moving them into "/Users/jamie/Library/Developer/CoreSimulator/Devices/7987CBDB-2D07-4277-99BB-8651AE9E3F7A/data/Containers/Shared/AppGroup/C1CE866F-4177-43A6-B089-300C4A5D1819/File Provider Storage/epubs". I was only able to figure out the file path by searching for an already known file from the Files app under "/Users/jamie/Library/Developer/CoreSimulator/Devices".