react-native-performance icon indicating copy to clipboard operation
react-native-performance copied to clipboard

fix(ios): build failure when using custom native marks

Open hardworker opened this issue 1 year ago • 3 comments

Build fails on importing RNPeroformance.h in Objective-C file, because chrono is a part of STL library which cannot be found in plain Objective-C files. The idea of fix is to prevent it to be included in a header.

RNPerformanceEntryWasAddedNotification declaration and initialization were split to prevent build failure as well.

hardworker avatar Nov 03 '23 16:11 hardworker

Hi, and thanks for your PR! As this doesn't seem to be an issue for myself or others, I'm curious of your setup. Do you use a very old version of React Native? Are you using native markers along with JS based?

oblador avatar Nov 07 '23 11:11 oblador

Hey, @oblador! No, I use a pretty recent 0.72 React Native. Native markers are used alongside JS ones. However it doesn't matter how you use them, it's only about importing <react-native-performance/RNPerformance.h> in a pure Objective-C file.

Here's an example based on a clean RN template: https://github.com/hardworker/react-native-performance-test-app

hardworker avatar Nov 07 '23 15:11 hardworker

Hey, @oblador. Could you please take a look at example above?

Augustach avatar Jan 03 '24 11:01 Augustach