IOS build Failed due to ---The target system is: iOS - - The host system is: Darwin - 21.5.0 - x86_64

04-07-2022 09:30-log: [cmake] – Configuring incomplete, errors occurred!
See also “/Users/fci-675/tn_homecc_studentsapp/build/ios/proj/CMakeFiles/CMakeOutput.log”.

04-07-2022 09:30-error: Error: Run build plugin native:(onAfterBuild) failed!
at BuildTask.runPluginTask (/Applications/CocosCreator/Creator/3.4.2/CocosCreator.app/Contents/Resources/app.asar/builtin/builder/dist/worker/builder/index.ccc:1:7456)
at async BuildTask.build (/Applications/CocosCreator/Creator/3.4.2/CocosCreator.app/Contents/Resources/app.asar/builtin/builder/dist/worker/builder/index.ccc:1:3580)
at async Ipc. (/Applications/CocosCreator/Creator/3.4.2/CocosCreator.app/Contents/Resources/app.asar/builtin/builder/dist/worker/index.ccc:1:3419)
04-07-2022 09:30-error: Error: run cmake failed “cmake -S /Users/fci-675/tn_homecc_studentsapp/native/engine/ios -GXcode -B/Users/fci-675/tn_homecc_studentsapp/build/ios/proj -T buildsystem=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DRES_DIR=”/Users/fci-675/tn_homecc_studentsapp/build/ios"", code: 1, signal: null
at ChildProcess. (/Applications/CocosCreator/Creator/3.4.2/CocosCreator.app/Contents/Resources/app.asar/platforms/internal/native/dist/console/cocosCli.ccc:1:7489)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Socket. (internal/child_process.js:439:11)
at Socket.emit (events.js:315:20)
at Pipe. (net.js:673:12)
04-07-2022 09:30-debug: Stop record console. {file(/Users/fci-675/tn_homecc_studentsapp/temp/builder/log/ios03-07-2022 21-33.log)}

Did you solve this problem?

not at all its not letting me build the project from cocos only

@htlxyz @Hugo @muxiandong @slackmoehrle @CocosMarketing
Guys, please help me out on this topic, I am not able to build in IOS at all its important to me at this stage.
E-mail: pushkal@happyadda.com

Hi, could you please provide the editor log when the build fails?

Hi @zzf_Cocos can we connect or can i send you the log file ??

IOS_build_logs.pdf (304.7 KB)

Okay, I will work with my engine colleagues on this.

image

The command order may be incorrect or other error in that file.

cmake_minimum_required(VERSION 3.8)
set(CMAKE_SYSTEM_NAME iOS)
set(APP_NAME “Tiny Ninza” CACHE STRING “Project Name”)
project(${APP_NAME} CXX)

include(${CMAKE_CURRENT_LIST_DIR}/…/common/CMakeLists.txt)

set(LIB_NAME ${APP_NAME}-mobile)

set(UI_RESOURCES)
set(PROJ_SOURCES)
set(PROJ_COMMON_SOURCES
${CMAKE_CURRENT_LIST_DIR}/…/common/Classes/Game.h
${CMAKE_CURRENT_LIST_DIR}/…/common/Classes/Game.cppx
)
if (USE_PORTRAIT)
configure_file(${CMAKE_CURRENT_LIST_DIR}/LaunchScreenBackgroundPortrait.png ${CMAKE_CURRENT_LIST_DIR}/LaunchScreenBackground.png COPYONLY)
else()
configure_file(${CMAKE_CURRENT_LIST_DIR}/LaunchScreenBackgroundLandscape.png ${CMAKE_CURRENT_LIST_DIR}/LaunchScreenBackground.png COPYONLY)
endif()

set(UI_RESOURCES
${CMAKE_CURRENT_LIST_DIR}/LaunchScreenBackground.png
${CMAKE_CURRENT_LIST_DIR}/Images.xcassets
${CMAKE_CURRENT_LIST_DIR}/Base.lproj/Localizable.strings
${CMAKE_CURRENT_LIST_DIR}/Base.lproj/LaunchScreen.storyboard
)

-------------- SRART ---------------

USED BY COCOS SERVICE, DON’T REMOVE!

if(EXISTS ${RES_DIR}/proj/service.cmake)
set(SERVICE_NATIVE_DIR ${CMAKE_CURRENT_LIST_DIR})
include(${RES_DIR}/proj/service.cmake)
endif()

-------------- END ----------------

list(APPEND PROJ_SOURCES
${CMAKE_CURRENT_LIST_DIR}/AppDelegate.mm
${CMAKE_CURRENT_LIST_DIR}/AppDelegate.h
${CMAKE_CURRENT_LIST_DIR}/service/SDKWrapper.m
${CMAKE_CURRENT_LIST_DIR}/service/SDKWrapper.h
${CMAKE_CURRENT_LIST_DIR}/main.m
${CMAKE_CURRENT_LIST_DIR}/ViewController.mm
${CMAKE_CURRENT_LIST_DIR}/ViewController.h
${UI_RESOURCES}
)
if(NOT CUSTOM_COPY_RESOURCE_HOOK)
include_resources(${RES_DIR}/assets)
endif()

add_executable(${LIB_NAME} ${PROJ_SOURCES} ${ASSET_FILES} ${PROJ_COMMON_SOURCES})
source_group(TREE ${RES_DIR}/assets PREFIX “Resources” FILES ${ASSET_FILES})
source_group(TREE ${CMAKE_CURRENT_LIST_DIR} PREFIX “Source Files” FILES ${PROJ_SOURCES})
source_group(TREE ${CMAKE_CURRENT_LIST_DIR}/…/common PREFIX “Source Files” FILES ${PROJ_COMMON_SOURCES})

-------------- SRART ---------------

USED BY COCOS SERVICE, DON’T REMOVE!

if(COMMAND service_insert_library)
service_insert_library()
endif()

-------------- END ----------------

target_link_libraries(${LIB_NAME} cocos2d)
target_include_directories(${LIB_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/…/common/Classes
${CMAKE_CURRENT_LIST_DIR}/service
)

set(EXECUTABLE_NAME ${LIB_NAME}) # referenced in Info.plist
set(PRODUCT_NAME ${APP_NAME})

set_target_properties(${LIB_NAME} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST “${CMAKE_CURRENT_LIST_DIR}/Info.plist”
MACOSX_BUNDLE 1
RESOURCE “${UI_RESOURCES}”
OSX_ARCHITECTURES “arm64;x86_64”
MACOSX_DEPLOYMENT_TARGET ${TARGET_IOS_VERSION}
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM “${DEVELOPMENT_TEAM}”
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY “iPhone Developer”
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME “AppIcon”
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_LAUNCHSTORYBOARD_NAME “LaunchScreen”
XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${TARGET_IOS_VERSION}
XCODE_ATTRIBUTE_ENABLE_BITCODE NO
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH YES
IOS_INSTALL_COMBINED YES
XCODE_ATTRIBUTE_SKIP_INSTALL NO
XCODE_ATTRIBUTE_INSTALL_PATH “$(LOCAL_APPS_DIR)”
)

Please refer this if this helps…

hi @PatriceJiang i shared a cmakelist.txt file

hi @zzf_Cocos i have shared the cmakelist.txt file as well please provide the solution if you can ?

Try removing the spaces in the AppName, currently in this version if there are spaces in the AppName in the build panel, the build will fail.

OK @zzf_Cocos will try this and let you know

Hi @zzf_Cocos i double checked there are no spaces in the AppName and the cocos IOS build is still failing