Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Restored ios:macos RNTester parity except for InputAccessoryV…
…iew."

This reverts commit 5a67ae0.
  • Loading branch information
tom-un committed Apr 13, 2020
commit e5a6df29a2dff00552f7246c296b64a6f754e66b
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ local.properties
*.iml
/android/
/ReactAndroid/packages/
.settings/

# Node
node_modules
Expand Down
9 changes: 1 addition & 8 deletions Libraries/CameraRoll/RCTCameraRollManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@

#import <CoreLocation/CoreLocation.h>
#import <Foundation/Foundation.h>
#import <React/RCTUIKit.h> // TODO(macOS ISS#2323203)
#import <UIKit/UIKit.h>
#import <Photos/Photos.h>
#import <dlfcn.h>
#import <objc/runtime.h>
#if !TARGET_OS_OSX // TODO(macOS ISS#2323203)
#import <MobileCoreServices/UTType.h>
#endif // TODO(macOS ISS#2323203)

#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
Expand Down Expand Up @@ -320,7 +318,6 @@ static void RCTResolvePromise(RCTPromiseResolveBlock resolve,
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject)
{
#if !TARGET_OS_OSX // TODO(macOS ISS#2323203)
NSArray<NSURL *> *assets_ = [RCTConvert NSURLArray:assets];
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
PHFetchResult<PHAsset *> *fetched =
Expand All @@ -336,10 +333,6 @@ static void RCTResolvePromise(RCTPromiseResolveBlock resolve,
}
}
];
#else // [TODO(macOS ISS#2323203)
NSError *error = RCTErrorWithMessage(@"Delete image not available on macOS");
reject(@"Couldn't delete", @"Couldn't delete assets", error);
#endif // ]TODO(macOS ISS#2323203)
}

static void checkPhotoLibraryConfig()
Expand Down
2 changes: 0 additions & 2 deletions Libraries/CameraRoll/RCTPhotoLibraryImageLoader.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ - (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
if (!imageURL) {
completionHandler(RCTErrorWithMessage(@"Cannot load a photo library asset with no URL"), nil);
return ^{};
#if !TARGET_OS_OSX // TODO(macOS ISS#2323203)
} else if ([imageURL.scheme caseInsensitiveCompare:@"assets-library"] == NSOrderedSame) {
assetID = [imageURL absoluteString];
results = [PHAsset fetchAssetsWithALAssetURLs:@[imageURL] options:nil];
#endif // TODO(macOS ISS#2323203)
} else {
assetID = [imageURL.absoluteString substringFromIndex:@"ph://".length];
results = [PHAsset fetchAssetsWithLocalIdentifiers:@[assetID] options:nil];
Expand Down
5 changes: 1 addition & 4 deletions Libraries/CameraRoll/React-RCTCameraRoll.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ Pod::Spec.new do |s|
s.documentation_url = "https://facebook.github.io/react-native/docs/cameraroll"
s.license = package["license"]
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
s.platforms = { :ios => "9.0", :tvos => "9.2" }
s.source = source
s.source_files = "*.{h,m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "React"

s.dependency "React-Core", version
s.dependency "React-RCTImage", version

s.osx.exclude_files = "RCTImagePickerManager.*", "RCTAssetsLibraryRequestHandler.*" # TODO(macOS GH#214)

end
12 changes: 0 additions & 12 deletions Libraries/Image/RCTImageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,4 @@ typedef NS_ENUM(NSInteger, UIImageRenderingMode) {
@property (nonatomic, assign) CGFloat blurRadius;
@property (nonatomic, assign) RCTResizeMode resizeMode;

#if TARGET_OS_OSX // [TODO(macOS ISS#2323203)
/**
* macOS Properties
*/
@property (nonatomic, copy) RCTDirectEventBlock onDoubleClick;
@property (nonatomic, copy) RCTDirectEventBlock onClick;
@property (nonatomic, copy) RCTDirectEventBlock onMouseEnter;
@property (nonatomic, copy) RCTDirectEventBlock onMouseLeave;
@property (nonatomic, copy) RCTDirectEventBlock onDragEnter;
@property (nonatomic, copy) RCTDirectEventBlock onDragLeave;
@property (nonatomic, copy) RCTDirectEventBlock onDrop;
#endif // ]TODO(macOS ISS#2323203)
@end
Loading