Closed ygyin-ivy closed 6 years ago
If you want to build for iOS, you will have to use an iOS
toolchain. I recommend using polly
for the builds, which is a python front end with built in toolchains that supports condensed one-line build + install command lines. Please take a look at the README for more examples and details and how to select a toolchain
In the same table, you can find iOS SDK version. E.g., if you have installed Xcode 9.4 with default iOS SDK 11.4, and you want to set the deployment SDK to version 9.3, you can use --toolchain ios-11-4-dep-9-3-arm64 to build the ARM64 architecture
You could run something like this:
TOOLCHAIN=ios-11-4-dep-9-4-arm64
CONFIG=Release
polly.py --toolchain ${TOOLCHAIN} --config-all ${CONFIG} --install --verbose --reconfig --fwd DRISHTI_BUILD_EXAMPLES=ON
You can find a list of toolchains in the top level of this project:
i know those, but i have more interested in Native IOS build of news 8/10
i know those, but i have more interested in Native IOS build of news 8/10
I'm not sure I follow, but if you want to build the native iOS facefilter app from the 8/10 commit, it will be built from the top level CMake/polly build with option DRISHTI_BUILD_EXAMPLES
. Since CMake has an Xcode generator, the FaceFilter
target is just a normal add_executable
call. This is in contrast to Android Studio, where gradle ends up managing the CMake build. You don't have to do anything special to build the iOS app.
![Uploading cmake-drishti.png…]()
option DRISHTI_BUILD_EXAMPLES is enable. cmake only generate macOS project
What did you type? What version of Xcode do you have and which version of iOS do you have installed on your phone? It sounds like you aren't using an iOS toolchain.
If you build from polly.py and use a toolchain starting with ios-*
it should create an iOS project.
TOOLCHAIN=ios-11-4-dep-9-4-arm64
CONFIG=Release
polly.py --toolchain ${TOOLCHAIN} --config-all ${CONFIG} --install --verbose --reconfig --fwd DRISHTI_BUILD_EXAMPLES=ON
xcode 9.4, ios 11.4 not type , not use polly.py only chose top dir using cmake-gui
only chose top dir using cmake-gui
This won't work. You have to cross compile for your iPhoneOS target from your macOS host, which requires a toolchain.
xcode 9.4, ios 11.4
In that case, the polly.py
command I typed above should work fine for you.
You can find more details about polly iOS toolchains here.
thx yestoday i tried this cross compile , stuck at POLLY_IOS_DEVELOPMENT_TEAM and bundle identifier.
You will have to set the POLLY_IOS_DEVELOPMENT_TEAM and the POLLY_IOS_BUNDLE_IDENTIFIER. Please read this section for details related to the Bundle ID. The setup in the last link is a 1x process which I believe you need to do the first time you install Xcode. You will need to have a valid Apple Developer account to run on your phone. I'll add more details about the iOS setup on the README. Unfortunately the code signing steps make the "quick start" a little less quick for iOS devices 😄
I've updated the README w/ the above notes and clarified the need for a toolchain to run the iOS builds.
Is there any way to pass -allowProvisioningUpdates to xcodebuild with polly.py?
Run Build Command:"/usr/bin/xcodebuild" "-project" "CMAKE_TRY_COMPILE.xcodeproj" "build" "-target" "cmTC_b3beb" "-configuration" "Debug"
=== BUILD TARGET cmTC_b3beb OF PROJECT CMAKE_TRY_COMPILE WITH CONFIGURATION Debug ===
Check dependencies
Code Signing Error: No profiles for 'com.ivy.example.TestDrishiti' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.ivy.example.TestDrishiti'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.4'
Is there any way to pass -allowProvisioningUpdates to xcodebuild with polly.py?
No.
The error you are hitting is the one that is described in this link. This can happen if you are using an enterprise account. The link provides a solution for the problem. I've posted the error + link to the README. Let me know if that helps.
i have tried to set POLLY_IOS_BUNDLE_IDENTIFIER that is described in that link , both enterprise account and my personal account. it's not work. maybe i still need to set something when using my personal account. when i fix this signing issue , i will post my solution in this post
when i fix this signing issue , i will post my solution in this post
Okay, that would be helpful. Unfortunately, this issue is hard for me to reproduce and troubleshoot.
Here are two issues that provide background on the above polly links. I think it will be worthwhile reading through those:
https://github.com/ruslo/polly/issues/102 https://github.com/ruslo/polly/issues/170
Can you step through the setup in the follow link and post the results here? This will help verify your development setup.
https://polly.readthedocs.io/en/latest/toolchains/ios/bundle-id.html#bundle-id
https://polly.readthedocs.io/en/latest/toolchains/ios/bundle-id.html#bundle-id
it's not work. i will read through those issues
it's not work. i will read through those issues
Okay, that's good, actually. It means you have Apple environment + code signing issues that are unrelated to polly + toolchains. If you can get the last step working with a minimal project, i.e.:
"Run example on real device. By this you will verify that build and signing is working correctly"
The polly build should work.
it should be a code signing issue,
Although i created a minimal project with my personal account and ran this on iPod touch, the polly build is still not working.
i will try to find why.
finally i fix this issue.
at the key-chain , there are two kinds of certification
one is iPhone distribution .
set it to POLLY_IOS_DEVELOPMENT_TEAM , the polly build works.
one is iPhone developer.
set it to POLLY_IOS_DEVELOPMENT_TEAM , the polly build fails with this issue .
I want to build ios app with cmake 3.11.4 I chose folder drishti and get a log -- config.cmake -- MSVC: APPLE: 1 ANDROID: IOS: is_linux: 0 XCODE: 1 its a log for build macOS.
which folder i should choose, or where to config ios build? Thanks