Skip to content

Commit

Permalink
fix!: Deprecate scrollView category extension on UIView
Browse files Browse the repository at this point in the history
This **removes** the API from Swift to solve the immediate problem in apache#1399
but leaves it available and deprecated in Objective-C due to use in 3rd party
plugins. (There are only 2 Swift plugins that use this API as far as I can
tell, and neither of them have very high usage or ongoing maintenance.)

Closes apacheGH-1399.
  • Loading branch information
dpogue committed Aug 21, 2024
1 parent 3a426fd commit 609170a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CordovaLib/include/Cordova/CDVPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@
#import <Cordova/CDVViewController.h>
#import <Cordova/CDVWebViewEngineProtocol.h>

#ifndef __swift__
// This global extension to the UIView class causes issues for Swift subclasses
// of UIView with their own scrollView properties, so we're removing it from
// the exposed Swift API and marking it as deprecated
// TODO: Remove in Cordova 9
@interface UIView (org_apache_cordova_UIView_Extension)

@property (nonatomic, weak) UIScrollView* scrollView;

@property (nonatomic, weak) UIScrollView* scrollView CDV_DEPRECATED(8, "Check for a scrollView property on the view object at runtime and invoke it dynamically.");
@end
#endif

extern NSString* const CDVPageDidLoadNotification;
extern NSString* const CDVPluginHandleOpenURLNotification;
Expand Down

0 comments on commit 609170a

Please sign in to comment.