Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when pod install #56

Closed
Jekiwijaya opened this issue May 24, 2021 · 5 comments
Closed

Error when pod install #56

Jekiwijaya opened this issue May 24, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Jekiwijaya
Copy link

Hello, please help, I'm getting error when running pod install in my project

Describe what happened
Getting error when run pod install

Steps to reproduce the issue:

Describe what you expected:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `dd-sdk-reactnative` depends upon `React-Core`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

Additional context
- Version of the SDK

"dd-sdk-reactnative": "^1.0.0-beta1",
- A copy of your `package.json` file
{
  "name": "apps",
  "version": "3.3.0",
  "private": true,
  "scripts": {
    "postinstall": "npx jetify && patch-package",
    "android": "npm run android:debug",
    "android:debug": "react-native run-android --variant=debug --appId=com.valar.pintu.debug",
    "android:staging": "react-native run-android --variant=releaseStaging --appId=com.valar.pintu.staging",
    "android:release": "react-native run-android --variant=release --appId=com.valar.pintu",
    "compile": "tsc -b --incremental",
    "ios": "react-native run-ios",
    "lint": "eslint modules --ext .js,.jsx,.ts,.tsx --quiet --fix",
    "start": "react-native start",
    "studio": "studio android",
    "test": "jest",
    "test:e2e": "detox test",
    "xcode": "open ios/Pintu.xcworkspace",
    "eslint": "yarn eslint . --ext .js,.jsx,.ts,.tsx",
    "sync-i18n": "ts-node modules/src/shared/libs/i18n/sync/gdrive/sync.ts",
    "gen:style": "npx ts-node modules/src/shared/utils/styles/generateStylesType.tsx"
  },
  "rnpm": {
    "assets": [
      "./modules/src/assets"
    ]
  },
  "dependencies": {
    "@apollo/react-hooks": "^3.1.3",
    "@codler/react-native-keyboard-aware-scroll-view": "^1.0.1",
    "@gurukumparan/react-native-android-inapp-updates": "^1.0.20",
    "@invertase/react-native-apple-authentication": "^2.0.0",
    "@nozbe/watermelondb": "^0.21.0",
    "@nozbe/with-observables": "^1.3.0",
    "@react-native-community/art": "^1.2.0",
    "@react-native-community/async-storage": "^1.8.1",
    "@react-native-community/clipboard": "^1.2.3",
    "@react-native-community/hooks": "^2.6.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "^5.5.1",
    "@react-native-community/push-notification-ios": "^1.3.0",
    "@react-native-firebase/analytics": "^11.5.0",
    "@react-native-firebase/app": "^11.5.0",
    "@react-native-firebase/crashlytics": "^11.5.0",
    "@react-native-firebase/dynamic-links": "^11.5.0",
    "@react-native-firebase/firestore": "^11.5.0",
    "@react-native-firebase/in-app-messaging": "^11.5.0",
    "@react-native-firebase/messaging": "^11.5.0",
    "@react-native-firebase/perf": "^11.5.0",
    "@react-native-firebase/remote-config": "^11.5.0",
    "@react-native-google-signin/google-signin": "^6.0.0",
    "@react-navigation/bottom-tabs": "^5.11.11",
    "@react-navigation/compat": "^5.3.15",
    "@react-navigation/native": "^5.9.3",
    "@react-navigation/stack": "^5.14.5",
    "@sentry/react-native": "^2.4.0",
    "@sentry/types": "^5.13.2",
    "@types/base-64": "^0.1.3",
    "@types/faker": "^4.1.10",
    "@types/gapi": "^0.0.39",
    "@types/jest": "^26.0.23",
    "@types/lodash": "^4.14.149",
    "@types/nanoid": "^2.1.0",
    "@types/qs": "^6.9.1",
    "@types/react-native": "^0.63",
    "@types/react-native-charts-wrapper": "^0.5.0",
    "@types/react-native-draggable-flatlist": "^1.1.1",
    "@types/react-native-fbsdk": "^1.1.0",
    "@types/react-native-modal-dropdown": "^0.6.1",
    "@types/react-native-share": "^3.0.0",
    "@types/react-native-vector-icons": "^6.4.5",
    "@types/react-qr-reader": "^2.1.2",
    "@types/semver": "^7.3.4",
    "@types/sprintf-js": "^1.1.2",
    "@types/styled-components": "^5.1.8",
    "@types/tinycolor2": "^1.4.2",
    "@types/ua-parser-js": "^0.7.33",
    "@typescript-eslint/eslint-plugin": "^2.22.0",
    "@typescript-eslint/parser": "^2.22.0",
    "@use-it/interval": "^0.1.3",
    "amplitude-js": "^5.9.0",
    "apollo-boost": "^0.4.7",
    "axios": "^0.21.1",
    "babel-plugin-styled-components": "^1.12.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "base-64": "^0.1.0",
    "bignumber.js": "^9.0.0",
    "buffer": "^5.4.3",
    "dataloader": "^2.0.0",
    "date-fns": "^2.10.0",
    "dd-sdk-reactnative": "^1.0.0-beta1",
    "detox": "^18.13.0",
    "expo-barcode-scanner": "^10.0.0",
    "expo-calendar": "^9.0.0",
    "expo-haptics": "^9.0.0",
    "expo-image-manipulator": "^9.0.0",
    "expo-image-picker": "^10.0.0",
    "expo-linear-gradient": "^9.0.0",
    "expo-localization": "^10.0.0",
    "expo-notifications": "^0.9.0",
    "expo-permissions": "^11.0.0",
    "expo-screen-capture": "^3.0.0",
    "expo-secure-store": "^10.0.0",
    "final-form": "^4.18.5",
    "googleapis": "^71.0.0",
    "graphql": "^14.6.0",
    "i18next-scanner": "^2.10.3",
    "i18next-scanner-typescript": "^1.0.3",
    "jail-monkey": "^2.3.3",
    "js-sha3": "^0.8.0",
    "libphonenumber-js": "^1.7.46",
    "lodash": "^4.17.19",
    "lottie-react-native": "^3.5.0",
    "nanoid": "^2.1.7",
    "patch-package": "^6.2.2",
    "prettier": "^1.19.1",
    "qs": "^6.9.1",
    "react": "16.13.1",
    "react-async": "^10.0.0",
    "react-final-form": "6.3.3",
    "react-ga": "^2.7.0",
    "react-i18next": "^11.3.3",
    "react-is": "^16.8",
    "react-native": "0.63.2",
    "react-native-animatable": "^1.3.3",
    "react-native-appsflyer": "^6.2.41",
    "react-native-autoheight-webview": "^1.5.8",
    "react-native-camera": "^3.43.6",
    "react-native-charts-wrapper": "^0.5.7",
    "react-native-code-push": "^7.0.1",
    "react-native-confirmation-code-field": "^7.0.1",
    "react-native-date-picker": "^3.2.0",
    "react-native-device-info": "^5.6.1",
    "react-native-dots-pagination": "^0.2.0",
    "react-native-draggable-flatlist": "^2.5.2",
    "react-native-dropdown-picker": "^3.6.8",
    "react-native-email": "^1.0.2",
    "react-native-email-link": "^1.7.2",
    "react-native-exception-handler": "^2.10.8",
    "react-native-exit-app": "^1.1.0",
    "react-native-fast-image": "^8.1.4",
    "react-native-fbsdk-next": "^4.2.0",
    "react-native-fingerprint-scanner": "^6.0.0",
    "react-native-freshchat-sdk": "^3.3.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-markdown-display": "^6.0.1",
    "react-native-modal": "^11.5.4",
    "react-native-modals": "^0.22.3",
    "react-native-moengage": "^7.0.0",
    "react-native-permissions": "^3.0.3",
    "react-native-qrcode-svg": "^6.0.1",
    "react-native-rating-requestor": "^4.0.1",
    "react-native-reanimated": "^2.1.0",
    "react-native-restart": "^0.0.14",
    "react-native-rsa-native": "^1.1.4",
    "react-native-safe-area-context": "^3.2.0",
    "react-native-safe-area-view": "^1.0.0",
    "react-native-screens": "^3.2.0",
    "react-native-share": "^4.0.0",
    "react-native-splash-screen": "^3.2.0",
    "react-native-status-bar-height": "^2.4.0",
    "react-native-store-review": "^0.1.5",
    "react-native-svg": "^12.1.0",
    "react-native-swipe-list-view": "^3.2.3",
    "react-native-tab-view": "^2.13.0",
    "react-native-unimodules": "^0.12.0",
    "react-native-user-agent": "^2.1.0",
    "react-native-vector-icons": "^7.1.0",
    "react-native-view-shot": "^3.1.2",
    "react-native-webview": "^11.0.0",
    "react-native-youtube": "^2.0.1",
    "react-qr-reader": "^2.2.1",
    "react-query": "^3.13.3",
    "reactotron-react-native": "^4.0.3",
    "rn-placeholder": "^3.0.0",
    "semver": "^7.3.2",
    "slugify": "^1.4.0",
    "sprintf-js": "^1.1.2",
    "styled-components": "^5.2.1",
    "tinycolor2": "^1.4.1",
    "ts-node": "^8.6.2",
    "typescript": "^3.8.3",
    "url": "^0.11.0",
    "use-debounce": "^3.4.2",
    "wallet-address-validator": "https://github.com/pintu-crypto/wallet-address-validator.git"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/plugin-proposal-decorators": "^7.13.15",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "@testing-library/react-hooks": "^5.1.2",
    "@testing-library/react-native": "^7.2.0",
    "@types/detox": "^17.14.0",
    "@types/nock": "^11.1.0",
    "@types/react-native-modals": "^0.19.0",
    "@types/react-test-renderer": "^17.0.1",
    "@types/testing-library__react-hooks": "^4.0.0",
    "babel-jest": "^26.6.3",
    "detox-recorder": "^1.0.151",
    "eslint": "^6.8.0",
    "eslint-plugin-prettier": "^3.1.2",
    "faker": "^5.5.3",
    "jest": "^26.6.3",
    "jest-circus": "^26.6.3",
    "jetifier": "^1.6.4",
    "md5": "^2.3.0",
    "metro-react-native-babel-preset": "^0.59.0",
    "nock": "^13.0.11",
    "react-native-flipper": "^0.86.0",
    "react-native-flipper-databases": "^0.2.1",
    "react-test-renderer": "16.13.1",
    "ts-jest": "^26.5.5",
    "ts-retry-promise": "^0.6.0"
  },
  "detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/Pintu Debug.app",
        "build": "xcodebuild -workspace  ios/apps.xcworkspace -scheme apps -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "device": {
          "type": "iPhone 11 Pro"
        }
      }
    },
    "test-runner": "jest"
  }
}

