react-native/ReactCommon/cxxreact/JSIndexedRAMBundleRegistry.cpp
Alex Dvornikov 7d2021ec49 Added iOS support for loading multiple RAM bundles
Differential Revision: D5890466

fbshipit-source-id: e7805f90a7c446f5f75427c3fadcd133a3f7ad18
2017-09-22 09:58:47 -07:00

23 lines
626 B
C++

// Copyright 2004-present Facebook. All Rights Reserved.
#include "JSIndexedRAMBundleRegistry.h"
#include <cxxreact/JSIndexedRAMBundle.h>
#include <folly/Memory.h>
#include "oss-compat-util.h"
namespace facebook {
namespace react {
std::unique_ptr<JSModulesUnbundle> JSIndexedRAMBundleRegistry::bundleById(uint32_t index) const {
return folly::make_unique<JSIndexedRAMBundle>(bundlePathById(index).c_str());
}
std::string JSIndexedRAMBundleRegistry::bundlePathById(uint32_t index) const {
return m_baseDirectoryPath + "/js-bundles/" + toString(index) + ".jsbundle";
}
} // namespace react
} // namespace facebook