Home Game Development robotically add library to undertaking xcode in cc 3.5.2? – Cocos Creator

robotically add library to undertaking xcode in cc 3.5.2? – Cocos Creator

0
robotically add library to undertaking xcode in cc 3.5.2? – Cocos Creator

[ad_1]


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

You should 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 this may remedy your subject.

1 Like

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

I already know the issue why each time I rebuild, this subject is empty. That’s as a result of I selected the choice skip xcode replace . However I nonetheless need to know the way if I construct a brand new xcode undertaking it might robotically add the library

The reply from @stark2022 ought to work.

And right here a modernized is approach

#...
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 undertaking, you’ll be able to take away the construct/ios folder or the only file construct/ios/proj/CMakeCache.txt, to set off regenerate.

1 Like

@PatriceJiang , will the library be added after constructing in cocos creator instrument with the above command? .
I attempted your code but it surely construct failed . Are you positive the next is syntactically appropriate ?

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

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

Sure

Are you positive the next is syntactically appropriate ?

What sort of error report do you meet? target_link_libraries.

Pls, attempt whether or not you’ll be able to accurately embrace the corresponding header file. I’m undecided whether or not your verification technique is dependable

Attempt to take away the key phrase PUBLIC to see when you can remedy the error reported

Sorry, i don’t have expertise for ios improvement :frowning: . i believed that I needed to examine right here @PatriceJiang .
image

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here