Amplitude-TypeScript icon indicating copy to clipboard operation
Amplitude-TypeScript copied to clipboard

chore: update ReactNative example to support Mac Catalyst

Open falconandy opened this issue 1 year ago • 0 comments

Summary

Updates React Native example to support Mac Catalyst.

  1. Updated React Native packages (react-native was updated to 0.71.7).
  2. Added a dummy Swift file to generated ios folder to use Swift libraries during building/linking.

Different XCode/React-Native combinations can have different issues. My environment: XCode 14.2, Ubuntu with MacOS as guest system (qemu virtualization).

Steps:

  1. yarn, then pod install in ios folder

  2. Turning on Mac Catalyst Screenshot_20230501_204845 Screenshot_20230501_204942

  3. Open ios folder in XCode and try to build with Mac Catalyst destination.

  4. If there is a error ... duplicated symbols for architecture x86_64 set linking option Don't Dead-Strip Inits and Terms to Yes Screenshot_20230501_205142

  5. The build should be successful. Screenshot_20230501_205329

  6. The example app should start. Screenshot_20230501_205542

Checklist

  • [x] Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

falconandy avatar May 01 '23 17:05 falconandy