adjust / unity_sdk

This is the Unity SDK of
http://www.adjust.com
MIT License
149 stars 70 forks source link

Xcode Build Fail l(d: Undefined symbols: , error: linker command failed with exit code 1 (use -v to see invocation)) #293

Closed SeoWo0 closed 2 months ago

SeoWo0 commented 2 months ago
스크린샷 2024-04-18 오전 10 21 22

Everything was done according to the SDK as written in the picture above.

Adjust_v4.38.0.unitypackage in Unity I built it by adding only

In xcode, all necessary frameworks have been added to TARGETS -> UnityFrameWork -> Build Phase -> Link Binary with Libraries.

After setting the above, if you build with Archive in xcode,

ld: Undefined symbols: _ADJDataResidencyEU, referenced from: AdjustLaunchApp in AdjustUnity.o _ADJDataResidencyTR, referenced from: __AdjustLaunchApp in AdjustUnity.o _ADJDataResidencyUS, referenced from: AdjustLaunchApp in AdjustUnity.o _ADJUrlStrategyChina, referenced from: AdjustLaunchApp in AdjustUnity.o _ADJUrlStrategyCn, referenced from: __AdjustLaunchApp in AdjustUnity.o _ADJUrlStrategyCnOnly, referenced from: AdjustLaunchApp in AdjustUnity.o _ADJUrlStrategyIndia, referenced from: __AdjustLaunchApp in AdjustUnity.o _OBJCCLASS$_ADJAdRevenue, referenced from: in AdjustUnity.o _OBJCCLASS$_ADJConfig, referenced from: in AdjustUnity.o _OBJCCLASS$_ADJEvent, referenced from: in AdjustUnity.o _OBJCCLASS$_ADJPurchase, referenced from: in AdjustUnity.o _OBJCCLASS$_ADJSubscription, referenced from: in AdjustUnity.o _OBJCCLASS$_ADJThirdPartySharing, referenced from: in AdjustUnity.o _OBJCCLASS$_Adjust, referenced from: in AdjustUnity.o _OBJCCLASS$_AdjustTestOptions, referenced from: in AdjustUnity.o clang: error: linker command failed with exit code 1 (use -v to see invocation)

The build fails after the above error log. Is there anything else I need to do?

SeoWo0 commented 2 months ago

solved it Some parts of the .a file and ios sdk were missing. thank you

uerceg commented 2 months ago

Hi @SeoWo0,

Thank you for the update. For future reference, in case anyone else stumbles upon the same issue, can you explain how exactly did you solve the issue?

SeoWo0 commented 2 months ago

I first added the Adjust unity package to Android and then moved it to the Adjust folder in iOS, but the above bug persisted.

The issue was resolved by re-importing the Adjust SDK Unity package and updating the missing .a file and the rest of the SDK.

I'm not sure why the .a file and the rest of the SDK were missing from the adjuist folder on iOS.

uerceg commented 2 months ago

Huh, interesting. But thank you very much for the follow up and explanation how did you solve the issue. Cheers!

SeoWo0 commented 2 months ago

Thanks!