19

System specification: Mac-in-cloud (v 12.3.1) 8 GB. XCODE 13.4

Few months ago we had created a project in xcode on mac-in-cloud. It was working fine and we pushed it on git then rented another mac-in-cloud to test even then project was working fine.

Now a bug come in our app so we rented another mac-in-cloud, pulled code and try to run it but getting this error:

Building for iOS Simulator, but linking in object file built for iOS, file '/Users/user220716/Desktop/Project/[project_name]/platforms/ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/GoogleMaps' for architecture arm64

I tried many solutions of similar questions even some same questions like this and this. But problem didn't solved.

Thank you in advance.

    6 Answers 6

    25

    The second link in your question should be the same problem you have. The solution is basically add arm64 to Excluded Architecture.

    enter image description here

    2
    • 1
      Not sure why Xcode allows editing this line as a string, you should not do that, double tap to get a pop-up.
      – MikeL
      CommentedNov 23, 2022 at 4:39
    • it's worked for meCommentedAug 3, 2024 at 17:35
    10

    This is an old question, but I ran into it while migrating from an intel based Mac to an M2 based Mac.

    While there are many questions with a similar issue, for example this one, most of those seem to be related to intel based Macs running on Xcode versions supporting Apple Silicon.

    This particular question mentions GoogleMaps which is the same library I had an issue with. During my research I found this issue opened on GoogleMaps that explains the issue along with some possible solutions, which for me would have required a manual installation of the library.

    enter image description here

    I was able to resolve my issue by simply changing my Podfile to use version 8 of GoogleMaps.

    pod 'GoogleMaps', '~>8.0' 
      6

      After a hour's search below solution work for meenter image description here

      if Above one not work try this only its work for me go to finder -> Applications -> xcode (right click on xcode got to get info and check mark the option open using roseeta) again open the XCODE enter image description here

      4
      • It not work for me
        – phuocantd
        CommentedNov 14, 2022 at 14:38
      • phuocantd try second as i describe in 2nd image its work for meCommentedNov 15, 2022 at 15:51
      • I add installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end in Podfile and it work for me
        – phuocantd
        CommentedNov 16, 2022 at 16:14
      • 4
        It worked for me but what is the explanation? I mean, iOS on iPhone and the simulator on M1 Mac run on the same architecture (arm64), right? Why should I exclude arm64 for the simulator build? Is XCode on M1 Mac running simulators using x64 arch? 🤔CommentedDec 2, 2022 at 3:58
      1

      After using a lot of solution nothing work for me, if add arm64 iOS archive failed and if remove arm64 then failed to run on iOS Simulator :-(

      easy and technical solution 

      enter image description here

        1
        1. ( softwareupdate --install-rosetta ) -> In terminal
        2. Product -> destination -> Show All run Destination (In XCode)
        3. Now you can see Rosetta simulator in additions.
        4. Select any one of Rosetta simulator and run.
          0

          I made Build Active Architectures from YES to NO in the build settings for the project and then Xcode 15 asked me if I want to run with Rosetta simulators, I said "hell yea!". Then the build failed. But I switched Build Active Architectures back to YES and running it still with Rosetta worked. The issue I have is GoogleWebRTC not building in non Rosetta simulators in Xcode 15.

            Start asking to get answers

            Find the answer to your question by asking.

            Ask question

            Explore related questions

            See similar questions with these tags.