Closed davidcarboni closed 4 months ago
:wave:
package resolution is not needed, the xcode dependency is already the latest.
the readme is not crystal clear about the require patch, can you try to follow these steps :
copy the patch in you patches
project directory (like example)
reset dependencies and add patch-package
for auto patching
rm -fr node_modules
yarn add patch-package
add post-install script
"scripts": {
...
"postinstall": "patch-package"
},
Reinstall dependencies and check that the applied patch is correct :
$ yarn install
yarn install v1.22.19
[1/4] π Resolving packages...
success Already up-to-date.
$ patch-package
patch-package 8.0.0
Applying patches...
xcode@3.0.1 β
β¨ Done in 0.81s.
run prebuild command
$ yarn expo prebuild --no-install
yarn run v1.22.19
$ /Users/anselme/project/expo-share-intent/expo-share-intent-plugin/example/basic/node_modules/.bin/expo prebuild --no-install
β Created native directories | reusing /android, /ios
β Updated package.json | no changes
β ¦ Running prebuild[expo-share-intent] add ios share extension (scheme:exposhareintentexample appIdentifier:expo.modules.exposhareintent.example)
β Running prebuild[expo-share-intent] add android filters (text/* image/*) and multi-filters (image/*)
Β» android: userInterfaceStyle: Install expo-system-ui in your project to enable this feature.
β Finished prebuild
β¨ Done in 3.94s.
Success! Thank you so much for taking the time to document this.
I applied the steps as you described and have successfiully run prebuild.
Fantastic work - your package has landed at the exact time I needed this solution, I'm very grateful for what you've created.
Your are welcome, i also updated the README π
Hi @achorein I'm doing the exact steps mentioned above and still facing issues.
yarn expo prebuild --no-install
yarn run v1.22.22
$ /Users/mcnaveen/Developer/shotix/node_modules/.bin/expo prebuild --no-install
β Created native directories | reusing /android, /ios
β Updated package.json | no changes
β Running prebuild************ scheme shotix
β Prebuild failed
TypeError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Cannot read properties of null (reading 'path')
TypeError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Cannot read properties of null (reading 'path')
at correctForPath (/Users/mcnaveen/Developer/shotix/node_modules/xcode/lib/pbxProject.js:1682:38)
at correctForResourcesPath (/Users/mcnaveen/Developer/shotix/node_modules/xcode/lib/pbxProject.js:1672:12)
at pbxProject.addResourceFile (/Users/mcnaveen/Developer/shotix/node_modules/xcode/lib/pbxProject.js:258:9)
at /Users/mcnaveen/Developer/shotix/node_modules/expo-config-plugin-ios-share-extension/build/withShareExtensionXcodeTarget.js:37:20
at async action (/Users/mcnaveen/Developer/shotix/node_modules/expo-config-plugin-ios-share-extension/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:23)
at async interceptingMod (/Users/mcnaveen/Developer/shotix/node_modules/expo-config-plugin-ios-share-extension/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
at async interceptingMod (/Users/mcnaveen/Developer/shotix/node_modules/@expo/config-plugins/build/plugins/withMod.js:104:21)
at async interceptingMod (/Users/mcnaveen/Developer/shotix/node_modules/@expo/config-plugins/build/plugins/withMod.js:104:21)
at async interceptingMod (/Users/mcnaveen/Developer/shotix/node_modules/@expo/config-plugins/build/plugins/withMod.js:104:21)
at async interceptingMod (/Users/mcnaveen/Developer/shotix/node_modules/@expo/config-plugins/build/plugins/withMod.js:104:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Describe the bug I am experiencing the documented issue regarding a post-install script:
TypeError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Cannot read properties of null (reading 'path')
To Reproduce I am attempting to run:
npx expo prebuild --no-install --clean
Environment give the output of the following command
npx react-native info
info Fetching system and libraries information... System: OS: Linux 6.5 Ubuntu 23.10 23.10 (Mantic Minotaur) CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz Memory: 4.30 GB / 15.20 GB Shell: version: 5.2.15 path: /bin/bash Binaries: Node: version: 18.18.0 path: ~/.nvm/versions/node/v18.18.0/bin/node Yarn: version: 1.22.21 path: ~/.nvm/versions/node/v18.18.0/bin/yarn npm: version: 10.5.0 path: ~/.nvm/versions/node/v18.18.0/bin/npm Watchman: Not Found SDKs: Android SDK: Not Found IDEs: Android Studio: Not Found Languages: Java: Not Found Ruby: Not Found npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.4 wanted: 0.73.4 npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: Not found newArchEnabled: falseinfo React Native v0.73.5 is now available (your project is running on v0.73.4). info Changelog: https://github.com/facebook/react-native/releases/tag/v0.73.5 info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.73.5 info For more info, check out "https://reactnative.dev/docs/upgrading?os=linux".
Additional context I have looked at the patch file but an not sure where to apply this change (I have searched under node_modules for files containing "xcode" to see if I could patch there but I haven't found the indicated line of code.
I have also looked at the linked issue and added the suggested override to my
package.json
however I still get the error message.I'm really pleased to have found your package as I would love to be able to share URLs to my app. Any pointers you can offer will be very much appreciated!