Static structure associated with Cocoapod not found in main project

I am trying to add a static structure (Moya) to my own Cocoapod project through Carthage.

My goal is to include Moya as a static frame in my personal Cocoapod (SwiftModel) and use Moya also in my main project (since SwiftModel has a dependency on it).

I added Moya to my structure by following these steps:

  • podspec file link structure

    s.vendored_frameworks = 'SwiftModel/Carthage/Build/iOS/Moya.framework'

  • add Moya to the private structure (Link Binary With Libraries)

enter image description here

So, inside my Pods project, it looks like this:

enter image description here

Attempting to add the path to the "Framework Header Search Path" did not make any changes. I tried to add it to the main project and to the pods project.

When only building a private building, everything works fine, and Moya admits. However, if I want to build the main project (including my private module), I always get this error:

Moya not found for arm64 architecture

enter image description here

+8
swift cocoapods carthage moya
source share
1 answer

As stated in your error,

Moya not found for arm64 architecture

This means that Moya is not available for arm64 architecture, but your main project has the following architectures: arm64, armv7, armv7s. Remove the arm64 from your main project architecture.

  • Also add -Objc to other link flags.
  • Try adding libz to the link library section of your project

IOS Support Matrix Support: -

enter image description here

+2
source share

All Articles