Skip to content

Instantly share code, notes, and snippets.

@ljbatwh
Created September 11, 2020 07:53
Show Gist options
  • Save ljbatwh/e763c185500582b876ba88548fed0d58 to your computer and use it in GitHub Desktop.
Save ljbatwh/e763c185500582b876ba88548fed0d58 to your computer and use it in GitHub Desktop.
SwiftUI Previews pasued by some rebuild
  1. enable new build system if you use Legacy Build System.

File -> Project Settings (or Workspace Settings) -> Build System -> Choose "New Build System(Default).

  1. skip script in build pharse by check checkbox "Run script only when installing" or
if [ $ENABLE_PREVIEWS == "NO" ]
   then
  # your code to execute here
else
  echo "Skipping the script because of preview mode"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment