How to generate prebuilt with v3.17.2 for iOS?

My Prebuilt Issue

  1. Cmake
    i try using cmake with above code to generate Cocos2d-x.xcodeproj and compile the library which generate libcocos2d.a and libjscocos2d.a. Then i link these 2 files to my Xcode project but get compile error Undefined symbols for architecture arm64 for more than 100 function related to cocos2dx

  2. using cocos2d_libs.xcodeproj in build and cocos2d_js_bindings.xcodeproj in scripting
    generated libcocos2d.a and libjscocos2d.a and link to my Xcode project, everything compile just fine and app can be run, but unable to use cc.EditBox issue as stated above.

  3. End up i have to link cocos2d_libs.xcodeproj and cocos2d_js_bindings.xcodeproj to my Xcode project, everything works just fine but with longer compile time.

I used to generate prebuilt with cocos console but that function was removed after v3.17.1, i still using v3.17 with prebuilt guide below

So is there any guide to generate prebuilt with v3.17.2 for iOS?

Thanks!

You may try something like: V4 would be a good time to move things forward?

thanks for you info.

i read that post seem not much related to the prebuilt.

Sorry Cmake used to compile the prebuilts in 3.17. What I meant by that post was perhaps we could fix the old cmake build process and make prebuilts available again.

ok i solved it by just using the template generate which linked cocos2d_libs.xcodeproj and cocos2d_js_bindings.xcodeproj.

  1. after compile, the project will generated libjscocos2d iOS.a and libcocos2d iOS.a under folder Debug-iphoneos for debug version and Release-iphoneos for release version. just right click the libjscocos2d iOS.a and libcocos2d iOS.a in the project and choose “Show in Finder” will open the folder.

  2. copy the 2 prebuilt library and follow the above guide will work the same.

Sorry can you describe this more so I can test it? I’ll add this to your faq for iOS and MacOS

its nothing special, you can just use the cocos2d_tests.xcodeproj under build folder or create any new project with cocos console which generate project with templates.

  1. build or run to compile the project.

  2. locate the libcocos2d iOS.a and libjscocos2d iOS.a

cocos2d_libs.xcodeproj
on the left side Project navigator -> cocos2d_libs.xcodeproj -> Products -> libcocos2d iOS.a -> right click -> Show in Finder

cocos2d_js_bindings.xcodeproj
on the left side Project navigator -> cocos2d_js_bindings.xcodeproj -> libjscocos2d iOS.a -> right click -> Show in Finder

  1. in the same folder you can find libcocos2d iOS.a and libjscocos2d iOS.a

  2. add libcocos2d iOS.a and libjscocos2d iOS.a to xcode project and remove cocos2d_libs.xcodeproj and cocos2d_js_bindings.xcodeproj

  3. add the require “Header Search Paths” and “Framework Search Paths” under Build Settings

libjscocos2d iOS.a is only require if you using cocos2dx with js.

you may find more info references on Nite guide, the difference only on how to generate the prebuilt as cocos console remove the prebuilt command, the process to include prebuilt to project is same.

1 Like

I got it now. Thanks. I’ll update some docs.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.