Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build Swift Algorand SDK in apple M1 processer #31

Open
MadushanSenavirathna opened this issue Apr 26, 2022 · 4 comments
Open

Comments

@MadushanSenavirathna
Copy link

MadushanSenavirathna commented Apr 26, 2022

Version

Swift Algorand SDK Version - Latest 1.1.0
Xcode version - Version 13.2.1
iPhone simulator - iOS 15.2

Problem

When doing Xcode project build Algorand SDK showing missing import message. I have posted the error message billow.

Could not find module swift algorand sdk' for target x86_64-apple-ios-simulator: found: arm64,
arm64-apple-ios-simulator, at: /Users/madushansenavirathna/Librarv/Developer/Xcode/DerivedData
PagoWallet-evpbpapxecehakezlwvedywaomtm/Build/Products/Debug-iphonesimulator
swifT_algorand_sak.swintmodule

This project run with apple M1 silicon processor default Xcode excluded architecture coming with arm64 also added x86_64 for project targets and the SDK targets but remaining the same issue.

Change Build Settings > Excluded Architectures >

Debug : x86_64 arm64
          Any iOS Simulator SDK : x86_64 arm64
Release:  x86_64 arm64
          Any iOS Simulator SDK : x86_64 arm64

Also we Changed User-Defined from Targets > Build Settings

Targets > Build Settings > User-Defined added Valid_ARCH

Valid_ARCH:  arm64 armv7 i386 x86_64
         Release: arm64 armv7 i386 x86_64
         Debug: arm64 armv7 i386 x86_64

Finally we tried to build XCFramework combine with x86_64 and arm64 binaries but this Swift Alfgorand SDK only supporting Swift Package Manger

Please give us any suggestion to resolve this problem combine with two binaries by using XCFramworks in CoCoapods or if you can resolve this issue or update this library from your side let us know.

Thank you.

@stefanomondino
Copy link
Contributor

hi @MadushanSenavirathna, while we double check this particular situation can you please try Cocoapods? We've added support to it in latest release.

Asking this since I'm also using a M1 processor (with no need to exclude any architecture at all) and have zero issues compiling it.

Also I'm not sure what you mean with this:

Please give us any suggestion to resolve this problem combine with two binaries by using XCFramworks in CoCoapods

@stefanomondino
Copy link
Contributor

Also, please try these:

  1. download the SDK demo from here -> https://github.com/Jesulonimi21/swift-algorand-sdk-ios-showcase
  2. try to compile it on your simulator (it's working on my M1).
  3. update the SDK inside the demo (right click on swift-algorand-sdk on the package dependencies, update)
  4. compile again (still working on my M1)

@MadushanSenavirathna
Copy link
Author

MadushanSenavirathna commented Apr 29, 2022 via email

@stefanomondino
Copy link
Contributor

@MadushanSenavirathna pod "swift-algorand-sdk" should do the trick :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants