Search Unity

DeObfuscate not implemented

Discussion in 'Unity IAP' started by Sherwinnie, Apr 15, 2021.

  1. Sherwinnie

    Sherwinnie

    Joined:
    Jan 24, 2020
    Posts:
    18
    I upgraded my IAP from previous version to 3.0.2 (showing 3.0.1 in project, but Package Manager says 3.0.2). It was working fine before, but I want to make sure I upgraded it int time. However, when I make the validater from AppleTangle and GoogleTangle, it throws a DeObfuscate Not Implemented Error. I looked into the source code, and sure enough it does throw a Not Implemented Error. I downloaded the sample project and check how to use Validation with the new version. However, in the sample project, DeObfuscate is implemented, and now I am...just kind of confused.

    So, what can I do now?

    ps. I know someone already asked a similar problem, but that thread...was not very helpful.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    10,282
    This is expected if you are running in the Editor. You just need to use a Try/Catch block. There is an example in the Sample IAP Project v2 https://forum.unity.com/threads/sample-iap-project.529555/#post-6950270
     
    Sherwinnie likes this.
  3. John_Corbett

    John_Corbett

    Unity Technologies

    Joined:
    May 17, 2019
    Posts:
    77
    Hi @Sherwinnie

    Just to clarify, that exception you see is normal on any non-Google, non-Apple platform. We don't support it on other platforms nor in-Editor Play Mode.

    Jeff's proposed solution is what I'd recommend. You don't need to do anything in the Exception catch block.
     
    Sherwinnie likes this.
  4. Sherwinnie

    Sherwinnie

    Joined:
    Jan 24, 2020
    Posts:
    18
    I can see the reason why it is currently it is done the way it is now. However, I just feel like this is an overkill. Instead of having to use try catch block whenever I call the function, as a user, I would much rather have the function prints something to the console, notifying it will work as normal in Apple or Google platform, but always return true in-Editor.

    It's just...if I have to use try-catch block every time I use the function, then I think it is against the design purpose of a try-catch block in the first-place. In my understanding, try-catch block is for situations where the function may or may not work in the run-time, not for functions we know 100% will fail in-Editor, but 100% will work in Build, since the function is actually working "normally." Plus, it is just an extra step to go through. I think in the future, someone will definitely ask the same question here again, since this change isn't really documented in code or anywhere, nor is it very intuitive.

    Just my thought though, thanks for providing an answer!
     
    justtime and JeffDUnity3D like this.
unityunity