MaxAst / expo-share-extension

Expo config plugin for creating iOS share extensions with a custom view.
MIT License
205 stars 4 forks source link

Issue starting basic example project #31

Closed belle-chang closed 3 months ago

belle-chang commented 4 months ago

Hi, I'm on step 3 of the Development section and running into this problem:

[!] An error occurred while processing the post-install hook of the Podfile.

[Xcodeproj] Consistency issue: no parent for object `ShareExtensionViewController.swift`: `SourcesBuildPhase`, `SourcesBuildPhase`

Any ideas and solutions? Not entirely sure how to start the sample app otherwise. Thanks for all your hard work on this plugin!

MaxAst commented 4 months ago

Hi @belle-chang, unfortunately I haven't been able to reproduce it. When I cd into examples/basic and run npm run prebuild, it runs successfully for me:

Screenshot 2024-06-06 at 11 28 46

Can you pls describe the exact steps you take until you reach the error you shared?

belle-chang commented 4 months ago

Hi Max! Thanks for promptly responding. I recloned the project and didn't get that issue again, but got a few others:

  1. I got a bunch of issues for importing expo/config-plugins, but when I updated the imports to @expo/config-plugins, I was able to finish running both yarn and the first 2 steps under Development (npm run build and npm run build plugin). Is updating the imports to @expo/config-plugins the correct solution? Attached an errors text file below. errors.txt
  2. After successfully running npm run prebuild, I'm running the last command npm run ios. Upon opening the basic app on my simulator, I'm seeing this: image

The steps I'm taking are:

  1. Running yarn in both the parent expo-share-extension and examples/basic directories
  2. Then following the instructions under the Development section
belle-chang commented 4 months ago

So I was able to fix the second issue by manually installing babel-plugin-module-resolver from https://github.com/expo/expo/issues/25923, but still curious about the first question regarding the import of expo/config-plugins vs @expo/config-plugins

MaxAst commented 4 months ago

could you try starting over (remove node_modules, yarn.lock, examples/basic/node_modules, examples/basic/yarn.lock, examples/basic/ios) and use npm install instead of yarn? Not sure this is the solution, but worth a try. You shouldn't need to manually install the babel resolver and change the expo/config-plugins imports to get the basic example running

belle-chang commented 3 months ago

Hi Max, thanks for the prompt response! using npm install fixed both issues and I was able to get the examples up and running. Thank you again!