RCTCxxUtils.h 652 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #include <functional>
  8. #include <memory>
  9. #import <Foundation/Foundation.h>
  10. @class RCTBridge;
  11. @class RCTModuleData;
  12. namespace facebook {
  13. namespace react {
  14. class Instance;
  15. class NativeModule;
  16. std::vector<std::unique_ptr<NativeModule>>
  17. createNativeModules(NSArray<RCTModuleData *> *modules, RCTBridge *bridge, const std::shared_ptr<Instance> &instance);
  18. NSError *tryAndReturnError(const std::function<void()> &func);
  19. NSString *deriveSourceURL(NSURL *url);
  20. }
  21. }