Xcode "Quoted include in Framework Header" - xcode

I am using Xcode Version 12.0.1 (12A7300). When I tried to build a simple online course project, it built successfully, but I keep getting the warning to update to recommended settings regarding Quoted include in Framework Header.
I am NOT doing anything with pods at the moment. In fact, I uninstalled and removed pods completely from my Mac just in case it contributed to the problem. How do I resolve this issue?
I hesitate to click "Perform Changes" as I think this is exactly what will cause pods to blow up double-quotes vs. angle brackets issue later. I want to solve this issue first before I proceed.

I had to do this for one of my projects just now:
Go ahead and click "Perform Changes". This will enable the dreaded warning but also update LastUpgradeCheck in your Xcode project file. The new value in LastUpgradeCheck will prevent Xcode from showing the "Update to recommended settings" alert for this recommendation.
Then, manually disable the "Quoted Include In Framework Header" warning in your project file. You can follow the instructions in this answer if you just select "Flash Chat iOS13 project" instead of "Pods" in Step 1.
The result should be that your project file will have an updated line looking similar to LastUpgradeCheck = 1210; (possibly with a different number), and then one or more added lines with CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;.
If you add back in cocoapods later, you may have to repeat the steps for the Pods project, or you may be able to get by with just updating cocoapods if the fixed version is released.

Related

Xcode project "enable recommended warnings"

I just updated to Xcode 9.3. I opened my project and I have a Project Settings warning that says "Build Settings" with a checkmark and "Project "X" - Enable with Recommended Warnings" also with a checkmark. Under that it says
This will enable the following recommended compiler warnings:
Implicit retain of 'self' within blocks
Overriding Deprecated Objective-C Methods
Pressing "Perform Changes" brings up "The working copy X has uncommitted changes." and underneath: "Do you want to continue upgrading to the latest recommended settings and performing project cleanup? It may not be possible to undo this operation." With a continue button.
As a beginner I haven't seen this before and I don't want to break anything. My question is, what should I do? Is this normal behavior and should I allow it?
It’s typically fine to click through this alert and enable those warnings.
This is normal behavior, which typically occurs after updating Xcode to a new version.
Each Xcode project has a bunch of compiler settings, which can vary from project to project. Some of those determine which things in your code it will warn you about. There are a set of these that are turned on by default, and that set changes over time.
The second alert about the working copy having modified files is because you are using git and haven’t committed all changes.

Include of non-modular header inside framework module 'GoogleMobileAds' after swift 2 conversion

Good day everyone. So i just migrated to swift 2.0 and am facing this problem as titled: Include of non-modular header inside framework module 'GoogleMobileAds'. 21 occurrences. What I have done so far:
I removed every item on my pod file and reinstalled one at a time. Just before adding the GoogleMobileAds, everything would work and deploy to the simulator. Once I add it in, I see all these errors.
I have tried:
"Allow non-modular Includes in Framework Modules" to "Yes".
I added the "post_install" script for
"'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'" to "yes" at
the pod file.
Strange thing was it did work for half a day on the simulator. When i was ready to deploy to device, it stopped working. I decided to reinstall the pods and it doesnt work even on simulator again.
Please help.
Attached some screen shots:
I have faced a similar situation as yours.
In my case, the following steps solved the issue.
Re-installed AdMob SDK after removing it once using command 'pod install'.
*This step may not be needed. I'm not sure.
Added the following line to my bridging-Header file.
#import <GoogleMobileAds/GoogleMobileAds.h>
You might have to create the file into your project manually if you don't have it. The file's name is [Your project name]-Bridging-Header.h for example, MyApp-Bridging-Header.h
You may also need to add the path of the file to your settings of "Objective-C Bridging Header" in "Build Settings" -> "Swift Compiler - Code Generation" like
MyApp/MyApp-Bridging-Header.h
The path is relative from your project root as with your Info.plist File's path in your settings.

XCode 4.5.2: Cannot run on the selected destination - Facebook SDK

