Friday, July 22, 2022
HomeGame DevelopmentA problem with automated deletion of recordsdata in iOS - Cocos Creator

A problem with automated deletion of recordsdata in iOS – Cocos Creator


A problem with automated deletion of recordsdata in iOS.

Hi there developer pals. I’m creating a recreation this time and getting ready for iOS launch. Cocos Creator has skilled as soon as once more that it’s a very nice engine. Belief me.

There was one drawback whereas creating IOS this time, and we added BridgeUtil.h and mm recordsdata to our recreation mission, however the recordsdata are eliminated each time we construct in Cocos Creator Inspector. Mechanically. It’s cumbersome so as to add every time.

Does anybody know the right way to resolve this?

These two recordsdata at the moment exist within the engine/ios folder and I add them to the Supply Information folder in mission title + cellular, however the script disappears each time I construct. After all the framework. We’re utilizing the Fb Framework, they usually’re including it again each time.


you’ll be able to add BridgeUtil.h and mm recordsdata to CMakeList.txt

I attempted the code you gave me. I put it as follows, however automated import nonetheless doesn’t work… Android didn’t have this drawback, however IOS is a bit tough.

image

which model of creator are you utilizing? i feel chances are you’ll add this two recordsdata to CMakeList.txt after what i pointed earlier than.

I’m at the moment utilizing cocos model 3.5.1. So that you imply so as to add textual content after construct?

i imply so as to add on this line, after the ViewController.h:

That is all of the code I get after I open the CMAKELIST file. Is the model you’re utilizing completely different from the one you’re utilizing? I need to do the identical as you suggested, however the code is completely different. After all, this code doesn’t work now.

why you place this two recordsdata in mission title + cellular? are you able to present Fb Framework you used? i put this two recordsdata in engine/ios and it exists after construct.

Oh I additionally put the file in engine/ios. The issue shouldn’t be that the file is bodily deleted, however that it’s excluded from the mission and must be added each time.

what you imply of excluded from the mission? and the place you added it?

I discovered the reply. The issue was the place I put the code. It was solved by including it to the HERE part beneath.

embrace(${CC_PROJECT_DIR}/…/widespread/CMakeLists.txt)
set(EXECUTABLE_NAME ${APP_NAME})

cc_ios_before_target(${EXECUTABLE_NAME})


————————————-HERE
listing(APPEND CC_ALL_SOURCES
${CMAKE_CURRENT_LIST_DIR}/BridgeUtil.h
${CMAKE_CURRENT_LIST_DIR}/BridgeUtil.mm
)


add_executable(${EXECUTABLE_NAME} ${CC_ALL_SOURCES})
cc_ios_after_target(${EXECUTABLE_NAME})

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments