Search Unity

Update IAP plugin 1.19 problem: no known instance method for selector 'introductoryPrice'

Discussion in 'Unity IAP' started by jesusrl, May 24, 2018.

  1. jesusrl

    jesusrl

    Joined:
    Aug 29, 2016
    Posts:
    1
    Hello,

    I have a problem after update the IAP plugin to 1.19. To do it I removed the previous version before the update and after this I clicked import on the services window. The Xcode used on Unity cloud build is 9.0. Unity version used 2018.1.0f2

    The error on UCB is this:
    /BUILD_PATH/GameName.ios-ci-master/temp.XXXXXX20180523-3651-160uhpz/Libraries/Plugins/UnityPurchasing/iOS/UnityPurchasing.m:577:85: no known instance method for selector 'introductoryPrice'

    There are more errors like this but for 'numberOfPeriods', 'subscriptionPeriod' and 'numberOfUnits'

    I have seen this code was added on UnityPurchasing.m after the update, it seems the problem because all the errors lines are here, but I don't know how to solve it
    upload_2018-5-24_12-25-42.png

    Can someone help me with this please?

    Thanks!!!
     
    Last edited: May 24, 2018
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @jesusrl Does this occur in your local build? What version of Unity are you using? Is this error during the IAP import/upgrade?
     
  3. RichardJones

    RichardJones

    Joined:
    May 24, 2018
    Posts:
    3
    We are also experiencing this on Unity 2017.3.1p1.
    Unity IAP was imported with no obvious issues and we didn't have a previous version of the Unity IAP asset installed (as this was the first time we had attempted to use it).
    No errors reported on Windows, but something seems to be amiss when building on iOS, because we are getting very similar errors in UnityPurchasing.m
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    To be clear, the error occurs when you are building the project locally in XCode?
     
  5. RichardJones

    RichardJones

    Joined:
    May 24, 2018
    Posts:
    3
    Yes that's right. No issue on my local machine running Windows, but same code fails to build on XCode.
    All we have done up to that point was download and import the asset.

    From what @jesusrl said, it seems the previous version of the asset was working fine for him on XCode, but we are coming to this new and don't have experience of 1.18
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  7. RakivEldring

    RakivEldring

    Joined:
    Nov 2, 2017
    Posts:
    8
    Jesusrl is my colleague .

    We are having this problem in UCB and Unity 2018.1.0f2. Havent tried local build with 1.19. 1.18 worked fine.
    UCB job is setup to use Xcode 9.0.
     
  8. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Same thing is happening for us: Unity 2017.3.0f3
     
  9. juanmabonet

    juanmabonet

    Joined:
    Jan 12, 2017
    Posts:
    27
    Last edited: May 27, 2018
  10. sensotec

    sensotec

    Joined:
    Aug 12, 2016
    Posts:
    2
    Same issue only for ios. Windows and Android build ok.
    Unity Version: Unity 2017.3.0f3
    IAP version: 1.19.0
    Building with Unity Cloud build


    /BUILD_PATH/PRODUCTPATH/temp.XXXXXX20180528-5805-tfev50/Libraries/Plugins/UnityPurchasing/iOS/UnityPurchasing.m:577:85: no known instance method for selector 'introductoryPrice'
    Same for: numberOfPeriods, subscriptionPeriod, numberOfUnits
     
  11. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    We've updated everything, deleted the project, uninstalled/reinstalled the unity package, reconnected to unity dashboard and updated all xcode and OSes etc. Same thing's happening
     
  12. Kaven01

    Kaven01

    Joined:
    Nov 22, 2017
    Posts:
    18
    Unity 2017.3.1f1 , just upgraded to IAP 1.19. and I am receiving the very same error. Only when I build in xcode; when run from unity on desktop, everything is fine. I happened with IAP upgrade; previous version worked well.
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Kaven01 What version of XCode are you using? I tested with 9.3 without issue.
     
  14. RichardJones

    RichardJones

    Joined:
    May 24, 2018
    Posts:
    3
    I suspect it's only older XCode versions, that have the errors. I couldnt reproduce when I built locally on my machine where I have Xcode 9.3 installed. It turns out our build server is on XCode 9.1 and it was that machine which was reporting the errors for us.

    So it will be interesting if anyone can reproduce on XCode 9.3, or whether this definitely fixes it. We are in process of updating our build server to test...
     
  15. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    OK I think I know what has happened and why so many people are having this issue: It is indeed the updating to Xcode 9.3 ( 9.4 ) that solves the issue but if you see my message above I said that I updated them all. Now the problem was the new xcode was not appearing under updates on our macs. One has to search for xcode and press the "grey" install button.
     
  16. MochiBits

    MochiBits

    Joined:
    Mar 11, 2014
    Posts:
    30
    Downgraded to 1.16 using Xcode 9 on 10.12.6 and it worked.

    Didn't want to upgrade my entire system just for the IAP asset.

     
  17. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You'll need that version of XCode to build for the latest iOS
     
  18. EtherGames

    EtherGames

    Joined:
    Jan 10, 2013
    Posts:
    12
    How to solve this error?
     

    Attached Files:

  19. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Have you followed the suggestions in this thread? You may need to upgrade XCode. If you continue to have issues, please share what versions of Unity, IAP and XCode that you are using and steps to reproduce.
     
  20. EtherGames

    EtherGames

    Joined:
    Jan 10, 2013
    Posts:
    12
    Thank you. XCode updation solved the issue.