skip to Main Content

I have a project connected to the FirebaseSDK which runs perfectly fine in Build, Simulator, Preview, and when Run on my iPhone 16 Pro.

However, I need to use the GoogleMaps SDK. When I install the package (https://github.com/googlemaps/ios-places-sdk) following the instructions from Google’s documentation, my project breaks. It still builds successfully and will run on my device, but no files will preview anymore. This is huge headache when trying ot make incremental changes since I have to constantly run the project on my phone to see confirm my changes were successful as intended.

It seems like the package is not fully installing everything it needs. When I run the project i get the error message


    Cannot preview in this file
    Failed to launch *mybundleid*

When I view the diagnostics, I get a message:


    [Remote] CouldNotLoadInputStaticArchiveFile: Could not load static archive during preview: /Users/Brandon_1/Library/Developer/Xcode/DerivedData/<projectName>-edjwkkhkgvjnpgcgtmecmarculee/Build/Products/Debug-iphonesimulator/GooglePlaces.a

    path: /Users/Brandon_1/Library/Developer/Xcode/DerivedData/<projectName>-edjwkkhkgvjnpgcgtmecmarculee/Build/Products/Debug-iphonesimulator/GooglePlaces.a

I’ve tried several different troubleshooting attempts, excluding the arm64 architecture from debug, removing and reinstalling the package. Installing the Google Maps iOS Utils package and nothing seems to work.

Several help articles included instructions to download the XCframework or .a file manually and drag them into the project, I’ve attempt to do that as well but cannot without causing additional errors that indicate duplicate projects or files.

Would love to better understand how XCode packages its projects and handles package dependencies in order to resolve this, or if anyone has a solution, much appreciated!

2

Answers


  1. Not a fix, but a workaround is to enable "Legacy Previews Execution":

    Editor > Canvas > Use Legacy Previews Execution

    Login or Signup to reply.
  2. We removed Google Places iOS SDK from our project and switched to Google Web Service / Place API. We make simple URL requests for our needs and don’t need the SDK anymore. You need to have a valid key though.

    https://developers.google.com/maps/documentation/places/web-service/overview

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search