achorein / expo-share-intent-demo

React Native Expo Share Intent Demonstration
90 stars 9 forks source link

Error when running on iOS Simulator #24

Closed pauldcollins closed 11 months ago

pauldcollins commented 11 months ago

I'm looking at the expo49-expo-router version.

I cloned this, did the install, prebuild and tried yarn ios, but got this error:

yarn install
yarn prebuild
yarn ios

The Error

CommandError: Malformed xcodebuild results: "CONFIGURATION_BUILD_DIR" variable was not generated in build output. Please report this issue and run your project with Xcode instead.

Is there a step I am missing?

achorein commented 11 months ago

it's working well for me with node v16, can you provide more details, what is your output for the following command :

npx react-native info
pauldcollins commented 11 months ago

Thanks for getting back to me @achorein and for putting this code example up. I tried downgrading to Node v16, but still the same error.

Here's the output of npx react-native info below.

System:
  OS: macOS 14.0
  CPU: (12) x64 Apple M2 Max
  Memory: 2.51 GB / 96.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.16.0
    path: ~/.nvm/versions/node/v18.16.0/bin/node
  Yarn:
    version: 1.17.3
    path: ~/.yarn/bin/yarn
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.16.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.13.0
    path: /Users/paulcollins/.rvm/gems/ruby-2.6.3/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.11090377
  Xcode:
    version: 15.0/15A240d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 9.0.4
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.6
    wanted: 0.72.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Also worth noting that when I try to set this up in my own codebase, and run a development build eas build --profile development --platform ios, I get this error (I have got around it using the --legacy-peer-deps` though:

npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.69.4" from expo-config-plugin-ios-share-extension@0.0.4
npm ERR! node_modules/expo-config-plugin-ios-share-extension
npm ERR!   expo-config-plugin-ios-share-extension@"^0.0.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react-native@0.69.12
npm ERR! node_modules/react-native
npm ERR!   peer react-native@"^0.69.4" from expo-config-plugin-ios-share-extension@0.0.4
npm ERR!   node_modules/expo-config-plugin-ios-share-extension
npm ERR!     expo-config-plugin-ios-share-extension@"^0.0.4" from the root project
pauldcollins commented 11 months ago

Hi @achorein - I managed to get your code working in my own application.

I still couldn't get your example working, but it all works fine for me in my own app. I will close this off and I have bought you 3 Coffees.

Thanks for putting this solution up! I hope Expo integrate it soon.