'Cordova/CDVViewController.h' not found when Archiving in Xcode (from Worklight) - ios

I'm suffering this error message when trying to Archive my app prior to submission to the App Store.
The full error is:
In file included from /Users/Kevin/Documents/workspace/SongLink2/apps/SLPhone/iphone/native/Classes/CDVMainViewController.m:14:
In file included from Classes/CDVMainViewController.h:15:
/Users/Kevin/Documents/workspace/SongLink2/apps/SLPhone/iphone/native/WorklightSDK/include/MainViewController.h:34:9: fatal error: 'Cordova/CDVViewController.h' file not found
#import <Cordova/CDVViewController.h>
^
1 error generated.
I'm using Worklight 6.2 to generate the project having added both Android and iPhone environments). I then switch to Xcode 6 to Run my app. This is successful for Run but fails when I Product->Archive with the error.
I've recently upgraded everything to:
IBM Worklight Studio 6.2.0.00-20140915-1601
Xcode 6.0.1 (6A317)
... but with no success.
I've tried:
Changing Header>Search Paths: but this had no effect. This also suggest reinstalling Cordova but I'm unsure how to do this in a Worklight environment.
Perform Product->Clean with no effect. This discussion also suggested running ./update_cordova_subproject /path/to/your/project but I don't know where Worklight installed cordova to try it.
Many discussions suggest Xcode->Preferences->Locations->Advanced and make sure it's set to Unique... but I'm already set to this value.
similar: but this didn't seem to get resolved
Please help me on my last step to app store submission!

In looking at the Header Search Path(s) I noticed I'd introduced an extra double quote which was causing Xcode some confusion! Once I removed that it worked fine.
Many thanks

I experienced this problem and the solution was a classic XCode mystery incantation to add to your search path:
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
Found on this website:
http://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232/4

Related

Xcode and Unity missing library 'lGoogleUtilities'

I am working on an App that is made with Unity and I have to build it in Xcode to get it in the App store.
Now I'm running into a problem here. I am getting this error:
library not found for -lGoogleUtilities
However, when I build the app in debug mode and test it on my iPad, there aren't any troubles. But when I try to build it for TestFlight (Toolbar -> Product -> Archive) that error occurs.
I've followed this tutorial to get it working in debug mode (because I had that error there too before)
https://youtu.be/YHHj1bZUbsc (from 6:20).
I am using the 'Google Admob', 'CloudOnce' and 'Play Services Resolver' plugins for Unity. In the debug version the error (before I fixed it in the debug version), was caused by 'Google Admob'. I feel like I am missing a framework or something in the release build.
Alright, so after another few hours of trying and searching I found out that I was actually opening the wrong file, you would think .xcodeproj would be the correct extension, but actually you have to open the .xcodeworkspace file. It compiled for me.

Unable to install app in simulator Xcode 9 beta

