Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Last active June 16, 2021 06:32
Show Gist options
  • Save badsyntax/0902ce35cec54c9402323a88cce221b2 to your computer and use it in GitHub Desktop.
Save badsyntax/0902ce35cec54c9402323a88cce221b2 to your computer and use it in GitHub Desktop.
Apple M1 workarounds

For npm packages that don't provide arm binaries:

npm i --target_arch=x64

For gradle packages that don't provide arm binaries:

// for apple m1, please add protoc_platform=osx-x86_64 in $HOME/.gradle/gradle.properties
if (project.hasProperty('protoc_platform')) {
  artifact = "com.google.protobuf:protoc:${protocVersion}:${protoc_platform}"
} else {
  artifact = "com.google.protobuf:protoc:${protocVersion}"
}

For cocoapods:

arch -x86_64 pod install

(See react-native-community/discussions-and-proposals#295)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment