react-native/scripts
Leo Natan 30469ed001 Expose React Native version as a symbol rather than macro
Summary:
Add RCTGetReactNativeVersion() to expose version in native code. Right now, version is exposed internally to RN using a MACRO constant. This exposes a symbol (function) that can be called to retrieve the React Native version in iOS.

Also exposed RCTVersion.h as a public header in the React project so it is available to developers.

The motivation behind this is for https://github.com/wix/detox —we need to know what RN version the user has, if any, so we can properly handle support and abstract differences.

Ran bump-oss-version.js to ensure the template is applied properly. Also compiled the project to make sure nothing is broken.

 [IOS] [ENHANCEMENT] [RCTVersion.h] - Expose version as a compile-time symbol for native queries

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/18136

Differential Revision: D7141076

Pulled By: hramos

fbshipit-source-id: 18a92b8c60d7b43fa0ed22597ea46a35cff73c56
2018-03-02 14:51:39 -08:00
..
circleci Check PATENTS does not creep into files 2018-03-01 08:22:05 -08:00
versiontemplates Expose React Native version as a symbol rather than macro 2018-03-02 14:51:39 -08:00
.packager.env Move YGStyle to seperate file and add constructors 2018-02-20 05:55:36 -08:00
android-e2e-test.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
bump-oss-version.js Expose React Native version as a symbol rather than macro 2018-03-02 14:51:39 -08:00
circle-ci-android-setup.sh Migrate to Circle 2.0 2017-09-21 14:01:30 -07:00
ios-configure-glog.sh Removing test-driver symlink in ios third party install script 2017-06-21 07:45:37 -07:00
ios-install-third-party.sh Make ios-install-third-party.sh more robust 2017-09-28 13:03:26 -07:00
launchPackager.bat Update license headers for MIT license 2018-02-16 18:31:53 -08:00
launchPackager.command Update license headers for MIT license 2018-02-16 18:31:53 -08:00
objc-test-ios.sh Fix Travis podspec CI for Cxx bridge 2017-07-07 02:32:07 -07:00
objc-test-tvos.sh Fix Travis podspec CI for Cxx bridge 2017-07-07 02:32:07 -07:00
objc-test.sh Consolidate checkout and yarn steps 2018-02-08 15:20:09 -08:00
packager.sh Update license headers for MIT license 2018-02-16 18:31:53 -08:00
process-podspecs.sh GLog fix on case sensitive APFS macOS 2018-01-28 22:29:51 -08:00
publish-npm.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
react-native-xcode.sh Update license headers for MIT license 2018-02-16 18:31:53 -08:00
run-android-ci-instrumentation-tests.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
run-android-emulator.sh Improve Android testing scripts 2016-12-13 17:13:35 -08:00
run-android-local-integration-tests.sh Skip flaky ScrollView tests 2017-03-13 13:30:31 -07:00
run-android-local-unit-tests.sh Improve Android testing scripts 2016-12-13 17:13:35 -08:00
run-ci-e2e-tests.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
run-instrumentation-tests-via-adb-shell.sh Fix Android comment and docblock typos 2017-12-03 20:16:36 -08:00
sync-css-layout.sh Update to MIT license 2018-02-16 18:31:53 -08:00
test-manual-e2e.sh Move HelloWorld template to a single index.js entry point 2017-08-03 14:02:43 -07:00
try-n-times.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
validate-android-device-env.sh Improve Android testing scripts 2016-12-13 17:13:35 -08:00
validate-android-sdk.sh Improve Android testing scripts 2016-12-13 17:13:35 -08:00
validate-android-test-env.sh Add helpful examples to Android test env validation failure messages. 2017-10-12 15:33:04 -07:00