I downloaded Xcode 9 beta recently, and when I tried to run my app in the simulator it is not getting installed. I am getting this error in my Xcode every time I try to run the app.
This app was unable to be installed.
The application used to work in Xcode 8.3.3
Unfortunately, the error message doesn’t explain why the install failed. You can take a look at ~/Library/Logs/CoreSimulator/CoreSimulator.log to see if the rest of the error message is there with more info. If not, you should check out the sim device’s system log:
sudo xcode-select -s /Applications/Xcode-beta.app # if you haven’t already
xcrun simctl spawn booted log show
You can use --predicate to filter that down a bit.
Late answer but might be that can be useful for others. I just get a project with existing watch-kit and custom keyboard code. After change the identifier i got the same error and i spend 1 day to find out why that happens.
I checked everything of bundle id and all version. then i do global search in xcode with old identifier and i found that following.
Here in both .plist file have old WKCompanionAppBundleIdentifier so after i update it with new manually application run again.
IMPORTANT NOTE:
IF YOU ARE JUST CHANGE IDENTIFIER FROM GENERAL TAB THAT DOES NOT MEAN IT UPDATE AT ALL. KINDLY CHECK WITH ALL POSSIBLE PLACES BY SEARCH AND REPLACE IT WITH NEW IDENTIFIER.
XCODE VERSIO: Version 9.0 (9A235)
I ran into this same issue and a quick click on Product > Clean did the trick for me!
If you are using CocoaPods in your project please have a look at this answer: https://stackoverflow.com/a/44533287/221194
Changing the status of the pods subdirectory helped me with my project.
I had a similar issue when installing my App on the IOS simulator (with Xcode 9).
I found the issue (at least for my case), it was due to an unauthorized key (Privacy - Location When In Use Usage Description) in the info.plist of the Watch App.
I have moved this key to the info.plist of the WatchKit Extension and now the App installs again.
I hope it will help others people having the same issue.
change deployment target as per requirement.
select project > GENERAL > DEPLOYMENT TARGET
also check ios version of your device
I had the same issue. Log shows it's an error caused by Google Signin:
FunctionName=-[MobileInstallationHelperService stageItemAtURL:completion:], SourceFileLine=392, NSUnderlyingError=0x7f891e9a1270 {Error Domain=MIInstallerErrorDomain Code=4 "Failed to remove ACL" UserInfo={NSLocalizedDescription=Failed to remove ACL, FunctionName=-[MIFileManager _removeACLAtPath:isDir:error:]
However it works on iOS 9 & 10 simulator.
I got same error and I was using Cocoapods in my project and for me help just update pods.
I ran into this issue in Xcode 9.0 beta 5 after renaming a project that contained an iOS and watchOS app. To fix, I recreated the iOS target.
This issue could be triggered by multiple things however if you take a look at the logs at ~/Library/Logs/CoreSimulator/CoreSimulator.log and it states an error that reads :
NSUnderlyingError=0x7fb51c271ee0 Could not hardlink copy /originPath
to /destinationPath
it's possible that your Build number in your Project Target's settings is set to empty.
Go to Project Target > Identity > Build and set a Build number. You'll have to uninstall the the app in the simulator and re-install it before installing updated versions.
Please check the bundle identifier to solve the issue.
I had the same issue on XCode 9.3.1 when I wanted to add google map framework to my project manually.
To fix the problem I remove the google frameworks from Embedded binaries...

ionic app archive failing in xcode 7.2 due to ‘Cordova/CDVViewController.h’ file not found

I am developing an ionic app for iOS and it is building fine, but when I archive it in xcode, it is throwing "‘Cordova/CDVViewController.h’ file not found" error in xcode 7.2.
I have tried usual suspects such as solution suggested in https://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232, but nothing worked. I have also tried archiving in xcode 7.1, 6.4 but the same error exists. I am using ionic 1.2.4.
Some of my project screenshots (if it helps)
let me know if you need more info.
2 things to try
1st)
you have screen shotted your header search paths i don't see a path to Cordova
try adding $(SRCROOT)/WhereCordovaIS to the header search paths
also do the same for Library Search Paths
2nd)
In the Cordova Lib make sure the headerFiles that are missing 'CDVViewController.h' is included in the 'copy files build step' in BuildPhases
is in the copy
Hi #David I tried your answer. Didn't work. However, I tried ionic's weather app and it worked. So I thought the issue might be with my environment. I cut out js, css and views folder and put it in a fresh repo and it worked like a charm.

App begin to crash on iOS 9.1 with Parse

I was using Parse with iOS 8.4 and Xcode 6.4 successfully. The parse version which I was using 1.7.5. Recently, I have updated my pods to latest and parse version is now 1.9.1 and also project settings to compile for 9.1. Secondly, I am using Xcode 7 now.
Everything compiles good and build is successful. However, when I am trying to run the application I get below error.
dyld: Symbol not found: _OBJC_CLASS_$_PFACL
Referenced from: /Users/ankur/Library/Developer/CoreSimulator/Devices/5924BE2D-5302-4140-B9C1-4E1D671B3C1F/data/Containers/Bundle/Application/9C046EDE-986D-4A6E-B461-38D7F859F5C7/myapp.app/myapp
Expected in: flat namespace
in /Users/ankur/Library/Developer/CoreSimulator/Devices/5924BE2D-5302-4140-B9C1-4E1D671B3C1F/data/Containers/Bundle/Application/9C046EDE-986D-4A6E-B461-38D7F859F5C7/myapp.app/myapp
I looked for PFACL and it is part of PODS. I can find it under PODS.
Not sure what is wrong here but looks like something missing?
Thanks for the help
Ankur
After waiting for so long and unable to receive an answer, I posted this on Parse Git page here https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/526#issuecomment-154668196. After getting a response, I investigated further and found that earlier version was able to run without [Parse enableLocalDatastore] however with newer version the moment I put that extra line of code the app is running perfectly. Though there are no errors while compiling the app in both cases.
I thought to share it here with the community so in case someone else face the similar problem it is helpful for them to try it.
Thanks for helping, the problem is sorted
Ankur

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

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/CDVViewController.h' file not found
in MainViewController.h file.
Searching through solutions on StackOverflow and elsewhere suggests that setting the project's Header Search Path from "$(OBJROOT)/UninstalledProducts/include"to "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" seems to solve the issue for a lot of people. However, this did not resolve the issue for me.
Is there anything that could be amiss? I never encountered a problem like this prior to updating Xcode.
Associated screenshot:
UPDATE: It seems like updating my Mac OS X to El Capitan might have fixed this problem as I no longer get it. At the time of posting this question, I was on Yosemite. Hope this helps anyone encountering the same issue
This is the solution!
Add this line to your Build Settings -> Header Search Paths:
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
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
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
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.
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

Resources