8

I have been trying to update Pods, however, I get this warning every time I run pod update.

enter image description here

Here are the Excluded Architectures of the Project and Pods respectively.

enter image description here

enter image description here

What I've tried

  • Added this snippet to the top of Podfile
post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
end
  • Removed Podfile.lock and Pods directory and run pod install

  • Almost followed this except for adding this snippet since I do not have .podspec file.

s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

It would be great if you have advice and tips.

Thanks.

[Update] February 23, 2021 (PST)

I have not figured out this, can anyone help me to solve it, please?

Things I did additionally

  • Added this snippet to the top Podfile.
post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
    end
  end
end
  • Tried to remove VALID_ARCHS from the Target, however, it's not removable. Also, replace them with blank. Nothing changes.

Curious

This is a screenshot of the build settings of Pods. enter image description here Build Active Architecture Only for Release is currently set No. Even if I change this to Yes, it's overwritten. Is this fine with leaving it as No?

Bob
  • 183
  • 1
  • 10
  • I would advice you to do what I suggested in this answer https://stackoverflow.com/questions/60696726/no-such-module-crashlytics-pod-seems-to-be-missing/60701426#60701426 – Mat Feb 19 '21 at 07:37
  • 1
    @Mat Thank you for your suggestion. I removed all `.workspace`, `Podfile`, `Podfile.lock`, and `Pods` and run `pod init`, and `pod install`. But still getting the warning. – Bob Feb 19 '21 at 07:51
  • Did it work before? Have you made any changes or just updated it? – Mat Feb 19 '21 at 08:03
  • Had never tried before. That was the first time removing them since you suggested for me. – Bob Feb 19 '21 at 08:11
  • I mean, when did you start getting the above error? – Mat Feb 19 '21 at 08:15
  • I updated to Xcode12.4. But it might have been there evem before and I didn't notice the warning. – Bob Feb 19 '21 at 08:18
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/228936/discussion-between-mat-and-bob). – Mat Feb 19 '21 at 08:20
  • I have been suffering the same issue for last 2 months. Any update? Please response! – Tulon Mar 17 '21 at 05:34
  • @Tulon I've been busy and haven't completely solved this issue yet. I haven't even tried what Eric suggested below. In my case, I use real devices and don't use simulators at all when I check if everything works. These warnings are telling us that there may be problems when we use simulators. Even though we see the warnings, it doesn't mean you can't update Pods. I think you have already got the latest SDKs. But if you use simulators, there is nothing that I can say at the moment. Sorry. – Bob Mar 18 '21 at 09:10

1 Answers1

4

In the short term, working around it in your podspec can work. Try this:

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "i386 arm64"
      end
    end
  end
end

See source for more info.

Longer term, start asking those library maintainers to stop relying on user_target_xcconfig.

I maintain GoogleMobileAdsMediationFacebook and we learned this the hard way. The version 6.3.0.0 spec has been updated to set VALID_ARCHS at the pod_target_xcconfig level only. We plan to make the same changse to Google-Mobile-Ads-SDK in an upcoming release. But those other ads SDKs will need to do the same.

Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28