Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 2.42 KB

README.md

File metadata and controls

67 lines (49 loc) · 2.42 KB

Running the FluentUI Tester on macOS

FluentUI Tester is the test app that we use to test our FluentUI components during development. It uses the react-native-test app under the covers, and loads the FluentUI bundle.

Launch FluentUI Tester app on macOS

Prereq: FluentUI Tester on macOS can only run on a Mac.

  1. Make sure you have followed the Getting Started instructions to install packages and build the entire FluentUI React Native repository. I.e. from the root of the repo:
yarn
yarn build
  1. Then go into apps/macos/src folder and run pod install to pull in the project-level Cocoapod dependencies defined in the podfile, and to generate a valid xcworkspace:
cd apps/macos/src
pod install

Note: if you get the error: "CocoaPods could not find compatible versions for pod "MicrosoftFluentUI"," you may need to run pod install --repo-update.

  1. Return to the macos directory and first run yarn start. Then run yarn macos to launch the FluentUI Tester app:
cd ..
yarn macos

Dependencies

Dependencies are managed by @rnx-kit/dep-check. If you're looking to upgrade react-native, look for the rnx-kit section in /apps/macos/package.json:

{
  ...
  "rnx-kit": {
    "reactNativeVersion": "^0.63",
    "kitType": "app",
    "bundle": {
  ...
}

Bump reactNativeVersion, and run yarn rnx-dep-check --write. This command will ensure that all relevant packages are bumped correctly.

You can read more about this tool here: @rnx-kit/dep-check design document

Troubleshooting

  • If you get the error: "Unable to resolve module... None of these files exist:...", close the packager and restart it by running yarn start. Note: you need to restart the packager when you switch to a different platform (e.g. from iOS to macOS), but once it restarts you can reload the tester apps on all running platforms at once.
  • If you want to do direct debugging via xcode, after the pod install, you can launch src/FluentTester.xcworkspace and build/run the scheme "ReactTestApp"
  • If you want to have a clean rebuild of the generated macOS project, you can do the following:
cd apps/macos/
rm src/FluentTester.xcworkspace
rm -r src/Pods/
pod install --project-directory=src.