Expand my Community achievements bar.

SOLVED

Error while importing AEPCore module

Avatar

Level 1

Hello, 

I am trying to import AEPCore module in my objective-c file using

 

@Import AEPCore;

 

but seeing following build error : - 

Undefined symbols for architecture x86_64:

"_OBJC_CLASS_$_AEPMobileCore", referenced from:

      objc-class-ref in AEPUtils.o

 

Ignoring file /<DERIVED_DATA_DIRECTORY>/Build/Products/Debug.Stage-iphonesimulator/AEPCore.o, building for iOS Simulator-x86_64 but attempting to link with file built for unknown-arm64

 

Undefined symbol: _OBJC_CLASS_$_AEPMobileCore 

 

When I saw supported architecture for the AEPCore library code, it was only available for ARCHS_STANDARD, due to this project's build is failing.

 

Also when we are trying to import the same lib in swift file, seeing following error

Could not find module 'AEPCore' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator, at: /Users/nbhawsar/Library/Developer/Xcode/DerivedData/Theo-aagcberfiecdfmgpwhvoojbngfoy/Build/Products/Debug.Stage-iphonesimulator/AEPCore.swiftmodule

 

Any help for this error is much appreciated.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 1

it also looks like you are maybe using an m1 and trying to build for simulator which means you are running into architeture issues.  For a quick workaround turn on rosetta for xcode and simulator so that it doesn't try to build everything as arm64 architecture for the sim

View solution in original post

3 Replies

Avatar

Employee

Which version of SDK are you using? If it is not the latest, could you try with the latest?

Avatar

Level 1

Undefined symbol: _OBJC_CLASS_$_AEPMobileCore 

 

means that the library is not linked

 

try to go into the "build phases" section of the target's settings in xcode and ensure that under 'link binary with libraries' that the AEP libraries are listed there

 

Avatar

Correct answer by
Level 1

it also looks like you are maybe using an m1 and trying to build for simulator which means you are running into architeture issues.  For a quick workaround turn on rosetta for xcode and simulator so that it doesn't try to build everything as arm64 architecture for the sim