Skip to content

[Bug]: When the SDK is added via Pod, the preview in Xcode fails to display. #154

@takashico

Description

@takashico

Platform

iOS

Platform Version

iOS 18.3

Braze SDK Version

11.9.0

Xcode Version

Xcode 16.2.0

Computer Processor

Apple (M1)

Repro Rate

100 %

Steps To Reproduce

  1. Add 'BrazeKit', 'BrazeUI', and 'BrazeLocation' via Pod.
  2. Run the SwiftUI preview.
  3. The preview fails to display.

Expected Behavior

We can preview the view in Xcode.

Actual Incorrect Behavior

The preview fails to display.

Image

Verbose Logs

== PREVIEW UPDATE ERROR:

    FailedToLaunchAppError: Failed to launch example.test.BrazeTest
    
    ==================================
    
    |  [Remote] JITError
    |  
    |  ==================================
    |  
    |  |  [Remote] CouldNotLoadInputStaticArchiveFile: Could not load static archive during preview: /Users/xxxxxx/Library/Developer/Xcode/DerivedData/BrazeTest-xxxxxx/Build/Products/Debug-iphonesimulator/BrazeUI/BrazeUI.framework/BrazeUI
    |  |  
    |  |  path: /Users/xxxxxx/Library/Developer/Xcode/DerivedData/BrazeTest-xxxxxx/Build/Products/Debug-iphonesimulator/BrazeUI/BrazeUI.framework/BrazeUI
    |  |  
    |  |  ==================================
    |  |  
    |  |  |  [Remote] LLVMError
    |  |  |  
    |  |  |  LLVMError: LLVMError(description: "Duplicate definition of symbol \'$.Resources.o.__inits.0\'")

== SELECTED RUN DESTINATION:

    Simulator - iOS 18.2 | iphonesimulator | arm64 | iPhone 16 | no proxy

Additional Information

  • If either 'BrazeUI' or 'BrazeLocation' is not included in the Pod, the preview works correctly.
  • If added via SPM, the preview works without any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions