Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18261] iOS: Correct missing newlines at ends of header files

GitHub Issuen/a
TypeStory
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-12-18T17:42:27.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.0.0
ComponentsiOS
Labelsn/a
ReporterIngo Muschenetz
AssigneeIngo Muschenetz
Created2014-12-18T12:05:18.000+0000
Updated2017-03-13T21:18:01.000+0000

Description

It appears that some of our header files are missing newlines and triggering Apple warnings. While this should no longer be an issue when using C++ 11, it appears to still cause warnings with default Apple settings: http://stackoverflow.com/questions/72271/no-newline-at-end-of-file-compiler-warning To find:
#!/usr/bin/env bash
for i in $(find . -type f -name "*.h") ; do \
 if diff /dev/null "$i" | tail -1 | \
  grep '^\\ No newline' > /dev/null; then  echo $i; \
fi; done
Run this in the titanium_mobile/iphone directory Taken from http://stackoverflow.com/questions/3261925/how-to-fix-no-newline-at-end-of-file-compiler-warning-for-lots-of-files To fix:
#!/usr/bin/env bash
for i in $(find . -type f -name "*.h") ; do  echo $i; \
 if diff /dev/null "$i" | tail -1 | \
  grep '^\\ No newline' > /dev/null; then echo >> "$i"; \
fi; done

Comments

  1. Ingo Muschenetz 2014-12-18

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/6506
  2. Lee Morris 2017-03-13

    Closing ticket as fixed.

JSON Source