events.action: opened
events.author: ivanbuhov
events.text: There is no more `metadata.bin` file. Metadata is now included in the executable upon build. The app thinning will strip the fat binaries to a single slice on the AppStore when the app is distributed to the client devices. This will leave a single copy of the metadata in the actual download from the AppStore.
  Related issue: https://github.com/NativeScript/ios-runtime/issues/179
events.title: Buhov/metadata merged in binary
events.type: issue
events.action: created
events.author: fealebenpae
events.text: I can't tell from the patch, but did you move the 'Generate Metadata' build phase in the project template to the top? It would be best if it were right before the 'Link Binary' phase, for the same reason @jasssonpet cited for the proposed `PRE_LINK` CMake phase change.
events.type: comment
events.action: created
events.author: ivanbuhov
events.text: It turns out that the generation of `__TNSMetadata` section is part of the compilation phase, not the linking phase. It is the linker who does the job (`Ld` command is called), but it is called as part of the compilation process, right after all `CompileC` commands. So when the metadata generation step is between `Compile Sources` and `Link Binary With Libraries` or when it is set as `PRE_LINK` action the compilation phase fails with `ld: can't open -sectcreate file: /Users/buhov/Desktop/NS/ios-runtime/cmake-build/examples/Gameraww/Release-iphoneos/metadata-armv7.bin`, because it expects metadata to be already generated but there is no `metadata-armv7.bin` file yet. When I move the metadata generation step before `Compile Sources` phase (and in the other case - as `PRE_BUILD` action) it works like a charm. So I will leave it as it is unless you have better ideas.
events.type: comment
events.action: created
events.author: fealebenpae
events.text: Alright, makes sense
events.type: comment
events.action: created
events.author: ivanbuhov
events.text: Unfortunately, this approach is not working when NS Runtime is linked dynamically because it seems it is looking for TNSMetadata section in the dynamic library, but it is in the app executable.
events.type: comment
events.action: created
events.author: jasssonpet
events.text: Can we move the extern variable to the app then
events.type: comment
events.action: created
events.author: ivanbuhov
events.text: Yes, it should work. :+1:
events.type: comment
events.action: created
events.author: fealebenpae
events.text: :+1: after squashing to make things prettier
events.type: comment
data_with_bots.bot: :x:
data_with_bots.meta: This message directly preceded comment from bot *ns-bot* by author *fealebenpae*:
data_with_bots.text: Alright, makes sense
data_with_bots.bot: :white_check_mark:
data_with_bots.meta: This message directly preceded comment from bot *ns-bot* by author *ivanbuhov*:
data_with_bots.text: Yes, it should work. :+1:
data_with_bots.bot: :x:
data_with_bots.meta: This message directly preceded comment from bot *ns-bot* by author *fealebenpae*:
data_with_bots.text: :+1: after squashing to make things prettier
data_without_bots.meta: This message directly preceded comment from bot *ns-bot* by author *fealebenpae*:
data_without_bots.text: Alright, makes sense
data_without_bots.meta: This message directly preceded comment from bot *ns-bot* by author *ivanbuhov*:
data_without_bots.text: Yes, it should work. :+1:
data_without_bots.meta: This message directly preceded comment from bot *ns-bot* by author *fealebenpae*:
data_without_bots.text: :+1: after squashing to make things prettier