Cannot run on the selected destination
The selected destination does not support the architecture for which the selected software is built. Switch to a destination that supports that architecture in order to run the selected software.
I am using the Facebook-iOS-SDK from GitHub: https://github.com/facebook/facebook-ios-sdk
tested latest commit (2a030e795aed343e7614e149a5ebdfa78b223a72) and sdk-version-3.0.8 tag, both having the same problem. Tested the Hackbook, Scrumptious, FriendPickerSample on both iDevices and iSimulator.
It was working before (on older version of XCode), so it could be the xcode upgrade, but my other projects work fine. I've tried multiple solutions on this site which works for others but not on mine, does anyone encounter this before with Facebook-SDK specifically? Thanks in advance!
EDIT: I have found the issue, if you install the FacebookSDK and you add the resources folder to get the facebook image buttons there is a Info.plist file. XCodes goes weird with this info.plist file. I have deleted it, made a clean and now it works perfect :)
OLD:
The same behavior here. On another projects it runs perfectly but in this one I have always the same problem. After some XCode restarts sometimes it runs ok, sometimes I "click" on run and then nothings happens, sometimes it runs...
The best option is to move the project to other path. Adding and removing the libsql3.0 from lib dependencies sometimes works too.
Sadly, it seems like this is a bug on XCode, it will build and run fine for once every couple of restarts and with the entire project directory moved to other path. This is very sad because apple always make good products for consumer but all their developer software are crappy compared to big M's
I ran into this problem. It seemed to start right after XCode hung and I had to force quit. This was a day before the 4.6 update. I hoped that that update might fix the problem. And I did get one successful build before I started getting that message (actually in 4.6 there are two different but similar messages that seem to alternate.
I solve the problem by letting XCode update the project settings. I first noticed this possibility when I made a duplicate copy of my project and open that, but it is clear that this option is also available in the original. Here is what I did
In the Issues Navigator just under my project "MyProject project" I had a message MyProject.xcode
Validate Project Settings
Update to recommended settings.
I click on that and I was presented with a dialog box with 4 checkboxes some explanatory text and the option to perform changes. I just let Xcode make those changes and everything has been fine since.
Remove info.plist from Facebook Resources folder. Changed the location of XCode project and Reset the iPhone simulator...now it is working :) Buggy XCode !!

Unexpected errors when building for profile in XCode 4.5

I have a project that I refactored for iOS 5 and ARC. It builds and runs fine, Analyzer finds nothing and I'm on the brink of submitting it to the App store. Before doing that, I thought it would be a good idea to check for leaks, just in case I missed something during the arcification. However when I choose "Product -> Profile" from the XCode 4.5 menu I get a flood of warnings and errors. All of them indicate that the build for profiling is not recognizing that the project is using ARC. The scheme settings for profile are set to use the same arguments and environment variables as run, but run works and profile doesn't. If I choose the "Profile without building" action, everything works. I've checked to make sure that there is only one version of XCode installed, checked the path, and it's all good. This is not a show stopper, but I'd like to know what's happening, and what setting to tweak if that's all it is.
Problem solved by deleting project.xcworkspace and xcuserdata folder from the project bundle. Apparently they got corrupted somewhere along the line.

iOS5 Storyboard error: Storyboards are unavailable on iOS 4.3 and prior

