Cordova app failing to Archive with Xcode 7.1 (Cordova/CDVViewController.h file not found)

前端 未结 5 1431
广开言路
广开言路 2020-12-13 20:57

I\'ve recently updated my Xcode to version 7.1 (from 7.0.1) and my Cordova app is failing to Archive with the error that says:

\'Cordova/CDVViewContro

相关标签:
5条回答
  • 2020-12-13 21:38

    On the screenshot I see a whitespace on "build/UninstalledProducts/iphoneos/include ", try removing it.

    And you don't have to remove the old, "$(OBJROOT)/UninstalledProducts/include", you have to keep both

    0 讨论(0)
  • 2020-12-13 21:45

    I found this solution at http://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232:

    Add this line to your Build Settings -> Header Search Paths:

    "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"

    Don't replace the existing line that looks similar, that is still needed to be backwards compatible with Xcode 7 and Xcode 6.4.

    but doesn't work for old Cordova versions. I cannot upgrade to recent version of Cordova, so after a little try&search approach I found a new solution that seem works on my environment:

    "$(OBJROOT)/UninstalledProducts/$(CONFIGURATION)-$(PLATFORM_NAME)/include"
    

    Same advice as before, don't replace the existing line, but append the new role at the end.

    Hope this should be useful.

    0 讨论(0)
  • 2020-12-13 21:47

    This is the solution!

    Add this line to your Build Settings -> Header Search Paths:

    "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
    
    0 讨论(0)
  • 2020-12-13 21:51

    I found a solution on this thread which worked for me with Xcode 7.1 (I was still having problems on OS X El Capitan).

    Gandhi's answer is:

    • Run this in your terminal: cordova platform update ios
    • Open your project in Xcode
    • Go to Preference -> Locations -> Advanced
    • Choose "Unique" as the option for Build Location
    • Product -> Clean
    • Product -> Build
    0 讨论(0)
  • 2020-12-13 21:53

    This is a problem with 7.1 check out this thread which may help (on the ionic forums but isn't an ionic specific issue, it's Cordova with XCode 7.1) http://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232

    0 讨论(0)
提交回复
热议问题