update readme (#20109)

This commit is contained in:
Arnold 2019-09-06 18:51:12 +08:00 committed by minggo
parent 9df47ef6fd
commit 860b537b3e
1 changed files with 2 additions and 2 deletions

View File

@ -56,11 +56,11 @@ open Cocos2d-x.xcodeproj
```sh
cd cocos2d-x
mkdir ios-build && cd ios-build
cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake
cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos
open Cocos2d-x.xcodeproj
```
The default build is for running on iOS device, if you want to run in the simulator, please add `-DIOS_PLATFORM=SIMULATOR` for architecture i386 or `-DIOS_PLATFORM=SIMULATOR64` for x86_64, but remember you can't run metal-support app in simulator because Apple limitation.
The parameter `-DCMAKE_OSX_SYSROOT=iphoneos` is optional, it generates a build for running on the iOS device. If you want to run in the simulator, please add `-DCMAKE_OSX_SYSROOT=iphonesimulator`, but remember you can't run a metal-support app in the simulator until Xcode 11.
if you want to sign iOS app in CMake, you will need to fill development team ID into `set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")`, or select to sign in Xcode after project files generated.