I've built a small app using storyboards and it ran great. Just before final testing I decided to try it out to see if it runs on iOS 4.3. I clicked on the gray 5.0 in the project settings and selected 4.3.
The app failed to build with the following error message:
Storyboards are unavailable on iOS 4.3 and prior
Both the iPhone and iPad storyboards tell me that.
The issue that when I switched back to iOS5 target, I still keep getting these errors from both storyboards, and the product won't build!
I checked: iOS Deployment target in projects settings is 5.0
Target app deployment target is 5.0
Build settings uses iOS 5.0 SDK
What else do I need to do to restore my project to a buildable state? Is this a brand new bug or am I forgetting something?
Update: I kept getting this error even after doing a clean.
I changed the debugger in Schemes to "LLDB" and did an additional clean, the project now builds and compiles
I also got this problem and finally I solved this by following procedure:
Open XXXXXX.storyboard
Open Identity and Type tab in your right view of Xcode.
Set the value of Development in Document Versioning to "Xcode 4.2" (my default value is "Default Version (Xcode 4.1)".
Change the value of Deployment from Project SDK Version (iOS 5.0) to iOS 5.0, then back to Project SDK Version (iOS 5.0)
Rebuild the project and the error should be resolved.
The solution that worked for me was just to delete the ~/Library/Developer/Xcode/DerivedData directory for my project.
I'm just going to add this one as another possible answer here, as the first solutions worked for me several times (as I mentioned in my previous comment) until today when I couldn't get my project to compile for love nor money with the same error.
With the debugger changed and Xcode set to 4.2 and restarting several times I could not compile. However I discovered another way to get around this issue.
Select the storyboard in the left column and 'Show in Finder' and drag the storyboard to the desktop. Xcode will now change its colour to red and be unable to compile.
Clean the project, drag the storyboard back from the desktop to the directory in finder.
Then, it builds and the error goes away again.
I don't know what triggered the error originally as I'm developing under iOS5 and building for 4.3, but it seems to come up from time to time and.
This seems to be a bug in the latest XCode that I've also run into too, did try the OP's solution of changing debugger and that had no effect.
It cropped up for me since I tried storyboard with 4.3 and then tried to change back.
My solution was to close XCode, open it again and clean. Then I compiled and it worked fine.
Hope this helps others.
While other solutions helped me, they didn't work 100% of the time. I don't know enough about XCode to know how reliable this solution is, but at least it worked for me so you can try it in your project.
In the left hand side of Xcode, open the project navigator. Click the top item, which is your project. In the panel immediately to the right, you'll see a choice to choose between your project and its targets. Click the project, and then in the panel to the right, under the "Info" tab, set "Command-line builds use" to Debug (in my two projects where I was having the error, both were set to Release).
A picture is probably easiest:
Another idea: Open another project with storyboards in Xcode and try to run that. If it succeeds, you can come back to the current project and it should build. I think this clearly indicates a bug in Xcode.
After trying all the answers in here (removing the Storyboard reference, quitting Xcode, cleaning, changing debugger, etc.), none worked (with Xcode 4.5).
The only way I got it to rebuild (and it was a total guess) was to open the Storyboard file in a text editor and delete the following line:
<deployment version="1280" identifier="iOS"/>
It should be near the top of the file, in the <dependencies> section. After that, the project was built successfully and Xcode even re-added that line to the file, but, it still builds...
Go figure...! Hopefully it can help someone!
At last, an elegant workaround that seems to do the trick for me! (I sure hope it works for everyone else. This one's stubborn.)
Once your settings are back safely in iOS 5-land, try Cmd-Option-Shift K (aka "Clean Build Folder..." from the menu - hold down Option to see it), then build.
the solution is simple,
right click your storyboard file, and show in finder
then select the folder where the file is (this would probably be in the en.lproj folder)
right click on the MainStoryboard.storyboard file causing the problem and open with text edit
find the line that reads or something like this:
<development version="4300" defaultVersion="4200" identifier="xcode"/>
and change it to something like this:
<development defaultVersion="4300" identifier="xcode"/>
save the file and build. Et voila...
Ok, I tried everything above and problem still occurred. So I just remove storyboards (as reference not move to trash). then build successfully; after that I added them again; Build, And finally worked.
I was having the same problem. I tried all the above answers and all combinations and nothing worked. Then later after doing some research, I analysed that the simple fact that the error that was throwing at me was straight forward.
Just go to the Build settings and instead of selecting the xcode project file, select the product file and change the Deployment target to 5.0 or 5.1. The error should go off.! I did this in Xcode 4.3 in Lion OSX. It worked fine for me!!
I also had this problem, and nothing helped. Even opening another project and trying to build failed.
What I did, and what for me, was going to project -> info and under "Deployment Target" change iOS Deployment Target to whatever, build and than change back to whatever it was and build again.
Here is yet another random, voodoo, flail that seemed to workaround the bug just now. (after other techniques here had not helped) I renamed the storyboard file (and the entry for it in the info.plist file). Haven't tried the "drag to/from desktop" ritual yet.
Tonight, I have lost like 45 minutes to this issue. grrrrr. Ok I feel better now.
After trying all the suggestions above, without success, I got my code to compile doing the following.
Edit -> Refactor -> Convert to Objective-C ARC
rm -rf $HOME/Library/Application Support/Developer/Shared/Xcode
rm -rf $HOME/Library/Preferences/com.apple.dt.Xcode.*
rm -rf $HOME/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState
rm -rf $HOME/Library/Developer/Xcode
seems to help with Xcode 4.3.2
Had similar issue. XCode would build and run other projects fine but couldn't get rid of the error on project I had changed, not even backups from server. Tried all the above solutions but nada. Here is what worked.
Uninstall XCode.
Delete user/library/developer/XCode folder.
Reinstall XCode (maybe you should start this before searching for the folder, download took me 20 minutes).
Start up, clean and build.
Worked for me. Saved me some time. Sometimes when the scalpel doesn't work it's time for the hatchet. Now I get to pick a new font to code in (this will clear your preferences)!
The only solution that has worked for me is to create another project without Storyboarding enabled, build it, then switch back to the storyboard project, clean and build.
Here is yet another random, voodoo, disconnect your iPhone if it is connected.
I simple changed deployment target to 4.0 and Development to 4.3 from MainStroyboard.
I clean the project; and restarted the mac, :) i know it sounds funny but restarting xcode didn't helped. maybe there is a cache in memory...
Then i built the project ; it was ok!

Resources