Compare commits

...

614 Commits

Author SHA1 Message Date
Paul Frazee 59ef3ec9c1 1.2 2023-02-22 09:20:52 -06:00
Paul Frazee b1ffb1e686 Fix to scrolling to posts within a thread (#228)
* Fix: render the entire thread at start so that scrollToIndex works always (close #270)

* Visual fixes to thread 'load more'

* A few small perf improvements to thread rendering

* Fix lint
2023-02-21 15:32:38 -06:00
Paul Frazee f55fbe73c7 A group of notifications fixes (#227)
* Fix: don't group together notifications that can't visually be grouped (close #221)

* Mark all notifications read on PTR

* Small optimization: useCallback and useMemo in posts feed

* Add loading spinner to footer of notifications (close #222)
2023-02-21 10:32:29 -06:00
Aryan Goharzad 1861f95a1f Sanitizes posts on publish and render (#217)
* Sanatizes posts on publish and render

* lint

* lint and added sanitize to thread view as well

* adjusts indices based on replaced text

* Woops, fixes a bug

* bugfix + cleanup

* comment

* lint

* move sanitize text to later in the flow

* undo changes to compose post

* Add RichText library building upon the sanitizePost library method

* Add lodash.clonedeep dep

* Switch to RichText processing on record load & render

* Fix lint

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-02-20 14:09:08 -06:00
Paul Frazee af1396e396 Randomize hard-coded suggested follows (#226)
* Ensure follows are loaded before filtering hardcoded suggestions

* Randomize hard-coded suggested profiles (close #219)
2023-02-20 09:29:18 -06:00
Paul Frazee da41392422 Fixes to notifications (#216)
* Improve push-notification for follows

* Refresh notifications on screen open (close #214)

* Avoid showing loader more than needed in post threads

* Refactor notification polling to handle view-state more effectively

* Delete a bunch of tests taht werent adding value

* Remove the accounts integration test; we'll use the e2e test instead

* Load latest in notifications when the screen is open rather than full refresh
2023-02-17 13:00:57 -06:00
Paul Frazee 70ec76970c Add "follows you" information and sync follow state between views (#215)
* Bump @atproto/api@0.1.2 and update API usage

* Add 'follows you' pill to profile header (close #110)

* Add 'follows you' to followers and follows (close #103)

* Update reposted-by and liked-by views to use the same components as followers and following

* Create a local follows cache MyFollowsModel to keep views in sync (close #205)

* Add incremental hydration to the MyFollows model

* Fix tests

* Update deps

* Fix lint

* Fix to paginated fetches

* Fix reference

* Fix potential state-desync issue
2023-02-16 14:34:04 -06:00
Paul Frazee ad4ccade51 Add feedback link to main menu (close #191) (#212) 2023-02-15 18:14:28 -06:00
Paul Frazee 8db020920f Push notification fixes (#210)
* Fix to when screen analytics events are firing

* Fix: dont trigger update state when backgrounded

* Small fix to notifee API usage

* Fix: properly load notification info for push card
2023-02-15 17:05:14 -06:00
Paul Frazee fb28fb0493 Implement our own lifecycle tracking to ensure it never fires while the app is backgrounded (close #193) (#211) 2023-02-15 16:52:35 -06:00
Paul Frazee 751c5e91a3 Only give the loading spinner on the home feed during PTR (#207)
(cherry picked from commit b7a5da12fdfacef74873b5cf6d75f20d259bde0e)
2023-02-15 13:14:17 -06:00
Paul Frazee b05a3146b7 Fix RN bug that causes home feed not to load more; also fix home feed load view. (#208)
RN has a bug where rendering a flatlist with an empty array appears to break its
virtual list windowing behaviors. See https://stackoverflow.com/a/67873596
2023-02-15 12:48:39 -06:00
Paul Frazee d6f34d8b86 Remove the 'loading' placeholder from images as it degraded feed perf (#202)
* Remove the 'loading' placeholder from images as it degraded feed perf

* Remove references
2023-02-14 17:30:46 -06:00
Paul Frazee e22e5e0fdd UI updates to the floating action button (#201)
* Update FAB to use a plus icon and not drop shadow

* Update FAB positioning to be more consistent in different shell modes

* Animate the FAB's repositioning
2023-02-14 17:30:26 -06:00
Paul Frazee ffd0b62860 Fix to suggested follows: chunk the hardcoded fetches to 25 at a time (close #196) (#198) 2023-02-14 16:55:01 -06:00
Paul Frazee 9b08fb93a0 Show the splash screen during session resumption (close #186) (#199) 2023-02-14 16:54:47 -06:00
Paul Frazee f331fb9c75 Don't show new-content notification for reposts (close #179) (#197) 2023-02-14 16:54:35 -06:00
Paul Frazee 7d162c8101 Fix home feed positioning (closes #189) (#195)
* Fix home feed positioning for floating header

* Fix positioning of errors in home feed

* Fix lint
2023-02-14 15:33:36 -06:00
Paul Frazee 6f98bf8aa5 Fix e2e tests 2023-02-09 16:53:19 -06:00
Paul Frazee 3ad0f3cc4a Bundle of UI modifications (#175)
* Adjust visual balance of SuggestedPosts and WhoToFollow

* Fix bug in the discovery load trigger

* Adjust search header aesthetic and have it scroll away

* More visual balance tweaks on the search page

* Even more visual balance tweaks on the search page

* Hide the footer on scroll in search

* Ditch the composer prompt buttons in the home feed

* Center the view header title

* Hide header on scroll on the home feed
2023-02-09 16:45:37 -06:00
Paul Frazee 22820372df more robust centering of the play button (#181)
Co-authored-by: Aryan Goharzad <arrygoo@gmail.com>
2023-02-09 16:37:59 -06:00
Aryan Goharzad 04b3ebbf63 Adds hardcoded suggested list (#178)
* Adds hardcoded suggested list

* Update suggested-actors-view to support page sizes smaller than the hardcoded list

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-02-09 16:33:35 -06:00
Paul Frazee 70b0dc070a Add scroll-to-top for all screens (#177) 2023-02-09 16:10:22 -06:00
Aryan Goharzad b84c88cd21 151 feat youtube embed iframe (#176)
* youtube embed iframe temp commit

* Fixes styling and code cleanup

* lint

* Now clicking between the pause and settings button doesn't trigger the parent

* use modest branding (less yt logos)

* Stop playing the video once there's a navigation event

* Make sure the iframe is unmounted on any navigation event

* fixes tests

* lint
2023-02-09 12:11:02 -06:00
Paul Frazee 00d41c9168 Rework the search UI and add (#174)
* Add search tab and move icon to footer

* Remove subtitles from view header

* Remove unused code

* Clean up UI of search screen

* Search: give better user feedback to UI state and add a cancel button

* Add WhoToFollow section to search

* Add a temporary SuggestedPosts solution using the patented 'bsky team algo'

* Trigger reload of suggested content in search on open

* Wait five min between reloading discovery content

* Reduce weight of solid search icon in footer

* Fix lint

* Fix tests
2023-02-08 18:01:29 -06:00
Paul Frazee 3c70bdf791 Add 'doesnt use non-exempt encryption' to ios config 2023-02-08 17:23:25 -06:00
Aryan Goharzad 9aca0d4632 151 fix youtube channel embed (#173)
* Fixes embeds for youtube channels

* Tests for youtube extract meta

* lint
2023-02-08 13:04:54 -06:00
Paul Frazee 6ffc92db09 Fix to an edge case with feed re-ordering for threads (#172) 2023-02-08 13:02:10 -06:00
Paul Frazee c2b7796317 Refactor models to use bundleAsync and lock regions (#171) 2023-02-08 11:57:40 -06:00
Paul Frazee 82ea907e8f Fix potential issues with promise guards when an error occurs (#170) 2023-02-08 10:52:47 -06:00
Paul Frazee 51d0ea4750 Merge branch 'main' of github.com:bluesky-social/social-app into main 2023-02-08 10:15:54 -06:00
Paul Frazee 0eaf458874 Bump app ios version to 1.1 (needed after app store submission) 2023-02-08 10:15:52 -06:00
Aryan Goharzad 575cbeb770 Fixes embeds for youtube channels (#169) 2023-02-08 10:10:05 -06:00
Paul Frazee 65f958c128 Wire up ReportAccount and ReportPost (#168) 2023-02-07 18:45:41 -06:00
Paul Frazee 8944160130 Minor aesthetic cleanup in SessionModel 2023-02-07 16:51:55 -06:00
Paul Frazee 759ec8011b Refactor session management to use a new "Agent" API (#165)
* Add the atp-agent implementation (temporarily in this repo)

* Rewrite all session & API management to use the new atp-agent

* Update tests for the atp-agent refactor

* Refactor management of session-related state. Includes:
- More careful management of when state is cleared or fetched
- Debug logging to help trace future issues
- Clearer APIs overall

* Bubble session-expiration events to the user and display a toast to explain

* Switch to the new @atproto/api@0.1.0
2023-02-07 16:04:08 -06:00
Aryan Goharzad 0e160298c8 154 cached image profile (#167)
* Fixes issue where retrying on image upload fails

* Lint, longer test time

* Longer waitfor time in tests

* even longer timeout

* longer timeout

* missed file

* Fixes image cache error on second try for profile screen

* lint

* lint

* lint
2023-02-07 14:29:33 -06:00
Aryan Goharzad 2ac6cae63a Fixes issue where retrying on image upload fails (#166)
* Fixes issue where retrying on image upload fails

* Lint, longer test time

* Longer waitfor time in tests

* even longer timeout

* longer timeout

* missed file

* Update src/view/com/composer/ComposePost.tsx

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

* Update src/view/com/composer/ComposePost.tsx

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-02-07 12:38:22 -06:00
Paul Frazee db9c8474bd Fix refresh behavior around a series of models (repost, graph, vote) (#163)
* Fix refresh behavior around a series of models (repost, graph, vote)

* Fix cursor behavior in reposted-by view
2023-02-06 15:11:31 -06:00
Paul Frazee 9e8dc67a5f Remove fallback gradient on external links without thumbs (#164)
* Remove fallback gradient on external links without thumbs

* Remove fallback gradient on external links without thumbs in the composer preview
2023-02-06 15:11:11 -06:00
Aryan Goharzad bc97aad555 87 dark mode edit profile (#162)
* Adds dark mode to delete account screen

* Adds one more missed darkmode

* more fixes
2023-02-06 13:30:34 -06:00
Aryan Goharzad a5b5fdd797 Adds dark mode to delete account screen (#159) 2023-02-06 12:23:54 -06:00
Aryan Goharzad 8e91fc3279 Adds respots under the 'post' tab under profile (#158) 2023-02-06 12:23:01 -06:00
Paul Frazee bf7b961222 More e2e tests (create account) (#150) 2023-02-06 09:57:32 -06:00
Paul Frazee 0e6b53258b Error cleanup (close #79) (#148)
* Avoid surfacing errors to the user when it's not critical

* Remove now-unused GetAssertionsView

* Apply cleanError() consistently

* Give a better error message for Upstream Failures (http status 502)

* Hide errors in notifications because they're not useful
2023-02-03 13:26:58 -06:00
Aryan Goharzad eb1568e0fd Adds detox testing and instructions (#147)
* Adds detox testing and instructions

* lint

* lint
2023-02-03 13:00:04 -06:00
Paul Frazee 2d1e38be72 Calculate image aspect ratio on load (#146)
* Calculate image aspect ratio on load

* Move aspect ratio bounds to constants
2023-02-03 10:55:08 -06:00
Aryan Goharzad cede0c772c Adds more tracking all around the app (#142)
* Adds more tracking all around the app

* more events

* lint

* using better analytics naming

* missed file

* more fixes
2023-02-02 18:48:36 -06:00
Paul Frazee 8b310d91f0 Fix photo & camera permission management (#140)
* Check photo & camera perms and alert the user if not available (close #64)

- Adds perms checks with a prompt to update settings if needed
- Moves initial access of photos in the composer so that the initial prompt
  occurs at an intuitive time.

* Add react-native-permissions test mock

* Fix issue causing multiple access requests

* Use longer var names

* Update podfile.lock

* Lint fix

* Move photo perm request in composer to the gallery btn instead of when the carousel is opened
2023-02-02 18:29:26 -06:00
Paul Frazee 9e71a50a1d Implement account deletion (#141) 2023-02-02 18:28:42 -06:00
Paul Frazee 99272c0ec1 Composer: mention tagging now works in middle of text (close #105) (#139) 2023-02-02 13:13:19 -06:00
Paul Frazee b14cf939d2 Disable like/repost animations to see if theyre causing #135 (#137) 2023-02-01 18:20:02 -06:00
Paul Frazee 1c481374ec Configure feed FlatList (removeClippedSubviews=true) to improve scroll performance (#136) 2023-02-01 18:19:50 -06:00
Paul Frazee 07c59583aa Merge branch 'main' of github.com:bluesky-social/social-app into main 2023-02-01 13:56:48 -06:00
Paul Frazee ed3829ee5c Fix layout in onboarding to not overflow the footer 2023-02-01 13:56:33 -06:00
Paul Frazee 865deb930b Fix bug in lightbox rendering (#133) 2023-02-01 13:20:43 -06:00
Aryan Goharzad 1e5330931d Adds dark mode to the dropdown (#131)
* Adds dark mode to the bottom sheet

* Make background button lighter (like before)

* lint
2023-02-01 13:11:29 -06:00
Paul Frazee 9889035a20 Reduce render cost of post controls and improve perceived responsiveness (#132)
* Move post control animations into conditional render and increase perceived responsiveness

* Remove log
2023-02-01 13:09:20 -06:00
Aryan Goharzad ad511bc574 Adds dark mode to the edit screen (#130)
* Adds dark mode to edit screen

* lint

* lint

* lint
2023-02-01 12:52:23 -06:00
Paul Frazee 7b802da7b5 Fixes to navigation swipes (#129)
* Nav swipe: increase the distance traveled in response to gesture movement.

This causes swipes to feel faster and more responsive.

* Fix: fully clamp the swipe against the edge

* Improve the performance of swipes by skipping the interaction manager
2023-02-01 11:13:28 -06:00
Paul Frazee ae6b5f0d20 Fix missing replacement of flex:1 to height:100 2023-01-31 17:07:23 -06:00
Paul Frazee 5d4dea0a5a Collection of fixes to list rendering (#127)
* Fix bug that caused endless spinners in profile feeds

* Bundle fetches of suggested actors into one update

* Fixes to suggested follow rendering
2023-01-31 17:03:34 -06:00
Paul Frazee 5ccdec1e4f Image performance improvements (#126)
* Switch out most images for FastImage

* Add image loading placeholders

* Fix tests
2023-01-31 17:01:02 -06:00
Aryan Goharzad 0ce4f57e0b [Draft] Fixes image failing on reupload issue (#128)
* Fixes image failing on reupload issue

* Use tmp folder instead of documents

* lint
2023-01-31 16:55:09 -06:00
Paul Frazee d26f024fa1 Add explicit link-embed controls to the composer (#120)
* Add explicit link-embed controls

* Update the target rez/size of link embed thumbs

* Remove the alert before publishing without a link card
2023-01-31 12:29:23 -06:00
Paul Frazee 0942c5ed21 Fix to ordering of images in the embed grid (#121) 2023-01-31 12:08:33 -06:00
Aryan Goharzad b2e7a90565 Replaces the alert with dropdown for profile image and banner (#123)
* replaces the alert with dropdown for profile image and banner

* lint
2023-01-31 12:07:06 -06:00
Paul Frazee 9302940a23 Update login to use new session.create api, which enables email login (close #93) (#119) 2023-01-31 10:38:43 -06:00
Paul Frazee 26a4f85fda Fix character counter color in dark mode 2023-01-31 10:20:31 -06:00
Paul Frazee 0d8a7cd816 Slightly increase the hitslop for post controls 2023-01-31 08:31:34 -06:00
Paul Frazee c9c4a107f2 Increase max image resolutions and sizes (#118) 2023-01-30 19:26:45 -06:00
Paul Frazee 43bc272615 Fixes to session management (#117)
* Update session-management to solve incorrectly dropped sessions

* Reset the nav on account switch

* Reset the feed on me.load()

* Update tests to reflect new account-switching behavior
2023-01-30 18:30:42 -06:00
Aryan Goharzad d563beb239 Image not loading on swipe (#114)
* Adds prefetching to images

* Adds image prefetch

* bugfix for images not showing on swipe

* Fixes prefetch bug

* Update src/view/com/util/PostEmbeds.tsx

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-01-30 13:32:12 -06:00
Paul Frazee 94771b5c7f Bump @atproto/api@0.0.7 (#112) 2023-01-30 12:01:12 -06:00
Aryan Goharzad a941cc7758 Update to RN 71.1.0 (#100)
* Update to RN 71

* Adds missing lint plugin

* Add missing native changes
2023-01-27 13:05:23 -06:00
Paul Frazee 759f022351 Bump podfile.lock 2023-01-26 09:51:05 -06:00
Paul Frazee 59b096196c Brand tuning: switch from "blueprint B" to "cloud imagery" (#96)
* Switch app icon to bluesky image

* Update splash screen to clouds

* Update login screen to use branding

* Lighten the shadows in the brand imagery
2023-01-25 19:01:16 -06:00
Paul Frazee f39a27ed66 Fix: dont dedup reposts that are in threads, as that can cause rendering issues (close #71) 2023-01-25 17:57:53 -06:00
Paul Frazee d0bca3c576 Add a sanity check to avoid bad references, close #77 2023-01-25 17:49:22 -06:00
Paul Frazee 03b44c0e45 Fix pagination and rendering of suggested follows (#95) 2023-01-25 17:46:14 -06:00
Aryan Goharzad 10c9b26475 Saves image on long press (#83)
* Saves image on long press

* Adds save on long press

* Forking lightbox

* move to wrapper only to the bottom sheet to reduce impact of this change

* lint

* lint

* lint

* Use official `share` API

* Clean up cache after download

* comment

* comment

* Reduce swipe close velocity

* Updates per feedback

* lint

* bugfix

* Adds delayed press-in for TouchableOpacity
2023-01-25 17:25:34 -06:00
Aryan Goharzad 3e6a6960d4 Adds darkmode support for "Liked by" screen (#94)
* Adds darkmode support for "Liked by" screen

* changes based on feedback

* variable naming
2023-01-25 16:54:22 -06:00
Paul Frazee 5635bde707 Push notification & session management cleanup (#92)
* Add some temporary logging to help suss out the session drop issue

* Fix to session resumption: copy session tokens during a resumeSession attempt

* Factor out notifee display into a lib and add to storybook

* Tune the bg notifications fetch to only get what is needed

* Fix: run account update inside a mobx action

* Remove debugging logs for sessions

* Fixes to bg notifications fetch
2023-01-25 11:31:09 -06:00
Paul Frazee 1a8c6ac71e Fix missing config for background fetch 2023-01-24 19:59:40 -06:00
Paul Frazee 3bb220f8be Initial pass at push notifications + some fixes to the session management (#91)
* Fix: test the session during resume to ensure it's valid

* Don't delete sessions for now

* Add notifee and request notif permissions on first login

* Set unread notifications badge on app icon

* Trigger a notifee card on new notifications

* Experimental: use react-native-background-fetch to check for notifications

* Add missing mocks

* Fix to resumeSession()
2023-01-24 19:32:24 -06:00
Paul Frazee 8187a07aee Add basic analytics (#89)
* Add basic analytics

* Fix: add mock for analytics
2023-01-24 13:58:35 -06:00
Paul Frazee d054a69bcf Resolve all remaining lint issues (#88)
* Rework 'navIdx' variables from number arrays to strings to avoid equality-check failures in react hooks

* Resolve all remaining lint issues

* Fix tests

* Use node v18 in gh action test
2023-01-24 13:00:11 -06:00
Aryan Goharzad 4b1fe49132 more prettier and lint cleanup (#82)
* more prettier and lint cleanup

* Fixes more lint issues

* lint

* ignore more files

* remove todos

* lint
2023-01-24 11:03:18 -06:00
Paul Frazee b2c139dbc0 Account switcher (#85)
* Update the account-create and signin views to use the design system.

Also:
- Add borderDark to the theme
- Start to an account selector in the signin flow

* Dark mode fixes in signin ui

* Track multiple active accounts and provide account-switching UI

* Add test tooling for an in-memory pds

* Add complete integration tests for login and the account switcher
2023-01-24 09:06:27 -06:00
Aryan Goharzad 02488f06d8 Removes white space from around images (#81)
* Removes white space from around images

* Add a subtle border
2023-01-23 20:17:37 -06:00
Aryan Goharzad b0d367a3b8 Lints some errors and warnings (#76) 2023-01-20 13:43:28 -06:00
Aryan Goharzad 19c9ffa352 Fixes embed links for twitter and tiktok (#74) 2023-01-20 12:54:30 -06:00
Paul Frazee cfc7d17db3 Only use cursors supplied by the server (ref #59) 2023-01-20 10:39:00 -06:00
Paul Frazee 71b24952c7 Sanity check selector swipes 2023-01-20 10:15:59 -06:00
Paul Frazee d7aed0b199 More layout fixes in notifications 2023-01-20 08:40:41 -06:00
Paul Frazee 2823524388 Spacing fix of expanded notifications 2023-01-20 08:36:15 -06:00
Paul Frazee fd8083350c Fix font color of expanded notifs 2023-01-20 08:35:35 -06:00
Paul Frazee 1411f33393 Fix text color in composer 2023-01-19 20:08:43 -06:00
Paul Frazee 8840293c92 Fix a case where the 'aborted' error message was getting through 2023-01-19 17:55:00 -06:00
Paul Frazee 83fa99a4fe Fix: taps on images in the composer now register even when input is focused 2023-01-19 17:46:45 -06:00
Paul Frazee 64473f5c98 Fix: new post doesnt open images selector 2023-01-19 17:37:24 -06:00
Paul Frazee a45424fdb1 Add the ability to paste images into the composer (#56) 2023-01-19 17:36:49 -06:00
Paul Frazee 14d3389a63 Fix error logs 2023-01-19 17:05:36 -06:00
Paul Frazee 311c7b52c8 Fixes to likes list 2023-01-19 16:54:30 -06:00
Paul Frazee a8fd747187 Fixes to reposted-by list 2023-01-19 16:50:16 -06:00
Paul Frazee 259610ab37 Fixes to follows listing 2023-01-19 16:39:40 -06:00
Paul Frazee 44b4ec22d7 Fixes to the followers list view 2023-01-19 16:38:12 -06:00
Paul Frazee f3dd6a89a1 Update podfile.lock 2023-01-19 16:37:21 -06:00
Paul Frazee a60473b93f Fix: ensure all views can scroll to the bottom 2023-01-19 15:21:06 -06:00
Paul Frazee c8c5ab05cd Update load latest to match sizing and aesthetic better 2023-01-19 15:10:15 -06:00
Paul Frazee 38219721c9 Fix html extraction tests 2023-01-19 14:30:33 -06:00
Paul Frazee 9d6e23b6e7 Visual tweaks to post prompts 2023-01-19 14:28:11 -06:00
Paul Frazee ce69d13ec4 Fix weird bar at top of composer in dark mode 2023-01-19 14:17:15 -06:00
Paul Frazee 4875c2edaf Fix bad ref 2023-01-19 14:17:00 -06:00
Paul Frazee e39759a9a4 Change post prompt to a set of buttons (#55) 2023-01-19 14:08:53 -06:00
Aryan Goharzad 547b663bb6 Fixes youtube embed issues (#50)
* fixes youtube embed

* move extractMetaHtml test to its own file

* tests cleanup

* Add fallback for youtube meta data

* lint

* Check for youtube in the url domain

* use hostname instead of full url to check for link domain

* checks only for domain
2023-01-19 12:53:11 -06:00
Paul Frazee 6ab5776f95 Improve link meta fetching for bsky links (#54)
* Add share dropdown item to profiles

* Temporary improvement for links to content on the network

* Enlarge text slightly on embed cards
2023-01-19 12:30:28 -06:00
Aryan Goharzad 9b40d4c8cc Adding action for linting (#51)
* Adding action for linting

* Configuring eslint

* Update lint.yml

* Update lint.yml

* Update lint.yml

* adds yarn jest to package.json

* test report

* debugging tests

* trying force exit

* force exit

* test1

* forceexit

* using another reporter

* jest debugging

* separated lints & tests

* test

* Cleanup

* Add  /src/third-party, /ios, and /android to ignore list
2023-01-19 12:28:52 -06:00
Paul Frazee a0a81da164 Clean up the settings page 2023-01-19 11:49:53 -06:00
Paul Frazee 0220adaefb Improve the 'expand avis' animation in the notifications 2023-01-19 11:41:24 -06:00
Paul Frazee 481dee52b1 Fix missing key in list 2023-01-19 11:35:37 -06:00
Paul Frazee 78d74a3d7c Add the ability to expand/collapse users in notifications 2023-01-19 11:34:07 -06:00
Paul Frazee 83ca9059fa Tune the empty state visuals 2023-01-19 10:50:21 -06:00
Paul Frazee 8da491cc3b Tweak compose prompt spacing 2023-01-19 10:40:55 -06:00
Paul Frazee 8d1b3adb6a Post layout tweaks (#53)
* Increase left margin on feed and embiggen avis

* Decrease feed margins a bit

* Tweak post bottom margin

* Update loading placeholder to match feed

* Update 'view full thread' positioning

* Update postthread to match feed layout

* Update notifications and individual post to match new layout

* Add missing aborted check
2023-01-19 10:35:57 -06:00
Paul Frazee 626f85651f Update composer to preview external link cards (#52)
* Fetch external link metadata during compose so the user can preview and remove the embed

* Add missing mocks

* Update tests to match recent changes
2023-01-18 18:14:46 -06:00
Paul Frazee 2acc7ed107 Enlarge avatars in the notifications 2023-01-18 17:06:17 -06:00
Paul Frazee 14a2be33af Remove log 2023-01-18 16:52:00 -06:00
Paul Frazee a642a3fe8f Handle post deletions by removing from active views (close #37) 2023-01-18 16:45:48 -06:00
Paul Frazee b90f7eaefb Fix image compression (close #41) 2023-01-18 14:54:55 -06:00
Paul Frazee 455515cae1 Keep the composer image selector open after choosing an image 2023-01-18 14:47:59 -06:00
Paul Frazee e3fc3b997a Hackfix around 'images too large' issue 2023-01-18 14:47:42 -06:00
Paul Frazee 3c529e743f Update compose prompt for isual balance and to include image button 2023-01-18 13:57:53 -06:00
Paul Frazee 9d7f968cdd Lighten the button gradients a bit 2023-01-18 13:30:50 -06:00
Paul Frazee b5769f9aed Fix to text consistency in composer 2023-01-18 13:22:34 -06:00
Paul Frazee ac98b322ca Focus the text input on tap during the composer 2023-01-18 13:21:23 -06:00
Paul Frazee c499f5f96a Remove all links from post meta to ensure taps are more consistent 2023-01-18 13:10:08 -06:00
Paul Frazee d719b502d3 Prettier profile headers (no standard header) 2023-01-18 12:56:53 -06:00
Paul Frazee 02e24c23a6 Move the grays from a red undertone to blue 2023-01-18 12:40:51 -06:00
Paul Frazee c57ae4cea4 Update gradients to use a more consistent blue theme 2023-01-18 12:32:48 -06:00
Paul Frazee 2536d6bf10 Rework all typography 2023-01-18 11:15:40 -06:00
Paul Frazee 060ce2c725 Merge branch 'improved-lightbox' into main 2023-01-17 21:18:25 -06:00
Paul Frazee a8d2935cf2 Fix an issue that caused the shelf menu to show up at random 2023-01-17 21:01:52 -06:00
Paul Frazee d6fb1528a0 Remove leftover code 2023-01-17 20:47:43 -06:00
Paul Frazee 2e3d170d1e Improve lightbox... and update to React Native 0.71.0 (#49)
* Switch to a better lightbox implementation (close #42)

* Upgrade to react-native 0.71.0

* Update (or remove low-value) tests
2023-01-17 20:40:02 -06:00
Paul Frazee 4690e28cde Update (or remove low-value) tests 2023-01-17 20:38:15 -06:00
Paul Frazee 66a754ad22 Upgrade to react-native 0.71.0 2023-01-17 20:21:11 -06:00
Paul Frazee 83a74f0f6e Switch to a better lightbox implementation (close #42) 2023-01-17 19:34:12 -06:00
Paul Frazee 811b8cfc4c Add images to the post in the right order 2023-01-17 18:35:48 -06:00
Paul Frazee a81d9cfca6 Give a more sensible default crop in the post image picker (related #39) 2023-01-17 18:35:37 -06:00
Paul Frazee c7ef5cd741 Add profile menuitem to main menu (close #47) 2023-01-17 16:55:43 -06:00
Paul Frazee 41f6afc528 Fix to extraneous home feed polling 2023-01-17 16:49:11 -06:00
Paul Frazee 37cb821d6b Visual improvements to post embeds for external links 2023-01-17 16:42:32 -06:00
Paul Frazee 203bfc4c7c Group together notifications more aggressively 2023-01-17 16:25:10 -06:00
Paul Frazee 779556f36d Fix left-alignment on notifications 2023-01-17 16:22:34 -06:00
Paul Frazee cf575cca68 Increase the profile bio line-count cutoff significantly to only catch very silly newline abuse (close #48) 2023-01-17 16:18:41 -06:00
Paul Frazee 97e6bdbe40 More adjustments to the repost icon 2023-01-17 13:25:04 -06:00
Paul Frazee 5f0101a360 Enlarge repost icon arrows 2023-01-17 13:21:11 -06:00
Paul Frazee a3bb305229 Rework repost icon to match line widths 2023-01-17 13:17:38 -06:00
Paul Frazee 808b33e7a7 Refer to upvotes as 'likes' in the UI (will change in the protocol soon) 2023-01-17 12:35:47 -06:00
Paul Frazee ac917ba829 Fix notification descriptions and render images for your own posts in notifs 2023-01-17 12:12:17 -06:00
Paul Frazee 6c3f2d3505 Lighten post controls a little in light-mode and add them to the theme 2023-01-17 11:20:07 -06:00
Paul Frazee 742a43658f Lighten borders slightly 2023-01-17 11:14:47 -06:00
Paul Frazee 0307e2e932 Fix an issue that caused the feed to rearrange on loadmore 2023-01-17 10:58:51 -06:00
Paul Frazee 7c1add25a1 Remove duplicate posts caused by reposts 2023-01-17 10:45:37 -06:00
Paul Frazee feeab9205b Add loading spinners to lightbox views (close #38) 2023-01-17 10:40:09 -06:00
Paul Frazee 1023653d97 Shrink the header back down but use bolder title text 2023-01-17 10:32:40 -06:00
Paul Frazee 077f2fe093 Remove scenes (#36)
* Remove scenes from the main menu

* Remove scenes from the profile view

* Remove 'scenes explainer' from onboarding flow

* Remove scene-related modals

* Remove member/membership code

* Remove all scenes-related items from notifications

* Remove scene-related code from posts feed

* Remove scene-related API helpers

* Update tests
2023-01-17 10:11:30 -06:00
João Ferreiro d636ec6339 Unit Testing (#35)
* add testing lib

* remove coverage folder from git

* finished basic test setup

* fix tests typescript and import paths

* add first snapshot

* testing utils

* rename test files; update script flags; ++tests

* testing utils functions

* testing downloadAndResize wip

* remove download test

* specify unwanted coverage paths;
remove update snapshots flag

* fix strings tests

* testing downloadAndResize method

* increasing testing

* fixing snapshots wip

* fixed shell mobile snapshot

* adding snapshots for the screens

* fix onboard snapshot

* fix typescript issues

* fix TabsSelector snapshot

* Account for testing device's locale in ago() tests

* Remove platform detection on regex

* mocking store state wip

* mocking store state

* increasing test coverage

* increasing test coverage

* increasing test coverage on src/screens

* src/screens (except for profile) above 80% cov

* testing profile screen wip

* increase coverage on Menu and TabsSelector

* mocking profile ui state wip

* mocking profile ui state wip

* fixing mobileshell tests wip

* snapshots using testing-library

* fixing profile tests wip

* removing mobile shell tests

* src/view/com tests wip

* remove unnecessary patch-package

* fixed profile test error

* clear mocks after every test

* fix base mocked store values (getters)

* fix base mocked store values
(hasLoaded, nonReplyFeed)

* profile screen above 80% coverage

* testing custom hooks

* improving composer coverage

* fix tests after merge

* finishing composer coverage

* improving src/com/discover coverage

* improve src/view/com/login coverage
fix SuggestedFollows tests
adding some comments

* fix SuggestedFollows tests

* improve src/view/com/profile coverage
extra minor fixes

* improve src/view/com/notifications coverage

* update coverage ignore patterns

* rename errorMessageTryAgainButton
increase SuggestedFollows converage

* improve src/view/com/posts coverage

* improve src/view/com/onboard coverage

* update snapshot

* improve src/view/com/post coverage

* improve src/view/com/post-thread coverage
rename ErrorMessage tests
test Debug and Log components

* init testing state

* testing root-store

* updating comments

* small fixes

* removed extra console logs

* improve src/state/models coverage
refactor rootStore
rename some spies

* adding cleanup method after tests

* improve src/state/models coverage

* improve src/state/models coverage

* improve src/state/models coverage

* improve src/state/models coverage

* test setInterval in setupState

* Clean up tests and update Home screen state management

* Remove some tests we dont need

* Remove snapshot tests

* Remove any tests that dont demonstrate clear value

* Cleanup

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-01-17 10:06:00 -06:00
Paul Frazee 98c9a6ad32 Remove the avi from the compose prompt 2023-01-16 17:37:18 -06:00
Paul Frazee 33a4d2cbe5 Enlarge the view header 2023-01-16 17:21:35 -06:00
Paul Frazee 8a5bc60819 Dark mode color fixes 2023-01-16 17:11:15 -06:00
Paul Frazee f492fd4d41 Readd the FAB for composing new posts 2023-01-16 17:07:33 -06:00
Paul Frazee ed7204ab71 Round the corners on single-image embeds a bit more 2023-01-16 16:58:30 -06:00
Paul Frazee 9aeaa38f3b More spacing and sizing tweaks, including larger post controls 2023-01-16 16:54:35 -06:00
Paul Frazee b3f9ed7981 Enlarge post text slightly 2023-01-16 16:42:07 -06:00
Paul Frazee b8ab064fcc More spacing fixes, especially for the repost info 2023-01-16 16:34:52 -06:00
Paul Frazee 58bf9cb8cd Spacing fixes 2023-01-16 16:30:05 -06:00
Paul Frazee 8a67e8d102 Fix visual consistency of 'reply to' in post and use display name 2023-01-16 16:24:16 -06:00
Paul Frazee 5d6fc56349 Fix missing metrics in post threads 2023-01-16 16:22:24 -06:00
Paul Frazee 77ed2129d3 Move menu controls into post footers and improve meta info rendering 2023-01-16 16:09:51 -06:00
Aryan Goharzad fcebe8e0b0 Readme Cleanup (#40)
* Readme Cleanup

Updates instructions for starting the dev/staging servers

* Update README.md

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-01-16 15:40:34 -06:00
Paul Frazee 6df617003a Fix: remove duplicates in the TL caused by rendering reply parents 2023-01-16 14:49:58 -06:00
Paul Frazee 6953bf9d22 Fix image compression for avis and banner images 2023-01-12 15:07:32 -06:00
Paul Frazee 9396595595 Add scrolling to menu 2023-01-03 14:35:33 -06:00
Paul Frazee cf13b5cd4c Bump deps to pull in some bugfixes 2023-01-03 14:31:12 -06:00
Paul Frazee e24ab48b73 Indicate images in notifications 2023-01-03 13:14:10 -06:00
Paul Frazee bbee08eb22 Implement validation and proper type detection 2023-01-03 13:08:56 -06:00
Paul Frazee c68f291128 Improve handling around connection failures during login 2023-01-03 12:17:07 -06:00
Paul Frazee 32b3575074 Add 'is 13' checkbox to account creation 2023-01-03 11:49:40 -06:00
Paul Frazee 11f972c640 Fix to feed update 2023-01-03 11:26:51 -06:00
Paul Frazee 61cf754fd5 Fix session hydration during load 2023-01-03 11:08:39 -06:00
Paul Frazee 00b50c71b5 Fix bug in error handling 2023-01-03 11:08:29 -06:00
Paul Frazee 66eb6f2888 Introduce error boundaries around all screens 2023-01-02 21:49:14 -06:00
Paul Frazee bc571ee998 Improve error logging 2023-01-02 21:39:15 -06:00
Paul Frazee c758996034 Bump api@0.0.5 and use the type guard helpers 2023-01-02 20:56:35 -06:00
Paul Frazee 1f26494c94 Implement logging system 2023-01-02 17:38:13 -06:00
Paul Frazee 74bfc10e36 Dont mute posts for a user when viewing their profile 2023-01-02 13:45:27 -06:00
Paul Frazee e194e5de91 Implement account muting 2023-01-02 13:40:14 -06:00
Paul Frazee 09f96da982 Fix to loading state 2022-12-30 15:58:28 -06:00
Paul Frazee 6e48d63dda Fix the status bar coloring 2022-12-30 15:56:54 -06:00
Paul Frazee eec636897c Add dark mode toggle 2022-12-30 15:48:34 -06:00
Paul Frazee 777f30562b Integrate composer into design system 2022-12-30 15:42:09 -06:00
Paul Frazee 16e4bc66bd Various small fixes 2022-12-30 15:32:07 -06:00
Paul Frazee 98c5312a29 Integrate search into suggested follows 2022-12-30 15:21:09 -06:00
Paul Frazee 9971f1f035 Dont autofocus the search input 2022-12-30 15:12:36 -06:00
Paul Frazee dec9d97171 Integrate settings into design system and some various fixes/tweaks 2022-12-30 15:11:47 -06:00
Paul Frazee 355749e605 Integrate menu into design system 2022-12-30 15:08:10 -06:00
Paul Frazee 6268736bfa Integrate notifications into the design system 2022-12-30 13:34:10 -06:00
Paul Frazee a270d750c8 Integrate profile listings into design system 2022-12-30 13:20:55 -06:00
Paul Frazee 0eb4c7495e Update profile header to use design system 2022-12-30 13:13:10 -06:00
Paul Frazee b438318b92 Integrate the shell into the design system 2022-12-30 12:49:07 -06:00
Paul Frazee 01aaa6123f Integrate ViewSelector into design system 2022-12-30 12:40:16 -06:00
Paul Frazee 486a1f082c Integrate composer prompt into design system 2022-12-30 12:35:37 -06:00
Paul Frazee f943cbd04a Integrate ViewHeader into the design system 2022-12-30 12:29:11 -06:00
Paul Frazee c54fa5b2e4 Update threads to use design system 2022-12-30 12:19:45 -06:00
Paul Frazee 54c0115181 Improve image layout 2022-12-30 11:55:25 -06:00
Paul Frazee bb3a2fddfc Tune post controls 2022-12-28 19:37:30 -06:00
Paul Frazee 5135a13812 Update posts in feed to use the theming system 2022-12-28 19:20:02 -06:00
Paul Frazee 059c3b362d Update notifications 2022-12-28 15:53:06 -06:00
Paul Frazee 090ceb4c53 Tighten up spacing and dividers 2022-12-28 15:50:28 -06:00
Paul Frazee 7796203c25 Fix letter spacing 2022-12-28 15:08:14 -06:00
Paul Frazee 44ae514d89 Add a design system (#34)
* Add theming system

* Add standard Button control and update RadioButtons

* Unify radiobutton with design system

* Update debug screen to have multiple views

* Add ToggleButton

* Update error controls to use design system

* Add typography to <Text> element

* Move DropdownButton into the design system

* Clean out old code

* Move Text into design system

* Add 'inverted' color palette

* Move LoadingPlaceholder into the design system
2022-12-28 14:06:01 -06:00
Paul Frazee 12d8e06a1e Increase image resolutions 2022-12-26 17:41:12 -06:00
Paul Frazee de65d9198a Start with highest quality compression and find a suitable size (#33) 2022-12-26 12:01:40 -06:00
Paul Frazee 41bf8e15cd Bump @atproto/api@0.0.3 2022-12-22 14:43:54 -06:00
João Ferreiro adeb1d5cec Unit testing (#32)
* add testing lib

* remove coverage folder from git

* finished basic test setup

* fix tests typescript and import paths

* add first snapshot

* testing utils

* rename test files; update script flags; ++tests

* testing utils functions

* testing downloadAndResize wip

* remove download test

* specify unwanted coverage paths;
remove update snapshots flag

* fix strings tests

* testing downloadAndResize method

* increasing testing

* fixing snapshots wip

* fixed shell mobile snapshot

* adding snapshots for the screens

* fix onboard snapshot

* fix typescript issues

* fix TabsSelector snapshot

* Account for testing device's locale in ago() tests

* Remove platform detection on regex

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2022-12-22 09:32:39 -06:00
Paul Frazee 61511d5161 Unvendor the api and switch to @atproto/api 2022-12-22 09:17:07 -06:00
Paul Frazee aee205b0ab Fix issue which caused parent posts to fail at mobx reactivity 2022-12-21 14:37:22 -06:00
Paul Frazee e59763b50a Update to use new getTimeline, getAuthorFeed, and getPostThread output models 2022-12-20 22:54:56 -06:00
Paul Frazee 5168d44926 Replace removed hasIndexes behavior 2022-12-20 16:32:04 -06:00
Paul Frazee def3156c33 Get the composer into a passable visual state on android when the keyboard is open 2022-12-20 14:55:50 -06:00
Paul Frazee a290891f70 Fix post-meta truncation on android 2022-12-20 14:50:04 -06:00
Paul Frazee a96562e89c Fixes to text input colors on android 2022-12-20 14:29:50 -06:00
Paul Frazee 279d41fcd1 Wrap all <Text> in a helper that ensures black color is applied by default 2022-12-20 12:49:44 -06:00
Paul Frazee 4932505c5e Use consistent rendering of avis and post metas in threads 2022-12-20 10:33:56 -06:00
Paul Frazee 629b7d8c9b Proper fix to the previous panic fix: put threads at the end when they should be there 2022-12-20 09:20:53 -06:00
Paul Frazee 5c71f8e32a Fix to error condition that breaks the feed 2022-12-20 09:02:38 -06:00
Paul Frazee 395a8838be A couple more android updates 2022-12-19 19:43:28 -06:00
João Ferreiro 17903b817d rn-fetch-blob android setup 2022-12-19 19:26:54 -06:00
João Ferreiro 54f05bfcf6 minor fix 2022-12-19 19:26:54 -06:00
João Ferreiro b1a058d098 fixing remaining text colors on android 2022-12-19 19:25:58 -06:00
João Ferreiro 27657541f2 fixing modal & keyboard interaction on android 2022-12-19 19:23:24 -06:00
João Ferreiro 73ea67f5c0 initial android fixes 2022-12-19 19:20:44 -06:00
João Ferreiro d065b62f52 fix camera permissions 2022-12-19 19:19:00 -06:00
João Ferreiro eb03170736 fix android runtime 2022-12-19 19:19:00 -06:00
João Ferreiro 6f734f7978 fix android build 2022-12-19 19:19:00 -06:00
Paul Frazee 9235d6c13b Remove prefetch of feed (it wasnt working) 2022-12-19 19:16:56 -06:00
Paul Frazee bc54c8d7c6 Tighten up the post control hit regions 2022-12-19 19:13:26 -06:00
Paul Frazee 3b8dbbff12 Tighten up the home feed 2022-12-19 19:12:43 -06:00
Paul Frazee e8bb545023 Enable image-only posts 2022-12-19 18:51:13 -06:00
Paul Frazee f0b30e26d4 Fix to thread ordering in the feed: correctly identify the starts of threads when adjacent 2022-12-19 13:22:18 -06:00
Paul Frazee cbfa9f62a4 Improve thread rendering 2022-12-18 18:54:05 -06:00
Paul Frazee fefd8cc8a0 Add WIP 'report account' modal 2022-12-18 17:45:23 -06:00
Paul Frazee 09765a5d36 Add WIP 'report post' modal 2022-12-18 17:28:28 -06:00
Paul Frazee e325b72c62 Reduce confusing visual feedback while scrolling 2022-12-18 16:43:18 -06:00
Paul Frazee 055a4d8e98 Add zooming to the lightbox 2022-12-16 16:32:54 -06:00
Paul Frazee 1e28ae6d2a Prefetch feed refreshes to speed up 'load more posts' 2022-12-16 15:37:13 -06:00
Paul Frazee 16343a2936 Fixes to the composer UX around images and scrolling 2022-12-16 14:48:37 -06:00
Paul Frazee 18cc2183cc Add swipe gestures to the lightbox 2022-12-16 11:57:45 -06:00
Paul Frazee 5e711c799b Implement 'forgot password' flow 2022-12-15 17:45:03 -06:00
Paul Frazee ca4b9d3a60 Split login screen into component files 2022-12-15 14:06:05 -06:00
Paul Frazee ebd03ffe2a Just do full renders of parent posts in the feed 2022-12-15 11:43:05 -06:00
Paul Frazee ee4f0673f1 Dont use ??= 2022-12-15 10:21:25 -06:00
Paul Frazee 33145f2e71 Improve handling of connection loss 2022-12-14 16:03:10 -06:00
Paul Frazee 721fd84a7e Fix state-tracking 2022-12-14 15:49:45 -06:00
Paul Frazee a06fd7dfd4 Reset feeds on login 2022-12-14 15:49:38 -06:00
Paul Frazee bd6bb4df06 Add haptic feedback to likes and reposts 2022-12-14 15:46:21 -06:00
Paul Frazee bb4dc3c3a5 Add post embeds (images and external links) 2022-12-14 15:35:15 -06:00
Paul Frazee 7b7fe7ccd8 Move posts feed to root store (me) and ensure new posts always update the feed 2022-12-13 15:52:18 -06:00
Paul Frazee 316679ae68 Fix: avoid dup keynames in posts feed 2022-12-13 15:51:54 -06:00
Paul Frazee b34cae6db4 Enlarge feed avis slightly 2022-12-13 15:40:55 -06:00
Paul Frazee 52e31394ab Ensure load more is always visible 2022-12-13 15:36:05 -06:00
Paul Frazee 84f18e03fa Use avatar in viewheader when cant go back 2022-12-13 15:35:45 -06:00
Paul Frazee 30761594ec Fix: avoid duplicate key names in notifications 2022-12-13 15:35:11 -06:00
Paul Frazee 87258a2439 Fix issue that caused repost & trend data to get lost on feed updates 2022-12-13 15:17:18 -06:00
Paul Frazee 6e31e928a9 Hide main menu drawer on click outside 2022-12-13 15:01:14 -06:00
Paul Frazee d0587c81f8 Use full available screen 2022-12-13 14:58:25 -06:00
Paul Frazee 29018f06b9 Fix: show avatars in all notifications 2022-12-13 14:53:00 -06:00
Paul Frazee 171cb6b3d3 Debug: disable feed reordering to isolate bugs 2022-12-13 11:15:32 -06:00
Paul Frazee 3e37c27310 Reposition 'load latest' based on minimal shell mode 2022-12-13 11:15:18 -06:00
Paul Frazee 06c3ebe2d4 Hide footer on scroll down (minimal shell mode) 2022-12-12 16:04:14 -06:00
Paul Frazee d336cd58b1 Improvements to service selection during login 2022-12-12 15:13:45 -06:00
Paul Frazee 684f67a8e0 Add profile image lightbox 2022-12-12 14:54:56 -06:00
Paul Frazee a7b23613d3 Improve session management 2022-12-12 14:39:02 -06:00
Paul Frazee a6db1a9ee3 Add banner image upload to profiles 2022-12-12 13:47:18 -06:00
Paul Frazee 0f065b2c27 Improvements to 'edit profile' error messages 2022-12-12 13:17:40 -06:00
Paul Frazee 7399e37bba Add 'loading more' spinner to feeds 2022-12-12 11:22:54 -06:00
Paul Frazee 7ce4c821e5 Tune the swipe gesture to detect more easily 2022-12-12 11:11:37 -06:00
Paul Frazee 68dd96128a More aesthetic and perf improvements to the menu drawer 2022-12-12 10:48:36 -06:00
Paul Frazee 6e55149281 Fix duplicate 'end of feed' issue 2022-12-12 09:56:19 -06:00
Paul Frazee 3aca890da6 Improve aesthetic of main menu swipeout (use screen mask) 2022-12-09 11:46:49 -06:00
Paul Frazee 4798d44110 Add main menu button 2022-12-09 11:22:19 -06:00
Paul Frazee 37b2b40aa1 Show 'processing' spinner in edit profile modal 2022-12-08 16:08:15 -06:00
Paul Frazee f9e287b12c Turn the main menu into a 'drawer' instead of a screen in the history 2022-12-08 15:34:22 -06:00
Paul Frazee 96dc9e398b Switch to temporary 'fixed tabs' model for default and notifications 2022-12-08 14:21:28 -06:00
Paul Frazee 2f0157dd33 Add avatar images and fix some type signatures 2022-12-08 13:45:23 -06:00
Paul Frazee f608712308 Replace reanimated for tabs selector 2022-12-07 17:08:49 -06:00
Paul Frazee 3807f216fe Cleanup 2022-12-07 16:59:10 -06:00
Paul Frazee 6b1a5374ae Replace navigational 'back swipe' gesture with new HorzSwipe util 2022-12-07 16:56:14 -06:00
Paul Frazee 71b7158ff9 Add HorzSwipe gesture and integrate it into the ViewSelector 2022-12-07 15:51:06 -06:00
Paul Frazee 26f06d768c Switch to react-native default animation tools for composer and post controls 2022-12-06 17:43:54 -06:00
Paul Frazee 383a40bc03 Fix mention-creation and implement mentions in notifications 2022-12-06 13:47:52 -06:00
Paul Frazee 8413fccdb5 Better empty state in profiles 2022-12-06 13:09:18 -06:00
Paul Frazee 3161703d8a Ensure all feed views can refresh 2022-12-06 13:04:40 -06:00
Paul Frazee 4c097d89c5 Add build version to menu 2022-12-06 12:40:40 -06:00
Paul Frazee 0b50ae3e61 Add context to replies when appearing in the feed 2022-12-06 12:29:13 -06:00
Paul Frazee 063583bb6f Implement terms-of-service and privacy-policy links in signup 2022-12-06 11:39:46 -06:00
Paul Frazee f2da9f2d0a Update API build 2022-12-06 11:39:30 -06:00
João Ferreiro fc7fa8a354 Upload profile image (#29)
* add editable button profile picture

* add editable button cover picture

* upload profile photos (save them locally)

* rollback pbxproj changes

* rollback podfile checksum (for git only)

* move edit photos onto edit profile modal

* adjust edit icon and image cropping size

* added temporary (react state) image

* added IMAGES_ENABLED flag

* minor lint fix

* save local photos on edit profile upload (wip)

* save profile photos on profile view state (wip)

* remove unecessary computed

* save photo in state before pushing it to viewmodel

* refactor profile pictures's state

* remove unnecessary isMe prop

* removing old comments

* tweak icon size & position

* A few styling tweaks and a fix to mobx state management

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2022-12-06 10:57:15 -06:00
Paul Frazee 709a970cdc Fix to unicode zero-width characters in expanded posts 2022-12-06 10:15:59 -06:00
Paul Frazee 5d7814897c Never allow undefined values in me model 2022-12-06 10:11:45 -06:00
Paul Frazee 1e2ee001a8 Rework the 'main menu' to be a screen that's always in history 2022-12-06 10:11:32 -06:00
Paul Frazee 11423fc25c Add missing usage descriptions for ios 2022-12-06 10:08:27 -06:00
Paul Frazee 160fc31b47 Enlarge the small emoji-only replies 2022-12-05 15:40:33 -06:00
Paul Frazee 3389e0dc4a Dismiss keyboard in search on scroll 2022-12-05 15:22:23 -06:00
Paul Frazee ae8162974e Add 'copy post text' tool 2022-12-05 15:03:42 -06:00
Paul Frazee b33269a535 Better sized and more informative character counter 2022-12-05 13:59:13 -06:00
Paul Frazee d8280b6ad9 Switch to System font to fix emoji rendering 2022-12-05 13:44:24 -06:00
Paul Frazee 935cc8f675 Fix: never attempt update on 0 items 2022-12-05 13:36:13 -06:00
Paul Frazee 3bd6e9c84c Increase touch-size of the 'load new posts' button 2022-12-05 13:33:31 -06:00
Paul Frazee f1b9114af0 Ensure the UI always renders, even in bad network conditions (close #6) 2022-12-05 13:25:04 -06:00
Paul Frazee 95e5b169c8 Merge branch 'upload-image' into main 2022-12-05 11:25:33 -06:00
Paul Frazee 09791a3b3c Remove loading-placeholder animation; according to some issues, animated linear-gradients may cause crashes 2022-12-05 10:50:46 -06:00
Paul Frazee c7a5642e48 Fix 'swipe back to nothing' bug 2022-12-05 10:39:34 -06:00
Paul Frazee 6c23972620 Make 'backswipe' a little easier to trigger 2022-12-05 10:25:53 -06:00
Paul Frazee 211af98aaf Enlarge click targets for post controls and view header 2022-12-05 10:18:38 -06:00
Paul Frazee bc404572cb Hide images behind a build flag until ready 2022-12-02 10:48:57 -06:00
João Ferreiro b824ac710b Upload image in composer (#27)
* upload images in composer v1

* fix android compile

* reafctor image carousel into new component;
fix photo overlapping text in composer

* revert android changes

* further refactoring code into different components

* move show carousel out of the component

* fixing add photo using camera

* fix typescript issue; force mediatype photo

* change post test with photo attached;
remove auto linking settings

* use runInAction in getPhotos model

* react-hooks/exhaustive-deps fixes

* crop every photo;
make use of useCallback

* moving placeholder condition

* Cleanup

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2022-12-02 10:41:01 -06:00
Paul Frazee 372cd80175 Cleanup 2022-12-02 10:40:22 -06:00
João Ferreiro d0c9f95c7e moving placeholder condition 2022-11-29 18:32:07 +00:00
João Ferreiro 91a06f2390 crop every photo;
make use of useCallback
2022-11-29 18:26:16 +00:00
João Ferreiro ffd333164b react-hooks/exhaustive-deps fixes 2022-11-29 17:51:06 +00:00
João Ferreiro a6e8bb39b8 use runInAction in getPhotos model 2022-11-29 17:46:55 +00:00
João Ferreiro 8d87fbd56a change post test with photo attached;
remove auto linking settings
2022-11-29 16:45:44 +00:00
João Ferreiro a129ddba27 Merge branch 'main' into upload-image 2022-11-29 16:19:38 +00:00
João Ferreiro 211b9fc2f2 fix typescript issue; force mediatype photo 2022-11-29 16:19:15 +00:00
João Ferreiro 8b6bb6999d fixing add photo using camera 2022-11-29 16:11:17 +00:00
Paul Frazee 524cb062a2 Improvements to link and mention detection regarding surrounding punctuation 2022-11-29 10:01:57 -06:00
João Ferreiro be71989e45 move show carousel out of the component 2022-11-29 16:00:21 +00:00
João Ferreiro edb5a8ddb2 Merge branch 'main' into upload-image 2022-11-29 15:36:26 +00:00
João Ferreiro fb461c0344 further refactoring code into different components 2022-11-29 15:35:49 +00:00
Paul Frazee a8608d0170 Relax the requirement that post entities match their value 2022-11-29 09:35:10 -06:00
Paul Frazee 628f69605c Decode html entities in link embeds 2022-11-29 09:29:57 -06:00
João Ferreiro 537770b39d revert android changes 2022-11-29 15:25:32 +00:00
João Ferreiro 44eca8a550 reafctor image carousel into new component;
fix photo overlapping text in composer
2022-11-29 10:59:32 +00:00
João Ferreiro 3a79e46a4a Merge branch 'main' into upload-image 2022-11-29 10:29:19 +00:00
Paul Frazee 6f56a8c539 Improve handling of deleted posts 2022-11-28 16:37:39 -06:00
Paul Frazee 2ac28aa2de Fixes to edit profile modal 2022-11-28 14:51:49 -06:00
Paul Frazee 53c55b2d7a Fix jank in notifications loading-state rendering 2022-11-28 14:22:19 -06:00
Paul Frazee 31e0fa898a Use a persistent notifications model to improve load times of the notifications view 2022-11-28 14:19:49 -06:00
Paul Frazee 1ec46a00e2 Improve unread notification styling 2022-11-28 13:56:05 -06:00
Paul Frazee d98fbbbe4d Batch notification loads to avoid layout reflows due to async 2022-11-28 13:45:49 -06:00
João Ferreiro ef02ec9ab1 fix android compile 2022-11-28 16:56:23 +00:00
João Ferreiro 72fe122005 Merge branch 'main' into upload-image 2022-11-28 16:56:05 +00:00
João Ferreiro 4b960bc320 upload images in composer v1 2022-11-28 16:46:58 +00:00
Paul Frazee 090ea1a3f4 Slow down and enlarge post-ctrl animations (close #11) 2022-11-28 10:40:25 -06:00
Paul Frazee 983f2349e0 Fix toast positioning (close #9) 2022-11-28 10:38:16 -06:00
Paul Frazee 8af98b4a52 Set a page-size on notifications 2022-11-28 10:22:52 -06:00
Paul Frazee d821803050 Fix a couple incorrect link detections ('e.g.' and 'foo.jpg') (close #13) 2022-11-28 10:22:08 -06:00
Paul Frazee 35ead0155e Remove the 'warning color' from the character counter 2022-11-28 09:58:40 -06:00
Paul Frazee 5b908f5358 Tune post-thread expanded view: add reply prompt, fix spacing and sizing 2022-11-28 09:49:41 -06:00
Paul Frazee 099fea6624 Enlarge the 'load more posts' prompt 2022-11-28 09:30:31 -06:00
Paul Frazee a2ef0b5a68 Enlarge the view header, left align the title, and add a compose button 2022-11-28 09:29:35 -06:00
Paul Frazee 38c17e06bb Update composer to shrink fonts and use more consistent visuals; also autofocus the input 2022-11-28 09:14:04 -06:00
Paul Frazee c7c0c04b66 Increase information density and enlarge some click targets 2022-11-28 09:13:37 -06:00
Paul Frazee bc7364acca Fix 'load more' showing up incorrectly 2022-11-28 08:30:34 -06:00
Paul Frazee 1e9d265403 Add link embeds to posts 2022-11-23 17:01:00 -06:00
Paul Frazee 02689c5533 Implement a link metadata fetching util function 2022-11-23 16:29:17 -06:00
Paul Frazee d0f6da2a51 Include reposts in no-replies view of feeds 2022-11-23 16:27:49 -06:00
Paul Frazee 2e9a858e3d Remove webcrypto polyfill, as it's no longer needed 2022-11-23 15:04:44 -06:00
Paul Frazee 8e46204617 Detect links in profile bios 2022-11-23 14:53:33 -06:00
Paul Frazee b844e479a1 Add replying-to context to threads 2022-11-23 14:22:40 -06:00
Paul Frazee f7ccf14211 Ensure threads group together posts by op 2022-11-23 13:45:50 -06:00
Paul Frazee 814ddb194a Disable landscape orientation in iPhones 2022-11-23 13:34:45 -06:00
Paul Frazee d7103412e5 Fix: Adjust home TL post dedup to ensure polling works correctly 2022-11-23 13:29:26 -06:00
Paul Frazee ad4c413ae4 Show parent post in composer when replying (close #3) 2022-11-23 13:28:29 -06:00
Paul Frazee f0ed5d7c28 Fix: dont detect double dots as urls 2022-11-23 13:15:38 -06:00
Paul Frazee e8304bb77d Fix keyboard issues in search 2022-11-23 13:12:29 -06:00
Paul Frazee 5ae10f17c5 Turn composer character counter into a countdown 2022-11-23 13:07:09 -06:00
Paul Frazee 4b8de11046 Handle bsky.app links natively 2022-11-23 10:51:20 -06:00
Paul Frazee 27f94052e9 Longer shortened URLs 2022-11-23 10:44:55 -06:00
Paul Frazee 8004d038ab Add threading to post feeds 2022-11-23 10:39:28 -06:00
Paul Frazee ff9d7346ec Fallback to display name in search results 2022-11-22 16:18:10 -06:00
Paul Frazee c0298dc7b7 Implement user search 2022-11-22 16:14:58 -06:00
Paul Frazee ab0f4f8288 Keep fetching suggestions to reach a full list 2022-11-22 15:53:23 -06:00
Paul Frazee 148fa29875 Farewell, todos.txt 2022-11-22 14:31:46 -06:00
Paul Frazee f13c42c078 Add support for links with no scheme in composer 2022-11-22 14:30:35 -06:00
Paul Frazee a079605049 Fix to tests 2022-11-22 14:30:13 -06:00
Paul Frazee 56d98abe64 Shorten rendered URLs in posts 2022-11-22 13:16:40 -06:00
Paul Frazee dab5a36a58 Fix to thread reply lines (fill full space) 2022-11-22 13:04:54 -06:00
Paul Frazee 65e80556e8 Add bottom padding to threads 2022-11-22 12:58:08 -06:00
Paul Frazee b60406f960 Scroll to highlighted post in threads 2022-11-22 12:56:56 -06:00
Paul Frazee 4d2c2c5f2a Add compose prompt to home feed empty state 2022-11-22 12:29:50 -06:00
Paul Frazee deb7c1bba7 Add 'posts & replies' view to profiles 2022-11-22 12:26:53 -06:00
Paul Frazee 8b1134dc75 Turn home button into a 'go back to start of nav history' 2022-11-22 12:19:38 -06:00
Paul Frazee a83da7367c Change post prompt to 'Whats up?' 2022-11-22 12:16:08 -06:00
Paul Frazee ec3ba2ebc8 Shrink and darken the post controls a little 2022-11-22 12:15:26 -06:00
Paul Frazee ab4f828865 Shrink the footer a bit 2022-11-22 12:02:45 -06:00
Paul Frazee c72e1b6635 Refactor: create src/lib to reflect actual sharing of that code 2022-11-22 12:02:31 -06:00
Paul Frazee 4e245f8471 Merge branch 'simplify' into main 2022-11-21 18:55:08 -06:00
Paul Frazee 652362b0c2 Track rotated auth tokens 2022-11-21 16:17:40 -06:00
Paul Frazee abd6ffdbf5 Add web linking and proper share controls 2022-11-21 16:07:26 -06:00
Paul Frazee 0dc1c904ed Adjust control alignment 2022-11-20 16:29:43 -06:00
Paul Frazee a8bdb4a288 Fix the pointy edges on the arrow icons 2022-11-20 16:24:44 -06:00
Paul Frazee 9ec2712728 Move search btn into the viewheader 2022-11-20 12:25:11 -06:00
Paul Frazee 64609575e7 Add build flags and disable tabs for now 2022-11-20 12:00:40 -06:00
Paul Frazee 09411967e8 Adjust post control sizing and alignment 2022-11-20 11:45:31 -06:00
Paul Frazee fbec25412b Remove downvotes from the UI 2022-11-20 11:32:13 -06:00
Paul Frazee ffe51591e8 Replace the FAB with a compose prompt at the top of the feed 2022-11-20 11:20:08 -06:00
Paul Frazee f11ef7ba0b Dont group notifications that are an hour apart 2022-11-18 15:38:20 -06:00
Paul Frazee 0439674aa9 Fix data loss on notifications-view update 2022-11-18 14:17:26 -06:00
Paul Frazee e609f8dadb Dedup posts in the home TL 2022-11-18 14:05:19 -06:00
Paul Frazee 6af2e1d162 Add support for web links 2022-11-18 13:59:17 -06:00
Paul Frazee 35e46a5b60 Fix rendering of mentions in composer 2022-11-18 11:55:05 -06:00
Paul Frazee 14ca7602e9 Add long press newtab to footer nav 2022-11-18 11:40:12 -06:00
Paul Frazee 7c719f3af8 Fix richtext link rendering 2022-11-18 11:37:25 -06:00
Paul Frazee 547965b528 Spacing and sizing fixes 2022-11-18 11:37:12 -06:00
Paul Frazee 85a425bf3e Dont autofocus composer to avoid a bug with keyboard avoiding views 2022-11-18 11:10:29 -06:00
Paul Frazee d9d9344fcc Small sizing and spacing tweaks 2022-11-18 11:10:19 -06:00
Paul Frazee 67fb6b23da Add min height to post text 2022-11-18 10:58:48 -06:00
Paul Frazee 2a4391af97 Fix avatar click target in posts 2022-11-18 10:48:18 -06:00
Paul Frazee fec3aa2e2f Fix post thread title 2022-11-17 16:26:00 -06:00
Paul Frazee 4fcc0accc7 Add padding to the bottom of the feed to ensure compose btn doesnt cover it 2022-11-17 16:07:38 -06:00
Paul Frazee 3da90128f0 Improve reliability of screen titles 2022-11-17 16:01:29 -06:00
Paul Frazee 038556cc58 Add new tab animation 2022-11-17 15:44:54 -06:00
Paul Frazee f42ff8e4cf Add live search to autocomplete and only highlight known handles 2022-11-17 14:35:12 -06:00
Paul Frazee d073049ed2 Fix loadLatest() on home feed 2022-11-17 13:17:08 -06:00
Paul Frazee b165d076f1 Fix: correctly set visible on screens 2022-11-17 13:15:04 -06:00
Paul Frazee c16e1b8fb1 Improve perf of post rendering 2022-11-17 13:02:53 -06:00
Paul Frazee a527c1086a Invalidate profiles cache on direct load 2022-11-17 13:01:57 -06:00
Paul Frazee 6be082e728 Clear session when auth fails 2022-11-17 12:33:59 -06:00
Paul Frazee f99cdba6dd Poll periodically for new posts 2022-11-17 12:33:19 -06:00
Paul Frazee 397ace5c11 Improve coffee 2022-11-17 11:29:35 -06:00
Paul Frazee 924c76f11b Add tabs explainer and fix 'black screen' during onboard 2022-11-17 11:21:04 -06:00
Paul Frazee d875933412 Lighten the post controls 2022-11-17 11:03:38 -06:00
Paul Frazee c5a81dcc71 Fix positioning with overflows in the post meta 2022-11-17 10:56:42 -06:00
Paul Frazee 28a9fe85d5 Include tab count and move btn to center 2022-11-17 10:37:30 -06:00
Paul Frazee 29d5cef912 Open in new tab on long press 2022-11-17 10:36:57 -06:00
Paul Frazee 0e935a50e7 Avoid overlap against phone header when tabs selector is open 2022-11-17 10:24:40 -06:00
Paul Frazee 61de9aaea6 Fix header spacing for when dark mode is active 2022-11-17 10:15:48 -06:00
Paul Frazee 83a533a0dc Show bold icons in footer based on state 2022-11-16 18:04:21 -06:00
Paul Frazee 2e7da95e5b Add a fancy 'drawer' animation to the tabs selector 2022-11-16 17:18:16 -06:00
Paul Frazee 93a7667c83 Add post deletion to highlighted post in threads 2022-11-16 16:18:15 -06:00
Paul Frazee 51f78cef9a Add post deletion 2022-11-16 16:16:43 -06:00
Paul Frazee bf7581e8e3 Clear notifications count optimistically 2022-11-16 14:36:16 -06:00
Paul Frazee aa7a5964f2 Fix composer positioning 2022-11-16 14:33:01 -06:00
Paul Frazee 30c0a5f4b1 Fix input positioning for small screens 2022-11-16 14:28:33 -06:00
Paul Frazee a3c3b1cd27 Fix sizing on smaller phones 2022-11-16 14:05:21 -06:00
Paul Frazee cc775dcdc0 Nicer loading state for profiles 2022-11-16 13:32:10 -06:00
Paul Frazee 5d9c21c2a5 Reduce jank in refreshes 2022-11-16 13:18:53 -06:00
Paul Frazee 9a19607f3f Add placeholder loading states 2022-11-16 13:05:36 -06:00
Paul Frazee 3d0eeb01f8 Improve reliability of modal close 2022-11-16 12:37:46 -06:00
Paul Frazee 310ec3a574 Fix up/down vote number changes 2022-11-16 11:02:36 -06:00
Paul Frazee 96d12df021 Add animations to post controls 2022-11-16 10:58:39 -06:00
Paul Frazee f382d6f3a5 Update prod service URL 2022-11-16 10:06:57 -06:00
Paul Frazee 6de99fd964 Better invite code error message 2022-11-15 15:13:55 -06:00
Paul Frazee bc76c7ffb8 Add a server instance selector and drop env vars 2022-11-15 15:09:50 -06:00
Paul Frazee 20ed8da853 Switch to using setVote() 2022-11-15 13:19:21 -06:00
Paul Frazee aaf10bfdbf Add current user profile to header and enlarge the header 2022-11-15 13:11:01 -06:00
Paul Frazee 36b9020f36 Add compose button to notifications, profile, and search 2022-11-15 13:00:00 -06:00
Paul Frazee 5ec8fcf350 Add missing dep 2022-11-15 12:54:15 -06:00
Paul Frazee 194c6dc0fd Improve connectivity-issue error message 2022-11-15 12:54:04 -06:00
Paul Frazee aadec58087 Better loading screens 2022-11-15 12:07:41 -06:00
Paul Frazee 1b1883aa30 Improve empty states 2022-11-15 10:54:43 -06:00
Paul Frazee 020a0bc882 Improve error messages 2022-11-15 10:46:12 -06:00
Paul Frazee f2bf75e85e Add profile info caching 2022-11-14 16:56:59 -06:00
Paul Frazee 957f42698e Disable storing nav state due to bugs 2022-11-14 16:56:40 -06:00
Paul Frazee fd436dcd9b Add more info to routing 2022-11-14 16:30:06 -06:00
Paul Frazee 9e32b64d57 Restore nav state hydration 2022-11-14 16:28:58 -06:00
Paul Frazee 7d39cb5f6b Improve not found page 2022-11-14 16:27:59 -06:00
Paul Frazee a8cd419b08 Use only alphabet in generated avatar 2022-11-14 15:58:21 -06:00
Paul Frazee c20d941a77 Update all state on profile change 2022-11-14 15:55:38 -06:00
Paul Frazee 93741ac50e Make 'back swiping' a little easier 2022-11-14 15:47:56 -06:00
Paul Frazee f83739fdb9 Enforce limits on create scene as well 2022-11-14 15:19:08 -06:00
Paul Frazee daf91112f5 Fix double-posting bug 2022-11-14 15:10:34 -06:00
Paul Frazee d406b3a5c2 Fix issue causing double-loads of notifications 2022-11-14 15:02:42 -06:00
Paul Frazee 09b8ae0fed Automatically add the domain to the handle during signin 2022-11-14 14:30:59 -06:00
Paul Frazee 683a456b5c Fix empty states for scene members and memberships 2022-11-14 14:24:23 -06:00
Paul Frazee 265af0d720 Fix: scroll all the way down on home feed 2022-11-14 14:18:42 -06:00
Paul Frazee 30f6636a95 Fix overflows in post meta info 2022-11-14 14:16:31 -06:00
Paul Frazee 03980afe98 Turn off autocorrect and auto-lowercase login handle 2022-11-14 14:01:01 -06:00
Paul Frazee a3f2c28c13 Add link behaviors to search screen suggestions 2022-11-14 13:52:23 -06:00
Paul Frazee 2850887c71 Dont suggest followed users and add empty state to suggestions 2022-11-14 13:48:57 -06:00
Paul Frazee 8a403407cb Dont include self in suggested follows 2022-11-14 13:42:53 -06:00
Paul Frazee 73f1f464d8 Always fallback from displayName to handle 2022-11-14 13:39:10 -06:00
Paul Frazee 16c06cd997 Turn 'include reason' on posts into a link 2022-11-14 13:36:09 -06:00
Paul Frazee 0f1a59641a Reposition to handle scene creation keyboard view 2022-11-14 13:32:04 -06:00
Paul Frazee bd62ab2f92 Change appid to xyz.blueskyweb.app 2022-11-14 13:13:08 -06:00
Paul Frazee 4727fb25ce Improvements to the feature explainer, including intro screen and screenshot of scenes 2022-11-14 13:12:29 -06:00
Paul Frazee 0947970514 Add staging env 2022-11-11 15:02:19 -06:00
Paul Frazee 04b081bbd7 Implement profile updates 2022-11-11 14:15:43 -06:00
Paul Frazee 3a6bb19cad Add UI to remove members from scenes 2022-11-11 13:28:23 -06:00
Paul Frazee 77650f328b Implement trending 2022-11-11 13:10:05 -06:00
Paul Frazee 424a08c4a0 Handle pending invites correctly 2022-11-11 12:49:53 -06:00
Paul Frazee 18d96ce0ce Disable scene discover btn for now 2022-11-11 10:17:23 -06:00
Paul Frazee 60f4d64af6 Only suggest users in invite suggestions 2022-11-11 10:17:14 -06:00
Paul Frazee 5664ecbd0c Fixes to onboarding 2022-11-10 17:19:45 -06:00
Paul Frazee 4fa74c0d38 Fixes to account creation 2022-11-10 17:05:26 -06:00
Paul Frazee 6b3780f6d1 Fix follows 2022-11-10 16:35:13 -06:00
Paul Frazee 7d90638188 Implement scene invitation and membership controls 2022-11-10 16:30:14 -06:00
Paul Frazee 28c2591e0b More informative empty state for scenes 2022-11-09 17:34:55 -06:00
Paul Frazee 2b58550d36 Add scene creator 2022-11-09 15:57:49 -06:00
Paul Frazee 22e619d0ea Add 'you are a member' line to scene headers and small other tweaks 2022-11-09 13:48:40 -06:00
Paul Frazee a32b067057 Add creator to scene profile header 2022-11-09 13:12:03 -06:00
Paul Frazee 482f848281 Implement scene member/memberships listings 2022-11-08 16:37:21 -06:00
Paul Frazee 6f97f8a84b Implement scenes listing in main menu 2022-11-08 15:56:22 -06:00
Paul Frazee 0168efd737 Finish the upvote/downvote implementation 2022-11-08 12:14:51 -06:00
Paul Frazee bb1d0ab0d9 Add search view; factor out SuggestedFollows component; add suggested follows to search 2022-11-07 16:24:06 -06:00
Paul Frazee 0fae45e8df Add onboarding (WIP) 2022-11-07 15:35:51 -06:00
Paul Frazee 34203fcbce Reuse service address 2022-11-07 11:45:26 -06:00
Paul Frazee e64fe9d36e Sizing and spacing fixes based on on-device testing 2022-11-05 16:12:06 -05:00
Paul Frazee 11c5000b5b Unify profile follow btn colors with the rest 2022-11-05 15:07:28 -05:00
Paul Frazee 1e5046c679 Set ios app icon 2022-11-05 14:55:41 -05:00
Paul Frazee 9344f7f20d Add splash screen to ios 2022-11-05 14:52:44 -05:00
Paul Frazee b724b0d3eb Rename to bsky.app 2022-11-05 13:56:22 -05:00
Paul Frazee 6703f0c068 Replace likes with votes on post UIs 2022-11-05 13:48:45 -05:00
Paul Frazee 88345d7cb5 More profile header tweaks 2022-11-05 13:02:21 -05:00
Paul Frazee 266cd69348 Tweak profile header 2022-11-05 12:43:21 -05:00
Paul Frazee 1ae5318af0 Switch to procedurally-generated banners 2022-11-05 12:33:59 -05:00
Paul Frazee 992b79384f Add actor types to the profiles and clean up the UI 2022-11-05 11:58:48 -05:00
Paul Frazee f9fa6229b2 Update to new textslice 2022-11-04 17:56:48 -05:00
Paul Frazee 2c5b988de0 Update to the latest APIs 2022-11-04 17:39:54 -05:00
Paul Frazee feac39e657 Rework the composer to a less buggy solution 2022-11-01 14:25:41 -05:00
Paul Frazee 1fa4419da1 Remove old tabs selector modal 2022-11-01 14:00:58 -05:00
Paul Frazee f49f8b6495 Add animation to the tabs selector 2022-11-01 13:46:07 -05:00
Paul Frazee c122f8a9d7 Replace notifications icon 2022-11-01 13:45:58 -05:00
Paul Frazee 91dd25f7b1 Replace footer-nav back and forward arrows with search and notifications 2022-11-01 11:53:30 -05:00
Paul Frazee 0d1cdb7a38 Add consistent view headers 2022-11-01 11:06:43 -05:00
Paul Frazee 9238504db9 Update scene items in mainmenu to use generated avatars 2022-11-01 10:06:24 -05:00
Paul Frazee 774a3a653e Improve animation jitter in main menu 2022-11-01 10:02:24 -05:00
Paul Frazee 497155b84c Fix typo 2022-10-31 17:24:58 -05:00
Paul Frazee b03cc5862b Switch to autogenerated avis for now 2022-10-31 17:23:47 -05:00
Paul Frazee b76a6109cf WIP scene UIs 2022-10-31 12:17:58 -05:00
Paul Frazee 97d8b7cf23 Fix some useEffect() cleanup issues 2022-10-26 14:48:15 -05:00
Paul Frazee 48158e05cb Update to latest APIs 2022-10-26 14:34:47 -05:00
Paul Frazee 20890227c9 Add contacts screen 2022-10-12 18:56:10 -05:00
Paul Frazee ed86125d87 Update api nsids 2022-10-12 15:18:46 -05:00
Paul Frazee 4b8795bfea Improve main menu (animation, aesthetics) 2022-10-11 15:16:46 -05:00
Paul Frazee 07a234e0f2 Home button scrolls to top when on home page 2022-10-11 09:37:01 -05:00
Paul Frazee bf42123576 Rearrange shell buttons to merge notifications into menu and bring back forward 2022-10-11 09:19:09 -05:00
Paul Frazee 37016ccf9f Remove the firehose view from home 2022-10-11 09:18:39 -05:00
Paul Frazee 47b8b93c2c Speed up shell nav button presses 2022-10-11 09:18:24 -05:00
Paul Frazee c5f744870f Rework footer controls 2022-10-10 21:13:25 -05:00
Paul Frazee 993a273d76 Rework profile header controls 2022-10-10 21:13:10 -05:00
Paul Frazee 6ee93cdbc4 Add firehose view to home screen 2022-10-04 14:22:20 -05:00
Paul Frazee 9a57f5de5e Update to new get*Feed xrpc methods 2022-10-04 12:55:25 -05:00
Paul Frazee 94f365f564 Update the view after a post is created 2022-10-04 11:33:32 -05:00
Paul Frazee 01515de17d Implement profile-update api 2022-10-04 11:10:24 -05:00
Paul Frazee f074d6017d Implement a couple missing bits 2022-10-04 10:53:08 -05:00
Paul Frazee 5b96be04b4 Fix to mention rendering 2022-10-04 10:26:33 -05:00
Paul Frazee de7951074a Choose mention candidates from follows 2022-10-04 10:18:35 -05:00
Paul Frazee 990b3c7084 Fixes to entity extraction 2022-10-04 10:15:35 -05:00
Paul Frazee 7de013f467 Implement mentions rendering 2022-10-03 16:02:03 -05:00
Paul Frazee ba417935f0 Fix to auth of mutation ops 2022-10-03 11:17:12 -05:00
Paul Frazee a77988a984 Implement notifications 2022-10-03 10:53:36 -05:00
Paul Frazee 5b8d0957b3 Remove debug time delays 2022-09-30 11:30:18 -05:00
Paul Frazee a913745b8f Fix thread view sizing 2022-09-29 15:17:31 -05:00
Paul Frazee 2f7e3da138 Clear all state on signout 2022-09-29 13:55:07 -05:00
Paul Frazee 13ce232455 Add settings page 2022-09-29 11:59:11 -05:00
Paul Frazee a67b4847ca Light icons 2022-09-29 10:40:05 -05:00
Paul Frazee 49beea6cc8 Add profile to tabs selector modal 2022-09-29 09:24:36 -05:00
Paul Frazee ee81540c64 More blue theming 2022-09-29 09:11:48 -05:00
Paul Frazee ccd3492e1e Beta banner 2022-09-29 09:05:47 -05:00
Paul Frazee 0a37c34704 Remove top bar in the shell 2022-09-29 09:05:40 -05:00
Paul Frazee 60c2805c01 Swap new tab and share buttons in tabs modal 2022-09-29 09:05:07 -05:00
Paul Frazee debfb16520 No visual feedback on FAB to reduce jank 2022-09-29 09:04:49 -05:00
Paul Frazee 76782b6ff1 Fix feed pagination on user profiles 2022-09-28 17:02:55 -05:00
Paul Frazee 1ccb0e8123 Add reply information to feed items 2022-09-28 15:36:25 -05:00
Paul Frazee d9cf32f0ac Improve thread rendering (show reply lines) 2022-09-28 15:03:16 -05:00
Paul Frazee 521e691138 Fix to session load 2022-09-28 15:03:02 -05:00
Paul Frazee be9d89e0cc Switch to one default avi 2022-09-28 14:00:40 -05:00
Paul Frazee b93b57c83e Update api 2022-09-28 13:59:57 -05:00
Paul Frazee 6bad17e353 Add account creation 2022-09-27 14:24:47 -05:00
Paul Frazee eaabfb8250 Remove old auth code 2022-09-27 10:13:12 -05:00
Paul Frazee 1001c5b4c4 Add logout and tweak signin screen 2022-09-27 08:59:15 -05:00
Paul Frazee 2441cbfde6 Implement signin flow 2022-09-26 21:03:07 -05:00
Paul Frazee b2b6df7a7e A few client fixes 2022-09-26 13:38:37 -05:00
Paul Frazee d954f6d905 Implement unfollow, unlike, unrepost 2022-09-23 09:47:21 -05:00
Paul Frazee 3269f048b3 Replace mock-api with real api 2022-09-22 19:28:25 -05:00
Paul Frazee 5c07a74c55 Add close animation to tabs selector 2022-09-09 16:45:37 -05:00
Paul Frazee 744a21ec57 Replace tabs selector with better solution, also fix some bugs with the modal state 2022-09-09 16:20:46 -05:00
Paul Frazee c55711a1d9 Reduce the frequency of accidental visual triggers of touchable items 2022-09-09 13:24:44 -05:00
Paul Frazee ddcc804518 Fix some jank in the navigation swipes 2022-09-09 13:11:30 -05:00
Paul Frazee 56f983fd4e Disable swipe gestures in view selector for now 2022-09-09 12:10:18 -05:00
Paul Frazee d85751caf0 Make view-selector swipes easier to trigger 2022-09-09 11:58:28 -05:00
Paul Frazee 79a5064072 Make nav swipes easier to trigger 2022-09-09 11:55:53 -05:00
Paul Frazee cb083f3836 Allow nav swipes to start from anywhere on the screen 2022-09-09 11:55:31 -05:00
Paul Frazee 3677f3be4b UI sizing fixes 2022-09-09 11:29:46 -05:00
Paul Frazee fc835be1e6 Rename mobile start-point index.js to avoid build issues 2022-09-09 11:29:22 -05:00
Paul Frazee 40fdd27698 Implement autocomplete UI in composer 2022-09-08 13:39:53 -05:00
Paul Frazee d46de5b819 Add EditProfile modal 2022-09-07 16:00:25 -05:00
Paul Frazee 9627e9981d Improve navigation gesture and fix caching issue 2022-09-07 14:43:00 -05:00
Paul Frazee 5852f17bed Refactor profile to use new ViewSelector element which is reusable and now supports swipe gestures 2022-09-06 22:34:31 -05:00
Paul Frazee 80c4566baf Add 'swipe to go back' gesture 2022-09-06 17:29:26 -05:00
Paul Frazee 8b286a2179 Rework profile page to include working view selector 2022-09-06 14:26:39 -05:00
Paul Frazee 9abeb86168 Rework profile header 2022-09-05 16:57:20 -05:00
Paul Frazee 0963e67325 Rewrite the post composer as a modal 2022-09-05 14:16:48 -05:00
Paul Frazee 8dba18b67c Add post dropdown menus 2022-09-02 15:43:10 -05:00
Paul Frazee 4e56f11d06 Move SharePost modal to new system 2022-09-02 12:17:33 -05:00
Paul Frazee 39f13f01bc Implement consistent Link component 2022-09-02 11:52:33 -05:00
Paul Frazee 2ed9ea85c6 Add more robust modals controller 2022-09-02 11:51:46 -05:00
Paul Frazee 61b5a0cbe9 Rename location-menu to location-navigator and add an actual location-menu 2022-09-02 09:55:52 -05:00
Paul Frazee c3831bd799 Add accounts menu to shell 2022-09-02 09:30:21 -05:00
Paul Frazee 53deb48e2d Add location 'menu' 2022-09-01 16:06:09 -05:00
Paul Frazee 2eac309f86 Fix bug in selection of screens to cache 2022-09-01 13:30:57 -05:00
Paul Frazee 558f8010eb Implement working screen-state management and remove extraneous loads 2022-09-01 12:00:08 -05:00
Paul Frazee 36e3697fd6 Fix screen-blanking bug 2022-09-01 10:58:29 -05:00
Paul Frazee 42f1c5d45d Update post thread aesthetics 2022-08-31 21:02:12 -05:00
Paul Frazee 00c4940352 Add avi and context menu to shell topbar 2022-08-31 20:43:36 -05:00
Paul Frazee 3075ded77f Add composer FAB to home page 2022-08-31 20:09:58 -05:00
Paul Frazee 94fd697148 Aesthetic improvements 2022-08-31 20:09:47 -05:00
Paul Frazee a3df278f7d Unify the color palette 2022-08-31 17:06:44 -05:00
Paul Frazee 135a0456a2 New navigation model (#1)
* Flatten all routing into a single stack

* Replace router with custom implementation

* Add shell header and titles

* Add tab selector

* Add back/forward history menus on longpress

* Fix: don't modify state during render

* Add refresh() to navigation and reroute navigations to the current location to refresh instead of add to history

* Cache screens during navigation to maintain scroll position and improve load-time for renders
2022-08-31 14:36:50 -05:00
351 changed files with 33396 additions and 20876 deletions
+85
View File
@@ -0,0 +1,85 @@
/** @type {Detox.DetoxConfig} */
module.exports = {
testRunner: {
args: {
$0: 'jest',
config: 'e2e/jest.config.js',
},
jest: {
setupTimeout: 120000,
},
},
apps: {
'ios.debug': {
type: 'ios.app',
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/app.app',
build:
'xcodebuild -workspace ios/app.xcworkspace -scheme app -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build',
},
'ios.release': {
type: 'ios.app',
binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/app.app',
build:
'xcodebuild -workspace ios/app.xcworkspace -scheme app -configuration Release -sdk iphonesimulator -derivedDataPath ios/build',
},
'android.debug': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
build:
'cd android ; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug ; cd -',
reversePorts: [8081],
},
'android.release': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
build:
'cd android ; ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release ; cd -',
},
},
devices: {
simulator: {
type: 'ios.simulator',
device: {
type: 'iPhone 14',
},
},
attached: {
type: 'android.attached',
device: {
adbName: '.*',
},
},
emulator: {
type: 'android.emulator',
device: {
avdName: 'Pixel_3a_API_30_x86',
},
},
},
configurations: {
'ios.sim.debug': {
device: 'simulator',
app: 'ios.debug',
},
'ios.sim.release': {
device: 'simulator',
app: 'ios.release',
},
'android.att.debug': {
device: 'attached',
app: 'android.debug',
},
'android.att.release': {
device: 'attached',
app: 'android.release',
},
'android.emu.debug': {
device: 'emulator',
app: 'android.debug',
},
'android.emu.release': {
device: 'emulator',
app: 'android.release',
},
},
}
-1
View File
@@ -1 +0,0 @@
REACT_APP_AUTH_LOBBY = 'http://localhost:3001'
+8 -4
View File
@@ -2,14 +2,18 @@ module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
// plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'detox'],
ignorePatterns: [
'**/__mocks__/*.ts',
'src/third-party',
'ios',
'android',
'coverage',
],
overrides: [
{
files: ['*.js', '*.mjs', '*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-shadow': 'off',
'no-shadow': 'off',
'no-undef': 'off',
semi: [2, 'never'],
},
},
+38
View File
@@ -0,0 +1,38 @@
name: Lint
on:
pull_request:
branches:
- main
jobs:
linting:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Yarn install
run: yarn
- name: Lint Reporter
uses: wearerequired/lint-action@v2.2.0
with:
eslint: true
prettier: true
- name: Typescript & Lint check
run: yarn lint
testing:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Install node 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Check out Git repository
uses: actions/checkout@v3
- name: Yarn install
run: yarn
- name: Run tests
run: |
yarn test --forceExit
+5
View File
@@ -59,3 +59,8 @@ buck-out/
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/
# Testing
coverage/
junit.xml
artifacts
+5
View File
@@ -0,0 +1,5 @@
ios
android
src/third-party
src/app.json
public
+1 -1
View File
@@ -1 +1 @@
2.7.4
2.7.6
+2 -2
View File
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.4'
ruby File.read(File.join(__dir__, '.ruby-version')).strip
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
+16 -40
View File
@@ -1,28 +1,19 @@
# Social App
In-progress social app.
Uses:
- [React Native](https://reactnative.dev)
- [React Native for Web](https://necolas.github.io/react-native-web/)
- [React Navigation](https://reactnative.dev/docs/navigation#react-navigation)
- [MobX](https://mobx.js.org/README.html)
- [Async Storage](https://github.com/react-native-async-storage/async-storage)
## TODOs
- Handle the "unauthed" state better than changing route definitions
- Currently it's possible to get a 404 if the auth state changes
# Bluesky
## Build instructions
- Setup your environment [using the react native instructions](https://reactnative.dev/docs/environment-setup).
- Setup your environment [for e2e testing using detox](https://wix.github.io/Detox/docs/introduction/getting-started):
- yarn global add detox-cli
- brew tap wix/brew
- brew install applesimutils
- After initial setup:
- `cd ios ; pod install`
- Start the dev servers
- `yarn dev-pds`
- `yarn dev-wallet`
- `git clone git@github.com:bluesky-social/atproto.git`
- `cd atproto`
- `yarn`
- `cd packages/dev-env && yarn start`
- Run the dev app
- iOS: `yarn ios`
- Android: `yarn android`
@@ -37,34 +28,19 @@ Uses:
## Various notes
### Env vars
### Debugging
Set using the `.env` file or using bash.
- Note that since 0.70, debugging using the old debugger (which shows up using CMD+D) doesn't work anymore. Follow the instructions below to debug the code: https://reactnative.dev/docs/next/hermes#debugging-js-on-hermes-using-google-chromes-devtools
```
REACT_APP_AUTH_LOBBY = 'http://localhost:3001'
```
### Running E2E Tests
### Build behaviors
The `metro.config.js` file rewrites a couple of imports. This is partly to work around missing features in Metro, and partly to patch the bundle. Affected imports include:
- ucans
- one-webcrypto
### Cryptography
For native builds, we must provide a polyfill of `webcrypto`. We use a custom native module AppSecureRandom (based on [react-native-securerandom](https://github.com/robhogan/react-native-securerandom)) for the CRNG and [msrcrypto](https://github.com/microsoft/MSR-JavaScript-Crypto) for the cryptography.
**NOTE** Keys are not currently stored securely.
- Make sure you've setup your environment following above
- Make sure Metro and the dev server are running
- Run `yarn e2e`
- Find the artifacts in the `artifact` folder
### Polyfills
`./platform/polyfills.*.ts` adds polyfills to the environment. Currently this includes:
- webcrypto
- TextEncoder / TextDecoder
### Auth flow
The auth flow is based on a browser app which is specified by the `REACT_APP_AUTH_LOBBY` env var. The app redirects to that location with the UCAN request, and then waits for a redirect back. In the native platforms with proper support, it will do this using an in-app browser. In native without in-app browser, or in the Web platform, it will handle this with redirects. The ucan is extracted from the hash fragment of the "return url" which is provided either by the in-app browser in response or detected during initial setup in the case of redirects.
+57
View File
@@ -0,0 +1,57 @@
import React from 'react'
import {View, ScrollView, Modal, FlatList, TextInput} from 'react-native'
const BottomSheetModalContext = React.createContext(null)
const BottomSheetModalProvider = (props: any) => {
return <BottomSheetModalContext.Provider {...props} value={{}} />
}
class BottomSheet extends React.Component {
snapToIndex() {}
snapToPosition() {}
expand() {}
collapse() {}
close() {
this.props.onClose?.()
}
forceClose() {}
render() {
return <View>{this.props.children}</View>
}
}
const BottomSheetModal = (props: any) => <Modal {...props} />
const BottomSheetBackdrop = (props: any) => <View {...props} />
const BottomSheetHandle = (props: any) => <View {...props} />
const BottomSheetFooter = (props: any) => <View {...props} />
const BottomSheetScrollView = (props: any) => <ScrollView {...props} />
const BottomSheetFlatList = (props: any) => <FlatList {...props} />
const BottomSheetTextInput = (props: any) => <TextInput {...props} />
const useBottomSheet = jest.fn()
const useBottomSheetModal = jest.fn()
const useBottomSheetSpringConfigs = jest.fn()
const useBottomSheetTimingConfigs = jest.fn()
const useBottomSheetInternal = jest.fn()
const useBottomSheetDynamicSnapPoints = jest.fn()
export {useBottomSheet}
export {useBottomSheetModal}
export {useBottomSheetSpringConfigs}
export {useBottomSheetTimingConfigs}
export {useBottomSheetInternal}
export {useBottomSheetDynamicSnapPoints}
export {
BottomSheetModalProvider,
BottomSheetBackdrop,
BottomSheetHandle,
BottomSheetModal,
BottomSheetFooter,
BottomSheetScrollView,
BottomSheetFlatList,
BottomSheetTextInput,
}
export default BottomSheet
+6
View File
@@ -0,0 +1,6 @@
export default {
requestPermission: jest.fn(),
onForegroundEvent: jest.fn(),
setBadgeCount: jest.fn(),
displayNotification: jest.fn(),
}
@@ -0,0 +1,9 @@
export const CameraRoll = {
getPhotos: jest.fn().mockResolvedValue({
edges: [
{node: {image: {uri: 'path/to/image1.jpg'}}},
{node: {image: {uri: 'path/to/image2.jpg'}}},
{node: {image: {uri: 'path/to/image3.jpg'}}},
],
}),
}
@@ -0,0 +1,4 @@
export default {
configure: jest.fn().mockResolvedValue(0),
finish: jest.fn(),
}
+1
View File
@@ -0,0 +1 @@
export default {}
+9
View File
@@ -0,0 +1,9 @@
export const openPicker = jest
.fn()
.mockImplementation(() => Promise.resolve({uri: ''}))
export const openCamera = jest
.fn()
.mockImplementation(() => Promise.resolve({uri: ''}))
export const openCropper = jest
.fn()
.mockImplementation(() => Promise.resolve({uri: ''}))
+67
View File
@@ -0,0 +1,67 @@
// @flow
// https://github.com/FormidableLabs/react-native-svg-mock
import React from 'react'
const createComponent = function (name: string) {
return class extends React.Component {
// overwrite the displayName, since this is a class created dynamically
static displayName = name
render() {
return React.createElement(name, this.props, this.props.children)
}
}
}
// Mock all react-native-svg exports
// from https://github.com/magicismight/react-native-svg/blob/master/index.js
const Svg = createComponent('Svg')
const Circle = createComponent('Circle')
const Ellipse = createComponent('Ellipse')
const G = createComponent('G')
const Text = createComponent('Text')
const TextPath = createComponent('TextPath')
const TSpan = createComponent('TSpan')
const Path = createComponent('Path')
const Polygon = createComponent('Polygon')
const Polyline = createComponent('Polyline')
const Line = createComponent('Line')
const Rect = createComponent('Rect')
const Use = createComponent('Use')
const Image = createComponent('Image')
const Symbol = createComponent('Symbol')
const Defs = createComponent('Defs')
const LinearGradient = createComponent('LinearGradient')
const RadialGradient = createComponent('RadialGradient')
const Stop = createComponent('Stop')
const ClipPath = createComponent('ClipPath')
const Pattern = createComponent('Pattern')
const Mask = createComponent('Mask')
export {
Svg,
Circle,
Ellipse,
G,
Text,
TextPath,
TSpan,
Path,
Polygon,
Polyline,
Line,
Rect,
Use,
Image,
Symbol,
Defs,
LinearGradient,
RadialGradient,
Stop,
ClipPath,
Pattern,
Mask,
}
export default Svg
+10
View File
@@ -0,0 +1,10 @@
jest.mock('rn-fetch-blob', () => {
return {
__esModule: true,
default: {
fs: {
unlink: jest.fn(),
},
},
}
})
+943
View File
@@ -0,0 +1,943 @@
import {LogModel} from './../src/state/models/log'
import {LRUMap} from 'lru_map'
import {RootStoreModel} from './../src/state/models/root-store'
import {NavigationTabModel} from './../src/state/models/navigation'
import {SessionModel} from '../src/state/models/session'
import {NavigationModel} from '../src/state/models/navigation'
import {ShellUiModel} from '../src/state/models/shell-ui'
import {MeModel} from '../src/state/models/me'
import {MyFollowsModel} from '../src/state/models/my-follows'
import {OnboardModel} from '../src/state/models/onboard'
import {ProfilesViewModel} from '../src/state/models/profiles-view'
import {LinkMetasViewModel} from '../src/state/models/link-metas-view'
import {MembershipsViewModel} from '../src/state/models/memberships-view'
import {FeedModel} from '../src/state/models/feed-view'
import {NotificationsViewModel} from '../src/state/models/notifications-view'
import {ProfileViewModel} from '../src/state/models/profile-view'
import {MembersViewModel} from '../src/state/models/members-view'
import {ProfileUiModel, Sections} from '../src/state/models/profile-ui'
import {SessionServiceClient} from '@atproto/api'
import {UserAutocompleteViewModel} from '../src/state/models/user-autocomplete-view'
import {UserLocalPhotosModel} from '../src/state/models/user-local-photos'
import {SuggestedActorsViewModel} from '../src/state/models/suggested-actors-view'
import {UserFollowersViewModel} from '../src/state/models/user-followers-view'
import {UserFollowsViewModel} from '../src/state/models/user-follows-view'
import {NotificationsViewItemModel} from './../src/state/models/notifications-view'
import {
PostThreadViewModel,
PostThreadViewPostModel,
} from '../src/state/models/post-thread-view'
import {FeedItemModel} from '../src/state/models/feed-view'
import {RepostedByViewModel} from '../src/state/models/reposted-by-view'
import {VotesViewModel} from '../src/state/models/votes-view'
export const mockedProfileStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: true,
error: '',
params: {
actor: '',
},
did: 'test did',
handle: 'testhandle',
declaration: {
cid: '',
actorType: '',
},
creator: 'test did',
displayName: '',
description: '',
avatar: '',
banner: '',
followersCount: 0,
followsCount: 0,
membersCount: 0,
postsCount: 0,
viewer: {
following: '',
},
rootStore: {} as RootStoreModel,
hasContent: true,
hasError: false,
isEmpty: false,
isUser: true,
isScene: false,
setup: jest.fn().mockResolvedValue({aborted: false}),
refresh: jest.fn().mockResolvedValue({}),
toggleFollowing: jest.fn().mockResolvedValue({}),
updateProfile: jest.fn(),
// unknown required because of the missing private methods: _xLoading, _xIdle, _load, _replaceAll
} as unknown as ProfileViewModel
export const mockedMembersStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: true,
error: '',
params: {
actor: 'test actor',
},
subject: {
did: 'test did',
handle: '',
displayName: '',
declaration: {
cid: '',
actorType: '',
},
avatar: undefined,
},
members: [
{
did: 'test did2',
declaration: {
cid: '',
actorType: '',
},
handle: 'testhandle',
displayName: 'test name',
indexedAt: '',
},
],
rootStore: {} as RootStoreModel,
hasContent: true,
hasError: false,
isEmpty: false,
isMember: jest.fn(),
setup: jest.fn().mockResolvedValue({aborted: false}),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn(),
removeMember: jest.fn(),
// unknown required because of the missing private methods: _xLoading, _xIdle, _fetch, _replaceAll, _append
} as unknown as MembersViewModel
export const mockedMembershipsStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: true,
error: '',
params: {
actor: '',
limit: 1,
before: '',
},
subject: {
did: 'test did',
handle: '',
displayName: '',
declaration: {cid: '', actorType: ''},
avatar: undefined,
},
memberships: [
{
did: 'test did',
declaration: {
cid: '',
actorType: 'app.bsky.system.actorUser',
},
handle: ',',
displayName: '',
createdAt: '',
indexedAt: '',
_reactKey: 'item-1',
},
],
rootStore: {} as RootStoreModel,
hasContent: true,
hasError: false,
isEmpty: false,
isMemberOf: jest.fn(),
setup: jest.fn().mockResolvedValue({aborted: false}),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn(),
// unknown required because of the missing private methods: _xLoading, _xIdle, _fetch, _replaceAll, _append
} as unknown as MembershipsViewModel
export const mockedFeedItemStore = {
_reactKey: 'item-1',
_isThreadParent: false,
_isThreadChildElided: false,
_isThreadChild: false,
post: {
uri: 'testuri',
cid: 'test cid',
author: {
did: 'test did',
handle: 'test.handle',
displayName: 'test name',
declaration: {cid: '', actorType: ''},
},
record: {
$type: 'app.bsky.feed.post',
createdAt: '2022-12-29T16:39:57.919Z',
text: 'Sup',
},
replyCount: 0,
repostCount: 0,
upvoteCount: 0,
downvoteCount: 0,
indexedAt: '2022-12-29T16:39:57.919Z',
viewer: {},
},
postRecord: {
$type: 'app.bsky.feed.post',
text: 'test text',
createdAt: '1',
reply: {
root: {
uri: 'testuri',
cid: 'tes cid',
},
parent: {
uri: 'testuri',
cid: 'tes cid',
},
},
},
rootStore: {} as RootStoreModel,
copy: jest.fn(),
toggleUpvote: jest.fn().mockResolvedValue({}),
toggleDownvote: jest.fn(),
toggleRepost: jest.fn().mockResolvedValue({}),
delete: jest.fn().mockResolvedValue({}),
reasonRepost: {
by: {
did: 'test did',
handle: 'test.handle',
declaration: {cid: '', actorType: ''},
},
indexedAt: '',
},
reasonTrend: {
by: {
did: 'test did',
handle: 'test.handle',
declaration: {cid: '', actorType: ''},
},
indexedAt: '',
},
reply: {
parent: {
author: {
did: 'test did',
handle: 'test.handle',
displayName: 'test name',
declaration: {cid: '', actorType: ''},
},
cid: '',
downvoteCount: 0,
indexedAt: '2023-01-10T11:17:46.945Z',
record: {},
replyCount: 1,
repostCount: 0,
upvoteCount: 0,
uri: 'testuri',
viewer: {},
},
root: {
author: {
did: 'test did',
handle: 'test.handle',
displayName: 'test name',
declaration: {cid: '', actorType: ''},
},
cid: '',
downvoteCount: 0,
indexedAt: '2023-01-10T11:17:46.739Z',
record: {},
replyCount: 1,
repostCount: 0,
upvoteCount: 1,
uri: 'testuri',
viewer: {},
},
},
} as FeedItemModel
export const mockedFeedStore = {
isLoading: false,
isRefreshing: false,
hasNewLatest: false,
hasLoaded: true,
error: '',
hasMore: true,
params: {
actor: '',
limit: 1,
before: '',
},
feed: [],
rootStore: {} as RootStoreModel,
feedType: 'home',
hasContent: true,
hasError: false,
isEmpty: false,
nonReplyFeed: [
{
_reactKey: 'item-1',
post: {
author: {
handle: 'handle.test',
displayName: 'test name',
avatar: '',
},
cid: 'bafyreihkwjoy2vbfqld2lp3tv4ce6yfr354sqgp32qoplrudso4gyyjiwe',
downvoteCount: 0,
indexedAt: '2022-12-29T16:35:55.270Z',
record: {
$type: 'app.bsky.feed.post',
createdAt: '2022-12-29T16:39:57.919Z',
text: 'Sup',
},
replyCount: 0,
repostCount: 0,
upvoteCount: 0,
uri: 'at://did:plc:wcizmlgv3rdslk64t6q4silu/app.bsky.feed.post/3jkzce5kfvn2h',
viewer: {
handle: 'handle.test',
displayName: 'test name',
avatar: '',
},
},
reason: undefined,
reply: undefined,
},
],
setHasNewLatest: jest.fn(),
setup: jest.fn().mockResolvedValue({}),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn().mockResolvedValue({}),
loadLatest: jest.fn(),
update: jest.fn(),
checkForLatest: jest.fn().mockRejectedValue('Error checking for latest'),
registerListeners: jest.fn().mockReturnValue(jest.fn()),
// unknown required because of the missing private methods: _xLoading, _xIdle, _pendingWork, _initialLoad, _loadLatest, _loadMore, _update, _replaceAll, _appendAll, _prependAll, _updateAll, _getFeed, loadMoreCursor, pollCursor, _loadPromise, _updatePromise, _loadLatestPromise, _loadMorePromise
} as unknown as FeedModel
export const mockedPostThreadViewPostStore = {
_reactKey: 'item-1',
_depth: 0,
_isHighlightedPost: false,
_hasMore: false,
postRecord: {
text: 'test text',
createdAt: '',
reply: {
root: {
uri: 'testuri',
cid: 'tes cid',
},
parent: {
uri: 'testuri',
cid: 'tes cid',
},
},
},
post: {
uri: 'testuri',
cid: 'testcid',
record: {},
author: {
did: 'test did',
handle: 'test.handle',
declaration: {cid: '', actorType: ''},
viewer: {
muted: true,
},
},
replyCount: 0,
repostCount: 0,
upvoteCount: 0,
downvoteCount: 0,
indexedAt: '',
viewer: {
repost: '',
upvote: '',
downvote: '',
},
},
rootStore: {} as RootStoreModel,
assignTreeModels: jest.fn(),
toggleRepost: jest.fn().mockRejectedValue({}),
toggleUpvote: jest.fn().mockRejectedValue({}),
toggleDownvote: jest.fn(),
delete: jest.fn(),
} as PostThreadViewPostModel
export const mockedPostThreadViewStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: false,
error: '',
notFound: false,
resolvedUri: 'testuri',
params: {
uri: 'testuri',
},
thread: mockedPostThreadViewPostStore,
hasContent: true,
hasError: false,
setup: jest.fn(),
refresh: jest.fn().mockResolvedValue({}),
update: jest.fn(),
// unknown required because of the missing private methods: _xLoading, _xIdle, _resolveUri, _load, _replaceAll
} as unknown as PostThreadViewModel
export const mockedNotificationsViewItemStore = {
_reactKey: 'item-1',
uri: 'testuri',
cid: '',
author: {
did: 'test did',
handle: 'test.handle',
declaration: {cid: '', actorType: ''},
},
rootStore: {} as RootStoreModel,
copy: jest.fn(),
reason: 'test reason',
isRead: true,
indexedAt: '',
isUpvote: true,
isRepost: false,
isTrend: false,
isMention: false,
isReply: false,
isFollow: false,
isAssertion: false,
needsAdditionalData: false,
isInvite: false,
subjectUri: 'testuri',
toSupportedRecord: jest.fn().mockReturnValue({
text: 'test text',
createdAt: '',
}),
fetchAdditionalData: jest.fn(),
toNotifeeOpts: jest.fn(),
} as NotificationsViewItemModel
export const mockedNotificationsStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: true,
error: '',
params: {
limit: 1,
before: '',
},
hasMore: true,
notifications: [mockedNotificationsViewItemStore],
rootStore: {} as RootStoreModel,
hasContent: true,
hasError: false,
isEmpty: false,
setup: jest.fn().mockResolvedValue({aborted: false}),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn().mockResolvedValue({}),
update: jest.fn().mockResolvedValue(null),
updateReadState: jest.fn(),
// unknown required because of the missing private methods: _xLoading, _xIdle, _pendingWork, _initialLoad, _loadMore, _update, _replaceAll, _appendAll, _updateAll, loadMoreCursor, _loadPromise, _updatePromise, _loadLatestPromise, _loadMorePromise
} as unknown as NotificationsViewModel
export const mockedSessionStore = {
serialize: jest.fn(),
hydrate: jest.fn(),
data: {
service: '',
refreshJwt: '',
accessJwt: '',
handle: '',
did: 'test did',
},
online: false,
attemptingConnect: false,
rootStore: {} as RootStoreModel,
hasSession: true,
clear: jest.fn(),
setState: jest.fn(),
setOnline: jest.fn(),
updateAuthTokens: jest.fn(),
connect: jest.fn(),
describeService: jest.fn().mockResolvedValue({
availableUserDomains: ['test'],
links: {
termsOfService: 'https://testTermsOfService',
privacyPolicy: 'https://testPrivacyPolicy',
},
}),
login: jest.fn(),
createAccount: jest.fn(),
logout: jest.fn(),
// unknown required because of the missing private methods: _connectPromise, configureApi & _connect
} as unknown as SessionModel
export const mockedNavigationTabStore = {
serialize: jest.fn(),
hydrate: jest.fn(),
id: 0,
history: [
{
url: '',
ts: 0,
title: '',
id: 0,
},
],
index: 0,
isNewTab: false,
current: {
url: '',
ts: 0,
title: '',
id: 0,
},
canGoBack: false,
canGoForward: false,
backTen: [
{
url: '',
title: '',
index: 0,
id: 0,
},
],
forwardTen: [
{
url: '',
title: '',
index: 0,
id: 0,
},
],
navigate: jest.fn(),
refresh: jest.fn().mockResolvedValue({}),
goBack: jest.fn(),
fixedTabReset: jest.fn(),
goForward: jest.fn(),
goToIndex: jest.fn(),
setTitle: jest.fn(),
setIsNewTab: jest.fn(),
fixedTabPurpose: 0,
getBackList: () => [
{
url: '/',
title: '',
index: 1,
id: 1,
},
],
getForwardList: jest.fn(),
} as NavigationTabModel
export const mockedNavigationStore = {
serialize: jest.fn(),
hydrate: jest.fn(),
tabs: [mockedNavigationTabStore],
tabIndex: 0,
clear: jest.fn(),
tab: mockedNavigationTabStore,
tabCount: 1,
isCurrentScreen: jest.fn(),
navigate: jest.fn(),
refresh: jest.fn().mockResolvedValue({}),
setTitle: jest.fn(),
handleLink: jest.fn(),
switchTo: jest.fn(),
setActiveTab: jest.fn(),
closeTab: jest.fn(),
newTab: jest.fn(),
} as NavigationModel
export const mockedShellStore = {
serialize: jest.fn(),
hydrate: jest.fn(),
minimalShellMode: false,
isMainMenuOpen: false,
isModalActive: false,
activeModal: undefined,
isLightboxActive: false,
activeLightbox: undefined,
isComposerActive: false,
composerOpts: undefined,
darkMode: false,
setDarkMode: jest.fn(),
setMainMenuOpen: jest.fn(),
setMinimalShellMode: jest.fn(),
openModal: jest.fn(),
closeModal: jest.fn(),
closeComposer: jest.fn(),
closeLightbox: jest.fn(),
openComposer: jest.fn(),
openLightbox: jest.fn(),
} as ShellUiModel
export const mockedFollowsStore = {
isFollowing: jest.fn().mockReturnValue(false),
} as MyFollowsModel
export const mockedMeStore = {
serialize: jest.fn(),
hydrate: jest.fn(),
did: 'test did',
handle: 'test',
displayName: 'test',
description: 'test',
avatar: '',
notificationCount: 0,
rootStore: {} as RootStoreModel,
memberships: mockedMembershipsStore,
mainFeed: mockedFeedStore,
notifications: mockedNotificationsStore,
follows: mockedFollowsStore,
clear: jest.fn(),
load: jest.fn(),
clearNotificationCount: jest.fn(),
fetchNotifications: jest.fn(),
refreshMemberships: jest.fn(),
} as MeModel
export const mockedOnboardStore = {
serialize: jest.fn(),
hydrate: jest.fn(),
isOnboarding: false,
stage: '',
start: jest.fn(),
stop: jest.fn(),
next: jest.fn(),
} as OnboardModel
export const mockedProfilesStore = {
hydrate: jest.fn(),
serialize: jest.fn(),
cache: new LRUMap(100),
rootStore: {} as RootStoreModel,
getProfile: jest.fn().mockResolvedValue({data: {}}),
overwrite: jest.fn(),
} as ProfilesViewModel
export const mockedLinkMetasStore = {
hydrate: jest.fn(),
serialize: jest.fn(),
cache: new LRUMap(100),
rootStore: {} as RootStoreModel,
getLinkMeta: jest.fn(),
} as LinkMetasViewModel
export const mockedLogStore = {
entries: [],
serialize: jest.fn(),
hydrate: jest.fn(),
debug: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
// unknown required because of the missing private methods: add
} as unknown as LogModel
export const mockedRootStore = {
api: {
com: {},
app: {
bsky: {
actor: {
searchTypeahead: jest.fn().mockResolvedValue({data: {users: []}}),
},
graph: {
getFollows: jest.fn().mockResolvedValue({data: {follows: []}}),
getFollowers: jest.fn().mockResolvedValue({}),
getMembers: jest.fn().mockResolvedValue({}),
},
},
},
} as unknown as SessionServiceClient,
resolveName: jest.fn(),
serialize: jest.fn(),
hydrate: jest.fn(),
updateSessionState: jest.fn(),
clearAllSessionState: jest.fn(),
session: mockedSessionStore,
nav: mockedNavigationStore,
shell: mockedShellStore,
me: mockedMeStore,
onboard: mockedOnboardStore,
profiles: mockedProfilesStore,
linkMetas: mockedLinkMetasStore,
log: mockedLogStore,
onScreenSoftReset: jest.fn().mockReturnValue({remove: jest.fn()}),
} as RootStoreModel
export const mockedProfileUiStore = {
profile: mockedProfileStore,
feed: mockedFeedStore,
memberships: mockedMembershipsStore,
members: mockedMembersStore,
selectedViewIndex: 0,
rootStore: mockedRootStore,
params: {
user: 'test user',
},
currentView: mockedFeedStore,
isInitialLoading: false,
isRefreshing: false,
isUser: true,
isScene: false,
selectorItems: [Sections.Posts, Sections.PostsWithReplies, Sections.Scenes],
selectedView: Sections.Posts,
setSelectedViewIndex: jest.fn(),
setup: jest.fn().mockResolvedValue({aborted: false}),
update: jest.fn(),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn(),
} as ProfileUiModel
export const mockedAutocompleteViewStore = {
isLoading: false,
isActive: true,
prefix: '',
follows: [
{
did: 'test did',
declaration: {
cid: '',
actorType: 'app.bsky.system.actorUser',
},
handle: '',
displayName: '',
createdAt: '',
indexedAt: '',
},
],
searchRes: [
{
did: 'test did',
declaration: {
cid: '',
actorType: 'app.bsky.system.actorUser',
},
handle: '',
displayName: '',
},
],
knownHandles: new Set<string>(),
suggestions: [
{
handle: 'handle.test',
displayName: 'Test Display',
},
{
handle: 'handle2.test',
displayName: 'Test Display 2',
},
],
rootStore: {} as RootStoreModel,
setup: jest.fn(),
setActive: jest.fn(),
setPrefix: jest.fn(),
// unknown required because of the missing private methods: _searchPromise, _getFollows , _search
} as unknown as UserAutocompleteViewModel
export const mockedLocalPhotosStore = {
photos: {
node: {
type: '',
group_name: '',
image: {
filename: '',
extension: '',
uri: '',
height: 1000,
width: 1000,
fileSize: null,
playableDuration: 0,
},
timestamp: 1672847197,
location: null,
},
},
rootStore: {} as RootStoreModel,
setup: jest.fn(),
// unknown required because of the missing private methods: _getPhotos
} as unknown as UserLocalPhotosModel
export const mockedSuggestedActorsStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: false,
error: '',
suggestions: [
{
did: '1',
declaration: {
cid: '',
actorType: 'app.bsky.system.actorUser',
},
handle: 'handle1.test',
displayName: 'test name 1',
description: 'desc',
indexedAt: '',
_reactKey: '1',
},
{
did: '2',
declaration: {
cid: '',
actorType: 'app.bsky.system.actorUser',
},
handle: '',
displayName: 'handle2.test',
description: 'desc',
indexedAt: '',
_reactKey: '2',
},
],
rootStore: {} as RootStoreModel,
hasContent: true,
hasError: false,
isEmpty: false,
setup: jest.fn().mockResolvedValue(null),
refresh: jest.fn().mockResolvedValue({}),
// unknown required because of the missing private methods: _xLoading, _xIdle, _fetch, _appendAll, _append
} as unknown as SuggestedActorsViewModel
export const mockedUserFollowersStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: false,
error: '',
params: {
user: 'test user',
},
subject: {
did: 'test did',
handle: '',
declaration: {cid: '', actorType: ''},
},
followers: [
{
did: 'test did',
declaration: {cid: '', actorType: ''},
handle: 'testhandle',
displayName: 'test name',
indexedAt: '',
_reactKey: '1',
},
{
did: 'test did2',
declaration: {cid: '', actorType: ''},
handle: 'testhandle2',
displayName: 'test name 2',
indexedAt: '',
_reactKey: '2',
},
],
rootStore: {} as RootStoreModel,
hasContent: true,
hasError: false,
isEmpty: false,
setup: jest.fn(),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn(),
// unknown required because of the missing private methods: _xIdle, _xLoading, _fetch, _replaceAll, _append
} as unknown as UserFollowersViewModel
export const mockedUserFollowsStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: false,
error: '',
params: {
user: 'test user',
},
subject: {
did: 'test did',
handle: '',
declaration: {cid: '', actorType: ''},
},
follows: [
{
did: 'test did',
declaration: {cid: '', actorType: ''},
handle: 'testhandle',
displayName: 'test name',
indexedAt: '',
_reactKey: '1',
},
{
did: 'test did2',
declaration: {cid: '', actorType: ''},
handle: 'testhandle2',
displayName: 'test name 2',
indexedAt: '',
_reactKey: '2',
},
],
rootStore: {} as RootStoreModel,
hasContent: true,
hasError: false,
isEmpty: false,
setup: jest.fn(),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn(),
// unknown required because of the missing private methods: _xIdle, _xLoading, _fetch, _replaceAll, _append
} as unknown as UserFollowsViewModel
export const mockedRepostedByViewStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: false,
error: '',
resolvedUri: '',
params: {
uri: 'testuri',
},
uri: '',
repostedBy: [
{
_reactKey: '',
did: '',
handle: '',
displayName: '',
declaration: {cid: '', actorType: ''},
indexedAt: '',
},
],
hasContent: false,
hasError: false,
isEmpty: false,
setup: jest.fn().mockResolvedValue({}),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn().mockResolvedValue({}),
// unknown required because of the missing private methods: _xIdle, _xLoading, _resolveUri, _fetch, _refresh, _replaceAll, _append
} as unknown as RepostedByViewModel
export const mockedVotesViewStore = {
isLoading: false,
isRefreshing: false,
hasLoaded: false,
error: '',
resolvedUri: '',
params: {
uri: 'testuri',
},
uri: '',
votes: [
{
_reactKey: '',
direction: 'up',
indexedAt: '',
createdAt: '',
actor: {
did: '',
handle: '',
declaration: {cid: '', actorType: ''},
},
},
],
hasContent: false,
hasError: false,
isEmpty: false,
setup: jest.fn(),
refresh: jest.fn().mockResolvedValue({}),
loadMore: jest.fn().mockResolvedValue({}),
// unknown required because of the missing private methods: _xIdle, _xLoading, _resolveUri, _fetch, _replaceAll, _append
} as unknown as VotesViewModel
-16
View File
@@ -1,16 +0,0 @@
/**
* @format
*/
import 'react-native'
import React from 'react'
import App from '../src/App'
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer'
it('renders correctly', () => {
renderer.act(() => {
renderer.create(<App />)
})
})
+47
View File
@@ -0,0 +1,47 @@
export const exampleComHtml = `<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta name="description" content="An example website">
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
background-color: #f0f0f2;
margin: 0;
padding: 0;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
div {
width: 600px;
margin: 5em auto;
padding: 2em;
background-color: #fdfdff;
border-radius: 0.5em;
box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
}
a:link, a:visited {
color: #38488f;
text-decoration: none;
}
@media (max-width: 700px) {
div {
margin: 0 auto;
width: auto;
}
}
</style>
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>`
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+47
View File
@@ -0,0 +1,47 @@
import {bundleAsync} from '../../../src/lib/async/bundle'
describe('bundle', () => {
it('bundles multiple simultaneous calls into one execution', async () => {
let calls = 0
const fn = bundleAsync(async () => {
calls++
await new Promise(r => setTimeout(r, 1))
return 'hello'
})
const [res1, res2, res3] = await Promise.all([fn(), fn(), fn()])
expect(calls).toEqual(1)
expect(res1).toEqual('hello')
expect(res2).toEqual('hello')
expect(res3).toEqual('hello')
})
it('does not bundle non-simultaneous calls', async () => {
let calls = 0
const fn = bundleAsync(async () => {
calls++
await new Promise(r => setTimeout(r, 1))
return 'hello'
})
const res1 = await fn()
const res2 = await fn()
const res3 = await fn()
expect(calls).toEqual(3)
expect(res1).toEqual('hello')
expect(res2).toEqual('hello')
expect(res3).toEqual('hello')
})
it('is not affected by rejections', async () => {
let calls = 0
const fn = bundleAsync(async () => {
calls++
await new Promise(r => setTimeout(r, 1))
throw new Error()
})
const res1 = await fn().catch(() => 'reject')
const res2 = await fn().catch(() => 'reject')
const res3 = await fn().catch(() => 'reject')
expect(calls).toEqual(3)
expect(res1).toEqual('reject')
expect(res2).toEqual('reject')
expect(res3).toEqual('reject')
})
})
+19
View File
@@ -0,0 +1,19 @@
import {isNetworkError} from '../../src/lib/errors'
describe('isNetworkError', () => {
const inputs = [
'TypeError: Network request failed',
'Uncaught TypeError: Cannot read property x of undefined',
'Uncaught RangeError',
'Error: Aborted',
]
const outputs = [true, false, false, true]
it('correctly distinguishes network errors', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const result = isNetworkError(input)
expect(result).toEqual(outputs[i])
}
})
})
+130
View File
@@ -0,0 +1,130 @@
import {extractHtmlMeta} from '../../src/lib/extractHtmlMeta'
import {exampleComHtml} from './__mocks__/exampleComHtml'
import {youtubeHTML} from './__mocks__/youtubeHtml'
import {tiktokHtml} from './__mocks__/tiktokHtml'
import {youtubeChannelHtml} from './__mocks__/youtubeChannelHtml'
describe('extractHtmlMeta', () => {
const cases = [
['', {}],
['nothing', {}],
['<title>title</title>', {title: 'title'}],
['<title> aSd!@#AC </title>', {title: 'aSd!@#AC'}],
['<title>\n title\n </title>', {title: 'title'}],
['<meta name="title" content="meta title">', {title: 'meta title'}],
[
'<meta name="description" content="meta description">',
{description: 'meta description'},
],
['<meta property="og:title" content="og title">', {title: 'og title'}],
[
'<meta property="og:description" content="og description">',
{description: 'og description'},
],
[
'<meta property="og:image" content="https://ogimage.com/foo.png">',
{image: 'https://ogimage.com/foo.png'},
],
[
'<meta property="twitter:title" content="twitter title">',
{title: 'twitter title'},
],
[
'<meta property="twitter:description" content="twitter description">',
{description: 'twitter description'},
],
[
'<meta property="twitter:image" content="https://twitterimage.com/foo.png">',
{image: 'https://twitterimage.com/foo.png'},
],
['<meta\n name="title"\n content="meta title"\n>', {title: 'meta title'}],
]
it.each(cases)(
'given the html tag %p, returns %p',
(input, expectedResult) => {
const output = extractHtmlMeta({html: input as string, hostname: ''})
expect(output).toEqual(expectedResult)
},
)
it('extracts title and description from a generic HTML page', () => {
const input = exampleComHtml
const expectedOutput = {
title: 'Example Domain',
description: 'An example website',
}
const output = extractHtmlMeta({html: input, hostname: 'example.com'})
expect(output).toEqual(expectedOutput)
})
it('extracts title and description from a Tiktok HTML page', () => {
const input = tiktokHtml
const expectedOutput = {
title:
'Coca-Cola and Mentos! Super Reaction! #cocacola #mentos #reaction #bal... | TikTok',
description:
'5.5M Likes, 20.8K Comments. TikTok video from Power Vision Tests (@_powervision_): &quot;Coca-Cola and Mentos! Super Reaction! #cocacola #mentos #reaction #balloon #sciencemoment #scienceexperiment #experiment #test #amazing #pvexp&quot;. оригинальный звук - Power Vision Tests.',
}
const output = extractHtmlMeta({html: input, hostname: 'tiktok.com'})
expect(output).toEqual(expectedOutput)
})
it('extracts title and description from a generic youtube page', () => {
const input = youtubeHTML
const expectedOutput = {
title: 'HD Video (1080p) with Relaxing Music of Native American Shamans',
description:
'Stunning HD Video ( 1080p ) of Patagonian Nature with Relaxing Native American Shamanic Music. HD footage used from ',
image: 'https://i.ytimg.com/vi/x6UITRjhijI/sddefault.jpg',
}
const output = extractHtmlMeta({html: input, hostname: 'youtube.com'})
expect(output).toEqual(expectedOutput)
})
it('extracts avatar from a youtube channel', () => {
const input = youtubeChannelHtml
const expectedOutput = {
title: 'penguinz0',
description:
'Clips channel: https://www.youtube.com/channel/UC4EQHfzIbkL_Skit_iKt1aA\n\nTwitter: https://twitter.com/MoistCr1TiKaL\n\nInstagram: https://www.instagram.com/bigmoistcr1tikal/?hl=en\n\nTwitch: https://www.twitch.tv/moistcr1tikal\n\nSnapchat: Hugecharles\n\nTik Tok: Hugecharles\n\nI don&#39;t have any other public accounts.',
image:
'https://yt3.googleusercontent.com/ytc/AL5GRJWOhJOuUC6C2b7gP-5D2q6ypXbcOOckyAE1En4RUQ=s176-c-k-c0x00ffffff-no-rj',
}
const output = extractHtmlMeta({html: input, hostname: 'youtube.com'})
expect(output).toEqual(expectedOutput)
})
it('extracts username from the url a twitter profile page', () => {
const expectedOutput = {
title: '@bluesky on Twitter',
}
const output = extractHtmlMeta({
hostname: 'twitter.com',
pathname: '/bluesky',
})
expect(output).toEqual(expectedOutput)
})
it('extracts username from the url a tweet', () => {
const expectedOutput = {
title: 'Tweet by @bluesky',
}
const output = extractHtmlMeta({
hostname: 'twitter.com',
pathname: '/bluesky/status/1582437529969917953',
})
expect(output).toEqual(expectedOutput)
})
it("does not extract username from the url when it's not a tweet or profile page", () => {
const expectedOutput = {
title: 'Twitter',
}
const output = extractHtmlMeta({
hostname: 'twitter.com',
pathname: '/i/articles/follows/-1675653703?time_window=24',
})
expect(output).toEqual(expectedOutput)
})
})
+118
View File
@@ -0,0 +1,118 @@
import {downloadAndResize, DownloadAndResizeOpts} from '../../src/lib/images'
import ImageResizer from '@bam.tech/react-native-image-resizer'
import RNFetchBlob from 'rn-fetch-blob'
describe('downloadAndResize', () => {
const errorSpy = jest.spyOn(global.console, 'error')
const mockResizedImage = {
path: jest.fn().mockReturnValue('file://resized-image.jpg'),
size: 100,
width: 50,
height: 50,
mime: 'image/jpeg',
}
beforeEach(() => {
const mockedCreateResizedImage =
ImageResizer.createResizedImage as jest.Mock
mockedCreateResizedImage.mockResolvedValue(mockResizedImage)
})
afterEach(() => {
jest.clearAllMocks()
})
it('should return resized image for valid URI and options', async () => {
const mockedFetch = RNFetchBlob.fetch as jest.Mock
mockedFetch.mockResolvedValueOnce({
path: jest.fn().mockReturnValue('file://downloaded-image.jpg'),
flush: jest.fn(),
})
const opts: DownloadAndResizeOpts = {
uri: 'https://example.com/image.jpg',
width: 100,
height: 100,
maxSize: 500000,
mode: 'cover',
timeout: 10000,
}
const result = await downloadAndResize(opts)
expect(result).toEqual(mockResizedImage)
expect(RNFetchBlob.config).toHaveBeenCalledWith({
fileCache: true,
appendExt: 'jpeg',
})
expect(RNFetchBlob.fetch).toHaveBeenCalledWith(
'GET',
'https://example.com/image.jpg',
)
expect(ImageResizer.createResizedImage).toHaveBeenCalledWith(
'file://downloaded-image.jpg',
100,
100,
'JPEG',
100,
undefined,
undefined,
undefined,
{mode: 'cover'},
)
})
it('should return undefined for invalid URI', async () => {
const opts: DownloadAndResizeOpts = {
uri: 'invalid-uri',
width: 100,
height: 100,
maxSize: 500000,
mode: 'cover',
timeout: 10000,
}
const result = await downloadAndResize(opts)
expect(errorSpy).toHaveBeenCalled()
expect(result).toBeUndefined()
})
it('should return undefined for unsupported file type', async () => {
const mockedFetch = RNFetchBlob.fetch as jest.Mock
mockedFetch.mockResolvedValueOnce({
path: jest.fn().mockReturnValue('file://downloaded-image'),
flush: jest.fn(),
})
const opts: DownloadAndResizeOpts = {
uri: 'https://example.com/image',
width: 100,
height: 100,
maxSize: 500000,
mode: 'cover',
timeout: 10000,
}
const result = await downloadAndResize(opts)
expect(result).toEqual(mockResizedImage)
expect(RNFetchBlob.config).toHaveBeenCalledWith({
fileCache: true,
appendExt: 'jpeg',
})
expect(RNFetchBlob.fetch).toHaveBeenCalledWith(
'GET',
'https://example.com/image',
)
expect(ImageResizer.createResizedImage).toHaveBeenCalledWith(
'file://downloaded-image',
100,
100,
'JPEG',
100,
undefined,
undefined,
undefined,
{mode: 'cover'},
)
})
})
+107
View File
@@ -0,0 +1,107 @@
import {LikelyType, getLinkMeta, getLikelyType} from '../../src/lib/link-meta'
import {exampleComHtml} from './__mocks__/exampleComHtml'
import {mockedRootStore} from '../../__mocks__/state-mock'
describe('getLinkMeta', () => {
const inputs = [
'',
'httpbadurl',
'https://example.com',
'https://example.com/index.html',
'https://example.com/image.png',
'https://example.com/video.avi',
'https://example.com/audio.ogg',
'https://example.com/text.txt',
'https://example.com/javascript.js',
'https://bsky.app/',
'https://bsky.app/index.html',
]
const outputs = [
{
error: 'Invalid URL',
likelyType: LikelyType.Other,
url: '',
},
{
error: 'Invalid URL',
likelyType: LikelyType.Other,
url: 'httpbadurl',
},
{
likelyType: LikelyType.HTML,
url: 'https://example.com',
title: 'Example Domain',
description: 'An example website',
},
{
likelyType: LikelyType.HTML,
url: 'https://example.com/index.html',
title: 'Example Domain',
description: 'An example website',
},
{
likelyType: LikelyType.Image,
url: 'https://example.com/image.png',
},
{
likelyType: LikelyType.Video,
url: 'https://example.com/video.avi',
},
{
likelyType: LikelyType.Audio,
url: 'https://example.com/audio.ogg',
},
{
likelyType: LikelyType.Text,
url: 'https://example.com/text.txt',
},
{
likelyType: LikelyType.Other,
url: 'https://example.com/javascript.js',
},
{
likelyType: LikelyType.AtpData,
url: '/',
title: 'Bluesky',
description: 'A new kind of social network',
},
{
likelyType: LikelyType.AtpData,
url: '/index.html',
title: 'Not found',
},
{
likelyType: LikelyType.Other,
url: '',
title: '',
},
]
it('correctly handles a set of text inputs', async () => {
for (let i = 0; i < inputs.length; i++) {
global.fetch = jest.fn().mockImplementationOnce(() => {
return new Promise((resolve, _reject) => {
resolve({
ok: true,
status: 200,
text: () => exampleComHtml,
})
})
})
const input = inputs[i]
const output = await getLinkMeta(mockedRootStore, input)
expect(output).toEqual(outputs[i])
}
})
})
describe('getLikelyType', () => {
it('correctly handles non-parsed url', async () => {
const output = await getLikelyType('https://example.com')
expect(output).toEqual(LikelyType.HTML)
})
it('handles non-string urls without crashing', async () => {
const output = await getLikelyType('123')
expect(output).toEqual(LikelyType.Other)
})
})
+24
View File
@@ -0,0 +1,24 @@
import {clamp} from '../../src/lib/numbers'
describe('clamp', () => {
const inputs: [number, number, number][] = [
[100, 0, 200],
[100, 0, 100],
[0, 0, 100],
[100, 0, -1],
[4, 1, 1],
[100, -100, 0],
[400, 100, -100],
[70, -1, 1],
[Infinity, Infinity, Infinity],
]
const outputs = [100, 100, 0, -1, 1, 0, -100, 1, Infinity]
it('correctly clamps any given number and range', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const result = clamp(...input)
expect(result).toEqual(outputs[i])
}
})
})
+516
View File
@@ -0,0 +1,516 @@
import {getYoutubeVideoId} from './../../src/lib/strings'
import {
extractEntities,
detectLinkables,
pluralize,
makeRecordUri,
ago,
makeValidHandle,
createFullHandle,
enforceLen,
cleanError,
toNiceDomain,
toShortUrl,
toShareUrl,
} from '../../src/lib/strings'
describe('extractEntities', () => {
const knownHandles = new Set(['handle.com', 'full123.test-of-chars'])
const inputs = [
'no mention',
'@handle.com middle end',
'start @handle.com end',
'start middle @handle.com',
'@handle.com @handle.com @handle.com',
'@full123.test-of-chars',
'not@right',
'@handle.com!@#$chars',
'@handle.com\n@handle.com',
'parenthetical (@handle.com)',
'start https://middle.com end',
'start https://middle.com/foo/bar end',
'start https://middle.com/foo/bar?baz=bux end',
'start https://middle.com/foo/bar?baz=bux#hash end',
'https://start.com/foo/bar?baz=bux#hash middle end',
'start middle https://end.com/foo/bar?baz=bux#hash',
'https://newline1.com\nhttps://newline2.com',
'start middle.com end',
'start middle.com/foo/bar end',
'start middle.com/foo/bar?baz=bux end',
'start middle.com/foo/bar?baz=bux#hash end',
'start.com/foo/bar?baz=bux#hash middle end',
'start middle end.com/foo/bar?baz=bux#hash',
'newline1.com\nnewline2.com',
'not.. a..url ..here',
'e.g.',
'something-cool.jpg',
'website.com.jpg',
'e.g./foo',
'website.com.jpg/foo',
'Classic article https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/',
'Classic article https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/ ',
'https://foo.com https://bar.com/whatever https://baz.com',
'punctuation https://foo.com, https://bar.com/whatever; https://baz.com.',
'parenthentical (https://foo.com)',
'except for https://foo.com/thing_(cool)',
]
interface Output {
type: string
value: string
noScheme?: boolean
}
const outputs: Output[][] = [
[],
[{type: 'mention', value: 'handle.com'}],
[{type: 'mention', value: 'handle.com'}],
[{type: 'mention', value: 'handle.com'}],
[
{type: 'mention', value: 'handle.com'},
{type: 'mention', value: 'handle.com'},
{type: 'mention', value: 'handle.com'},
],
[
{
type: 'mention',
value: 'full123.test-of-chars',
},
],
[],
[{type: 'mention', value: 'handle.com'}],
[
{type: 'mention', value: 'handle.com'},
{type: 'mention', value: 'handle.com'},
],
[{type: 'mention', value: 'handle.com'}],
[{type: 'link', value: 'https://middle.com'}],
[{type: 'link', value: 'https://middle.com/foo/bar'}],
[{type: 'link', value: 'https://middle.com/foo/bar?baz=bux'}],
[{type: 'link', value: 'https://middle.com/foo/bar?baz=bux#hash'}],
[{type: 'link', value: 'https://start.com/foo/bar?baz=bux#hash'}],
[{type: 'link', value: 'https://end.com/foo/bar?baz=bux#hash'}],
[
{type: 'link', value: 'https://newline1.com'},
{type: 'link', value: 'https://newline2.com'},
],
[{type: 'link', value: 'middle.com', noScheme: true}],
[{type: 'link', value: 'middle.com/foo/bar', noScheme: true}],
[{type: 'link', value: 'middle.com/foo/bar?baz=bux', noScheme: true}],
[{type: 'link', value: 'middle.com/foo/bar?baz=bux#hash', noScheme: true}],
[{type: 'link', value: 'start.com/foo/bar?baz=bux#hash', noScheme: true}],
[{type: 'link', value: 'end.com/foo/bar?baz=bux#hash', noScheme: true}],
[
{type: 'link', value: 'newline1.com', noScheme: true},
{type: 'link', value: 'newline2.com', noScheme: true},
],
[],
[],
[],
[],
[],
[],
[
{
type: 'link',
value:
'https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/',
},
],
[
{
type: 'link',
value:
'https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/',
},
],
[
{type: 'link', value: 'https://foo.com'},
{type: 'link', value: 'https://bar.com/whatever'},
{type: 'link', value: 'https://baz.com'},
],
[
{type: 'link', value: 'https://foo.com'},
{type: 'link', value: 'https://bar.com/whatever'},
{type: 'link', value: 'https://baz.com'},
],
[{type: 'link', value: 'https://foo.com'}],
[{type: 'link', value: 'https://foo.com/thing_(cool)'}],
]
it('correctly handles a set of text inputs', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const result = extractEntities(input, knownHandles)
if (!outputs[i].length) {
expect(result).toBeFalsy()
} else if (outputs[i].length && !result) {
expect(result).toBeTruthy()
} else if (result) {
expect(result.length).toBe(outputs[i].length)
for (let j = 0; j < outputs[i].length; j++) {
expect(result[j].type).toEqual(outputs[i][j].type)
if (outputs[i][j].noScheme) {
expect(result[j].value).toEqual(`https://${outputs[i][j].value}`)
} else {
expect(result[j].value).toEqual(outputs[i][j].value)
}
if (outputs[i]?.[j].type === 'mention') {
expect(
input.slice(result[j].index.start, result[j].index.end),
).toBe(`@${result[j].value}`)
} else {
if (!outputs[i]?.[j].noScheme) {
expect(
input.slice(result[j].index.start, result[j].index.end),
).toBe(result[j].value)
} else {
expect(
input.slice(result[j].index.start, result[j].index.end),
).toBe(result[j].value.slice('https://'.length))
}
}
}
}
}
})
})
describe('detectLinkables', () => {
const inputs = [
'no linkable',
'@start middle end',
'start @middle end',
'start middle @end',
'@start @middle @end',
'@full123.test-of-chars',
'not@right',
'@bad!@#$chars',
'@newline1\n@newline2',
'parenthetical (@handle)',
'start https://middle.com end',
'start https://middle.com/foo/bar end',
'start https://middle.com/foo/bar?baz=bux end',
'start https://middle.com/foo/bar?baz=bux#hash end',
'https://start.com/foo/bar?baz=bux#hash middle end',
'start middle https://end.com/foo/bar?baz=bux#hash',
'https://newline1.com\nhttps://newline2.com',
'start middle.com end',
'start middle.com/foo/bar end',
'start middle.com/foo/bar?baz=bux end',
'start middle.com/foo/bar?baz=bux#hash end',
'start.com/foo/bar?baz=bux#hash middle end',
'start middle end.com/foo/bar?baz=bux#hash',
'newline1.com\nnewline2.com',
'not.. a..url ..here',
'e.g.',
'e.g. real.com fake.notreal',
'something-cool.jpg',
'website.com.jpg',
'e.g./foo',
'website.com.jpg/foo',
'Classic article https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/',
'Classic article https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/ ',
'https://foo.com https://bar.com/whatever https://baz.com',
'punctuation https://foo.com, https://bar.com/whatever; https://baz.com.',
'parenthentical (https://foo.com)',
'except for https://foo.com/thing_(cool)',
]
const outputs = [
['no linkable'],
[{link: '@start'}, ' middle end'],
['start ', {link: '@middle'}, ' end'],
['start middle ', {link: '@end'}],
[{link: '@start'}, ' ', {link: '@middle'}, ' ', {link: '@end'}],
[{link: '@full123.test-of-chars'}],
['not@right'],
[{link: '@bad'}, '!@#$chars'],
[{link: '@newline1'}, '\n', {link: '@newline2'}],
['parenthetical (', {link: '@handle'}, ')'],
['start ', {link: 'https://middle.com'}, ' end'],
['start ', {link: 'https://middle.com/foo/bar'}, ' end'],
['start ', {link: 'https://middle.com/foo/bar?baz=bux'}, ' end'],
['start ', {link: 'https://middle.com/foo/bar?baz=bux#hash'}, ' end'],
[{link: 'https://start.com/foo/bar?baz=bux#hash'}, ' middle end'],
['start middle ', {link: 'https://end.com/foo/bar?baz=bux#hash'}],
[{link: 'https://newline1.com'}, '\n', {link: 'https://newline2.com'}],
['start ', {link: 'middle.com'}, ' end'],
['start ', {link: 'middle.com/foo/bar'}, ' end'],
['start ', {link: 'middle.com/foo/bar?baz=bux'}, ' end'],
['start ', {link: 'middle.com/foo/bar?baz=bux#hash'}, ' end'],
[{link: 'start.com/foo/bar?baz=bux#hash'}, ' middle end'],
['start middle ', {link: 'end.com/foo/bar?baz=bux#hash'}],
[{link: 'newline1.com'}, '\n', {link: 'newline2.com'}],
['not.. a..url ..here'],
['e.g.'],
['e.g. ', {link: 'real.com'}, ' fake.notreal'],
['something-cool.jpg'],
['website.com.jpg'],
['e.g./foo'],
['website.com.jpg/foo'],
[
'Classic article ',
{
link: 'https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/',
},
],
[
'Classic article ',
{
link: 'https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/',
},
' ',
],
[
{link: 'https://foo.com'},
' ',
{link: 'https://bar.com/whatever'},
' ',
{link: 'https://baz.com'},
],
[
'punctuation ',
{link: 'https://foo.com'},
', ',
{link: 'https://bar.com/whatever'},
'; ',
{link: 'https://baz.com'},
'.',
],
['parenthentical (', {link: 'https://foo.com'}, ')'],
['except for ', {link: 'https://foo.com/thing_(cool)'}],
]
it('correctly handles a set of text inputs', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const output = detectLinkables(input)
expect(output).toEqual(outputs[i])
}
})
})
describe('pluralize', () => {
const inputs: [number, string, string?][] = [
[1, 'follower'],
[1, 'member'],
[100, 'post'],
[1000, 'repost'],
[10000, 'upvote'],
[100000, 'other'],
[2, 'man', 'men'],
]
const outputs = [
'follower',
'member',
'posts',
'reposts',
'upvotes',
'others',
'men',
]
it('correctly pluralizes a set of words', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const output = pluralize(...input)
expect(output).toEqual(outputs[i])
}
})
})
describe('makeRecordUri', () => {
const inputs: [string, string, string][] = [
['alice.test', 'app.bsky.feed.post', '3jk7x4irgv52r'],
]
const outputs = ['at://alice.test/app.bsky.feed.post/3jk7x4irgv52r']
it('correctly builds a record URI', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const result = makeRecordUri(...input)
expect(result).toEqual(outputs[i])
}
})
})
describe('ago', () => {
const inputs = [
1671461038,
'04 Dec 1995 00:12:00 GMT',
new Date(),
new Date().setMinutes(new Date().getMinutes() - 10),
new Date().setHours(new Date().getHours() - 1),
new Date().setDate(new Date().getDate() - 1),
new Date().setMonth(new Date().getMonth() - 1),
]
const outputs = [
new Date(1671461038).toLocaleDateString(),
new Date('04 Dec 1995 00:12:00 GMT').toLocaleDateString(),
'0s',
'10m',
'1h',
'1d',
'1mo',
]
it('correctly calculates how much time passed, in a string', () => {
for (let i = 0; i < inputs.length; i++) {
const result = ago(inputs[i])
expect(result).toEqual(outputs[i])
}
})
})
describe('makeValidHandle', () => {
const inputs = [
'test-handle-123',
'test!"#$%&/()=?_',
'this-handle-should-be-too-big',
]
const outputs = ['test-handle-123', 'test', 'this-handle-should-b']
it('correctly parses and corrects handles', () => {
for (let i = 0; i < inputs.length; i++) {
const result = makeValidHandle(inputs[i])
expect(result).toEqual(outputs[i])
}
})
})
describe('createFullHandle', () => {
const inputs: [string, string][] = [
['test-handle-123', 'test'],
['.test.handle', 'test.test.'],
['test.handle.', '.test.test'],
]
const outputs = [
'test-handle-123.test',
'.test.handle.test.test.',
'test.handle.test.test',
]
it('correctly parses and corrects handles', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const result = createFullHandle(...input)
expect(result).toEqual(outputs[i])
}
})
})
describe('enforceLen', () => {
const inputs: [string, number][] = [
['Hello World!', 5],
['Hello World!', 20],
['', 5],
]
const outputs = ['Hello', 'Hello World!', '']
it('correctly enforces defined length on a given string', () => {
for (let i = 0; i < inputs.length; i++) {
const input = inputs[i]
const result = enforceLen(...input)
expect(result).toEqual(outputs[i])
}
})
})
describe('cleanError', () => {
const inputs = [
'TypeError: Network request failed',
'Error: Aborted',
'Error: TypeError "x" is not a function',
'Error: SyntaxError unexpected token "export"',
'Some other error',
]
const outputs = [
'Unable to connect. Please check your internet connection and try again.',
'Unable to connect. Please check your internet connection and try again.',
'TypeError "x" is not a function',
'SyntaxError unexpected token "export"',
'Some other error',
]
it('removes extra content from error message', () => {
for (let i = 0; i < inputs.length; i++) {
const result = cleanError(inputs[i])
expect(result).toEqual(outputs[i])
}
})
})
describe('toNiceDomain', () => {
const inputs = [
'https://example.com/index.html',
'https://bsky.app',
'https://bsky.social',
'#123123123',
]
const outputs = ['example.com', 'bsky.app', 'Bluesky Social', '#123123123']
it("displays the url's host in a easily readable manner", () => {
for (let i = 0; i < inputs.length; i++) {
const result = toNiceDomain(inputs[i])
expect(result).toEqual(outputs[i])
}
})
})
describe('toShortUrl', () => {
const inputs = [
'https://bsky.app',
'https://bsky.app/3jk7x4irgv52r',
'https://bsky.app/3jk7x4irgv52r2313y182h9',
]
const outputs = [
'bsky.app',
'bsky.app/3jk7x4irgv52r',
'bsky.app/3jk7x4irgv52r2313y...',
]
it('shortens the url', () => {
for (let i = 0; i < inputs.length; i++) {
const result = toShortUrl(inputs[i])
expect(result).toEqual(outputs[i])
}
})
})
describe('toShareUrl', () => {
const inputs = ['https://bsky.app', '/3jk7x4irgv52r', 'item/test/123']
const outputs = [
'https://bsky.app',
'https://bsky.app/3jk7x4irgv52r',
'https://bsky.app/item/test/123',
]
it('appends https, when not present', () => {
for (let i = 0; i < inputs.length; i++) {
const result = toShareUrl(inputs[i])
expect(result).toEqual(outputs[i])
}
})
})
describe('getYoutubeVideoId', () => {
it(' should return undefined for invalid youtube links', () => {
expect(getYoutubeVideoId('')).toBeUndefined()
expect(getYoutubeVideoId('https://www.google.com')).toBeUndefined()
expect(getYoutubeVideoId('https://www.youtube.com')).toBeUndefined()
expect(
getYoutubeVideoId('https://www.youtube.com/channelName'),
).toBeUndefined()
expect(
getYoutubeVideoId('https://www.youtube.com/channel/channelName'),
).toBeUndefined()
})
it('getYoutubeVideoId should return video id for valid youtube links', () => {
expect(getYoutubeVideoId('https://www.youtube.com/watch?v=videoId')).toBe(
'videoId',
)
expect(
getYoutubeVideoId(
'https://www.youtube.com/watch?v=videoId&feature=share',
),
).toBe('videoId')
expect(getYoutubeVideoId('https://youtu.be/videoId')).toBe('videoId')
})
})
@@ -0,0 +1,84 @@
import {
getMentionAt,
insertMentionAt,
} from '../../../src/lib/strings/mention-manip'
describe('getMentionAt', () => {
type Case = [string, number, string | undefined]
const cases: Case[] = [
['hello @alice goodbye', 0, undefined],
['hello @alice goodbye', 1, undefined],
['hello @alice goodbye', 2, undefined],
['hello @alice goodbye', 3, undefined],
['hello @alice goodbye', 4, undefined],
['hello @alice goodbye', 5, undefined],
['hello @alice goodbye', 6, 'alice'],
['hello @alice goodbye', 7, 'alice'],
['hello @alice goodbye', 8, 'alice'],
['hello @alice goodbye', 9, 'alice'],
['hello @alice goodbye', 10, 'alice'],
['hello @alice goodbye', 11, 'alice'],
['hello @alice goodbye', 12, 'alice'],
['hello @alice goodbye', 13, undefined],
['hello @alice goodbye', 14, undefined],
['@alice', 0, 'alice'],
['@alice hello', 0, 'alice'],
['@alice hello', 1, 'alice'],
['@alice hello', 2, 'alice'],
['@alice hello', 3, 'alice'],
['@alice hello', 4, 'alice'],
['@alice hello', 5, 'alice'],
['@alice hello', 6, 'alice'],
['@alice hello', 7, undefined],
['alice@alice', 0, undefined],
['alice@alice', 6, undefined],
]
it.each(cases)(
'given input string %p and cursor position %p, returns %p',
(str, cursorPos, expected) => {
const output = getMentionAt(str, cursorPos)
expect(output?.value).toEqual(expected)
},
)
})
describe('insertMentionAt', () => {
type Case = [string, number, string]
const cases: Case[] = [
['hello @alice goodbye', 0, 'hello @alice goodbye'],
['hello @alice goodbye', 1, 'hello @alice goodbye'],
['hello @alice goodbye', 2, 'hello @alice goodbye'],
['hello @alice goodbye', 3, 'hello @alice goodbye'],
['hello @alice goodbye', 4, 'hello @alice goodbye'],
['hello @alice goodbye', 5, 'hello @alice goodbye'],
['hello @alice goodbye', 6, 'hello @alice.com goodbye'],
['hello @alice goodbye', 7, 'hello @alice.com goodbye'],
['hello @alice goodbye', 8, 'hello @alice.com goodbye'],
['hello @alice goodbye', 9, 'hello @alice.com goodbye'],
['hello @alice goodbye', 10, 'hello @alice.com goodbye'],
['hello @alice goodbye', 11, 'hello @alice.com goodbye'],
['hello @alice goodbye', 12, 'hello @alice.com goodbye'],
['hello @alice goodbye', 13, 'hello @alice goodbye'],
['hello @alice goodbye', 14, 'hello @alice goodbye'],
['@alice', 0, '@alice.com '],
['@alice hello', 0, '@alice.com hello'],
['@alice hello', 1, '@alice.com hello'],
['@alice hello', 2, '@alice.com hello'],
['@alice hello', 3, '@alice.com hello'],
['@alice hello', 4, '@alice.com hello'],
['@alice hello', 5, '@alice.com hello'],
['@alice hello', 6, '@alice.com hello'],
['@alice hello', 7, '@alice hello'],
['alice@alice', 0, 'alice@alice'],
['alice@alice', 6, 'alice@alice'],
]
it.each(cases)(
'given input string %p and cursor position %p, returns %p',
(str, cursorPos, expected) => {
const output = insertMentionAt(str, cursorPos, 'alice.com')
expect(output).toEqual(expected)
},
)
})
+123
View File
@@ -0,0 +1,123 @@
import {AppBskyFeedPost} from '@atproto/api'
type Entity = AppBskyFeedPost.Entity
import {RichText} from '../../../src/lib/strings/rich-text'
import {removeExcessNewlines} from '../../../src/lib/strings/rich-text-sanitize'
describe('removeExcessNewlines', () => {
it('removes more than two consecutive new lines', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n\n\n\n\n\n\ntest\n\n\n\n\n\n\ntest\n\n\n\n\n\n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
})
it('removes more than two consecutive new lines with spaces', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n \n \n \n \n\n\ntest\n\n\n\n\n\n\ntest\n\n\n\n\n \n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
})
it('returns original string if there are no consecutive new lines', () => {
const input = new RichText('test\n\ntest\n\ntest\n\ntest\n\ntest')
const output = removeExcessNewlines(input)
expect(output.text).toEqual(input.text)
})
it('returns original string if there are no new lines', () => {
const input = new RichText('test test test test test')
const output = removeExcessNewlines(input)
expect(output.text).toEqual(input.text)
})
it('returns empty string if input is empty', () => {
const input = new RichText('')
const output = removeExcessNewlines(input)
expect(output.text).toEqual('')
})
it('works with different types of new line characters', () => {
const input = new RichText(
'test\r\ntest\n\rtest\rtest\n\n\n\ntest\n\r \n \n \n \n\n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\r\ntest\n\rtest\rtest\n\ntest\n\ntest')
})
it('removes more than two consecutive new lines with zero width space', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n\u200B\u200B\n\n\n\ntest\n \u200B\u200B \n\n\n\ntest\n\n\n\n\n\n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
})
it('removes more than two consecutive new lines with zero width non-joiner', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n\u200C\u200C\n\n\n\ntest\n \u200C\u200C \n\n\n\ntest\n\n\n\n\n\n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
})
it('removes more than two consecutive new lines with zero width joiner', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n\u200D\u200D\n\n\n\ntest\n \u200D\u200D \n\n\n\ntest\n\n\n\n\n\n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
})
it('removes more than two consecutive new lines with soft hyphen', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n\u00AD\u00AD\n\n\n\ntest\n \u00AD\u00AD \n\n\n\ntest\n\n\n\n\n\n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
})
it('removes more than two consecutive new lines with word joiner', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n\u2060\u2060\n\n\n\ntest\n \u2060\u2060 \n\n\n\ntest\n\n\n\n\n\n\ntest',
)
const output = removeExcessNewlines(input)
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
})
})
describe('removeExcessNewlines w/entities', () => {
it('preserves entities as expected', () => {
const input = new RichText(
'test\n\n\n\n\ntest\n\n\n\n\n\n\ntest\n\n\n\n\n\n\ntest\n\n\n\n\n\n\ntest',
[
{index: {start: 0, end: 13}, type: '', value: ''},
{index: {start: 13, end: 24}, type: '', value: ''},
{index: {start: 9, end: 15}, type: '', value: ''},
{index: {start: 4, end: 9}, type: '', value: ''},
],
)
const output = removeExcessNewlines(input)
expect(entToStr(input.text, input.entities?.[0])).toEqual(
'test\n\n\n\n\ntest',
)
expect(entToStr(input.text, input.entities?.[1])).toEqual(
'\n\n\n\n\n\n\ntest',
)
expect(entToStr(input.text, input.entities?.[2])).toEqual('test\n\n')
expect(entToStr(input.text, input.entities?.[3])).toEqual('\n\n\n\n\n')
expect(output.text).toEqual('test\n\ntest\n\ntest\n\ntest\n\ntest')
expect(entToStr(output.text, output.entities?.[0])).toEqual('test\n\ntest')
expect(entToStr(output.text, output.entities?.[1])).toEqual('test')
expect(entToStr(output.text, output.entities?.[2])).toEqual('test')
expect(output.entities?.[3]).toEqual(undefined)
})
})
function entToStr(str: string, ent?: Entity) {
if (!ent) {
return ''
}
return str.slice(ent.index.start, ent.index.end)
}
+123
View File
@@ -0,0 +1,123 @@
import {RichText} from '../../../src/lib/strings/rich-text'
describe('richText.insert', () => {
const input = new RichText('hello world', [
{index: {start: 2, end: 7}, type: '', value: ''},
])
it('correctly adjusts entities (scenario A - before)', () => {
const output = input.clone().insert(0, 'test')
expect(output.text).toEqual('testhello world')
expect(output.entities?.[0].index.start).toEqual(6)
expect(output.entities?.[0].index.end).toEqual(11)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual('llo w')
})
it('correctly adjusts entities (scenario B - inner)', () => {
const output = input.clone().insert(4, 'test')
expect(output.text).toEqual('helltesto world')
expect(output.entities?.[0].index.start).toEqual(2)
expect(output.entities?.[0].index.end).toEqual(11)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual('lltesto w')
})
it('correctly adjusts entities (scenario C - after)', () => {
const output = input.clone().insert(8, 'test')
expect(output.text).toEqual('hello wotestrld')
expect(output.entities?.[0].index.start).toEqual(2)
expect(output.entities?.[0].index.end).toEqual(7)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual('llo w')
})
})
describe('richText.delete', () => {
const input = new RichText('hello world', [
{index: {start: 2, end: 7}, type: '', value: ''},
])
it('correctly adjusts entities (scenario A - entirely outer)', () => {
const output = input.clone().delete(0, 9)
expect(output.text).toEqual('ld')
expect(output.entities?.length).toEqual(0)
})
it('correctly adjusts entities (scenario B - entirely after)', () => {
const output = input.clone().delete(7, 11)
expect(output.text).toEqual('hello w')
expect(output.entities?.[0].index.start).toEqual(2)
expect(output.entities?.[0].index.end).toEqual(7)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual('llo w')
})
it('correctly adjusts entities (scenario C - partially after)', () => {
const output = input.clone().delete(4, 11)
expect(output.text).toEqual('hell')
expect(output.entities?.[0].index.start).toEqual(2)
expect(output.entities?.[0].index.end).toEqual(4)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual('ll')
})
it('correctly adjusts entities (scenario D - entirely inner)', () => {
const output = input.clone().delete(3, 5)
expect(output.text).toEqual('hel world')
expect(output.entities?.[0].index.start).toEqual(2)
expect(output.entities?.[0].index.end).toEqual(5)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual('l w')
})
it('correctly adjusts entities (scenario E - partially before)', () => {
const output = input.clone().delete(1, 5)
expect(output.text).toEqual('h world')
expect(output.entities?.[0].index.start).toEqual(1)
expect(output.entities?.[0].index.end).toEqual(3)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual(' w')
})
it('correctly adjusts entities (scenario F - entirely before)', () => {
const output = input.clone().delete(0, 2)
expect(output.text).toEqual('llo world')
expect(output.entities?.[0].index.start).toEqual(0)
expect(output.entities?.[0].index.end).toEqual(5)
expect(
output.text.slice(
output.entities?.[0].index.start,
output.entities?.[0].index.end,
),
).toEqual('llo w')
})
})
+157
View File
@@ -0,0 +1,157 @@
import {RootStoreModel} from './../../../src/state/models/root-store'
import {NavigationModel} from './../../../src/state/models/navigation'
import * as flags from '../../../src/build-flags'
import AtpAgent from '@atproto/api'
import {DEFAULT_SERVICE} from '../../../src/state'
describe('NavigationModel', () => {
let model: NavigationModel
let rootStore: RootStoreModel
beforeEach(() => {
rootStore = new RootStoreModel(new AtpAgent({service: DEFAULT_SERVICE}))
model = new NavigationModel(rootStore)
model.setTitle('0-0', 'title')
})
afterAll(() => {
jest.clearAllMocks()
})
it('should clear() to the correct base state', async () => {
await model.clear()
expect(model.tabCount).toBe(3)
expect(model.tab).toEqual({
fixedTabPurpose: 0,
history: [
{
id: expect.anything(),
ts: expect.anything(),
url: '/',
},
],
id: expect.anything(),
index: 0,
isNewTab: false,
})
})
it('should call the navigate method', async () => {
const navigateSpy = jest.spyOn(model.tab, 'navigate')
await model.navigate('testurl', 'teststring')
expect(navigateSpy).toHaveBeenCalledWith('testurl', 'teststring')
})
it('should call the refresh method', async () => {
const refreshSpy = jest.spyOn(model.tab, 'refresh')
await model.refresh()
expect(refreshSpy).toHaveBeenCalled()
})
it('should call the isCurrentScreen method', () => {
expect(model.isCurrentScreen('11', 0)).toEqual(false)
})
it('should call the tab getter', () => {
expect(model.tab).toEqual({
fixedTabPurpose: 0,
history: [
{
id: expect.anything(),
ts: expect.anything(),
url: '/',
},
],
id: expect.anything(),
index: 0,
isNewTab: false,
})
})
it('should call the tabCount getter', () => {
expect(model.tabCount).toBe(3)
})
describe('tabs not enabled', () => {
jest.mock('../../../src/build-flags', () => ({
TABS_ENABLED: false,
}))
afterAll(() => {
jest.clearAllMocks()
})
it('should not create new tabs', () => {
// @ts-expect-error
flags.TABS_ENABLED = false
model.newTab('testurl')
expect(model.tab.isNewTab).toBe(false)
expect(model.tabIndex).toBe(0)
})
it('should not change the active tab', () => {
// @ts-expect-error
flags.TABS_ENABLED = false
model.setActiveTab(3)
expect(model.tabIndex).toBe(0)
})
it('should note close tabs', () => {
// @ts-expect-error
flags.TABS_ENABLED = false
model.closeTab(0)
expect(model.tabCount).toBe(3)
})
})
// TODO restore when tabs get re-enabled
// describe('tabs enabled', () => {
// jest.mock('../../../src/build-flags', () => ({
// TABS_ENABLED: true,
// }))
// afterAll(() => {
// jest.clearAllMocks()
// })
// it('should create new tabs', () => {
// // @ts-expect-error
// flags.TABS_ENABLED = true
// model.newTab('testurl', 'title')
// expect(model.tab.isNewTab).toBe(true)
// expect(model.tabIndex).toBe(2)
// })
// it('should change the current tab', () => {
// // @ts-expect-error
// flags.TABS_ENABLED = true
// model.setActiveTab(0)
// expect(model.tabIndex).toBe(0)
// })
// it('should close tabs', () => {
// // @ts-expect-error
// flags.TABS_ENABLED = true
// model.closeTab(0)
// expect(model.tabs).toEqual([
// {
// fixedTabPurpose: 1,
// history: [
// {
// id: expect.anything(),
// ts: expect.anything(),
// url: '/notifications',
// },
// ],
// id: expect.anything(),
// index: 0,
// isNewTab: false,
// },
// ])
// expect(model.tabIndex).toBe(0)
// })
// })
})
+46
View File
@@ -0,0 +1,46 @@
import {
OnboardModel,
OnboardStageOrder,
} from '../../../src/state/models/onboard'
describe('OnboardModel', () => {
let onboardModel: OnboardModel
beforeEach(() => {
onboardModel = new OnboardModel()
})
afterAll(() => {
jest.clearAllMocks()
})
it('should start/stop correctly', () => {
onboardModel.start()
expect(onboardModel.isOnboarding).toBe(true)
onboardModel.stop()
expect(onboardModel.isOnboarding).toBe(false)
})
it('should call the next method until it has no more stages', () => {
onboardModel.start()
onboardModel.next()
expect(onboardModel.stage).toBe(OnboardStageOrder[1])
onboardModel.next()
expect(onboardModel.isOnboarding).toBe(false)
expect(onboardModel.stage).toBe(OnboardStageOrder[0])
})
it('serialize and hydrate', () => {
const serialized = onboardModel.serialize()
const newModel = new OnboardModel()
newModel.hydrate(serialized)
expect(newModel).toEqual(onboardModel)
onboardModel.start()
onboardModel.next()
const serialized2 = onboardModel.serialize()
newModel.hydrate(serialized2)
expect(newModel).toEqual(onboardModel)
})
})
-55
View File
@@ -1,55 +0,0 @@
# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
# - `npm start` - to start the packager
# - `cd android`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
# - `buck install -r android/app` - compile, install and run application
#
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
lib_deps = []
create_aar_targets(glob(["libs/*.aar"]))
create_jar_targets(glob(["libs/*.jar"]))
android_library(
name = "all-libs",
exported_deps = lib_deps,
)
android_library(
name = "app-code",
srcs = glob([
"src/main/java/**/*.java",
]),
deps = [
":all-libs",
":build_config",
":res",
],
)
android_build_config(
name = "build_config",
package = "xyz.blueskyweb.pubsq",
)
android_resource(
name = "res",
package = "xyz.blueskyweb.pubsq",
res = "src/main/res",
)
android_binary(
name = "app",
keystore = "//android/keystores:debug",
manifest = "src/main/AndroidManifest.xml",
package_type = "debug",
deps = [
":app-code",
],
)
+65 -214
View File
@@ -1,128 +1,86 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
import com.android.build.OutputFile
import org.apache.tools.ant.taskdefs.condition.Os
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation. If none specified and
* // "index.android.js" exists, it will be used. Otherwise "index.js" is
* // default. Can be overridden with ENTRY_FILE environment variable.
* entryFile: "index.android.js",
*
* // https://reactnative.dev/docs/performance#enable-the-ram-format
* bundleCommand: "ram-bundle",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
project.ext.react = [
enableHermes: false, // clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
// codegenDir = file("../node_modules/react-native-codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
// nodeExecutableAndArgs = ["node"]
//
// The command to run when bundling. By default is 'bundle'
// bundleCommand = "ram-bundle"
//
// The path to the CLI configuration file. Default is empty.
// bundleConfig = file(../rn-cli.config.js)
//
// The name of the generated asset file containing your JS bundle
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
// entryFile = file("../js/MyApplication.android.js")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []
/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
}
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
* Set this to true to create four separate APKs instead of one,
* one for each native architecture. This is useful if you don't
* use App Bundles (https://developer.android.com/guide/app-bundle/)
* and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
* The preferred build flavor of JavaScriptCore (JSC)
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and that value will be read here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);
/**
* Architectures to build native code for.
* Private function to get the list of Native Architectures you want to build.
* This reads the value from reactNativeArchitectures in your gradle.properties
* file and works together with the --active-arch-only flag of react-native run-android.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
@@ -134,84 +92,13 @@ android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace "xyz.blueskyweb.app"
defaultConfig {
applicationId "xyz.blueskyweb.pubsq"
applicationId "xyz.blueskyweb.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21",
"APP_STL=c++_shared",
"NDK_TOOLCHAIN_VERSION=clang",
"GENERATED_SRC_DIR=$buildDir/generated/source",
"PROJECT_BUILD_DIR=$buildDir",
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build"
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
cppFlags "-std=c++17"
// Make sure this target name is the same you specify inside the
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
targets "app_appmodules"
// Fix for windows limit on number of character in file paths and in command lines
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
arguments "NDK_APP_SHORT_COMMANDS=true"
}
}
}
if (!enableSeparateBuildPerCPUArchitecture) {
ndk {
abiFilters (*reactNativeArchitectures())
}
}
}
}
if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
path "$projectDir/src/main/jni/Android.mk"
}
}
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
afterEvaluate {
// If you wish to add a custom TurboModule or component locally,
// you should uncomment this line.
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
// Due to a bug inside AGP, we have to explicitly set a dependency
// between configureNdkBuild* tasks and the preBuild tasks.
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
configureNdkBuildRelease.dependsOn(preReleaseBuild)
configureNdkBuildDebug.dependsOn(preDebugBuild)
reactNativeArchitectures().each { architecture ->
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
dependsOn("preDebugBuild")
}
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
dependsOn("preReleaseBuild")
}
}
}
}
splits {
@@ -261,60 +148,24 @@ android {
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
implementation project(':rn-fetch-blob')
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
if (isNewArchitectureEnabled()) {
// If new architecture is enabled, we let you build RN from source
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
// This will be applied to all the imported transtitive dependency.
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.facebook.react:react-native"))
.using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
}
}
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.implementation
into 'libs'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
def isNewArchitectureEnabled() {
// To opt-in for the New Architecture, you can either:
// - Set `newArchEnabled` to true inside the `gradle.properties` file
// - Invoke gradle with `-newArchEnabled=true`
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}
-19
View File
@@ -1,19 +0,0 @@
"""Helper definitions to glob .aar and .jar targets"""
def create_aar_targets(aarfiles):
for aarfile in aarfiles:
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
lib_deps.append(":" + name)
android_prebuilt_aar(
name = name,
aar = aarfile,
)
def create_jar_targets(jarfiles):
for jarfile in jarfiles:
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
lib_deps.append(":" + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)
@@ -25,13 +25,16 @@ import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
/**
* Class responsible of loading Flipper inside your React Native application. This is the debug
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new ReactFlipperPlugin());
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
+9 -6
View File
@@ -1,7 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xyz.blueskyweb.pubsq">
package="xyz.blueskyweb.app">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name=".MainApplication"
@@ -15,7 +18,7 @@
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:windowSoftInputMode="adjustPan"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -26,17 +29,17 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- debug host: https://pubsq.pfrazee.com -->
<!-- debug host: https://bsky.pfrazee.com -->
<data android:scheme="https" />
<data android:host="pubsq.pfrazee.com" />
<data android:host="bsky.pfrazee.com" />
</intent-filter>
<!-- deep linking via custom links -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- debug scheme: pubsq://app -->
<data android:scheme="pubsq" />
<!-- debug scheme: bsky://app -->
<data android:scheme="bsky" />
<data android:host="app" />
</intent-filter>
</activity>
@@ -1,28 +0,0 @@
package xyz.blueskyweb.pubsq;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.Promise;
import java.security.SecureRandom;
import android.util.Base64;
public class AppSecureRandomModule extends ReactContextBaseJavaModule {
public AppSecureRandomModule(ReactApplicationContext context) {
super(context);
}
@ReactMethod
public void generateSecureRandomAsBase64(int length, Promise promise) {
SecureRandom secureRandom = new SecureRandom();
byte[] buffer = new byte[length];
secureRandom.nextBytes(buffer);
promise.resolve(Base64.encodeToString(buffer, Base64.NO_WRAP));
}
@Override
public String getName() {
return "AppSecureRandomModule";
}
}
@@ -1,26 +0,0 @@
package xyz.blueskyweb.pubsq;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class AppSecureRandomPackage implements ReactPackage {
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<>();
modules.add(new AppSecureRandomModule(reactContext));
return modules;
}
}
@@ -1,8 +1,9 @@
package xyz.blueskyweb.pubsq;
package xyz.blueskyweb.app;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
import android.os.Bundle;
public class MainActivity extends ReactActivity {
@@ -13,34 +14,23 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "xyz.blueskyweb.pubsq";
return "xyz.blueskyweb.app";
}
/**
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
* you can specify the rendered you wish to use (Fabric or the older renderer).
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
* (aka React 18) with two boolean flags.
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new MainActivityDelegate(this, getMainComponentName());
}
public static class MainActivityDelegate extends ReactActivityDelegate {
public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
super(activity, mainComponentName);
}
@Override
protected ReactRootView createRootView() {
ReactRootView reactRootView = new ReactRootView(getContext());
return new DefaultReactActivityDelegate(
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
return reactRootView;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
);
}
}
@@ -1,22 +1,21 @@
package xyz.blueskyweb.pubsq;
package xyz.blueskyweb.app;
import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactNativeHost;
import com.facebook.soloader.SoLoader;
import xyz.blueskyweb.pubsq.newarchitecture.MainApplicationReactNativeHost;
import xyz.blueskyweb.app.newarchitecture.MainApplicationReactNativeHost;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
@@ -28,7 +27,6 @@ public class MainApplication extends Application implements ReactApplication {
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new AppSecureRandomPackage());
return packages;
}
@@ -36,18 +34,20 @@ public class MainApplication extends Application implements ReactApplication {
protected String getJSMainModuleName() {
return "index";
}
};
private final ReactNativeHost mNewArchitectureNativeHost =
new MainApplicationReactNativeHost(this);
@Override
protected boolean isNewArchEnabled() {
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
}
@Override
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
};
@Override
public ReactNativeHost getReactNativeHost() {
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
return mNewArchitectureNativeHost;
} else {
return mReactNativeHost;
}
return mReactNativeHost;
}
@Override
@@ -56,37 +56,10 @@ public class MainApplication extends Application implements ReactApplication {
// If you opted-in for the New Architecture, we enable the TurboModule system
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
/**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
*
* @param context
* @param reactInstanceManager
*/
private static void initializeFlipper(
Context context, ReactInstanceManager reactInstanceManager) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.app.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load();
}
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
}
@@ -1,116 +0,0 @@
package xyz.blueskyweb.pubsq.newarchitecture;
import android.app.Application;
import androidx.annotation.NonNull;
import com.facebook.react.PackageList;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
import com.facebook.react.bridge.JSIModulePackage;
import com.facebook.react.bridge.JSIModuleProvider;
import com.facebook.react.bridge.JSIModuleSpec;
import com.facebook.react.bridge.JSIModuleType;
import com.facebook.react.bridge.JavaScriptContextHolder;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.UIManager;
import com.facebook.react.fabric.ComponentFactory;
import com.facebook.react.fabric.CoreComponentsRegistry;
import com.facebook.react.fabric.EmptyReactNativeConfig;
import com.facebook.react.fabric.FabricJSIModuleProvider;
import com.facebook.react.uimanager.ViewManagerRegistry;
import xyz.blueskyweb.pubsq.BuildConfig;
import xyz.blueskyweb.pubsq.newarchitecture.components.MainComponentsRegistry;
import xyz.blueskyweb.pubsq.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
import java.util.ArrayList;
import java.util.List;
/**
* A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
* TurboModule delegates and the Fabric Renderer.
*
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
* `newArchEnabled` property). Is ignored otherwise.
*/
public class MainApplicationReactNativeHost extends ReactNativeHost {
public MainApplicationReactNativeHost(Application application) {
super(application);
}
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
// TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
// packages.add(new TurboReactPackage() { ... });
// If you have custom Fabric Components, their ViewManagers should also be loaded here
// inside a ReactPackage.
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
@NonNull
@Override
protected ReactPackageTurboModuleManagerDelegate.Builder
getReactPackageTurboModuleManagerDelegateBuilder() {
// Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
// for the new architecture and to use TurboModules correctly.
return new MainApplicationTurboModuleManagerDelegate.Builder();
}
@Override
protected JSIModulePackage getJSIModulePackage() {
return new JSIModulePackage() {
@Override
public List<JSIModuleSpec> getJSIModules(
final ReactApplicationContext reactApplicationContext,
final JavaScriptContextHolder jsContext) {
final List<JSIModuleSpec> specs = new ArrayList<>();
// Here we provide a new JSIModuleSpec that will be responsible of providing the
// custom Fabric Components.
specs.add(
new JSIModuleSpec() {
@Override
public JSIModuleType getJSIModuleType() {
return JSIModuleType.UIManager;
}
@Override
public JSIModuleProvider<UIManager> getJSIModuleProvider() {
final ComponentFactory componentFactory = new ComponentFactory();
CoreComponentsRegistry.register(componentFactory);
// Here we register a Components Registry.
// The one that is generated with the template contains no components
// and just provides you the one from React Native core.
MainComponentsRegistry.register(componentFactory);
final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
ViewManagerRegistry viewManagerRegistry =
new ViewManagerRegistry(
reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
return new FabricJSIModuleProvider(
reactApplicationContext,
componentFactory,
new EmptyReactNativeConfig(),
viewManagerRegistry);
}
});
return specs;
}
};
}
}
@@ -1,36 +0,0 @@
package xyz.blueskyweb.pubsq.newarchitecture.components;
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.fabric.ComponentFactory;
import com.facebook.soloader.SoLoader;
/**
* Class responsible to load the custom Fabric Components. This class has native methods and needs a
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
* folder for you).
*
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
* `newArchEnabled` property). Is ignored otherwise.
*/
@DoNotStrip
public class MainComponentsRegistry {
static {
SoLoader.loadLibrary("fabricjni");
}
@DoNotStrip private final HybridData mHybridData;
@DoNotStrip
private native HybridData initHybrid(ComponentFactory componentFactory);
@DoNotStrip
private MainComponentsRegistry(ComponentFactory componentFactory) {
mHybridData = initHybrid(componentFactory);
}
@DoNotStrip
public static MainComponentsRegistry register(ComponentFactory componentFactory) {
return new MainComponentsRegistry(componentFactory);
}
}
@@ -1,48 +0,0 @@
package xyz.blueskyweb.pubsq.newarchitecture.modules;
import com.facebook.jni.HybridData;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.soloader.SoLoader;
import java.util.List;
/**
* Class responsible to load the TurboModules. This class has native methods and needs a
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
* folder for you).
*
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
* `newArchEnabled` property). Is ignored otherwise.
*/
public class MainApplicationTurboModuleManagerDelegate
extends ReactPackageTurboModuleManagerDelegate {
private static volatile boolean sIsSoLibraryLoaded;
protected MainApplicationTurboModuleManagerDelegate(
ReactApplicationContext reactApplicationContext, List<ReactPackage> packages) {
super(reactApplicationContext, packages);
}
protected native HybridData initHybrid();
native boolean canCreateTurboModule(String moduleName);
public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
protected MainApplicationTurboModuleManagerDelegate build(
ReactApplicationContext context, List<ReactPackage> packages) {
return new MainApplicationTurboModuleManagerDelegate(context, packages);
}
}
@Override
protected synchronized void maybeLoadOtherSoLibraries() {
if (!sIsSoLibraryLoaded) {
// If you change the name of your application .so file in the Android.mk file,
// make sure you update the name here as well.
SoLoader.loadLibrary("app_appmodules");
sIsSoLibraryLoaded = true;
}
}
}
@@ -1,24 +0,0 @@
#include "MainApplicationModuleProvider.h"
#include <rncore.h>
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
const std::string moduleName,
const JavaTurboModule::InitParams &params) {
// Here you can provide your own module provider for TurboModules coming from
// either your application or from external libraries. The approach to follow
// is similar to the following (for a library called `samplelibrary`:
//
// auto module = samplelibrary_ModuleProvider(moduleName, params);
// if (module != nullptr) {
// return module;
// }
// return rncore_ModuleProvider(moduleName, params);
return rncore_ModuleProvider(moduleName, params);
}
} // namespace react
} // namespace facebook
@@ -1,16 +0,0 @@
#pragma once
#include <memory>
#include <string>
#include <ReactCommon/JavaTurboModule.h>
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
const std::string moduleName,
const JavaTurboModule::InitParams &params);
} // namespace react
} // namespace facebook
@@ -1,45 +0,0 @@
#include "MainApplicationTurboModuleManagerDelegate.h"
#include "MainApplicationModuleProvider.h"
namespace facebook {
namespace react {
jni::local_ref<MainApplicationTurboModuleManagerDelegate::jhybriddata>
MainApplicationTurboModuleManagerDelegate::initHybrid(
jni::alias_ref<jhybridobject>) {
return makeCxxInstance();
}
void MainApplicationTurboModuleManagerDelegate::registerNatives() {
registerHybrid({
makeNativeMethod(
"initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
makeNativeMethod(
"canCreateTurboModule",
MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
});
}
std::shared_ptr<TurboModule>
MainApplicationTurboModuleManagerDelegate::getTurboModule(
const std::string name,
const std::shared_ptr<CallInvoker> jsInvoker) {
// Not implemented yet: provide pure-C++ NativeModules here.
return nullptr;
}
std::shared_ptr<TurboModule>
MainApplicationTurboModuleManagerDelegate::getTurboModule(
const std::string name,
const JavaTurboModule::InitParams &params) {
return MainApplicationModuleProvider(name, params);
}
bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
std::string name) {
return getTurboModule(name, nullptr) != nullptr ||
getTurboModule(name, {.moduleName = name}) != nullptr;
}
} // namespace react
} // namespace facebook
@@ -1,38 +0,0 @@
#include <memory>
#include <string>
#include <ReactCommon/TurboModuleManagerDelegate.h>
#include <fbjni/fbjni.h>
namespace facebook {
namespace react {
class MainApplicationTurboModuleManagerDelegate
: public jni::HybridClass<
MainApplicationTurboModuleManagerDelegate,
TurboModuleManagerDelegate> {
public:
// Adapt it to the package you used for your Java class.
static constexpr auto kJavaDescriptor =
"Lcom/app/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
static void registerNatives();
std::shared_ptr<TurboModule> getTurboModule(
const std::string name,
const std::shared_ptr<CallInvoker> jsInvoker) override;
std::shared_ptr<TurboModule> getTurboModule(
const std::string name,
const JavaTurboModule::InitParams &params) override;
/**
* Test-only method. Allows user to verify whether a TurboModule can be
* created by instances of this class.
*/
bool canCreateTurboModule(std::string name);
};
} // namespace react
} // namespace facebook
@@ -1,61 +0,0 @@
#include "MainComponentsRegistry.h"
#include <CoreComponentsRegistry.h>
#include <fbjni/fbjni.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <react/renderer/components/rncore/ComponentDescriptors.h>
namespace facebook {
namespace react {
MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
std::shared_ptr<ComponentDescriptorProviderRegistry const>
MainComponentsRegistry::sharedProviderRegistry() {
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
// Custom Fabric Components go here. You can register custom
// components coming from your App or from 3rd party libraries here.
//
// providerRegistry->add(concreteComponentDescriptorProvider<
// AocViewerComponentDescriptor>());
return providerRegistry;
}
jni::local_ref<MainComponentsRegistry::jhybriddata>
MainComponentsRegistry::initHybrid(
jni::alias_ref<jclass>,
ComponentFactory *delegate) {
auto instance = makeCxxInstance(delegate);
auto buildRegistryFunction =
[](EventDispatcher::Weak const &eventDispatcher,
ContextContainer::Shared const &contextContainer)
-> ComponentDescriptorRegistry::Shared {
auto registry = MainComponentsRegistry::sharedProviderRegistry()
->createComponentDescriptorRegistry(
{eventDispatcher, contextContainer});
auto mutableRegistry =
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
mutableRegistry->setFallbackComponentDescriptor(
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
ComponentDescriptorParameters{
eventDispatcher, contextContainer, nullptr}));
return registry;
};
delegate->buildRegistryFunction = buildRegistryFunction;
return instance;
}
void MainComponentsRegistry::registerNatives() {
registerHybrid({
makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
});
}
} // namespace react
} // namespace facebook
@@ -1,32 +0,0 @@
#pragma once
#include <ComponentFactory.h>
#include <fbjni/fbjni.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
namespace facebook {
namespace react {
class MainComponentsRegistry
: public facebook::jni::HybridClass<MainComponentsRegistry> {
public:
// Adapt it to the package you used for your Java class.
constexpr static auto kJavaDescriptor =
"Lcom/app/newarchitecture/components/MainComponentsRegistry;";
static void registerNatives();
MainComponentsRegistry(ComponentFactory *delegate);
private:
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
sharedProviderRegistry();
static jni::local_ref<jhybriddata> initHybrid(
jni::alias_ref<jclass>,
ComponentFactory *delegate);
};
} // namespace react
} // namespace facebook
-11
View File
@@ -1,11 +0,0 @@
#include <fbjni/fbjni.h>
#include "MainApplicationTurboModuleManagerDelegate.h"
#include "MainComponentsRegistry.h"
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
return facebook::jni::initialize(vm, [] {
facebook::react::MainApplicationTurboModuleManagerDelegate::
registerNatives();
facebook::react::MainComponentsRegistry::registerNatives();
});
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

+1 -1
View File
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">pubsq</string>
<string name="app_name">bsky</string>
</resources>
@@ -0,0 +1,18 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package xyz.blueskyweb.app;
import android.content.Context;
import com.facebook.react.ReactInstanceManager;
/**
* Class responsible of loading Flipper inside your React Native application. This is the release
* flavor of it so it's empty as we don't want to load Flipper.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
// Do nothing as we don't want to initialize Flipper on Release.
}
}
+6 -36
View File
@@ -4,50 +4,20 @@ import org.apache.tools.ant.taskdefs.condition.Os
buildscript {
ext {
buildToolsVersion = "31.0.0"
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
compileSdkVersion = 33
targetSdkVersion = 33
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:7.2.1')
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:4.1.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
maven { url 'https://www.jitpack.io' }
}
}
+4
View File
@@ -38,3 +38,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+2 -5
View File
@@ -2,8 +2,5 @@ rootProject.name = 'app'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
include(":ReactAndroid")
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
}
include ':rn-fetch-blob'
project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/rn-fetch-blob/android')
+1 -1
View File
@@ -4,7 +4,7 @@ module.exports = {
[
'module:react-native-dotenv',
{
// envName: 'APP_ENV',
envName: 'APP_ENV',
moduleName: '@env',
path: '.env',
blocklist: null,
+12
View File
@@ -0,0 +1,12 @@
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
rootDir: '..',
testMatch: ['<rootDir>/e2e/**/*.test.js'],
testTimeout: 120000,
maxWorkers: 1,
globalSetup: 'detox/runners/jest/globalSetup',
globalTeardown: 'detox/runners/jest/globalTeardown',
reporters: ['detox/runners/jest/reporter'],
testEnvironment: 'detox/runners/jest/testEnvironment',
verbose: true,
}
+77
View File
@@ -0,0 +1,77 @@
/* eslint-env detox/detox */
describe('Example', () => {
async function grantAccessToUserWithValidCredentials(
username,
{takeScreenshots} = {takeScreenshots: false},
) {
await element(by.id('signInButton')).tap()
if (takeScreenshots) {
await device.takeScreenshot('1- opened sign-in screen')
}
await element(by.id('loginSelectServiceButton')).tap()
if (takeScreenshots) {
await device.takeScreenshot('2- opened service selector')
}
await element(by.id('localDevServerButton')).tap()
if (takeScreenshots) {
await device.takeScreenshot('3- selected local dev server')
}
await element(by.id('loginUsernameInput')).typeText(username)
await element(by.id('loginPasswordInput')).typeText('hunter2')
if (takeScreenshots) {
await device.takeScreenshot('4- entered username and password')
}
await element(by.id('loginNextButton')).tap()
}
beforeEach(async () => {
await device.uninstallApp()
await device.installApp()
await device.launchApp({permissions: {notifications: 'YES'}})
})
it('As Alice, I can login', async () => {
await expect(element(by.id('signInButton'))).toBeVisible()
await grantAccessToUserWithValidCredentials('alice', {
takeScreenshots: true,
})
await device.takeScreenshot('5- opened home screen')
})
it('As Alice, I can login, and post a text', async () => {
await grantAccessToUserWithValidCredentials('alice')
await element(by.id('composeFAB')).tap()
await device.takeScreenshot('1- opened composer')
await element(by.id('composerTextInput')).typeText(
'Greetings earthlings, I come in peace... and to run some tests.',
)
await device.takeScreenshot('2- entered text')
await element(by.id('composerPublishButton')).tap()
await device.takeScreenshot('3- opened general section')
await expect(element(by.id('composeFAB'))).toBeVisible()
})
it('I can create a new account', async () => {
await element(by.id('createAccountButton')).tap()
await device.takeScreenshot('1- opened create account screen')
await element(by.id('registerSelectServiceButton')).tap()
await device.takeScreenshot('2- opened service selector')
await element(by.id('localDevServerButton')).tap()
await device.takeScreenshot('3- selected local dev server')
await element(by.id('registerEmailInput')).typeText('example@test.com')
await element(by.id('registerPasswordInput')).typeText('hunter2')
await element(by.id('registerHandleInput')).typeText('e2e-test')
await element(by.id('registerIs13Input')).tap()
await device.takeScreenshot('4- entered account details')
await element(by.id('createAccountButton')).tap()
await expect(element(by.id('onboardFeatureExplainerSkipBtn'))).toBeVisible()
await expect(element(by.id('onboardFeatureExplainerNextBtn'))).toBeVisible()
await device.takeScreenshot('5- onboard feature explainer')
await element(by.id('onboardFeatureExplainerSkipBtn')).tap()
await expect(element(by.id('onboardFollowsSkipBtn'))).toBeVisible()
await expect(element(by.id('onboardFollowsNextBtn'))).toBeVisible()
await device.takeScreenshot('6- onboard follows recommender')
await element(by.id('onboardFollowsSkipBtn')).tap()
})
})
View File
+10
View File
@@ -0,0 +1,10 @@
# This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.
# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
-5
View File
@@ -1,5 +0,0 @@
#import <React/RCTBridgeModule.h>
@interface AppSecureRandomModule : NSObject <RCTBridgeModule>
@end
-27
View File
@@ -1,27 +0,0 @@
#import "AppSecureRandomModule.h"
@implementation AppSecureRandomModule
RCT_EXPORT_MODULE();
+ (BOOL)requiresMainQueueSetup
{
return NO;
}
RCT_REMAP_METHOD(generateSecureRandomAsBase64,
withLength:(int)length
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
{
NSMutableData* bytes = [NSMutableData dataWithLength:length];
int result = SecRandomCopyBytes(kSecRandomDefault,length, [bytes mutableBytes]);
if (result == errSecSuccess) {
resolve([bytes base64EncodedStringWithOptions:0]);
} else {
NSError *error = [NSError errorWithDomain:@"RNSecureRandom" code:result userInfo: nil];
reject(@"randombytes_error", @"Error generating random bytes", error);
}
}
@end
+43
View File
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController id="Y6W-OH-hqX" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" image="LaunchScreen" translatesAutoresizingMaskIntoConstraints="NO" id="Ppr-Vi-7AA">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Ppr-Vi-7AA" secondAttribute="trailing" id="8NR-sO-ZhN"/>
<constraint firstItem="Ppr-Vi-7AA" firstAttribute="top" secondItem="5EZ-qb-Rvc" secondAttribute="top" id="Od5-pK-zM2"/>
<constraint firstItem="Ppr-Vi-7AA" firstAttribute="leading" secondItem="5EZ-qb-Rvc" secondAttribute="leading" id="Ww6-nx-IYo"/>
<constraint firstAttribute="bottom" secondItem="Ppr-Vi-7AA" secondAttribute="bottom" id="vTP-N3-Ihm"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="119.84732824427481" y="4.9295774647887329"/>
</scene>
</scenes>
<resources>
<image name="LaunchScreen" width="600" height="900"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
+49 -10
View File
@@ -1,8 +1,25 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false
platform :ios, min_ios_version_supported
prepare_react_native_project!
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'app' do
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
@@ -13,26 +30,48 @@ target 'app' do
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
#:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
# react-native-permissions settings
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
target 'appTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
#use_flipper!()
post_install do |installer|
react_native_post_install(installer)
# Temporary fix until CocoaPods 1.12.0 is released.
# https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1201464693
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
# iOS fix
+531 -318
View File
@@ -1,303 +1,395 @@
PODS:
- boost (1.76.0)
- BVLinearGradient (2.6.2):
- React-Core
- DoubleConversion (1.1.6)
- FBLazyVector (0.68.2)
- FBReactNativeSpec (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- RCTRequired (= 0.68.2)
- RCTTypeSafety (= 0.68.2)
- React-Core (= 0.68.2)
- React-jsi (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- FBLazyVector (0.71.1)
- FBReactNativeSpec (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- RCTRequired (= 0.71.1)
- RCTTypeSafety (= 0.71.1)
- React-Core (= 0.71.1)
- React-jsi (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- fmt (6.2.1)
- glog (0.3.5)
- RCT-Folly (2021.06.28.00-v2):
- hermes-engine (0.71.1):
- hermes-engine/Pre-built (= 0.71.1)
- hermes-engine/Pre-built (0.71.1)
- libevent (2.1.12)
- libwebp (1.2.4):
- libwebp/demux (= 1.2.4)
- libwebp/mux (= 1.2.4)
- libwebp/webp (= 1.2.4)
- libwebp/demux (1.2.4):
- libwebp/webp
- libwebp/mux (1.2.4):
- libwebp/demux
- libwebp/webp (1.2.4)
- Permission-Camera (3.6.1):
- RNPermissions
- Permission-PhotoLibrary (3.6.1):
- RNPermissions
- RCT-Folly (2021.07.22.00):
- boost
- DoubleConversion
- fmt (~> 6.2.1)
- glog
- RCT-Folly/Default (= 2021.06.28.00-v2)
- RCT-Folly/Default (2021.06.28.00-v2):
- RCT-Folly/Default (= 2021.07.22.00)
- RCT-Folly/Default (2021.07.22.00):
- boost
- DoubleConversion
- fmt (~> 6.2.1)
- glog
- RCTRequired (0.68.2)
- RCTTypeSafety (0.68.2):
- FBLazyVector (= 0.68.2)
- RCT-Folly (= 2021.06.28.00-v2)
- RCTRequired (= 0.68.2)
- React-Core (= 0.68.2)
- React (0.68.2):
- React-Core (= 0.68.2)
- React-Core/DevSupport (= 0.68.2)
- React-Core/RCTWebSocket (= 0.68.2)
- React-RCTActionSheet (= 0.68.2)
- React-RCTAnimation (= 0.68.2)
- React-RCTBlob (= 0.68.2)
- React-RCTImage (= 0.68.2)
- React-RCTLinking (= 0.68.2)
- React-RCTNetwork (= 0.68.2)
- React-RCTSettings (= 0.68.2)
- React-RCTText (= 0.68.2)
- React-RCTVibration (= 0.68.2)
- React-callinvoker (0.68.2)
- React-Codegen (0.68.2):
- FBReactNativeSpec (= 0.68.2)
- RCT-Folly (= 2021.06.28.00-v2)
- RCTRequired (= 0.68.2)
- RCTTypeSafety (= 0.68.2)
- React-Core (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-Core (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default (= 0.68.2)
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/CoreModulesHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/Default (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/DevSupport (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default (= 0.68.2)
- React-Core/RCTWebSocket (= 0.68.2)
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-jsinspector (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTActionSheetHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTAnimationHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTBlobHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTImageHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTLinkingHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTNetworkHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTSettingsHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTTextHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTVibrationHeaders (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-Core/RCTWebSocket (0.68.2):
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-Core/Default (= 0.68.2)
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsiexecutor (= 0.68.2)
- React-perflogger (= 0.68.2)
- Yoga
- React-CoreModules (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- RCTTypeSafety (= 0.68.2)
- React-Codegen (= 0.68.2)
- React-Core/CoreModulesHeaders (= 0.68.2)
- React-jsi (= 0.68.2)
- React-RCTImage (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-cxxreact (0.68.2):
- boost (= 1.76.0)
- RCT-Folly/Futures (2021.07.22.00):
- boost
- DoubleConversion
- fmt (~> 6.2.1)
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-callinvoker (= 0.68.2)
- React-jsi (= 0.68.2)
- React-jsinspector (= 0.68.2)
- React-logger (= 0.68.2)
- React-perflogger (= 0.68.2)
- React-runtimeexecutor (= 0.68.2)
- React-jsi (0.68.2):
- boost (= 1.76.0)
- DoubleConversion
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-jsi/Default (= 0.68.2)
- React-jsi/Default (0.68.2):
- boost (= 1.76.0)
- DoubleConversion
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-jsiexecutor (0.68.2):
- DoubleConversion
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-perflogger (= 0.68.2)
- React-jsinspector (0.68.2)
- React-logger (0.68.2):
- glog
- react-native-safe-area-context (4.3.1):
- libevent
- RCTRequired (0.71.1)
- RCTTypeSafety (0.71.1):
- FBLazyVector (= 0.71.1)
- RCTRequired (= 0.71.1)
- React-Core (= 0.71.1)
- React (0.71.1):
- React-Core (= 0.71.1)
- React-Core/DevSupport (= 0.71.1)
- React-Core/RCTWebSocket (= 0.71.1)
- React-RCTActionSheet (= 0.71.1)
- React-RCTAnimation (= 0.71.1)
- React-RCTBlob (= 0.71.1)
- React-RCTImage (= 0.71.1)
- React-RCTLinking (= 0.71.1)
- React-RCTNetwork (= 0.71.1)
- React-RCTSettings (= 0.71.1)
- React-RCTText (= 0.71.1)
- React-RCTVibration (= 0.71.1)
- React-callinvoker (0.71.1)
- React-Codegen (0.71.1):
- FBReactNativeSpec
- hermes-engine
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React
- React-Core
- React-jsi
- React-jsiexecutor
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- React-perflogger (0.68.2)
- React-RCTActionSheet (0.68.2):
- React-Core/RCTActionSheetHeaders (= 0.68.2)
- React-RCTAnimation (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- RCTTypeSafety (= 0.68.2)
- React-Codegen (= 0.68.2)
- React-Core/RCTAnimationHeaders (= 0.68.2)
- React-jsi (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-RCTBlob (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- React-Codegen (= 0.68.2)
- React-Core/RCTBlobHeaders (= 0.68.2)
- React-Core/RCTWebSocket (= 0.68.2)
- React-jsi (= 0.68.2)
- React-RCTNetwork (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-RCTImage (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- RCTTypeSafety (= 0.68.2)
- React-Codegen (= 0.68.2)
- React-Core/RCTImageHeaders (= 0.68.2)
- React-jsi (= 0.68.2)
- React-RCTNetwork (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-RCTLinking (0.68.2):
- React-Codegen (= 0.68.2)
- React-Core/RCTLinkingHeaders (= 0.68.2)
- React-jsi (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-RCTNetwork (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- RCTTypeSafety (= 0.68.2)
- React-Codegen (= 0.68.2)
- React-Core/RCTNetworkHeaders (= 0.68.2)
- React-jsi (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-RCTSettings (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- RCTTypeSafety (= 0.68.2)
- React-Codegen (= 0.68.2)
- React-Core/RCTSettingsHeaders (= 0.68.2)
- React-jsi (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-RCTText (0.68.2):
- React-Core/RCTTextHeaders (= 0.68.2)
- React-RCTVibration (0.68.2):
- RCT-Folly (= 2021.06.28.00-v2)
- React-Codegen (= 0.68.2)
- React-Core/RCTVibrationHeaders (= 0.68.2)
- React-jsi (= 0.68.2)
- ReactCommon/turbomodule/core (= 0.68.2)
- React-runtimeexecutor (0.68.2):
- React-jsi (= 0.68.2)
- ReactCommon/turbomodule/core (0.68.2):
- React-Core (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default (= 0.71.1)
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/CoreModulesHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/Default (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/DevSupport (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default (= 0.71.1)
- React-Core/RCTWebSocket (= 0.71.1)
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-jsinspector (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTActionSheetHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTAnimationHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTBlobHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTImageHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTLinkingHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTNetworkHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTSettingsHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTTextHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTVibrationHeaders (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-Core/RCTWebSocket (0.71.1):
- glog
- RCT-Folly (= 2021.07.22.00)
- React-Core/Default (= 0.71.1)
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-perflogger (= 0.71.1)
- Yoga
- React-CoreModules (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- RCTTypeSafety (= 0.71.1)
- React-Codegen (= 0.71.1)
- React-Core/CoreModulesHeaders (= 0.71.1)
- React-jsi (= 0.71.1)
- React-RCTImage (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-cxxreact (0.71.1):
- boost (= 1.76.0)
- DoubleConversion
- glog
- RCT-Folly (= 2021.06.28.00-v2)
- React-callinvoker (= 0.68.2)
- React-Core (= 0.68.2)
- React-cxxreact (= 0.68.2)
- React-jsi (= 0.68.2)
- React-logger (= 0.68.2)
- React-perflogger (= 0.68.2)
- RNCAsyncStorage (1.17.6):
- RCT-Folly (= 2021.07.22.00)
- React-callinvoker (= 0.71.1)
- React-jsi (= 0.71.1)
- React-jsinspector (= 0.71.1)
- React-logger (= 0.71.1)
- React-perflogger (= 0.71.1)
- React-runtimeexecutor (= 0.71.1)
- React-hermes (0.71.1):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2021.07.22.00)
- RCT-Folly/Futures (= 2021.07.22.00)
- React-cxxreact (= 0.71.1)
- React-jsiexecutor (= 0.71.1)
- React-jsinspector (= 0.71.1)
- React-perflogger (= 0.71.1)
- React-jsi (0.71.1):
- boost (= 1.76.0)
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2021.07.22.00)
- React-jsiexecutor (0.71.1):
- DoubleConversion
- glog
- RCT-Folly (= 2021.07.22.00)
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-perflogger (= 0.71.1)
- React-jsinspector (0.71.1)
- React-logger (0.71.1):
- glog
- react-native-blur (4.3.0):
- React-Core
- RNCClipboard (1.10.0):
- react-native-cameraroll (5.2.2):
- React-Core
- RNGestureHandler (2.5.0):
- react-native-image-resizer (3.0.4):
- React-Core
- RNInAppBrowser (3.6.3):
- react-native-pager-view (6.1.2):
- React-Core
- RNReanimated (2.9.1):
- react-native-paste-input (0.6.0):
- React-Core
- Swime (= 3.0.6)
- react-native-safe-area-context (4.4.1):
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React-Core
- ReactCommon/turbomodule/core
- react-native-splash-screen (3.3.0):
- React-Core
- react-native-version-number (0.3.6):
- React
- react-native-webview (11.26.1):
- React-Core
- React-perflogger (0.71.1)
- React-RCTActionSheet (0.71.1):
- React-Core/RCTActionSheetHeaders (= 0.71.1)
- React-RCTAnimation (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- RCTTypeSafety (= 0.71.1)
- React-Codegen (= 0.71.1)
- React-Core/RCTAnimationHeaders (= 0.71.1)
- React-jsi (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-RCTAppDelegate (0.71.1):
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React-Core
- ReactCommon/turbomodule/core
- React-RCTBlob (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- React-Codegen (= 0.71.1)
- React-Core/RCTBlobHeaders (= 0.71.1)
- React-Core/RCTWebSocket (= 0.71.1)
- React-jsi (= 0.71.1)
- React-RCTNetwork (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-RCTImage (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- RCTTypeSafety (= 0.71.1)
- React-Codegen (= 0.71.1)
- React-Core/RCTImageHeaders (= 0.71.1)
- React-jsi (= 0.71.1)
- React-RCTNetwork (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-RCTLinking (0.71.1):
- React-Codegen (= 0.71.1)
- React-Core/RCTLinkingHeaders (= 0.71.1)
- React-jsi (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-RCTNetwork (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- RCTTypeSafety (= 0.71.1)
- React-Codegen (= 0.71.1)
- React-Core/RCTNetworkHeaders (= 0.71.1)
- React-jsi (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-RCTSettings (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- RCTTypeSafety (= 0.71.1)
- React-Codegen (= 0.71.1)
- React-Core/RCTSettingsHeaders (= 0.71.1)
- React-jsi (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-RCTText (0.71.1):
- React-Core/RCTTextHeaders (= 0.71.1)
- React-RCTVibration (0.71.1):
- RCT-Folly (= 2021.07.22.00)
- React-Codegen (= 0.71.1)
- React-Core/RCTVibrationHeaders (= 0.71.1)
- React-jsi (= 0.71.1)
- ReactCommon/turbomodule/core (= 0.71.1)
- React-runtimeexecutor (0.71.1):
- React-jsi (= 0.71.1)
- ReactCommon/turbomodule/bridging (0.71.1):
- DoubleConversion
- glog
- RCT-Folly (= 2021.07.22.00)
- React-callinvoker (= 0.71.1)
- React-Core (= 0.71.1)
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-logger (= 0.71.1)
- React-perflogger (= 0.71.1)
- ReactCommon/turbomodule/core (0.71.1):
- DoubleConversion
- glog
- RCT-Folly (= 2021.07.22.00)
- React-callinvoker (= 0.71.1)
- React-Core (= 0.71.1)
- React-cxxreact (= 0.71.1)
- React-jsi (= 0.71.1)
- React-logger (= 0.71.1)
- React-perflogger (= 0.71.1)
- rn-fetch-blob (0.12.0):
- React-Core
- RNBackgroundFetch (4.1.8):
- React-Core
- RNCAsyncStorage (1.17.11):
- React-Core
- RNCClipboard (1.11.1):
- React-Core
- RNFastImage (8.6.3):
- React-Core
- SDWebImage (~> 5.11.1)
- SDWebImageWebPCoder (~> 0.8.4)
- RNFS (2.20.0):
- React-Core
- RNGestureHandler (2.8.0):
- React-Core
- RNImageCropPicker (0.38.1):
- React-Core
- React-RCTImage
- RNImageCropPicker/QBImagePickerController (= 0.38.1)
- TOCropViewController
- RNImageCropPicker/QBImagePickerController (0.38.1):
- React-Core
- React-RCTImage
- TOCropViewController
- RNInAppBrowser (3.7.0):
- React-Core
- RNNotifee (7.4.0):
- React-Core
- RNNotifee/NotifeeCore (= 7.4.0)
- RNNotifee/NotifeeCore (7.4.0):
- React-Core
- RNPermissions (3.6.1):
- React-Core
- RNReactNativeHapticFeedback (1.14.0):
- React-Core
- RNReanimated (2.13.0):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
@@ -324,19 +416,37 @@ PODS:
- React-RCTText
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.13.1):
- RNScreens (3.18.2):
- React-Core
- React-RCTImage
- RNSVG (12.4.0):
- RNSVG (12.5.0):
- React-Core
- SDWebImage (5.11.1):
- SDWebImage/Core (= 5.11.1)
- SDWebImage/Core (5.11.1)
- SDWebImageWebPCoder (0.8.5):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.10)
- segment-analytics-react-native (2.10.1):
- React-Core
- sovran-react-native
- sovran-react-native (0.4.5):
- React-Core
- Swime (3.0.6)
- TOCropViewController (2.6.1)
- Yoga (1.14.0)
DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- libevent (~> 2.1.12)
- Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`)
- Permission-PhotoLibrary (from `../node_modules/react-native-permissions/ios/PhotoLibrary`)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
@@ -344,18 +454,27 @@ DEPENDENCIES:
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
- React-Codegen (from `build/generated/ios`)
- React-Core (from `../node_modules/react-native/`)
- React-Core/DevSupport (from `../node_modules/react-native/`)
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
- React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- "react-native-blur (from `../node_modules/@react-native-community/blur`)"
- "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)"
- "react-native-image-resizer (from `../node_modules/@bam.tech/react-native-image-resizer`)"
- react-native-pager-view (from `../node_modules/react-native-pager-view`)
- "react-native-paste-input (from `../node_modules/@mattermost/react-native-paste-input`)"
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
- react-native-version-number (from `../node_modules/react-native-version-number`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
- React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`)
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
- React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
- React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
@@ -365,22 +484,40 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- RNBackgroundFetch (from `../node_modules/react-native-background-fetch`)
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- RNFastImage (from `../node_modules/react-native-fast-image`)
- RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
- RNInAppBrowser (from `../node_modules/react-native-inappbrowser-reborn`)
- "RNNotifee (from `../node_modules/@notifee/react-native`)"
- RNPermissions (from `../node_modules/react-native-permissions`)
- RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNSVG (from `../node_modules/react-native-svg`)
- "segment-analytics-react-native (from `../node_modules/@segment/analytics-react-native`)"
- "sovran-react-native (from `../node_modules/@segment/sovran-react-native`)"
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
SPEC REPOS:
trunk:
- fmt
- libevent
- libwebp
- SDWebImage
- SDWebImageWebPCoder
- Swime
- TOCropViewController
EXTERNAL SOURCES:
boost:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
BVLinearGradient:
:path: "../node_modules/react-native-linear-gradient"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
FBLazyVector:
@@ -389,6 +526,12 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/React/FBReactNativeSpec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
hermes-engine:
:podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
Permission-Camera:
:path: "../node_modules/react-native-permissions/ios/Camera"
Permission-PhotoLibrary:
:path: "../node_modules/react-native-permissions/ios/PhotoLibrary"
RCT-Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
RCTRequired:
@@ -407,6 +550,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/React/CoreModules"
React-cxxreact:
:path: "../node_modules/react-native/ReactCommon/cxxreact"
React-hermes:
:path: "../node_modules/react-native/ReactCommon/hermes"
React-jsi:
:path: "../node_modules/react-native/ReactCommon/jsi"
React-jsiexecutor:
@@ -415,14 +560,32 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
React-logger:
:path: "../node_modules/react-native/ReactCommon/logger"
react-native-blur:
:path: "../node_modules/@react-native-community/blur"
react-native-cameraroll:
:path: "../node_modules/@react-native-camera-roll/camera-roll"
react-native-image-resizer:
:path: "../node_modules/@bam.tech/react-native-image-resizer"
react-native-pager-view:
:path: "../node_modules/react-native-pager-view"
react-native-paste-input:
:path: "../node_modules/@mattermost/react-native-paste-input"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
react-native-splash-screen:
:path: "../node_modules/react-native-splash-screen"
react-native-version-number:
:path: "../node_modules/react-native-version-number"
react-native-webview:
:path: "../node_modules/react-native-webview"
React-perflogger:
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
React-RCTActionSheet:
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
React-RCTAnimation:
:path: "../node_modules/react-native/Libraries/NativeAnimation"
React-RCTAppDelegate:
:path: "../node_modules/react-native/Libraries/AppDelegate"
React-RCTBlob:
:path: "../node_modules/react-native/Libraries/Blob"
React-RCTImage:
@@ -441,65 +604,115 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
rn-fetch-blob:
:path: "../node_modules/rn-fetch-blob"
RNBackgroundFetch:
:path: "../node_modules/react-native-background-fetch"
RNCAsyncStorage:
:path: "../node_modules/@react-native-async-storage/async-storage"
RNCClipboard:
:path: "../node_modules/@react-native-clipboard/clipboard"
RNFastImage:
:path: "../node_modules/react-native-fast-image"
RNFS:
:path: "../node_modules/react-native-fs"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNImageCropPicker:
:path: "../node_modules/react-native-image-crop-picker"
RNInAppBrowser:
:path: "../node_modules/react-native-inappbrowser-reborn"
RNNotifee:
:path: "../node_modules/@notifee/react-native"
RNPermissions:
:path: "../node_modules/react-native-permissions"
RNReactNativeHapticFeedback:
:path: "../node_modules/react-native-haptic-feedback"
RNReanimated:
:path: "../node_modules/react-native-reanimated"
RNScreens:
:path: "../node_modules/react-native-screens"
RNSVG:
:path: "../node_modules/react-native-svg"
segment-analytics-react-native:
:path: "../node_modules/@segment/analytics-react-native"
sovran-react-native:
:path: "../node_modules/@segment/sovran-react-native"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
FBLazyVector: a7a655862f6b09625d11c772296b01cd5164b648
FBReactNativeSpec: 81ce99032d5b586fddd6a38d450f8595f7e04be4
boost: 57d2868c099736d80fcd648bf211b4431e51a558
BVLinearGradient: 34a999fda29036898a09c6a6b728b0b4189e1a44
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: ad72713385db5289b19f1ead07e8e4aa26dcb01d
FBReactNativeSpec: df2602c11e33d310433496e28a48b4b2be652a61
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 476ee3e89abb49e07f822b48323c51c57124b572
RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8
RCTRequired: 3e917ea5377751094f38145fdece525aa90545a0
RCTTypeSafety: c43c072a4bd60feb49a9570b0517892b4305c45e
React: 176dd882de001854ced260fad41bb68a31aa4bd0
React-callinvoker: c2864d1818d6e64928d2faf774a3800dfc38fe1f
React-Codegen: 98b6f97f0a7abf7d67e4ce435c77c05b7a95cf05
React-Core: fdaa2916b1c893f39f02cff0476d1fb0cab1e352
React-CoreModules: fd8705b80699ec36c2cdd635c2ce9d874b9cfdfc
React-cxxreact: 1832d971f7b0cb2c7b943dc0ec962762c90c906e
React-jsi: 72af715135abe8c3f0dcf3b2548b71d048b69a7e
React-jsiexecutor: b7b553412f2ec768fe6c8f27cd6bafdb9d8719e6
React-jsinspector: c5989c77cb89ae6a69561095a61cce56a44ae8e8
React-logger: a0833912d93b36b791b7a521672d8ee89107aff1
react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de
React-perflogger: a18b4f0bd933b8b24ecf9f3c54f9bf65180f3fe6
React-RCTActionSheet: 547fe42fdb4b6089598d79f8e1d855d7c23e2162
React-RCTAnimation: bc9440a1c37b06ae9ebbb532d244f607805c6034
React-RCTBlob: a1295c8e183756d7ef30ba6e8f8144dfe8a19215
React-RCTImage: a30d1ee09b1334067fbb6f30789aae2d7ac150c9
React-RCTLinking: ffc6d5b88d1cb9aca13c54c2ec6507fbf07f2ac4
React-RCTNetwork: f807a2facab6cf5cf36d592e634611de9cf12d81
React-RCTSettings: 861806819226ed8332e6a8f90df2951a34bb3e7f
React-RCTText: f3fb464cc41a50fc7a1aba4deeb76a9ad8282cb9
React-RCTVibration: 79040b92bfa9c3c2d2cb4f57e981164ec7ab9374
React-runtimeexecutor: b960b687d2dfef0d3761fbb187e01812ebab8b23
ReactCommon: 095366164a276d91ea704ce53cb03825c487a3f2
RNCAsyncStorage: 466b9df1a14bccda91da86e0b7d9a345d78e1673
RNCClipboard: f1736c75ab85b627a4d57587edb4b60999c4dd80
RNGestureHandler: bad495418bcbd3ab47017a38d93d290ebd406f50
RNInAppBrowser: 3ff3a3b8f458aaf25aaee879d057352862edf357
RNReanimated: 5c8c17e26787fd8984cd5accdc70fef2ca70aafd
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNSVG: 3dd44d99d1c18e1342aee4bfa53ab3f6a8c4865f
Yoga: 99652481fcd320aefa4a7ef90095b95acd181952
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
hermes-engine: 922ccd744f50d9bfde09e9677bf0f3b562ea5fb9
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
Permission-Camera: bf6791b17c7f614b6826019fcfdcc286d3a107f6
Permission-PhotoLibrary: 5b34ca67279f7201ae109cef36f9806a6596002d
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: fd4d923b964658aa0c4091a32c8b2004c6d9e3a6
RCTTypeSafety: c276d85975bde3d8448907235c70bf0da257adfd
React: e481a67971af1ce9639c9f746b753dd0e84ca108
React-callinvoker: 1051c04a94fa9d243786b86380606bad701a3b31
React-Codegen: 14b1e716d361d5ad95e0ce1a338f3fa0733a98b5
React-Core: 698fc3baecb80d511d987475a16d036cec6d287f
React-CoreModules: 59245305f41ff0adfeac334acc0594dea4585a7c
React-cxxreact: 49accd2954b0f532805dbcd1918fa6962f32f247
React-hermes: d068733294581a085e95b6024e8d951b005e26d3
React-jsi: 122b9bce14f4c6c7cb58f28f87912cfe091885fa
React-jsiexecutor: 60cf272aababc5212410e4249d17cea14fc36caa
React-jsinspector: ff56004b0c974b688a6548c156d5830ad751ae07
React-logger: 60a0b5f8bed667ecf9e24fecca1f30d125de6d75
react-native-blur: 50c9feabacbc5f49b61337ebc32192c6be7ec3c3
react-native-cameraroll: 71d68167beb6fc7216aa564abb6d86f1d666a2c6
react-native-image-resizer: 794abf75ec13ed1f0dbb1f134e27504ea65e9e66
react-native-pager-view: 54bed894cecebe28cede54c01038d9d1e122de43
react-native-paste-input: 5182843692fd2ec72be50f241a38a49796e225d7
react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
react-native-version-number: b415bbec6a13f2df62bf978e85bc0d699462f37f
react-native-webview: 9f111dfbcfc826084d6c507f569e5e03342ee1c1
React-perflogger: ec8eef2a8f03ecfa6361c2c5fb9197ef4a29cc85
React-RCTActionSheet: a0c023b86cf4c862fa9c4eb0f6f91fbe878fb2de
React-RCTAnimation: 168d53718c74153947c0109f55900faa64d79439
React-RCTAppDelegate: a8efbab128b34aa07a9491c85a41401210b1bec5
React-RCTBlob: 9bcbfc893bfda9f6b2eb016329d38c0f6366d31a
React-RCTImage: 3fcd4570b4b0f1ac2f4b4b6308dba33ce66c5b50
React-RCTLinking: 1edb8e1bb3fc39bf9e13c63d6aaaa3f0c3d18683
React-RCTNetwork: 500a79e0e0f67678077df727fabba87a55c043e1
React-RCTSettings: cc4414eb84ad756d619076c3999fecbf12896d6f
React-RCTText: 2a34261f3da6e34f47a62154def657546ebfa5e1
React-RCTVibration: 49d531ec8498e0afa2c9b22c2205784372e3d4f3
React-runtimeexecutor: 311feb67600774723fe10eb8801d3138cae9ad67
ReactCommon: 03be76588338a27a88d103b35c3c44a3fd43d136
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNBackgroundFetch: 8e16176ff415daac743a6eb57afc8e9e14dbe623
RNCAsyncStorage: 8616bd5a58af409453ea4e1b246521bb76578d60
RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd
RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3
RNImageCropPicker: 648356d68fbf9911a1016b3e3723885d28373eda
RNInAppBrowser: e36d6935517101ccba0e875bac8ad7b0cb655364
RNNotifee: da8dcf09f079ea22f46e239d7c406e10d4525a5f
RNPermissions: dcdb7b99796bbeda6975a6e79ad519c41b251b1c
RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c
RNReanimated: d8d9d3d3801bda5e35e85cdffc871577d044dc2e
RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d
RNSVG: 6adc5c52d2488a476248413064b7f2832e639057
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
segment-analytics-react-native: cb097e393c3560a0d4cfd877044293e37b0050d9
sovran-react-native: fd3dc8f1a4b14acdc4ad25fc6b4ac4f52a2a2a15
Swime: d7b2c277503b6cea317774aedc2dce05613f8b0b
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
Yoga: 921eb014669cf9c718ada68b08d362517d564e0c
PODFILE CHECKSUM: cf94853ebcb0d8e0d027dca9ab7a4ede886a8f20
PODFILE CHECKSUM: 95c7fde1130d862b561348cca2b3fb7f9bd84bfb
COCOAPODS: 1.11.3
+113 -76
View File
@@ -11,11 +11,10 @@
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
5CEAE7B7A55582F96F1D5952 /* libPods-app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FCB672808307A6013805A3FE /* libPods-app.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
E4BD704B285AD57E00A8FED9 /* AppSecureRandomModule.m in Sources */ = {isa = PBXBuildFile; fileRef = E4BD704A285AD57E00A8FED9 /* AppSecureRandomModule.m */; };
E4BD704C285AD57E00A8FED9 /* AppSecureRandomModule.m in Sources */ = {isa = PBXBuildFile; fileRef = E4BD704A285AD57E00A8FED9 /* AppSecureRandomModule.m */; };
FEB90D21557517F9279AECA4 /* libPods-app-appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BAD3BC60FA05CF2D4F6F9BA2 /* libPods-app-appTests.a */; };
5698CA584FD738B2091BD18F /* libPods-app-appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C0C7BDE7769B84011D3747DC /* libPods-app-appTests.a */; };
67BF1AE6AABFC881715B2D6A /* libPods-app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8789F612EDA2C48C6064ADD6 /* libPods-app.a */; };
E46FE2C12981C0DB007C107C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E46FE2C02981C0DB007C107C /* LaunchScreen.storyboard */; };
E4BBD590292C1F5200296224 /* app.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = E4437C9E28581FA7006DA9E7 /* app.entitlements */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -32,23 +31,21 @@
00E356EE1AD99517003FC87E /* appTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = appTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* appTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = appTests.m; sourceTree = "<group>"; };
03F7088487057F17D25D2F4B /* Pods-app-appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.release.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.release.xcconfig"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = app.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = app/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = app/AppDelegate.mm; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = app/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = app/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = app/main.m; sourceTree = "<group>"; };
19C43486502F2DE23E091FE3 /* Pods-app-appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.debug.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.debug.xcconfig"; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = app/LaunchScreen.storyboard; sourceTree = "<group>"; };
970005155A83960D1D13380F /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = "<group>"; };
BAD3BC60FA05CF2D4F6F9BA2 /* libPods-app-appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app-appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
53DBA218C184B95B107AC33E /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = "<group>"; };
8789F612EDA2C48C6064ADD6 /* libPods-app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8BB4EDB104E125B8A1913E74 /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = "<group>"; };
A8E093A0B5DA947150924A68 /* Pods-app-appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.release.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.release.xcconfig"; sourceTree = "<group>"; };
C01FB6762BC17DADC0319338 /* Pods-app-appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.debug.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.debug.xcconfig"; sourceTree = "<group>"; };
C0C7BDE7769B84011D3747DC /* libPods-app-appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app-appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E4437C9E28581FA7006DA9E7 /* app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = app.entitlements; path = app/app.entitlements; sourceTree = "<group>"; };
E4BD7049285AD54000A8FED9 /* AppSecureRandomModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppSecureRandomModule.h; sourceTree = "<group>"; };
E4BD704A285AD57E00A8FED9 /* AppSecureRandomModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppSecureRandomModule.m; sourceTree = "<group>"; };
ED22CAA45207BC18E75DB44B /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = "<group>"; };
E46FE2C02981C0DB007C107C /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
FCB672808307A6013805A3FE /* libPods-app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -56,7 +53,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FEB90D21557517F9279AECA4 /* libPods-app-appTests.a in Frameworks */,
5698CA584FD738B2091BD18F /* libPods-app-appTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -64,7 +61,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5CEAE7B7A55582F96F1D5952 /* libPods-app.a in Frameworks */,
67BF1AE6AABFC881715B2D6A /* libPods-app.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -96,10 +93,8 @@
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
13B07FB61A68108700A75B9A /* Info.plist */,
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
13B07FB71A68108700A75B9A /* main.m */,
E4BD7049285AD54000A8FED9 /* AppSecureRandomModule.h */,
E4BD704A285AD57E00A8FED9 /* AppSecureRandomModule.m */,
E46FE2C02981C0DB007C107C /* LaunchScreen.storyboard */,
);
name = app;
sourceTree = "<group>";
@@ -108,8 +103,8 @@
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
FCB672808307A6013805A3FE /* libPods-app.a */,
BAD3BC60FA05CF2D4F6F9BA2 /* libPods-app-appTests.a */,
8789F612EDA2C48C6064ADD6 /* libPods-app.a */,
C0C7BDE7769B84011D3747DC /* libPods-app-appTests.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -148,10 +143,10 @@
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
isa = PBXGroup;
children = (
ED22CAA45207BC18E75DB44B /* Pods-app.debug.xcconfig */,
970005155A83960D1D13380F /* Pods-app.release.xcconfig */,
19C43486502F2DE23E091FE3 /* Pods-app-appTests.debug.xcconfig */,
03F7088487057F17D25D2F4B /* Pods-app-appTests.release.xcconfig */,
8BB4EDB104E125B8A1913E74 /* Pods-app.debug.xcconfig */,
53DBA218C184B95B107AC33E /* Pods-app.release.xcconfig */,
C01FB6762BC17DADC0319338 /* Pods-app-appTests.debug.xcconfig */,
A8E093A0B5DA947150924A68 /* Pods-app-appTests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -163,11 +158,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "appTests" */;
buildPhases = (
F309585457BFF312EF73FD95 /* [CP] Check Pods Manifest.lock */,
A6849EFFDCB214D4F4EAE972 /* [CP] Check Pods Manifest.lock */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
2772CBCCE24036517E86445D /* [CP] Copy Pods Resources */,
DFA0C2B14E2F369C4B2337CE /* [CP] Copy Pods Resources */,
B73FFC16945F7B215A06B698 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -183,13 +179,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "app" */;
buildPhases = (
4D45C29570A58E7A8A8D177D /* [CP] Check Pods Manifest.lock */,
DDF15D430A078CE70E577FDA /* [CP] Check Pods Manifest.lock */,
FD10A7F022414F080027D42C /* Start Packager */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
9CEFF2A5EA3D60C120442CA6 /* [CP] Copy Pods Resources */,
45E56D79C207C80AF89FBAA2 /* [CP] Copy Pods Resources */,
B0229D18A3C8908C642F9131 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -248,7 +245,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
E46FE2C12981C0DB007C107C /* LaunchScreen.storyboard in Resources */,
E4BBD590292C1F5200296224 /* app.entitlements in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -262,32 +260,90 @@
files = (
);
inputPaths = (
"$(SRCROOT)/.xcode.env.local",
"$(SRCROOT)/.xcode.env",
);
name = "Bundle React Native code and images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
};
2772CBCCE24036517E86445D /* [CP] Copy Pods Resources */ = {
45E56D79C207C80AF89FBAA2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-input-files.xcfilelist",
"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-output-files.xcfilelist",
"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources.sh\"\n";
showEnvVarsInLog = 0;
};
4D45C29570A58E7A8A8D177D /* [CP] Check Pods Manifest.lock */ = {
A6849EFFDCB214D4F4EAE972 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-app-appTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
B0229D18A3C8908C642F9131 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
B73FFC16945F7B215A06B698 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
DDF15D430A078CE70E577FDA /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -309,43 +365,21 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9CEFF2A5EA3D60C120442CA6 /* [CP] Copy Pods Resources */ = {
DFA0C2B14E2F369C4B2337CE /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-input-files.xcfilelist",
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-output-files.xcfilelist",
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F309585457BFF312EF73FD95 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-app-appTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FD10A7F022414F080027D42C /* Start Packager */ = {
@@ -375,7 +409,6 @@
buildActionMask = 2147483647;
files = (
00E356F31AD99517003FC87E /* appTests.m in Sources */,
E4BD704C285AD57E00A8FED9 /* AppSecureRandomModule.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -384,7 +417,6 @@
buildActionMask = 2147483647;
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
E4BD704B285AD57E00A8FED9 /* AppSecureRandomModule.m in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -402,7 +434,7 @@
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 19C43486502F2DE23E091FE3 /* Pods-app-appTests.debug.xcconfig */;
baseConfigurationReference = C01FB6762BC17DADC0319338 /* Pods-app-appTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
@@ -430,7 +462,7 @@
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 03F7088487057F17D25D2F4B /* Pods-app-appTests.release.xcconfig */;
baseConfigurationReference = A8E093A0B5DA947150924A68 /* Pods-app-appTests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
@@ -455,16 +487,17 @@
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = ED22CAA45207BC18E75DB44B /* Pods-app.debug.xcconfig */;
baseConfigurationReference = 8BB4EDB104E125B8A1913E74 /* Pods-app.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = app/app.entitlements;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = A6GRZHF6BV;
DEVELOPMENT_TEAM = B3LX46C5HS;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = app/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -474,7 +507,7 @@
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = xyz.blueskyweb.pubsq;
PRODUCT_BUNDLE_IDENTIFIER = xyz.blueskyweb.app;
PRODUCT_NAME = app;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@@ -484,25 +517,27 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 970005155A83960D1D13380F /* Pods-app.release.xcconfig */;
baseConfigurationReference = 53DBA218C184B95B107AC33E /* Pods-app.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = app/app.entitlements;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = A6GRZHF6BV;
DEVELOPMENT_TEAM = B3LX46C5HS;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = app/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = xyz.blueskyweb.pubsq;
PRODUCT_BUNDLE_IDENTIFIER = xyz.blueskyweb.app;
PRODUCT_NAME = app;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
@@ -542,7 +577,7 @@
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -558,7 +593,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@@ -576,6 +611,7 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
name = Debug;
@@ -613,7 +649,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -622,7 +658,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@@ -639,6 +675,7 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
+2 -4
View File
@@ -1,8 +1,6 @@
#import <React/RCTBridgeDelegate.h>
#import <RCTAppDelegate.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@property (nonatomic, strong) UIWindow *window;
@interface AppDelegate : RCTAppDelegate
@end
+18 -82
View File
@@ -1,63 +1,28 @@
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTAppSetupUtils.h>
// universal links
#import <React/RCTLinkingManager.h>
#if RCT_NEW_ARCH_ENABLED
#import <React/CoreModulesPlugins.h>
#import <React/RCTCxxBridgeDelegate.h>
#import <React/RCTFabricSurfaceHostingProxyRootView.h>
#import <React/RCTSurfacePresenter.h>
#import <React/RCTSurfacePresenterBridgeAdapter.h>
#import <ReactCommon/RCTTurboModuleManager.h>
// splash screen
#import "RNSplashScreen.h"
#import <react/config/ReactNativeConfig.h>
@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
RCTTurboModuleManager *_turboModuleManager;
RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
facebook::react::ContextContainer::Shared _contextContainer;
}
@end
#endif
#import <TSBackgroundFetch/TSBackgroundFetch.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RCTAppSetupPrepareApp(application);
// Show the splash screen
// [RNSplashScreen show];
// Register BackgroundFetch
[[TSBackgroundFetch sharedInstance] didFinishLaunching];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
#if RCT_NEW_ARCH_ENABLED
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
_bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
#endif
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"xyz.blueskyweb.pubsq", nil);
if (@available(iOS 13.0, *)) {
rootView.backgroundColor = [UIColor systemBackgroundColor];
} else {
rootView.backgroundColor = [UIColor whiteColor];
}
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
self.moduleName = @"xyz.blueskyweb.app";
self.initialProps = @{};
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
@@ -69,45 +34,16 @@
#endif
}
#if RCT_NEW_ARCH_ENABLED
#pragma mark - RCTCxxBridgeDelegate
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
///
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
- (BOOL)concurrentRootEnabled
{
_turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
delegate:self
jsInvoker:bridge.jsCallInvoker];
return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
return true;
}
#pragma mark RCTTurboModuleManagerDelegate
- (Class)getModuleClassFromName:(const char *)name
{
return RCTCoreModulesClassProvider(name);
}
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
{
return nullptr;
}
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
initParams:
(const facebook::react::ObjCTurboModule::InitParams &)params
{
return nullptr;
}
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
{
return RCTAppSetupDefaultModuleFromClass(moduleClass);
}
#endif
// universal links
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Some files were not shown because too many files have changed in this diff Show More