Monday, August 8, 2022
HomeGame DevelopmentHow you can mechanically add library to mission xcode in cc 3.5.2?...

How you can mechanically add library to mission xcode in cc 3.5.2? – Cocos Creator



After i add some libs in construct phases->hyperlink binary with libraries . I attempt to construct mission once more through the use of cocos creator construct instrument. I opened mission xcode once more. In construct phases->hyperlink binary with libraries , it was empty.
Is there any option to repair this downside?


It’s essential edit:
native/engine/ios/CMakeLists.txt

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppTrackingTransparency")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Safety")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework StoreKit")

Hope it will clear up your situation.

I attempted it. it didn’t work @stark2022
image

I already know the issue why each time I rebuild, this area is empty. That’s as a result of I selected the choice skip xcode replace . However I nonetheless wish to know the way if I construct a brand new xcode mission it may mechanically add the library

The reply from @stark2022 ought to work.

And right here a modernized is method

#...
cc_ios_after_target(${EXECUTABLE_NAME})

target_link_libraries(${EXECUTABLE_NAME} PUBLIC
  "-framework AppTrackingTransparency"
  "-framework Safety"
  "-framework StoreKit"
)

If the skip choice is checked and must override the Xcode mission, you possibly can take away the construct/ios folder or the one file construct/ios/proj/CMakeCache.txt, to set off regenerate.

@PatriceJiang , will the library be added after constructing in cocos creator instrument with the above command?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments