Code Monkey home page Code Monkey logo

Comments (8)

descorp avatar descorp commented on June 9, 2024 1

Hey @harryblam

Indeed.. We are looking towards #if targetEnvironment(simulator) now

UPD

I can confirm that #if targetEnvironment(simulator) works.

from adyen-wechatpay-ios.

descorp avatar descorp commented on June 9, 2024

Hey @harryblam

Unfortunately WeChat lib does not support arm64, even the latest version 1.9.2.

from adyen-wechatpay-ios.

harryblam avatar harryblam commented on June 9, 2024

Hi @descorp , thanks for the quick reply!

That really sucks from their side. Do you think that there could be a way around this by recompiling the WeChat framework from scratch and including the arm64 binaries in the Adyen XCFramework package?

from adyen-wechatpay-ios.

descorp avatar descorp commented on June 9, 2024

Hey @harryblam

Seems like we can ignore WeChat by using arch(arm64).
Will investigate further.

#if arch(arm64)
        return false
    #else
        WXApi.registerApp("", universalLink: "")
        return WXApi.isWXAppInstalled() && WXApi.isWXAppSupport()
#endif

from adyen-wechatpay-ios.

harryblam avatar harryblam commented on June 9, 2024

Nice find! This could indeed help for development purposes, however this wouldn't work in production though, as arm64 is the current iOS CPU architecture (used since the iPhone 5S) right?

We would need to find a way to ignore only iOS arm64 simulator architecture as far as i'm aware.

from adyen-wechatpay-ios.

harryblam avatar harryblam commented on June 9, 2024

The below issue ticket links to an article that says that we could set the project VALID_ARCHS to exclude arm64, but again I think that there will be a problem running on device in that case.

https://developers.weixin.qq.com/community/develop/doc/0008a0b0f90e80a7520b4c0055b400

The only solution I can see here is to re-create an XCFramework here with the correct simulator architecture included....

from adyen-wechatpay-ios.

harryblam avatar harryblam commented on June 9, 2024

Thanks @descorp , this is a nice workaround ☝️

I'm happy to close this issue if you are. However it's useful information for future onlookers who may have the same issue.

I will leave it to you to decide, thanks!

from adyen-wechatpay-ios.

descorp avatar descorp commented on June 9, 2024

I'll pin it :)

from adyen-wechatpay-ios.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.