Riskified / ios_sdk

Riskified iOS SDK
Apache License 2.0
3 stars 7 forks source link

Add support for Apple Silicon #3

Open DagAgren opened 3 years ago

DagAgren commented 3 years ago

The current release does not support developing on Apple Silicon Macs. The .a file does not contain object files for arm64 Simulator builds.

marko-asplund commented 2 years ago

Any chance of getting Apple Silicon builds of this library @mooseriskified @dormini ?

username0x0a commented 2 years ago

master already contains arm64 slices for both the devices and the Simulators, see:

https://github.com/Riskified/ios_sdk/tree/master/RiskifiedBeacon.xcframework

The .a lib hasn't been updated for ages and it's not very well designed for multi-architecture distribution. xcframework is the way to go.

mooseriskified commented 2 years ago

@marko-asplund you can find the arm64 build in the xcframework repo as mentioned by @username0x0a

marko-asplund commented 2 years ago

Thanks @username0x0a & @mooseriskified ! 🙇‍♂️

rresma2 commented 2 years ago
Screen Shot 2022-01-27 at 1 16 08 PM

Getting the following compiler when trying to compile on the latest Xcode 13.2.1 for simulator on iOS 15 using the approach above regarding xcframework. Is there a workaround? It's blocking our team's effort to upgrade to the latest Xcode

username0x0a commented 2 years ago

@rresma2 Which version of framework is that? 🤔 We're using 1.2.9 on Xcode 13.2.1 just fine here. Although targeting iOS only 13+ for some time.

rresma2 commented 2 years ago

Interesting. So after taking a closer look at the logs it seems like it's complaining about another library. Wondering why it's printing an error message for Riskified though. How might I go about checking the version number btw?

Dependencies could not be resolved because no versions of 'firebase-ios-sdk' match the requirement 8.6.0 and root depends on 'firebase-ios-sdk' 8.6.0.

InternalError(description: "Internal error. Please file a bug at https://bugs.swift.org with this info. unknown binary artifact for \'Riskified\'")
mooseriskified commented 2 years ago

@rresma2 if you are using XCFramework then there is only one version so far 1.2.9. I am curious to see if you figure out why the error message included Riskified

rresma2 commented 2 years ago

Hey @mooseriskified ~ Sorry for the late reply. Ended up figuring it out. Very subtle thing.l Turns out the binaryTarget's name and path extension name need to match.

Before .binaryTarget(name: "Riskified", path: "Sources/Frameworks/RiskifiedBeacon.xcframework"),

After .binaryTarget(name: "RiskifiedBeacon", path: "Sources/Frameworks/RiskifiedBeacon.xcframework"),

Here's a link to where we found our solution https://support.zendesk.com/hc/en-us/community/posts/4429572484762-Xcode-13-3-Beta-3-artifact-not-found-for-target