EvanBacon / expo-apple-targets

Config Plugin to setup Apple targets
308 stars 30 forks source link

expo SDK 51 => autolink failed #41

Closed nemoneph closed 2 months ago

nemoneph commented 2 months ago

Hello, On the last expo version (51.0.28), it's generate an error on prebuild / pod install :

Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v18.18.0/bin/node
[!] Invalid `Podfile` file: undefined method `[]' for nil:NilClass.
 #  from /Users/expo/workingdir/build/ios/Podfile:27
 #  -------------------------------------------
 #    else
 >      origin_autolinking_method.call()
 #    end
 #  -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
- Couldn't install Pods. Updating the Pods project and trying again...
> pod install --repo-update
- Couldn't install Pods. Updating the Pods project and trying again...
Using Expo modules

Revert back to : 51.0.26 resolve the problem

It's seem link with this PR : https://github.com/expo/expo/pull/30914 but I don't have any clue about this.

Thx :)

nemoneph commented 2 months ago

Fixed on expo 51.0.31.

rogerfuentes commented 3 weeks ago

I'm having the same issue on a managed workflow (I'm not sure if the library is only meant to be used on bare workflows) I'm using expo@51.0.38.

If I run npx expo prebuild the pod installation step works without problems.

wodin commented 3 weeks ago

@rogerfuentes the EAS Build servers automatically run npx expo prebuild if there are no android/ios directories, so it's strange that running npx expo prebuild would work for you.

What happens if you add the following to .gitignore and then try to build? It should cause the build servers to run the prebuild:

/android/
/ios/

Note: I haven't actually used expo-apple-targets myself yet