iZettle / sdk-ios

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/ios-sdk
Other
82 stars 38 forks source link

iZettle build phase tries to access a directory that does not exist during building, causing build to fail #410

Closed samtgerhart closed 1 year ago

samtgerhart commented 1 year ago

Current Behavior

When building an iOS application that uses iZettle, the build fails at the iZettle-delete unsupported archs iOS build phase because the script tries to access a directory (${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/iZettleSDK.framework) that doesn't exist on my machine.

See "Additional Information" section at the bottom to see the script in question.

Steps to Reproduce

Out of all of my colleagues, I am the only one who experiences this issue. The only way I know how to reproduce the issue is just to delete this directory: ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/iZettleSDK.framework, but I am not sure why this directory just doesn't exist on my machine. I am sorry if this isn't related to iZettle!

The current workaround for me is just deleting the build phase when locally running the app and not committing that change.

Context

I use an M1 Macbook and run Xcode and Terminal using Rosetta

Failure Logs

Screen Shot 2022-11-10 at 1 24 18 PM Screen Shot 2022-11-10 at 1 31 42 PM

Additional Information

In the README, this step is included in the instructions for setting up iZettle:

  1. Create a new “Run Script Phase” in your app’s target’s “Build Phases” and paste the following snippet in the script text field:
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/iZettleSDK.framework/strip-frameworks.sh"

This step is required to work around an App Store submission bug when archiving universal binaries.

davidzettle commented 1 year ago

Hello, please make sure to update your SDK version as version 2.2 was a build from 2019, so it is not supported anymore. You can see our latest SDK releases here: https://developer.zettle.com/docs/ios-sdk/changelog

Regards,