Search Unity

No matching function for call to _UnityAdsCopyString and _NSStringFromIl2CppString

Discussion in 'Unity Ads & User Acquisition' started by leandro_trick, Jan 6, 2020.

  1. leandro_trick

    leandro_trick

    Joined:
    Oct 29, 2014
    Posts:
    14
    Using the latest Xcode, Unity 2019.2.17f, latest Advertisement package from Package Manager (3.4.1)

    The methods are in the file UnityAdsUtilities.h but for some reason the files referencing them can't either find NSStringFromIl2CppString or UnityAdsCopyString (referenced in UnityBannerUnityWrapper).

    These look like some kind of bug with the latest Advertisement package. I was able to build successfully after commenting out all the lines that use said methods... but well, that's just a patch for now

    Build in UCB also failing.
     
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    We have addressed this issue and a fix version will be released soon.
     
    leandro_trick likes this.
  3. leandro_trick

    leandro_trick

    Joined:
    Oct 29, 2014
    Posts:
    14
    Thanks @SamOYUnity3D, I assume is going to be on a new version of the package? (3.4.2?)

    Do you have an ETA?
     
  4. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    Yes, this will be fixed in version 3.4.2, there is currently don't have an ETA yet.
     
  5. leandro_trick

    leandro_trick

    Joined:
    Oct 29, 2014
    Posts:
    14
    Thanks @SamOYUnity3D, any workarounds? It's blocking us from doing builds
     
  6. Larry-B

    Larry-B

    Joined:
    Jan 26, 2016
    Posts:
    4
    @leandro_trick we were getting the same error in Unity 2019.2.14 and we managed now to do the builds with Unity 2019.2.0f
     
    leandro_trick likes this.
  7. JohnnyOkami

    JohnnyOkami

    Joined:
    May 22, 2015
    Posts:
    8
    Also having this issue and awaiting fix in 3.4.2..
     
    leandro_trick likes this.
  8. leandro_trick

    leandro_trick

    Joined:
    Oct 29, 2014
    Posts:
    14
    Tried that but unfortunately it didn't work for us. It was worth the try though
     
  9. Valnat

    Valnat

    Joined:
    Jan 8, 2019
    Posts:
    78
    Hi, Unity 2018.3.5f have this troubles
     
  10. Larry-B

    Larry-B

    Joined:
    Jan 26, 2016
    Posts:
    4
    Unfortunately it worked for us only 1 time, I guess it was just luck :)) ...now we came back to the same issue. Any ETA on the fix? @SamOYUnity3D
     
    Last edited: Jan 15, 2020
  11. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    We expect to have 3.4.2 out by the end of the month. As far as workarounds, please try switching from a debug build to a release build to see if it can fix the build errors in Xcode.
     

    Attached Files:

    • 1.png
      1.png
      File size:
      163.8 KB
      Views:
      518
  12. jojo_game_studios

    jojo_game_studios

    Joined:
    Aug 24, 2017
    Posts:
    5
    Set it to release and it did not help
     
  13. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    Sorry to hear that. Please kindly wait for SDK 3.4.2.
     
  14. s1gurd

    s1gurd

    Joined:
    Dec 18, 2017
    Posts:
    1
    We faced the same problem, solved by downgrading Unity Monetization from 3.4.1 to 3.2.0
     
  15. UniDro

    UniDro

    Joined:
    Nov 21, 2014
    Posts:
    25
    In continue to notorious 3.4.0, which was not firing any callbacks. here we are with 3.4.1 which works fine on Android and discourages iOS builds.
    o_O

    Please, we're all waiting for that fix!
     
  16. dave_oak

    dave_oak

    Joined:
    Oct 7, 2015
    Posts:
    26
    3.4.2 is now available and I still can't get rid of this error. :/

    I'm using Unity 2018.4.16f1 with Scripting 3.5 because of a third party extension. XCode 11.3.1 freshly installed.
     
    Last edited: Jan 29, 2020
  17. leandro_trick

    leandro_trick

    Joined:
    Oct 29, 2014
    Posts:
    14
    It somehow started working for me on Cloud Build using Unity 2019.2.18f1
    Advertisement 3.4.1

    Won't try updating just in case.
     
  18. sbankhead

    sbankhead

    Unity Technologies

    Joined:
    Jul 27, 2014
    Posts:
    97
    @dave_oak I was able to build a project using the repro steps from this ticket. If your still seeing an issue, can you please open a ticket with the support team or at the very least start a new thread with as much details as possible to your specific case, and provide a sample project that reproduces the issue if you can? Also make sure that your building a new ios project and not trying to append or update your older project after updating the ads sdk.
     
  19. MdevM

    MdevM

    Joined:
    Sep 28, 2017
    Posts:
    43
    3.4.2 didn't fix this issue for me, I get it on Unity 2018.4.x and 2019.x.
     
  20. LTX

    LTX

    Joined:
    Jun 4, 2013
    Posts:
    2
    same thing here, 3.4.2 did not fix the issue. still getting a bunch of no matching function for
    NSStringFromIl2CppString

    Edit:
    ok, i removed all the old .mm files and import the new ones and it seems to be better
     
    Last edited: Jan 30, 2020
  21. MdevM

    MdevM

    Joined:
    Sep 28, 2017
    Posts:
    43

    Sorry, can you please explain what the .mm files are? I've tried reimporting everything and still can't get it to work.
     
    jojo_game_studios likes this.
  22. jojo_game_studios

    jojo_game_studios

    Joined:
    Aug 24, 2017
    Posts:
    5
    Yes what are the old .mm files?
     
  23. UniDro

    UniDro

    Joined:
    Nov 21, 2014
    Posts:
    25
    Still not fixed? really?

    re-add UnityAds.framework didn't help.
    no changes.



    Il2CppStringFromNSString, NSStringFromIl2CppString
     
    Last edited: Feb 2, 2020
    jojo_game_studios likes this.
  24. jojo_game_studios

    jojo_game_studios

    Joined:
    Aug 24, 2017
    Posts:
    5
    Ok i figured it out, you have to reimport .mm files and it now works for me
    1. Go into your unity project
    2. Turn off unity ads service and leave on the asset store sdk
    3. Navigate to plugins folder in Assets Assets/Plugins/IOS/
    4. Delete all of the loose files in the ios folder (NOT THE FOLDERS INSIDE IOS!!!)
    5. Reimport unity ads sdk from the asset store
    6. Build and enjoy a working project
     
    paintpaul, ageana and UniDro like this.
  25. UniDro

    UniDro

    Joined:
    Nov 21, 2014
    Posts:
    25
    Pardon moi. @jojo_game_studios approach works. Delete old Unity* files in the root of Plugins/iOS folder

    upload_2020-2-3_19-28-12.png

    Then re-import newest UnityAds package.

    3.4.2 [FIXED]
     
  26. blahti

    blahti

    Joined:
    Feb 20, 2015
    Posts:
    2
    It worked for me too. I am using Unity 2018.4.2f1.
    Thanks very much.
     
  27. Valnat

    Valnat

    Joined:
    Jan 8, 2019
    Posts:
    78
    Hi, @UniDro

    I'm made this actions, but I get error No matching function for call "NSStringFromII2CppString"

    Unity 2018.3.5f1 with UnityADS 3.4.2
     
  28. sbankhead

    sbankhead

    Unity Technologies

    Joined:
    Jul 27, 2014
    Posts:
    97
    If your using package manager it handles upgrading the code safety, but if you still use the asset store implementation then you need to remove the old copy of unity ads first. The easiest way to see which folders this is, is to look at what get imported when you try to import the unitypackage and delete everything in those directories related to unity ads. this includes files contained in the android and ios folders in the plugins folder inside the assets folder, as well as the UnityAds folder inside the assets folder.

    If you switch to using the package manager implementation you must still remove the asset store implementation or you will get errors about duplicate definitions of the ads code.