Thank you Alex for following up.
If someone’s looking at this thread and trying to compile an iOS example from the Examples folder of VTK, here are the steps that worked for me (I’m currently using Xcode 10.3):
-
sudo cp -r
<CMAKE_FRAMEWORK_INSTALL_PREFIX>/vtk.framework /Library/Frameworks/ (this is only necessary if the <CMAKE_FRAMEWORK_INSTALL_PREFIX> is not a standard framework path otherwise you need to explicitly set is in Xcode) - open <source_folder_path>/Examples/iOS/Surfaces (or any other VTK example in the iOS folder) #NOTE: some examples may need non-default specific VTK modules to be built in the framework building step.
- add the following 2 lines to the
.plist
file (this is because the VTK examples are not up-to-date?):<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
- because Xcode10 and higher does not support libstd++ anymore you need to do the following:
- git clone https://github.com/Kila2/libstdc-.6.0.9.tbd.git <libstd_path>
-
cp
<libstd_path>/iPhoneOS/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/ -
cp
<libstd_path>/iPhoneSimulator/libstdc++.*.dylib /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/ -
cp
<libstd_path>/iPhoneSimulator/libstdc++*.tbd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/
- open <source_folder_path>/Examples/IOS/Surfaces/Surfaces.xcodeproj in Xcode
- build and run
Hope this will be useful!