Expo 48 Build Fastlane Err 'no template named "unary_function"

Please provide the following:

  1. SDK Version: 48.0.20
  2. Platforms(Android/iOS/web/all): iOS

#else
template
struct hash_base : std::unary_function<T, std::size_t> {};
^ no template named ‘unary_function’ in namespace ‘std’; did you mean ‘__unary_function’?
#endif
struct enable_hash_value { typedef std::size_t type; };

I think the build error is related to this No template named ‘unary_function’ in namespace ‘std’; did you mean ‘__unary_function’?

Update: We tried to do a prebuild, then fix the C++ error manually, then build but that also didn’t work. We found a workaround where by doing a prebuild then build in XCode and sent to Apple App Store Connect via XCode, but would love to not have to do this.

We are also facing similar issue with iOS builds since last one day.
We are using Expo SDK 47.

Here are the brief details about build.
Build ID: 732e5bf6-db34-49b1-9161-0dd5779ccdb5
Full name: @loot8/loot8-app
Project ID: b5788999-ddd8-43a7-8c65-102469f18ee8

Error during “Run Fastlane” task

(ios/Pods/boost/boost/container_hash/hash.hpp:131:33)

  129 | #else
  130 |         template <typename T>
> 131 |         struct hash_base : std::unary_function<T, std::size_t> {};
      |                                 ^ no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
  132 | #endif
  133 | 
  134 |         struct enable_hash_value { typedef std::size_t type; };
1 Like

Up.
Any answer regarding the issue?

It looks like this is caused by compiling with Xcode 15. If you don’t need Xcode 15, you can choose a different image that has Xcode 14. e.g. the default macos-ventura-13.4-xcode-14.3.1 (a.k.a. default).

If you need to use Xcode 15, then you might need to upgrade to Expo SDK 49 and React Native 0.72.5 or wait for React Native to release updates for older versions of React Native to work with Xcode 15.

As the Xcode 15 and iOS 17 post says:

Xcode 15 and iOS 17 were released on Monday, September 18th. Since then, we’ve released the following improvements to our tools and services in order to fully support these new versions.

React Native 0.72.5 is now recommended for SDK 49 (the previously recommended version was 0.72.4). This patch release includes support for Xcode 15. If you are using SDK 49, we recommend upgrading to this version if you build locally and have Xcode 15 installed, or if you would like to use Xcode 15 on EAS Build. You can install it with npx expo install --fix.

Note: We will be updating the recommended React Native patch version for SDK 47 and 48 when new versions are released with support for Xcode 15.

1 Like