afterpay / sdk-ios

Afterpay iOS SDK
https://developers.afterpay.com
Apache License 2.0
20 stars 10 forks source link

Multiple commands produce xxx/xxx/Assets.car' #252

Closed fruitsw closed 1 year ago

fruitsw commented 1 year ago

🌎 iOS

💬 Description

pod 'Afterpay', '~> 5.3' pod install build log error

🦶 Reproduction Steps

build error

Steps to reproduce the behavior:

  1. build

🌳 Logs

Showing Recent Messages

Prepare build
note: Building targets in dependency order
error: Multiple commands produce xxx/xxx/Assets.car'
    note: Target 'Y' (project 'Y') has compile command with input 'xxx/xxxx/Y-Assets.xcassets'
    note: That command depends on command in Target 'Y' (project 'Y'): script phase “[CP] Copy Pods Resources”

Building targets in dependency order

Multiple commands produce 'xxx/Build/Products/Debug-iphonesimulator/Y.app/Assets.car'

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: b55eed478d3645579373a4644b10710d
Build description path: xxx/Build/Intermediates.noindex/XCBuildData/b55eed478d3645579373a4644b10710d.xcbuilddata

Build target Y of project Y with configuration Debug
warning: duplicate output file 'xxx/Build/Products/Debug-iphonesimulator/Y.app/Assets.car' on task: PhaseScriptExecution [CP] Copy Pods Resources /xxx/Build/Intermediates.noindex/IVROSE.build/Debug-iphonesimulator/Y.build/Script-2F1330B42282C661001646A1.sh (in target 'Y' from project 'Y')

duplicate output file 'xxx/Build/Products/Debug-iphonesimulator/Y.app/Assets.car' on task: PhaseScriptExecution [CP] Copy Pods Resources /xxx/Build/Intermediates.noindex/IVROSE.build/Debug-iphonesimulator/Y.build/Script-2F1330B42282C661001646A1.sh
fruitsw commented 1 year ago

Instead of resources s/he shall use resource_bundle as the Podspec documentation also strongly recommends. Using resources actually has other disadvantages (resource files are not optimized, name conflicts can arise between different Pods), whereas using a resource bundle is safe, regardless if Pods are embedded as static libraries or as dynamic frameworks. Note, though, that it is not enough to just alter the Podspec, all code that loads bundle resources must be adopted to load them from the correct bundle (the name will be known as when using resource_bundle in a Podspec file, you also must give the bundle(s) a name).

ScottAntonacAP commented 1 year ago

Hello @fruitsw,

Thank you for raising this issue.

An internal ticket has been raised which the team will assess and prioritise. Updates will continue to be posted here.

Thank you.

ScottAntonacAP commented 1 year ago

Hello @fruitsw,

This has been updated in the latest release (v5.4.0).

Thank you again for raising.