Skip to content

Error: Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules #247

@JoeM-RP

Description

@JoeM-RP

While attempting to add the AEPCore SDK to my iOS app, I encountered an issue preventing the code from compiling.

Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules

Expected Behaviour

After adding AEPCore SDk and running pod install, the app should build and run successfully on iOS

Actual Behaviour

During build phase, the following error causes the build to fail: Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules

Reproduce Scenario (including but not limited to)

Create a new React Native app using Expo: npx create-expo-app my-app

Install AEPCore SDK via npm: npm install @adobe/react-native-aepcore

"Prebuild" to expose iOS folder: expo prebuild --platform ios

Ensure pods installed via: cd ios && pod install

Add imports to AppDelegate.h and implementation to AppDelegate didFinishLaunchingWithOptions per README

Build and run the project via expo run:ios or via XCode

Build fails

Platform and Version

Issue occurs only for iOS. Android integration works as expected

"@adobe/react-native-aepcore": "^1.0.0",
"expo": "~47.0.12",
"react": "18.1.0",
"react-native": "0.70.5",

Sample Code that illustrates the problem

Sample attached:
adobe-sample-expo-react-native.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions