ios-maps-sdk icon indicating copy to clipboard operation
ios-maps-sdk copied to clipboard

GoogleMaps SDK breaks SwiftUI Previews

Open ztepsa opened this issue 1 year ago • 0 comments

Adding GoogleMaps SDK using SPM into the project breaks SwiftUI previews from working.

Environment details

MacOS Sequoia 15.0.1 (24A348) Xcode 16.0 (16A242d) Google Maps SDK For iOS Swift package 9.1.1

Steps to reproduce

  1. Open Xcode and create new iOS project
  2. Start SwiftUI Previews for ContentView and observe that SwiftUI Previews are working (check screenshots)
  3. Add Google Maps SDK For iOS Swift package using SPM (check screenshots)
  4. Import GoogleMaps framework into the ContentView
  5. Try to start the SwiftUI Previews and observe that they are not working (check screenshots)

Screenshots

Previews working

previews-working

Previews not working

previews-not-working previews-not-working-error

SPM integration

previews-issues-spm-integration

Previews error log

== DATE:

    Wednesday, 9 October 2024 at 10:42:20 Central European Summer Time
    
    2024-10-09T08:42:20Z



== PREVIEW UPDATE ERROR:

    FailedToLaunchAppError: Failed to launch com.example.PreviewsTesting
    
    ==================================
    
    |  [Remote] JITError
    |  
    |  ==================================
    |  
    |  |  [Remote] LLVMError
    |  |  
    |  |  LLVMError: LLVMError(description: "file too small to be an archive")



== PREVIEW UPDATE ERROR:

    FailedToLaunchAppError: Failed to launch com.example.PreviewsTesting
    
    ==================================
    
    |  [Remote] JITError
    |  
    |  ==================================
    |  
    |  |  [Remote] LLVMError
    |  |  
    |  |  LLVMError: LLVMError(description: "file too small to be an archive")



== VERSION INFO:

    Tools: 16A242d
    OS:    24A348
    PID:   43949
    Model: MacBook Pro
    Arch:  arm64e



== ENVIRONMENT:

    openFiles = [
        /Users/ztepsa/Projects/Fun/PreviewsTesting/PreviewsTesting/ContentView.swift
    ]
    wantsNewBuildSystem = true
    newBuildSystemAvailable = true
    activeScheme = PreviewsTesting
    activeRunDestination = iPhone 16 Pro variant iphonesimulator arm64
    workspaceArena = [x]
    buildArena = [x]
    buildableEntries = [
        PreviewsTesting.app
    ]
    runMode = JIT Executor



== SELECTED RUN DESTINATION:

    Simulator - iOS 18.0 | iphonesimulator | arm64 | iPhone 16 Pro | no proxy



== EXECUTION MODE OVERRIDES:

    Workspace JIT mode user setting: true
    Falling back to Dynamic Replacement: false



== PACKAGE RESOLUTION ERRORS:

    



== REFERENCED SOURCE PACKAGES:

    <IDESwiftPackageCore.IDESwiftPackageDependency:0x340906280 path:'/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/SourcePackages/checkouts/ios-maps-sdk'>



== JIT LINKAGE:

    Run Destination: B9B2F88A-4EDF-43EA-85C9-04F10F66A577-iphonesimulator18.0-arm64-iphonesimulator
    JIT Link Description {
        7:PreviewsTesting.app
    }
    



== SESSION GROUP 879:

    workspace identifier: WorkspaceIdentifier(identifier: EE38763D-F621-4111-AAE2-247A82D4D041)
    providers: [
        Preview Provider | Registry-ContentView.swift#1[preview] [Editor(846)]
    ]
    translation units: [
        /Users/ztepsa/Projects/Fun/PreviewsTesting/PreviewsTesting/ContentView.swift
    ]
    attributes: [
        Editor(846):     []
    ]
    session: 884
    request sessions: [
        Registry[Registry-ContentView.swift#1[preview] (line 16)]: not completed
    ]



== UPDATE SESSION 884:

    Start Date: Wednesday, 9 October 2024 at 10:42:02 Central European Summer Time
    Preview Preflight {
        UpdaterStore {
            updaterLimit: single
            expectedAbandonedIdentifiers: [896, 604, 539, 750, 834]
        }
        Simulator {
            platform: iphonesimulator
            device: BF29C9DD-23CF-403C-82D5-8A799B02DD75 iPhone 16 Pro
            buildNumber: 22A3351
            runtimePath: /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime
        }
        host bundle: 
        com.example.PreviewsTesting {
            url: file:///Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator/PreviewsTesting.app
            version: 889
            signingInformation: 
            Code Signing {
                identifier: com.example.PreviewsTesting
                hasGetTaskAllow: false
                isSandboxed: false
            }
            attributes: [
                AppExtensionIdentifierPreviewAttributeKey: nil,
                LaunchConfigEnvironmentVariablesPreviewAttributesKey: ["OS_ACTIVITY_TOOLS_PRIVACY": "YES", "OS_LOG_DT_HOOK_MODE": "0x07", "OS_LOG_DT_HOOK_PREFIX": "OSLOG-663AEE01-FD18-4428-8C91-46420629534F", "OS_ACTIVITY_TOOLS_OVERSIZE": "YES", "DYLD_FRAMEWORK_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "SQLITE_ENABLE_THREAD_ASSERTIONS": "1", "PACKAGE_RESOURCE_BUNDLE_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "__XCODE_BUILT_PRODUCTS_DIR_PATHS": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "__XPC_DYLD_FRAMEWORK_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "IDE_DISABLED_OS_ACTIVITY_DT_MODE": "1", "CFLOG_FORCE_DISABLE_STDERR": "1", "OS_LOG_TRANSLATE_PRINT_MODE": "0x80", "TERM": "dumb", "__XPC_DYLD_LIBRARY_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "DYLD_INSERT_LIBRARIES": "/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libLogRedirect.dylib", "DYLD_LIBRARY_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator"],
                AgentRoleKey: Previews,
                AgentRunModeKey: JIT Executor,
                LaunchConfigArgumentsPreviewAttributesKey: [],
                AgentCompanionAppBundleIdentifierKey: nil,
            ]
        }
        builtTargetDescriptions: Build Logs/ResolvedBuiltTargetDescriptions-request-1-com.example.PreviewsTesting.txt
    }
    Preview Provider {
        UpdaterStore {
            updaterLimit: single
            expectedAbandonedIdentifiers: [896, 604, 539, 750, 834]
        }
        Simulator {
            platform: iphonesimulator
            device: BF29C9DD-23CF-403C-82D5-8A799B02DD75 iPhone 16 Pro
            buildNumber: 22A3351
            runtimePath: /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime
        }
        host bundle: 
        com.example.PreviewsTesting {
            url: file:///Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator/PreviewsTesting.app
            version: 889
            signingInformation: 
            Code Signing {
                identifier: com.example.PreviewsTesting
                hasGetTaskAllow: false
                isSandboxed: false
            }
            attributes: [
                AppExtensionIdentifierPreviewAttributeKey: nil,
                LaunchConfigEnvironmentVariablesPreviewAttributesKey: ["OS_ACTIVITY_TOOLS_PRIVACY": "YES", "OS_LOG_DT_HOOK_MODE": "0x07", "OS_LOG_DT_HOOK_PREFIX": "OSLOG-663AEE01-FD18-4428-8C91-46420629534F", "OS_ACTIVITY_TOOLS_OVERSIZE": "YES", "DYLD_FRAMEWORK_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "SQLITE_ENABLE_THREAD_ASSERTIONS": "1", "PACKAGE_RESOURCE_BUNDLE_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "__XCODE_BUILT_PRODUCTS_DIR_PATHS": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "__XPC_DYLD_FRAMEWORK_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "IDE_DISABLED_OS_ACTIVITY_DT_MODE": "1", "CFLOG_FORCE_DISABLE_STDERR": "1", "OS_LOG_TRANSLATE_PRINT_MODE": "0x80", "TERM": "dumb", "__XPC_DYLD_LIBRARY_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator", "DYLD_INSERT_LIBRARIES": "/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libLogRedirect.dylib", "DYLD_LIBRARY_PATH": "/Users/ztepsa/Library/Developer/Xcode/DerivedData/PreviewsTesting-hlfgqutbnbrnkqgawasfimvwzicv/Build/Products/Debug-iphonesimulator"],
                AgentRoleKey: Previews,
                AgentRunModeKey: JIT Executor,
                LaunchConfigArgumentsPreviewAttributesKey: [],
                AgentCompanionAppBundleIdentifierKey: nil,
            ]
        }
        builtTargetDescriptions: Build Logs/ResolvedBuiltTargetDescriptions-request-2-com.example.PreviewsTesting.txt
    }
    Build Graph {
        PreviewsTesting.app (#7)
           GoogleMaps (#4)
              GoogleMapsTarget (#3)
                 GoogleMapsCoreTarget (#1)
                 GoogleMapsBaseTarget (#2)
           sourceFile(file:///Users/ztepsa/Projects/Fun/PreviewsTesting/PreviewsTesting/ContentView.swift -> ContentView.swift) (#5)
           ContentView.swift (#6)
    }
    Update Plan {
        iOS [arm64 iphonesimulator18.0 iphonesimulator] (iPhone 16 Pro, B9B2F88A-4EDF-43EA-85C9-04F10F66A577-iphonesimulator18.0-arm64-iphonesimulator), [], thinning disabled, thunking enabled) {
            Destination: iPhone 16 Pro B9B2F88A-4EDF-43EA-85C9-04F10F66A577 | default device for iphonesimulator [
                PreviewsTesting app - Previews {
                    execution point packs [
                        [source: ContentView.swift, role: Previews] (in PreviewsTesting)
                    ]
                    translation units [
                        ContentView.swift (in PreviewsTesting.app)
                    ]
                    modules [
                        GoogleMaps
                        GoogleMapsBaseTarget
                        GoogleMapsCoreTarget
                        GoogleMapsTarget
                        PreviewsTesting.app
                    ]
                    jit link description [
                        PreviewsTesting.app
                    ]
                }
            ]
        }
    }



== POWER STATE LOGS:

    09. 10. 2024., 10:29 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 68%)
    09. 10. 2024., 10:29 Broadcasting device power state: Mid Power
    09. 10. 2024., 10:29 No device power state user override user default value.
    09. 10. 2024., 10:30 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 67%)
    09. 10. 2024., 10:32 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 66%)
    09. 10. 2024., 10:34 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 65%)
    09. 10. 2024., 10:36 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 64%)
    09. 10. 2024., 10:38 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 63%)
    09. 10. 2024., 10:40 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 62%)
    09. 10. 2024., 10:42 Received power source state: Battery Powered (lowPowerMode: false, status: unplugged, level: 61%)Current power state: Mid Power

ztepsa avatar Oct 09 '24 08:10 ztepsa