title: Adding a resource file to iOS in a native react native module
body: <p>I'm working on a native react native module, where I need a JSON resource file. I cannot figure out how to make this file available for the iOS side for either unit testing in the module or when serving a react native application.</p>
  
  <p>I've been trying to put the file into a folder (<code>Resources</code> or <code>SupportFiles</code> as folder name makes no difference) on the root level of the ios-folder of the module. When I drag it to the XCode (9.3.1) project navigator, it gets added to the "Tests"-target of the module (the lego brick icon), under <code>Build Phases</code> --> <code>Copy Bundle Resources</code>. I have also tried adding it to <code>Build Phases</code> --> <code>Copy Files</code> under the real module build targets (the ones with facade-icons).</p>
  
  <p>Running <code>NSLog(@"%@", [[NSBundle mainBundle] bundlePath]);</code> using a unit test I get a path:
  <code>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents</code></p>
  
  <p>Neither my file nor the folder get transferred to that path. If I manually copy the file there it opens without problems from my code (as accessed from the <code>mainBundle</code>, but that is not a sustainable solution.</p>
  
  <p>I was wondering whether the resource files would only be copied to destination during a full build operation? The module builds successfully for the unit tests, but a full build has not been defined, as the module is not intended to run by itself. I also tried building my test app, which exercises the module, but couldn't find the file in any of the build results there either.</p>
  
  <p>All in all this should be trivial (and on the Android-side it was). What am I missing?</p>