Search Unity

UnityPurchasing & il2cpp on standalone mac error

Discussion in 'Unity IAP' started by matt_unity258, Nov 27, 2018.

  1. matt_unity258

    matt_unity258

    Joined:
    Dec 4, 2017
    Posts:
    4
    Hi,
    When trying to build standalone mac with scripting backend set to IL2CPP the build fails unless I delete the Assets\Plugins\UnityPurchasing Folder. (Unity version Unity_2018.2.17f1)

    Any ideas why this is happening or if there's an elegant way to ignore the folder?

    part of the error I see is:
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException:

    Thanks in Advance
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,572
    Please check in the editor log file, there should be more information about the failure there. Can you post more details about the specific error message?
     
  3. matt_unity258

    matt_unity258

    Joined:
    Dec 4, 2017
    Posts:
    4
    Does this help?


    Undefined symbols for architecture x86_64:
    "_getUnityPurchasingAppReceipt", referenced from:
    _iOSStoreBindings_getUnityPurchasingAppReceipt_m4103466157 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_get_appReceipt_m2498480463 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_getUnityPurchasingAppReceipt_m643976844, _iOSStoreBindings_getUnityPurchasingAppReceipt_m4103466157 )
    "_unityPurchasingInterceptPromotionalPurchases", referenced from:
    _OSXStoreBindings_unityPurchasingInterceptPromotionalPurchases_m3411166610 in 51021C4E05B526C3D173876EEAB014CE.o
    _OSXStoreBindings_InterceptPromotionalPurchases_m769580797 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_unityPurchasingInterceptPromotionalPurchases_m421098356 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_InterceptPromotionalPurchases_m2936449487 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _iOSStoreBindings_unityPurchasingInterceptPromotionalPurchases_m421098356, _OSXStoreBindings_unityPurchasingInterceptPromotionalPurchases_m3411166610 )
    "_unityPurchasingRetrieveProducts", referenced from:
    _iOSStoreBindings_unityPurchasingRetrieveProducts_m1942317051 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_RetrieveProducts_m3230380609 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingRetrieveProducts_m689081799, _iOSStoreBindings_unityPurchasingRetrieveProducts_m1942317051 )
    "_unityPurchasingPurchase", referenced from:
    _iOSStoreBindings_unityPurchasingPurchase_m127163060 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_Purchase_m925077806 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingPurchase_m1987719083, _iOSStoreBindings_unityPurchasingPurchase_m127163060 )
    "_unityPurchasingRestoreTransactions", referenced from:
    _iOSStoreBindings_unityPurchasingRestoreTransactions_m2532953743 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_RestoreTransactions_m2847613056 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingRestoreTransactions_m3672818507, _iOSStoreBindings_unityPurchasingRestoreTransactions_m2532953743 )
    "_setUnityPurchasingCallback", referenced from:
    _iOSStoreBindings_setUnityPurchasingCallback_m1482920455 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_SetUnityPurchasingCallback_m756868915 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_setUnityPurchasingCallback_m3551531614, _iOSStoreBindings_setUnityPurchasingCallback_m1482920455 )
    "_unityPurchasingAddTransactionObserver", referenced from:
    _iOSStoreBindings_unityPurchasingAddTransactionObserver_m463851353 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_AddTransactionObserver_m621098447 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingAddTransactionObserver_m1174623098, _iOSStoreBindings_unityPurchasingAddTransactionObserver_m463851353 )
    "_unityPurchasingFinishTransaction", referenced from:
    _iOSStoreBindings_unityPurchasingFinishTransaction_m1779103950 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_FinishTransaction_m601113037 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _iOSStoreBindings_unityPurchasingFinishTransaction_m1779103950, _OSXStoreBindings_unityPurchasingFinishTransaction_m3734261221 )
    ld: symbol(s) not found for architecture x86_64


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)



    and


    Undefined symbols for architecture x86_64:
    "_getUnityPurchasingAppReceipt", referenced from:
    _iOSStoreBindings_getUnityPurchasingAppReceipt_m4103466157 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_get_appReceipt_m2498480463 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_getUnityPurchasingAppReceipt_m643976844, _iOSStoreBindings_getUnityPurchasingAppReceipt_m4103466157 )
    "_unityPurchasingInterceptPromotionalPurchases", referenced from:
    _OSXStoreBindings_unityPurchasingInterceptPromotionalPurchases_m3411166610 in 51021C4E05B526C3D173876EEAB014CE.o
    _OSXStoreBindings_InterceptPromotionalPurchases_m769580797 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_unityPurchasingInterceptPromotionalPurchases_m421098356 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_InterceptPromotionalPurchases_m2936449487 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _iOSStoreBindings_unityPurchasingInterceptPromotionalPurchases_m421098356, _OSXStoreBindings_unityPurchasingInterceptPromotionalPurchases_m3411166610 )
    "_unityPurchasingRetrieveProducts", referenced from:
    _iOSStoreBindings_unityPurchasingRetrieveProducts_m1942317051 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_RetrieveProducts_m3230380609 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingRetrieveProducts_m689081799, _iOSStoreBindings_unityPurchasingRetrieveProducts_m1942317051 )
    "_unityPurchasingPurchase", referenced from:
    _iOSStoreBindings_unityPurchasingPurchase_m127163060 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_Purchase_m925077806 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingPurchase_m1987719083, _iOSStoreBindings_unityPurchasingPurchase_m127163060 )
    "_unityPurchasingRestoreTransactions", referenced from:
    _iOSStoreBindings_unityPurchasingRestoreTransactions_m2532953743 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_RestoreTransactions_m2847613056 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingRestoreTransactions_m3672818507, _iOSStoreBindings_unityPurchasingRestoreTransactions_m2532953743 )
    "_setUnityPurchasingCallback", referenced from:
    _iOSStoreBindings_setUnityPurchasingCallback_m1482920455 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_SetUnityPurchasingCallback_m756868915 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_setUnityPurchasingCallback_m3551531614, _iOSStoreBindings_setUnityPurchasingCallback_m1482920455 )
    "_unityPurchasingAddTransactionObserver", referenced from:
    _iOSStoreBindings_unityPurchasingAddTransactionObserver_m463851353 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_AddTransactionObserver_m621098447 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _OSXStoreBindings_unityPurchasingAddTransactionObserver_m1174623098, _iOSStoreBindings_unityPurchasingAddTransactionObserver_m463851353 )
    "_unityPurchasingFinishTransaction", referenced from:
    _iOSStoreBindings_unityPurchasingFinishTransaction_m1779103950 in 51021C4E05B526C3D173876EEAB014CE.o
    _iOSStoreBindings_FinishTransaction_m601113037 in 51021C4E05B526C3D173876EEAB014CE.o
    (maybe you meant: _iOSStoreBindings_unityPurchasingFinishTransaction_m1779103950, _OSXStoreBindings_unityPurchasingFinishTransaction_m3734261221 )
    ld: symbol(s) not found for architecture x86_64


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    at Program.Main(String[] args)
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,572
    Yes, it does! It looks like something is out of sync with the native libraries in the UnityPurchasing folder. For example, there is managed code in the iOSStoreBindings class, which should not exist for a standalone build on macOS.

    Specifically, this error means that IL2CPP cannot find the native libraries that are used for p/invoke from the managed code. These native libraries need to exist at build time.

    This sounds like a bug with Unity Purchasing, although I'm not familiar enough with that code to be sure. Can you submit a bug report?
     
  5. matt_unity258

    matt_unity258

    Joined:
    Dec 4, 2017
    Posts:
    4
    I submitted a bug report now (Case 1104495).
    Any ideas for a workaround until this gets fixed so that I don't need to manually delete the UnityPurchasing Folder every time I build for StandAlone Mac?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,685
    This is a known issue that we are planning to address in the next release later this year or early 2019.
     
    Dolee-Arts likes this.
  7. matt_unity258

    matt_unity258

    Joined:
    Dec 4, 2017
    Posts:
    4
    Hi @JeffDUnity3D , Any updates on when we can expect this fix to be released?
    Thanks!
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,685
    No updates at this time.