Dovydastc

Dovydastc

Frontend engineer

Member Since 4 years ago

Aarhus, Denmark

Experience Points
0
follower
Lessons Completed
1
follow
Lessons Completed
2
stars
Best Reply Awards
1
repos

508 contributions in the last year

Pinned
⚡ Desktop implementation of Steam's mobile authenticator app
Activity
Dec
27
4 weeks ago
started
started time in 4 weeks ago
Nov
22
2 months ago
Activity icon
issue

Dovydastc issue comment react-native-cameraroll/react-native-cameraroll

Dovydastc
Dovydastc

iOS: Use PHAccessLevelAddOnly for saveToCameraRoll

Summary

This patch fixes an issue (#292) when trying to save to camera roll on iOS 14 or later. The requestPhotoLibraryAccess function requests read and write access on the Photo library. Which triggers a system popup to request access as seen in #292.

The fix adds an extra parameter to determine if PHAccessLevelReadWrite or PHAccessLevelAddOnly should be used when requesting access to the Photo library.

Test Plan

This was tested using the example app and our internal app which uses only uses the saveToCameraroll feature.

What's required for testing (prerequisites)?

A device or simulator with iOS 14+ and a device or simulator with < iOS 14.

What are the steps to reproduce (after prerequisites)?

Same as above.

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)
Activity icon
issue

Dovydastc issue comment react-native-cameraroll/react-native-cameraroll

Dovydastc
Dovydastc

feat: Ask for write only permissions when saving photos in Ios

Summary

Fixes #265

Could be enhanced to fix #279 as well. It's pretty well explained here.

Also from the same link, album management seems to be a nightmare and still require read/write permissions although you just like to save. I could not find any workaround :(

Test Plan

What's required for testing (prerequisites)?

Nothing particular

What are the steps to reproduce (after prerequisites)?

Everything resides in CameraRoll.save. If you specified an album, behaviour will remain unchanged. Otherwise, you'll see the following write only permission modal.

IMG_20210215_125519

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)
Activity icon
issue

Dovydastc issue comment facebook/react-native

Dovydastc
Dovydastc

Cannot find protocol declaration for 'NativeVibrationSpec'

Description

when running app on ios after upgrade to 0.66, I got these semantic error: node_modules/react-native/Libraries/Vibration/RCTVibration.mm:16:28: Cannot find protocol declaration for 'NativeVibrationSpec'

node_modules/react-native/Libraries/Vibration/RCTVibration.mm:33:20: Use of undeclared identifier 'facebook'

React Native version:

System: OS: macOS 11.5.2 CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @2.60GHz Memory: 71.96 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 15.14.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.22.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 28, 29, 30 Build Tools: 28.0.2, 28.0.3, 29.0.2, 30.0.2, 30.0.3 System Images: android-25 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 13.0/13A233 - /usr/bin/xcodebuild Languages: Java: 1.8.0_282 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.0 => 0.66.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. upgrade project to v0.66 and upgrade cocoa pods to 1.11.2 from m1 device, build succesfully
  2. after that run project on my old MacBook pro, delete node_modules and podfile.lock and reinstall again dependencies. 3- Run project got build failed

Expected Results

to build project successfully, after solving this error 👍 Cannot find protocol declaration for 'NativeVibrationSpec' Screen Shot 2021-10-14 at 4 43 57 PM

Dovydastc
Dovydastc

Upgrading react-native to 0.61.3 fixed an issue for me!

Activity icon
issue

Dovydastc issue comment facebook/react-native

Dovydastc
Dovydastc

Weird build failure on Xcode after updating to RN 0.66.1

Description

After updating RN from 0.65.1 to 0.66.1, my iOS builds were failing with the following errors.

Screenshot 2021-10-18 at 17 15 49

I thought one of the libraries I'm using is not compatible with the new version, so I've started a new project from the typescript template and added them one by one. I turned out that that every time I add a new library with a native change, I get this error message and the only way to bypass it is by cleaning the project and restarting it with the following commands.

rm -rf node_modules ios/build ios/Pods ios/Podfile.lock && yarn cache clean yarn && cd ios && pod install && cd ../ yarn start --reset-cache

React Native version:

System:
    OS: macOS 11.6
    CPU: (8) arm64 Apple M1
    Memory: 353.69 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.9.1 - /opt/homebrew/bin/node
    Yarn: 1.22.11 - /opt/homebrew/bin/yarn
    npm: 7.21.1 - /opt/homebrew/bin/npm
    Watchman: 2021.09.13.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    Android SDK:
      API Levels: 29, 30, 31
      Build Tools: 29.0.2, 30.0.2, 31.0.0
      System Images: android-31 | ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.0/13A233 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.66.1 => 0.66.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Init a new project (I tested only on Typescript)
  2. Install dependencies, build from Xcode
  3. Install a library any native change so that you can pod install after too (I guarantee it works with the following: react-native-svg + react-native-svg-transformer, react-native-reanimated, react-native-device-info, react-native-dotenv, react-native-file-logger, react-native-safe-area-context)
  4. Restart metro and rebuild from Xcode

Expected Results

App should build successfully as it normally does.

Dovydastc
Dovydastc

Upgrading react-native to 0.61.3 fixed an issue for me!

Nov
11
2 months ago
Activity icon
issue

Dovydastc issue comment wix/react-native-calendars

Dovydastc
Dovydastc

paging with vertical scrolled CalendarList

[QUESTION] is there a way to page per month with vertical scroll in CalenderList?

Description

paging with vertical scrolled CalendarList

Expected Behavior

to page per month

Observed Behavior

month not align center when scrolling with paging

untitled

Dovydastc
Dovydastc

Fixed with paging enabled and fixed height in style prop. Height must be the same as single calendar month page height. In my case it was 360px

<CalendarList style={{ height: 360 }} scrollEnabled={true} pagingEnabled={true} horizontal={false} />