37 Commits

Author SHA1 Message Date
Bartol Karuza
a09af08f0a
fix: Revert "Convert PHAsset to JPEG for uploading" (#207)
This reverts commit c958493441edf622dbc320b9e1319298b8123481.

fixes #193

BREAKING CHANGE: this reverts forcing all mime types to jpeg on upload, which is the cause of lost GIF data
2020-06-24 11:21:42 +03:00
Harry Yu
ec33d328af
feat: Added imageSize and playableDuration to include param, deletes isStored (#187)
BREAKING CHANGE: imageSize and playableDuration are no longer included by default to improve performance
2020-06-23 08:45:20 +03:00
Bartol Karuza
4da8310892
feat: Added include parameter to getPhotos to let users tradeoff performance by omitting metadata (#178) (#200)
BREAKING CHANGE: meta data is no longer added as default. This applies to `fileName`, `fileSize` and `location`. If you need this metadata use the new `include` parameter. Adding this metadata will slow down the `getPhotos` function, so consider only retrieving this meta data for smaller sets of images as needed, instead of for all images.

* Created getPhotosFast function, fixed inconsistent getPhotos toDate logic

* Fixed wrong param name, added better typechecking

* Added example, renamed allowEmptyFilenames to skipGettingFilenames

* Removed `after` from getPhotosFast docs

* Redid implementation based on a new `include` param

* Updated API to use include parameter

* Fixed flow checking by converting index.ts to Typescript

* Unformatted README.md

* Unformatted README.md

* Unformatted README.md

* Added .prettierignore and ignored README.md for now

* Made example/index.js not checked by Flow

* Updated README.md to include notes in the outputs too

* Made inclusion of fields consistent, addressed other feedback

* Renamed GetPhotosFastParams back to GetPhotosParams

* Updated documentation to reflect nullable types

* Updated typings and documentation for fromTime, toTime

* Updated to fix `hasNextPage` being incorrectly false in some cases

Co-authored-by: Harry Yu <hy.harry.yu@gmail.com>
2020-06-16 13:20:51 +03:00
Bartol Karuza
e65e1f208b
fix: Revert "feat: Added include parameter to getPhotos to let users tradeoff performance by omitting metadata (#178)" (#199) 2020-06-16 13:05:12 +03:00
Harry Yu
e54a6afa8b
feat: Added include parameter to getPhotos to let users tradeoff performance by omitting metadata (#178)
* Created getPhotosFast function, fixed inconsistent getPhotos toDate logic

* Fixed wrong param name, added better typechecking

* Added example, renamed allowEmptyFilenames to skipGettingFilenames

* Removed `after` from getPhotosFast docs

* Redid implementation based on a new `include` param

* Updated API to use include parameter

* Fixed flow checking by converting index.ts to Typescript

* Unformatted README.md

* Unformatted README.md

* Unformatted README.md

* Added .prettierignore and ignored README.md for now

* Made example/index.js not checked by Flow

* Updated README.md to include notes in the outputs too

* Made inclusion of fields consistent, addressed other feedback

* Renamed GetPhotosFastParams back to GetPhotosParams

* Updated documentation to reflect nullable types

* Updated typings and documentation for fromTime, toTime

* Updated to fix `hasNextPage` being incorrectly false in some cases
2020-06-16 12:07:25 +03:00
Antonio Gallo
e7cf8665d4
feat: Added fileSize for getPhotos API (#180)
Co-authored-by: Antonio Gallo <antgallo@amazon.com>
2020-05-20 20:35:59 +03:00
Conner Owen
a4be52cf83
fix: Error Domain=PHPhotosErrorDomain Code=-1 (#172)
fixes #157 
fixes #143 

* Update RNCCameraRollManager.m
2020-05-08 22:41:46 +03:00
Eni Sinanaj
b261a98efe
fix: Fixed reference to git repository in Podspec file (#161)
* Fixed reference to git repository in Podspec file

* Fixed build issue because of unused variable

* Fixed issue with build. Unused variable inputImage
2020-04-30 15:16:19 +03:00
dmydry
f51d38783e
fix: getPhotos crash if there is a quote in album name (#156) 2020-03-26 12:01:09 +02:00
Justin Huntington
334ab0e1a6
fix: remove unused import that breaks the build for RN >= 0.60 (#150) 2020-03-26 10:19:45 +02:00
Tuan Luong
fc1855e001
feat: get album list (#139) 2020-02-08 11:17:56 +08:00
Jack
e70cff5429
fix: fix IOS MetaData (#134)
* changes to fix IOS MetaData

* chore: fix formatting

Co-authored-by: Bartol Karuza <bartol.k@gmail.com>
2020-02-08 10:17:48 +08:00
Tuan Luong
75b4208474
feat: Support filter media items between dates (#140)
* Update RNCCameraRollManager.m

* Update CameraRollModule.java

* Update README.md

* Update RNCCameraRollManager.m

* Update CameraRoll.d.ts

* Update RNCCameraRollManager.h

* Update CameraRollModule.java

* Update RNCCameraRollManager.m

* update code
2020-02-05 17:20:54 +08:00
Zach Ramos
03bc028efe fix(lib) build error in RNCCameraRollManager.m (#109)
After upgrading to 1.3.0 that includes #87, my builds started to fail on the step to link react-native-cameraroll with the following message:
`Undefined symbol: _OBJC_Class_$_RCTImageLoader`.

I'm not sure what @tomtargosz's environment is like that allowed this to work, but it does not seem to work in 0.61.x with autolinked (cocoapods) dependencies. It looks like the recommendation made in that file is incorrect. 

The correct way to fix this, which I see in [react-native-image-crop-picker](https://github.com/ivpusic/react-native-image-crop-picker/blob/master/ios/src/ImageCropPicker.m#L394) and in [several](https://github.com/facebook/react-native/blob/master/Libraries/Image/RCTImageEditingManager.mm#L60) [internal](https://github.com/facebook/react-native/blob/master/Libraries/Image/RCTImageView.m#L324) [react files](@implementation RCTImageViewManager), is to use `[self.bridge moduleForName:@"ImageLoader" lazilyLoadIfNecessary:YES]`.
2019-11-14 18:22:32 +01:00
Tom Targosz
c0a132daec fix(lib): Fix warning for deprecated RCTBridge interface for RCTImageLoader (#87) 2019-11-07 14:14:12 +01:00
Kevin Brown
7850dd538f feat(lib): Moved deletePhotos to use new PHAsset API and added an implementation for Android (#69)
* deletePhotos works in iOS

* Deletion works on Android.

* Removing unnecessary commented out code.

* Updated typescript typings.

* Made readme more accurate based on being able to retrieve failure from the iOS API.

* Let formatter run, also now rejecting the promise when there's any error on deletion on Android.
2019-11-07 14:13:24 +01:00
Bartol Karuza
75e325dcfe
fix(lib): typo in PHFetchOptions (#78) 2019-08-14 22:01:26 +02:00
maxaggedon
c958493441 fix(lib): Convert PHAsset to JPEG for uploading 2019-08-14 21:05:04 +02:00
SimonErm
dc00a4f115 feat(lib): save photos or videos to an album
* add option to specify album in saveToCameraRoll and move the optional type param to options

* check platform before setting default value for group types to prevent exception

* adjust typings

* update invariant message

* format code

* extract new implementation to function to avoid breaking change

* format code

* add missing spaces

* fix(lib): add accidentally removed savedphotos back to the enum to prevent crash

* chore(lib): formatting

* chore(lib): add doc for the new save method
2019-08-14 21:00:20 +02:00
Kevin Brown
0d5a2dadb3 fix(lib): Remove unrecognised UTF8 tag from xcworkspace file 2019-08-14 19:15:36 +02:00
Jason Waldrip
b1ceb75340 fixes #42, again (#66) 2019-06-26 10:38:30 +02:00
Bartol Karuza
a2d39f0971
fix(lib): move to local variable instead of relying on the string constant from RN core (#63) 2019-06-18 17:32:38 +02:00
Edward Smith
f420cefa77 feat(lib): Filename added to the image properties iOS and Android (#61)
* fix(lib): mirror fix PHAsset video upload

458e70c79d (diff-3a2b7a4c4ebe5ac224b5a32896c032fb)

* Include the filename in both iOS and Android

* Add filename to docs
2019-06-13 08:24:46 +02:00
Bartol Karuza
829c7bd65a
fix(lib): mirror fix PHAsset video upload (#58)
458e70c79d (diff-3a2b7a4c4ebe5ac224b5a32896c032fb)
2019-06-13 08:19:37 +02:00
Seph Soliman
f5973f8ebe Fix #45 ordering of photos when groupTypes is All (#46)
* Fix #45 ordering of photos when groupTypes is All

* Fix backwards compatible album name for all photos
2019-05-07 21:44:02 +02:00
Abdullah M
4d879e4cb1
Add check to prevent CFRelease(NULL) crash for mimeType 2019-04-18 10:19:31 +08:00
José Ignacio Guerrero VInueza
c66cc4fb49 [FIX][iOS] All mediaTypes return order
This fixes the wrong return order when you fetch photos/videos (all)
2019-04-04 12:12:00 -05:00
全贺菁
953b3f083e fix no homepage in Podfile 2019-03-13 19:07:24 +08:00
Bartol Karuza
0c453b6118 general cleanup
Added typescript binding
Fixed flow type issues
renamed NativeModule to RNCCameraRoll
Added basic jest tests
prettier/lint issues fixed
2019-03-03 14:39:57 +08:00
Bartol Karuza
bc557cf169 Sync @joshuagross RCTCameraRollManager: fix "all" photos filter
Summary: Currently, trying to fetch "all" photos will loop and never complete. Now it appears to produce the expected results (acting like the "All Photos" smart library in Photos) and doesn't loop. Confirmed console log results, showing no loops: P60994983

Reviewed By: PeteTheHeat

Differential Revision: D14221545

fbshipit-source-id: 31381b1ba2c673fd210cb95f3b7d0f8ffc23ec3f
2019-03-02 15:54:39 +08:00
Bartol Karuza
4777d05546 Make lib JS+native code reachable from iOS example app 2019-02-24 20:47:44 +08:00
Bartol Karuza
b00c05bb81 fix iOS library file reference 2019-02-24 13:48:37 +08:00
Bartol Karuza
5a76ff4d5f in file renames 2019-02-24 12:29:24 +08:00
Bartol Karuza
43b68a8335 renamed migrated files 2019-02-24 12:25:02 +08:00
Bartol Karuza
abf3ecd110 move migrated files to right folder 2019-02-24 12:21:54 +08:00
Bartol Karuza
1515c69c43 remove generated files from create-react-native-library to be overwritten 2019-02-24 12:20:25 +08:00
Bartol Karuza
1f3f111bca create-react-native-library and react-native init of example app
# Conflicts:
#	README.md
2019-02-24 12:13:49 +08:00