Skip to content

this can't work on macOS Big Sur #20608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RIRUa opened this issue Nov 16, 2020 · 11 comments
Open

this can't work on macOS Big Sur #20608

RIRUa opened this issue Nov 16, 2020 · 11 comments

Comments

@RIRUa
Copy link

RIRUa commented Nov 16, 2020

  • cocos2d-x version:4.0
  • devices test on:MacBook Pro
  • developing environments
    • NDK version:--
    • Xcode version:12.2
    • VS version:--
    • browser type and version:--

Steps to Reproduce:

  1. cocos new test -l cpp --portrait
  2. use cmake to test
  3. run
  4. 2errors is appeared. (about: /usr/lib/libz.dylib & /usr/lib/libiconv.dylib)
@zhongfq
Copy link
Contributor

zhongfq commented Nov 18, 2020

cmake/Modules/CocosConfigDepend.cmake

use find_library:
find_library(ICONV_LIBRARY iconv)
find_library(Z_LIBRARY z)

@neonguyen
Copy link

@zhongfq I did your tutorial and get another error
This one is on a real device:
Screen Shot 2020-11-24 at 22 20 17
and this one is on a simulator:
Screen Shot 2020-11-24 at 21 51 46

Note: I did change the "Build Active Architecture Only" to "No"

Not only that I see a lot of deprecated functions. Should we think to remove all of them??? The almost iOS device now is running iOS > 12. Should we think to stop support iOS < 12??????

@zhongfq
Copy link
Contributor

zhongfq commented Nov 24, 2020

@neonguyen you should set some Xcode property in project CMakeLists.txt:
set_xcode_property(${APP_NAME} SKIP_INSTALL "NO")
set_xcode_property(${APP_NAME} INSTALL_PATH "$(LOCAL_APPS_DIR)")

@zhongfq
Copy link
Contributor

zhongfq commented Nov 24, 2020

@neonguyen in CocosConfigDepend.cmake for iOS:

Locate system libraries on iOS

find_library(UIKIT_LIBRARY UIKit)
find_library(OPENGLES_LIBRARY OpenGLES)
find_library(CORE_MOTION_LIBRARY CoreMotion)
find_library(AVKIT_LIBRARY AVKit)
find_library(CORE_MEDIA_LIBRARY CoreMedia)
find_library(CORE_TEXT_LIBRARY CoreText)
find_library(SECURITY_LIBRARY Security)
find_library(CORE_GRAPHICS_LIBRARY CoreGraphics)
find_library(AV_FOUNDATION_LIBRARY AVFoundation)
find_library(WEBKIT_LIBRARY WebKit)
find_library(ICONV_LIBRARY iconv)
find_library(Z_LIBRARY z)
list(APPEND PLATFORM_SPECIFIC_LIBS
${UIKIT_LIBRARY}
${OPENGLES_LIBRARY}
${CORE_MOTION_LIBRARY}
${AVKIT_LIBRARY}
${CORE_MEDIA_LIBRARY}
${CORE_TEXT_LIBRARY}
${SECURITY_LIBRARY}
${CORE_GRAPHICS_LIBRARY}
${AV_FOUNDATION_LIBRARY}
${WEBKIT_LIBRARY}
${COCOS_APPLE_LIBS}
${ICONV_LIBRARY}
${Z_LIBRARY}
)

@neonguyen
Copy link

@zhongfq I did set all those things. but It still did not work.
My environments:
Macbook pro 15" 2019
Cocos2dx: 4.0 (change from 3.x by pull request)
XCode version 12.2
MacOS: big sur
CMake: 3.18.6

@zhongfq
Copy link
Contributor

zhongfq commented Nov 25, 2020

@neonguyen my env as same as you too, you can try my fork: https://github.com/zhongfq/cocos-lua, and then you can compare what different, especially the cocos folder

@neonguyen
Copy link

neonguyen commented Nov 25, 2020

@zhongfq one more thing, I am using python 3.7..6. Can it affect the cocos project? and I am using C++

@zhongfq
Copy link
Contributor

zhongfq commented Nov 25, 2020

@neonguyen no. my project base on c++, i use command 'cocos new -l cpp' create my project. i think there are miss some Xcode property in your project. Your program i had meet before

@neonguyen
Copy link

@neonguyen no. my project base on c++, i use command 'cocos new -l cpp' create my project. i think there are miss some Xcode property in your project. Your program i had meet before

Thanks for your time.
let me check your fork and feedback later.

@neonguyen
Copy link

@zhongfq I tried again a few times. Unfortunately, It still did not work. My V4 version is upgraded from V3. I worry it can be the reason. I cannot reinstall my Mac now.

@neonguyen
Copy link

@zhongfq I found the solution to solve the build problem. Now I can run the project on my iPhone. Unfortunately, I cannot run it on the simulator. Can you run it on the simulator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants