{"id":13850720,"url":"https://github.com/WorldBrain/Memex-Mobile","last_synced_at":"2025-07-12T23:30:19.936Z","repository":{"id":38619014,"uuid":"188011244","full_name":"WorldBrain/Memex-Mobile","owner":"WorldBrain","description":"Mobile app for Memex","archived":false,"fork":false,"pushed_at":"2024-08-30T07:13:18.000Z","size":48072,"stargazers_count":42,"open_issues_count":22,"forks_count":11,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2025-06-28T10:31:51.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WorldBrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-22T09:56:13.000Z","updated_at":"2024-07-02T11:41:31.000Z","dependencies_parsed_at":"2024-11-07T13:33:34.562Z","dependency_job_id":null,"html_url":"https://github.com/WorldBrain/Memex-Mobile","commit_stats":{"total_commits":1498,"total_committers":6,"mean_commits":"249.66666666666666","dds":"0.20761014686248336","last_synced_commit":"e8be6e26539e896ab4669df5d1d66ef333e11f15"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/WorldBrain/Memex-Mobile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldBrain%2FMemex-Mobile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldBrain%2FMemex-Mobile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldBrain%2FMemex-Mobile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldBrain%2FMemex-Mobile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WorldBrain","download_url":"https://codeload.github.com/WorldBrain/Memex-Mobile/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldBrain%2FMemex-Mobile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264041413,"owners_count":23548170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T20:01:28.169Z","updated_at":"2025-07-12T23:30:18.901Z","avatar_url":"https://github.com/WorldBrain.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Setting up\n\n1. `git clone git@github.com:WorldBrain/Memex-Mobile --recursive`\n1. Go to the `app/` directory\n1. Run `yarn`\n\n## Android specific\n\n4. Add Firebase credentials in `app/android/app/google-services.json`\n5. Ensure JDK 11 is installed (newer JDKs will not work):\n   `brew install openjdk@11`\n\n## iOS specific\n\n4. Add Firebase credentials:\n\n   1.1. for main app: `app/ios/app/GoogleService-Info.plist`\n\n   1.2. for share extension: `app/ios/MemexShare/GoogleService-Info.plist`\n\n1. Go to the `app/ios` directory\n1. Install Cocoapods if not already installed: https://cocoapods.org/\n1. Run `pod install`\n\n# Running in dev\n\n1. Build the Reader feature's content script: `yarn content-script`\n   _(`yarn content-script:watch` if working on it)_\n\n## Android\n\n2. Ensure an emulator/device is connected via ADB.\n1. In one terminal, run `yarn start` to start React Native's Metro bundler\n1. In another terminal, run `yarn android-device` (ensure `JAVA_HOME` is set to\n   JDK 11's home dir)\n\n## iOS (requires macOS)\n\n2. In one terminal, run `yarn start` to start React Native's Metro bundler\n1. In another terminal, run `open app/ios/app.xcworkspace` to open the XCode\n   workspace **(important that you don't open `app/ios/app.xcodeproj`)**\n1. In the menu bar, go to `Product \u003e Destination`\n\n   3.1. Choose a connected iPhone or one of the Rosetta simulators. Note that\n   native simulators currently won't work due to a bug with the MemexShare\n   extension build\n\n1. Press the \"Play\" button in the top left\n\n## Set up app reload on source code change\n\n_Assumes the above steps have been followed and app is currently running in iOS\nsimulator while `yarn start` is running in a terminal._\n\n1. In the iOS simulator, press `cmd + D`, or `cmd/ctrl + M` on Android emulator,\n   to open the developer menu\n2. Press \"Enable Live Reload\"\n3. Change anything in the source code and save and the app should quickly reload\n   with those new changes.\n\n# Troubleshooting\n\n## Updating React Native\n\nEach time we're faced with this problem it proves itself to be significantly\ndifficult and time consuming.\n\nHere's some tips:\n\n1. Use the RN web upgrade helper to show what RN + native platform files change\n   between versions, then add those changes manually:\n   https://react-native-community.github.io/upgrade-helper/\n   - There is the `npx react-native upgrade` though it doesn't work properly\n     half the time, leaving native platform files untouched (possibly to do\n     with our older setup).\n   - You generally don't need to manually update the the project.pbxproj file\n     (a new app.xcworkspace file will be generated post `pod install`)\n2. After adding changes to the files, install deps in the following order:\n   1. `yarn` (try to delete the `yarn.lock` file and let it generate a new one\n      if faced with issues)\n   2. `pod install` from the `ios/` directory (likely you'll need to delete the\n      existing `Podfile.lock`)\n3. Clear the XCode build folder before attempting build (cmd+shift+k)\n4. If you're facing difficulties attempting an upgrade over many RN versions,\n   first try upgrading to an lower version, then upgrade to the latest version\n   if that works.\n5. Misc. errors are likely on the way. Most I encountered could be found and\n   solved through Googling. Though keep a list, as likely you'll mess up, need\n   to do it again, and resolve the same errors next time.\n\n## Missing content script runtime error\n\n```\nError: Unable to resolve module `../../../../dist/content_script_reader.js.txt` from `src/features/reader/utils/load-content-script.ts`\n```\n\nThis just means the content script has not been built yet. This is a separate\nwebpack build to the main React Native bundle created by Metro. Ensure\n`yarn content-script` is run at least once to build it, or use\n`yarn content-script:watch` to run it in watch mode if you intend to make\nchanges in `src/content-script/`.\n\n## iOS build nvm PREFIX error\n\nThe error looks something like this, and occurs late in the build when some node\nscripts are run:\n\n```\nnvm is not compatible with the \"PREFIX\" environment variable: currently set to \"/usr/local\"\nRun `unset PREFIX` to unset it.\n```\n\nIf this happens, likely you've installed `yarn` via `homebrew` or some other\nmeans while `node` is installed via `nvm`. You'll need to uninstall `yarn` from\n`homebrew` (and `node`, unless you really need it alongside an `nvm` install)\nand then reinstall `yarn` via the `nvm` provided `npm` instance:\n`npm install -g yarn`.\n\nMore info:\nhttps://medium.com/@andrejkurocenko/fixing-react-native-build-error-nvm-is-not-compatible-with-the-prefix-environment-variable-3948e6e4da80\n\n## Build issues citing missing deps or libraries\n\nOften I've encountered issues where things either crash on build or at runtime\nciting missing dependencies, mainly on iOS. If this happens, I would advise\ntrying to re-install all the needed deps and trying again. You can copy and\npaste the following snippets, running them from the repo root:\n\n**_Clean and reset your git repo + submodules_**\n\n```\ngit clean -xfd\ngit submodule foreach --recursive git clean -xfd\ngit reset --hard\ngit submodule foreach --recursive git reset --hard\ngit submodule update --init --recursive\n```\n\n**Note:** _Running the above should automatically remove your NPM deps and\nCocoaPods._\n\n**_Clean and re-install your NPM deps_**\n\n```\nrm -rf node_modules/\nyarn\n```\n\n**_Re-install all CocoaPods_**\n\n```\ncd ios/\npod install\ncd ..\n```\n\n**_Clean XCode build caches_**\n\nChoose `Product \u003e Clean` in the XCode menu bar.\n\n## `Haste module naming collision` error throwing from `yarn start`\n\nSometimes you may see an error output from `yarn start` similar to the\nfollowing, possibly with different submodules:\n\n```\nLoading dependency graph...jest-haste-map: Haste module naming collision: @worldbrain/storex-pattern-modules\n  The following files share their name; please adjust your hasteImpl:\n    * \u003crootDir\u003e/external/@worldbrain/storex-pattern-modules/package.json\n    * \u003crootDir\u003e/external/@worldbrain/memex-storage/external/@worldbrain/storex-pattern-modules/package.json\n```\n\nIf this happens, run the following to rmeove the duplicated submodules:\n\n```\nrm -rf app/external/@worldbrain/memex-storage/external\n```\n\nThis indicates an issue with how that repo is currently set up with its own\nsubmodules, which needs to be fixed.\n\n**NOTE:** _If you run `git submodule update` again at any time, you may need to\nre-run the above command to re-remove the duplicated submodules_\n\n## Share extension stops working on iOS after new package added\n\nSometimes, after adding and setting up a new package, the share extension will\nno longer work on iOS. Often this is because the\n`yarn react-native link $PACKAGE_NAME` command to auto-link needed libs does not\nperform the needed steps for the share ext's project. The linked libs are\ntreated separately on both the main app and the share extension.\n\nTo fix this, after running the relevant `react-native link` command:\n\n1. open `ios/app.xcodeproj` in Xcode\n2. go to the `MemexShare` target\n3. go to `Build Phases`\n4. go to `Link Binary With Libraries`\n5. press the add button and find the relevant `lib$PACKAGE_NAME.a` library\n\nFor example, the `@react-native-community/async-storage` package did not get its\nneeded libs automatically linked with the share extension. Read through\n[their docs](https://github.com/react-native-community/async-storage/blob/LEGACY/docs/Linking.md#ios)\non how to manually link (most RN packages with such a requirement seem to\ncontain these instructions) to get the relevant lib and follow the above steps.\n\n## Android build errors complaining about missing `android.support.v4.util` packages\n\nRunning `yarn react-native run-android` will sometimes result in errors during\ncompilation, such as `error: package android.support.v4.util does not exist`. If\nthis occurs, run `node_modules/.bin/jetify` to migrate all node_modules to\nAndroidX then try to run again.\n\n**Note:** This should now automatically be run on `postinstall` when running\n`yarn` while setting up the repo.\n\nThe reason this happens (from my limited understanding) is because certain deps\nwill be using native Java code that isn't updated to AndroidX yet while the main\napp assumes AndroidX. Running `jetify` updates those deps. **This may need to be\nrun each time you refresh your deps by running `yarn`.** More info in the\n`jetifier` NPM package: https://www.npmjs.com/package/jetifier\n\n## No online devices found\n\nIf you get an error about no online devices found, the emulator is running too\nslowly. (Which it was even for me running 4 fast cores and 16GB RAM and a GPU\nbeast with 8GB of video memory.) For me, enabling GPU accelleration worked,\nwhich can only be done on images NOT including the Play Store.\n\nIf the emulator somehow doesn't receive input from your physical keyboard, you\ncan open the React developer menu with this command:\n\n```\nadb shell input keyevent 82\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWorldBrain%2FMemex-Mobile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWorldBrain%2FMemex-Mobile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWorldBrain%2FMemex-Mobile/lists"}