gitn00b1337 / expo-widgets

Bringing widget functionality to expo!
148 stars 12 forks source link

EAS Build fails on `pod install` #18

Closed jottenlips closed 5 months ago

jottenlips commented 5 months ago
[!] An error occurred while processing the post-install hook of the Podfile.

[Xcodeproj] Consistency issue: no parent for object `WidgetBundle.swift`: `SourcesBuildPhase`, `SourcesBuildPhase`
Screenshot 2024-06-11 at 8 34 39 AM

Has anyone else run into this?

This works

EXPO_NO_CACHE=true EXPO_NO_GIT_STATUS=true expo prebuild -p ios --clean"
yarn ios

but running

cd ios
pod install

in EAS fails consistently.

jottenlips commented 5 months ago

I've also seen it with Assets.xcassets for the resources phase if I remove some of the swift files and move the code to Widget.swift

jottenlips commented 5 months ago

This may actually be an issue with my project, seems like pod install works on the example.

 ~/home/expo-widgets/example/ios/ main pod install
Using Expo modules
[Expo] Enabling modular headers for pod ExpoModulesCore
[Expo] Enabling modular headers for pod React-Core
[Expo] Enabling modular headers for pod React-RCTAppDelegate
[Expo] Enabling modular headers for pod expo-dev-menu-interface
[Expo] Enabling modular headers for pod EXManifests
[Expo] Enabling modular headers for pod EXUpdatesInterface
[Expo] Enabling modular headers for pod expo-dev-menu
[Expo] Enabling modular headers for pod RCT-Folly
[Expo] Enabling modular headers for pod expo-dev-launcher
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Using Expo modules
[Expo] Enabling modular headers for pod ExpoModulesCore
[Expo] Enabling modular headers for pod React-Core
[Expo] Enabling modular headers for pod React-RCTAppDelegate
[Expo] Enabling modular headers for pod expo-dev-menu-interface
[Expo] Enabling modular headers for pod EXManifests
[Expo] Enabling modular headers for pod EXUpdatesInterface
[Expo] Enabling modular headers for pod expo-dev-menu
[Expo] Enabling modular headers for pod RCT-Folly
[Expo] Enabling modular headers for pod expo-dev-launcher
Framework build type is static library
[Codegen] Skipping React-Codegen podspec generation.
Analyzing dependencies
[Codegen] Found FBReactNativeSpec
[Codegen] Found rncore
Downloading dependencies
Generating Pods project
Setting REACT_NATIVE build settings
Setting CLANG_CXX_LANGUAGE_STANDARD to c++17 on /Users/johnottenlips/vestaboard/expo-widgets/example/ios/expowidgets.xcodeproj
Pod install took 6 [s] to run
Integrating client project
expo_patch_react_imports! took 0.0697 seconds to transform files.
Pod installation complete! There are 57 dependencies from the Podfile and 58 total pods installed.

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.
jottenlips commented 5 months ago

The issue may be related to my project being on Expo 50 and this one on Expo 49? going to try an upgrade and will open a PR.

jottenlips commented 5 months ago

nope, example still works on Expo 50. I might just need to remove my ios and android directories so EAS will be forced to run prebuild.

gitn00b1337 commented 5 months ago

Hi, If it works with --clean then it's likely the same issue as issue #14 which is the library currently expects a fresh project and adds the widget configs required for iOS. If you already have a prebuild, it'll then add more config and sometimes this causes a problem. Adjusting the library to work on existing prebuilds is on my TODO list when I have the time, but it is likely to be quite a bit of work. For your case, you're using EAS build but that WILL take into consideration whether you have a prebuild already locally. So, either prebuild locally with --clean, or delete the iOS folder generated and try it again. Let me know how you get on

jottenlips commented 5 months ago

Deleting the iOS and Android folders and removing my extra nested folder structure worked for me. My widget is now at ./widgets/ios instead of /widgets/ios/widget-prod. This seemed to clear up the no parent for object WidgetBundle.swift Error on pod install. I also got the error locally when rerunning pod install from the prebuilt iOS folder.

We are letting EAS run the prebuild command now. Thank you!