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

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

Related

How to fix No App Bundles On XCode Version 12.4 (12D4e)

I have a problem uploading my testing IOS .ipa on the app store, so right now after the uploading process, there is an error pop up that Error ITMS-90167: "No .app bundles found in the package.
Library Use:
React Native: Latest Version
This is quite new and interesting to me, it is my first time to encounter this error.
Can anyone help me with this kind of error and how to solve this kind of error?
Hope someone helps me to fix this.
More likely this issue related to certificate or your current Xcode version.
Here what you can do:
Open Target -> Signing&Capabilities -> Signing Certificate -> Uncheck and check again (this will update your entitlements).
If 1st doesn't work for you. Try to update it to latest XCode 13.1 and upload again.
There is similar question opened for Xcode8 with workaround, that could help you too: https://stackoverflow.com/a/37931353/4977439

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...

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

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

Getting UnityException: Launching iOS project via Xcode4 failed

I am trying to port unity project but its giving me this error " Getting UnityException: Launching iOS project via Xcode4 failed. " . I have also using Xcode 5 & Unity 4.2 for this compilation.Please let me know how can i solve this issue.Its little bit creating frustation me.
I had similar issue and found answer here:
http://forum.unity3d.com/threads/200437-Unity-4-2-0f4-and-Xcode-5-not-working
and here
http://answers.unity3d.com/questions/539677/ios-7-and-xcode5.html
Short answer is:
Build project in Unity 4.2
In Xcode open File/Open Recent/Unity-iPhone.xcodeproj
In project go to Build Settings/Build Options/Debug Information Format and set it to DWARF
Hope this helps! ;)
P.S. Unfortunately this has helped only partially. Build and run still don't work.
In my case I'm not sure what did the trick, but it was probably a setting under:
Unity Preferences -> External Tools -> iOS Xcode 4.x support [untick]

PhoneGap Xcode Missing Header files on Build 'Cordova/CDVViewController.h' file not found

I am using PhoneGap 2.2.0 and XCode 4.5.2.
I can test my programs in the simulators, and I can put them on my devices to test them.
But I simply cannot build for distribution. It always fails with the following error:
my-projevt-path/Classes/AppDelegate.h:30:9: 'Cordova/CDVViewController.h' file not found
I've seen this problem around the web and still can't make it work, given whatever solutions have been posted.
I've changed things in Build Settings, I've reinstalled PhoneGap, I've run new lines in terminal, I've done my app over starting a new PhoneGap project from scratch, I've checked preferences in the build location in Xcode... I can't figure this out AT ALL.
Please, can anyone help? I've been working on this for days.
Thanks!
Problems in Xcode
If you have compilation problems related to missing headers, the build products should build into the same build directory. You may need to set the preference "Xcode Preferences -> Locations -> Derived Data -> Advanced…" to "Unique". This is the default setting for Xcode on a fresh new install, if you upgraded from older versions of Xcode, you might have a legacy preference in there that you need to update.
Found the answer!!!
Yes I am getting the same problem yeah and some help could be great.....
I followed all the instructions even with the ./update_cordova_subproject path as well it does not work. Also I solved the locking problem but I could not find the solution to this problem
The answer, in my case, had seemingly nothing to do with the error message that was being sent. Missing header files? That didn't seem to be the issue. Or, at least, not the direct cause of the issue.
This was an issue with my provisioning/certificates being somehow not right. I had re-created them several times, but it continued to be an issue.
I sent the job to another developer, who opened it on his machine, revoked my certificates and created new ones, and built it without changing anything else. He forwarded me the certificate, the provisioning, and an archive of the job. I opened the archive in xCode and validated it and uploaded it. And it was fine.
If you have got this problem, be certain your certificate/provisioning is set up right. I thought mine was, but apparently it wasn't? The "Apple Process" is definitely weird, and when certificates / profiles gets messed up, problems arise.
I was having the same problem and just solved it! First of the problem may very well be because of your distribution provisioning files... but when you look at the Project Navigator in xCode at the top level you have your Project and inside you have the CordovaLib.xcodeproj click on this file and you will see the iOS Deployment target. Make sure the proper IOS version is selected there. This is 1/2.
2) Then you need to duplicate the Release configuration and rename it Distribution. While the CordovaLib.xcodeproj is selected make a build and then build the actual project. This worked smoothly for me.
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.

Resources