Skip to content

Commit

Permalink
Add macros to mark APIs as being deprecated or unavailable. (flutter#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored Dec 8, 2017
1 parent 2cf9ed0 commit e8526e6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shell/platform/darwin/ios/framework/Headers/Flutter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
#ifndef FLUTTER_FLUTTER_H_
#define FLUTTER_FLUTTER_H_

/**
BREAKING CHANGES:
November 29, 2017: Added a BREAKING CHANGES section.
*/

#include "FlutterAppDelegate.h"
#include "FlutterBinaryMessenger.h"
#include "FlutterChannels.h"
Expand Down
17 changes: 17 additions & 0 deletions shell/platform/darwin/ios/framework/Headers/FlutterMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,21 @@
#define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
#endif // defined(NS_ASSUME_NONNULL_BEGIN)

/**
Indicates that the API has been deprecated for the specifed reason. Code that
uses the deprecated API will continue to work as before. However, the API will
soon become unavailable and users are encouraged to immediately take the
appropriate action mentioned in the deprecation message and the BREAKING
CHANGES section present in the Flutter.h umbrella header.
*/
#define FLUTTER_DEPRECATED(msg) __attribute__((__deprecated__(msg)))

/**
Indicates that the previously deprecated API is now unavailable. Code that
uses the API will not work and the declaration of the API is only a stub meant
to display the given message detailing the actions for the user to take
immediately.
*/
#define FLUTTER_UNAVAILABLE(msg) __attribute__((__unavailable__(msg)))

#endif // FLUTTER_FLUTTERMACROS_H_

0 comments on commit e8526e6

Please sign in to comment.