@Jekiwijaya Jekiwijaya added the bug Something isn't working label May 24, 2021
@0xnm
Copy link
Member

0xnm commented May 25, 2021

Hello @Jekiwijaya! Can you please also share your podfile (at least relevant part of it) and the version of XCode used?

@jhbarnett
Copy link

jhbarnett commented May 28, 2021

Encountered this issue as well with "^1.0.0-beta1". Xcode 12.5, package.json and podfile below.

{
  "name": "fitrankings-native",
  "version": "2.4.0",
  "private": true,
  "scripts": {...},
  "dependencies": {
    "@fitrankings/common": "^1.0.0",
    "@react-native-community/async-storage": "^1.11.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/native": "^5.1.5",
    "@sentry/react-native": "^2.1.0",
    "base-64": "^1.0.0",
    "dd-sdk-reactnative": "^1.0.0-beta1",
    "i18n-js": "^3.0.11",
    "lodash-es": "^4.17.15",
    "lodash.throttle": "4.1.1",
    "mobx": "^4.15.4",
    "mobx-react-lite": "^1.4.1",
    "mobx-state-tree": "^3.14.1",
    "pako": "^2.0.3",
    "ramda": "0.27.1",
    "react": "16.13.1",
    "react-native": "0.63.2",
    "react-native-gesture-handler": "^1.5.0",
    "react-native-health": "^1.7.1",
    "react-native-keychain": "6.1.1",
    "react-native-localize": "^1.0.0",
    "react-native-paper": "^4.4.1",
    "react-native-safe-area-context": "0.7.3",
    "react-native-safe-area-view": "1.1.1",
    "react-native-screens": "^2.10.1",
    "react-native-splash-screen": "3.2.0",
    "react-native-vector-icons": "^7.1.0",
    "react-native-webview": "^11.0.2",
    "reactotron-mst": "^3.1.1",
    "reactotron-react-native": "^5.0.0",
    "utf8": "^3.0.0",
    "validate.js": "0.13.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/plugin-proposal-decorators": "^7.0.0",
    "@babel/plugin-proposal-optional-catch-binding": "^7.0.0",
    "@babel/runtime": "^7.12.5",
    "@bam.tech/react-native-make": "^3.0.0",
    "@storybook/addon-storyshots": "5.3.19",
    "@storybook/react-native": "5.3.19",
    "@storybook/react-native-server": "5.3.19",
    "@types/i18n-js": "^3.0.3",
    "@types/jest": "^25.2.3",
    "@types/ramda": "0.26.44",
    "@types/react": "16.9.23",
    "@types/react-native": "^0.63.2",
    "@types/react-test-renderer": "^16.9.2",
    "@typescript-eslint/eslint-plugin": "^2.27.0",
    "@typescript-eslint/parser": "^2.27.0",
    "babel-jest": "^26.6.3",
    "eslint": "^6.8.0",
    "eslint-config-prettier": "^6.0.0",
    "eslint-config-standard": "^14.1.0",
    "eslint-plugin-import": "^2.15.0",
    "eslint-plugin-node": "^11.0.0",
    "eslint-plugin-promise": "^4.0.1",
    "eslint-plugin-react": "^7.12.4",
    "eslint-plugin-react-hooks": "^4.1.0",
    "eslint-plugin-react-native": "^3.6.0",
    "eslint-plugin-standard": "^4.0.0",
    "ignite-bowser": "^5.4.1",
    "jest": "25.5.4",
    "jetifier": "^1.6.2",
    "metro-react-native-babel-preset": "^0.64.0",
    "npm-run-all": "4.1.5",
    "patch-package": "6.2.2",
    "postinstall-prepare": "1.0.1",
    "prettier": "^2.0.4",
    "react-devtools-core": "4.8.2",
    "react-powerplug": "1.0.0",
    "react-test-renderer": "16.13.1",
    "rimraf": "3.0.2",
    "solidarity": "3.0.0",
    "typescript": "3.9.7"
  },
  "workspaces": {
    "nohoist": [
      "ignite-bowser",
      "react-native",
      "react-native/**",
      "jest-expo",
      "jest-expo/**",
      "react-native-*",
      "@react-native-*",
      "@react-native-*/**",
      "@react-navigation",
      "@react-navigation/**",
      "rn-*",
      "mobx-react-lite",
      "@bam.tech/react-native-make",
      "@sentry/react-native",
      "@sentry/react-native/**",
      "dd-sdk-reactnative"
    ]
  }, ...}
require_relative "../node_modules/@react-native-community/cli-platform-ios/native_modules"
require_relative "../node_modules/react-native/scripts/react_native_pods"

platform :ios, '11.0'

target 'FitRankings' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'FitRankingsTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
  post_install do |installer|
    flipper_post_install(installer)
  end
end

@buranmert buranmert self-assigned this Jun 2, 2021
@buranmert
Copy link
Contributor

hi @Jekiwijaya and @jhbarnett 👋
i see react-native: 0.63.2 in your package.json files
v0.63.2 is the last version that doesn't set DEFINES_MODULE = YES, starting from v0.63.3 this flag is being set and your problem disappears.

can you please update your react-native: 0.63.4 (0.63.3 should work as well) in your package.json and try again?

@jhbarnett
Copy link

Hey @buranmert, thanks for the help. I do appear to be past this issue and on to this one now.

@buranmert
Copy link
Contributor

for the records: we also found another solution without upgrading to v0.63.3+

// in your Podfile
use_frameworks!
...
pod 'React-Core', :modular_headers => true
  1. pod install fails with the error in this issue without :modular_headers => true
  2. linking fails due to undefined symbols without use_frameworks!

please note that upgrading your react native version is still the best solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants