iosalamofireapple-m1xcode15

No such module Alamofire, XCode 15.2 and M1 chip


import Alamofire

Podfile pod 'Alamofire', '~> 5.1.0'

computer:Macbook Air with M1

After I type the command "pod install", the ios project builds and shows the error "No such module Alamofire". Before I upgraded XCode from 14.3.1, the problem existed. Does somebody know how to solve this problem?

pod install

The command type in the terminal, it appears the message as below:

Ignoring ffi-1.15.4 because its extensions are not built. Try: gem pristine ffi --version 1.15.4 Analyzing dependencies Downloading dependencies Generating Pods project Integrating client project Pod installation complete! There are 6 dependencies from the Podfile and 15 total pods installed.

[!] Automatically assigning platform iOS with version 12.0 on target MyApp because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.


Solution

  • I got the answer from the article No such module error in Xcode 12.4 Apple M1

    post_install do |installer|   
          installer.pods_project.build_configurations.each do |config|
            config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
          end
    end