Search Issue Tracker
Fixed in 2018.2.X
Fixed in 2018.1.X
Votes
0
Found in
5.3.4p5
Issue ID
793420
Regression
No
[iOS] iOS Trampoline extern "C" doesn't work with Objective C
Reproduction Steps:
1. Open "Case793420" project
2. Enter valid Player Settings > Automatic Signing TeamID
3. Enter valid Player Settings > Bundle Identifier
4. Build to iOS platform
5. Open the generated Xcode project in Xcode
6. Build the project in Xcode
7. Notice the compilation errors on two lines in UnityViewControllerBase+iOS.h
User suggested fix:
1. In Xcode, open the file UnityViewControllerBase+iOS.h
2. Replace the two lines with compilation errors with the code below
#ifdef __cplusplus
extern "C" {
#endif
void AddViewControllerRotationHandling(Class class_, IMP willRotateToInterfaceOrientation, IMP didRotateFromInterfaceOrientation, IMP viewWillTransitionToSize);
void AddViewControllerDefaultRotationHandling(Class class_);
#ifdef __cplusplus
}
#endif
Expected behaviour: Project builds correctly without any errors.
Reproduced on versions: Unity 2017.1.3f1, 2017.2.1p2, 2017.3.0p3, 2018.1.0b3
Reproduced on devices: iPhone 7 Plus iOS 10.3.2
Reproduced on Xcode 9.0
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment