Skip to content

iOS fails to build with xcode 12 + use_frameworks! #509

Closed
@stu-dev

Description

@stu-dev

Current behavior

iOS does not build when using xcode 12 + use_frameworks! in Podfile

Expected behavior

iOS should build

Repro steps

npx react-native init RNAsyncStorage && cd RNAsyncStorage
yarn add @react-native-async-storage/async-storage
  • Add use_frameworks! to Podfile (also disable flipper)
npx pod-install
yarn ios

(example repo: https://github.com/stu-dev/RNAsyncStorage)

Environment

  • Platforms tested:
    • Android
    • iOS
    • macOS
    • Windows
  • AsyncStorage version: 1.13.2
  • Environment:
System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
    Memory: 515.01 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 14.4.0 - ~/.nvm/versions/node/v14.4.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v14.4.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 23, 26, 27, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2
      System Images: android-23 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-R | Google APIs Intel x86 Atom_64
      Android NDK: 21.3.6528147
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6858069
    Xcode: 12.3/12C33 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_191 - /usr/bin/javac
    Python: 2.7.17 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.4 => 0.63.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
  • Logs/Errors that may be relevant:
Undefined symbols for architecture x86_64:
  "_RCTMakeAndLogError", referenced from:
      _RCTErrorForKey in RNCAsyncStorage.o
      -[RNCAsyncStorage _writeEntry:changedManifest:] in RNCAsyncStorage.o
  "_RCTJSErrorFromNSError", referenced from:
      -[RNCAsyncStorage multiMerge:callback:] in RNCAsyncStorage.o
  "_RCTJSONStringify", referenced from:
      -[RNCAsyncStorage _writeManifest:] in RNCAsyncStorage.o
      -[RNCAsyncStorage multiMerge:callback:] in RNCAsyncStorage.o
  "_RCTCurrentThreadName", referenced from:
      -[RNCAsyncStorage _ensureSetup] in RNCAsyncStorage.o
  "_RCTJSONParse", referenced from:
      -[RNCAsyncStorage multiMerge:callback:] in RNCAsyncStorage.o
  "__RCTAssertFormat", referenced from:
      -[RNCAsyncStorage _ensureSetup] in RNCAsyncStorage.o
  "_RCTMD5Hash", referenced from:
      -[RNCAsyncStorage _filePathForKey:] in RNCAsyncStorage.o
  "__RCTLogNativeInternal", referenced from:
      -[RNCAsyncStorage _ensureSetup] in RNCAsyncStorage.o
      _RCTStorageDirectoryMigrationLogError in RNCAsyncStorage.o
  "_RCTMakeError", referenced from:
      -[RNCAsyncStorage _ensureSetup] in RNCAsyncStorage.o
      _RCTReadFile in RNCAsyncStorage.o
      -[RNCAsyncStorage _writeManifest:] in RNCAsyncStorage.o
      -[RNCAsyncStorage _writeEntry:changedManifest:] in RNCAsyncStorage.o
      ___37-[RNCAsyncStorage multiGet:callback:]_block_invoke_2 in RNCAsyncStorage.o
      _RCTMakeErrors in RNCAsyncStorage.o
      ___25-[RNCAsyncStorage clear:]_block_invoke in RNCAsyncStorage.o
      ...
  "_RCTJSONParseMutable", referenced from:
      -[RNCAsyncStorage _ensureSetup] in RNCAsyncStorage.o
      -[RNCAsyncStorage multiMerge:callback:] in RNCAsyncStorage.o
  "_RCTRegisterModule", referenced from:
      +[RNCAsyncStorage load] in RNCAsyncStorage.o
ld: symbol(s) not found for architecture x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions