After adding Core Data to our Objective-C project and adding an Entity, the build started failing with the error:
The “Swift Language Version” (SWIFT_VERSION) build setting error with project in Objective C
It turns out that the default Code Generation language of Core Data is swift, even if the entire project is written in Objective-C.
To resolve the error, click on the added Entity and look at File Inspector. There is a Code Generation section which you'll need to switch to Objective-C. Alternatively you can add the SWIFT_VERSION in your build settings, but I could not find that in our project. (https://stackoverflow.com/questions/52950514/value-for-swift-version-cannot-be-empty)
Solution found on stack overflow: https://stackoverflow.com/questions/47743271/the-swift-language-version-swift-version-build-setting-error-with-project-in
Friday, September 6, 2019
Saturday, June 30, 2018
Automatic Signing and Provisioning Profile FAILED
Yet another post on what I did when receiving an error on the signing step.
The errors were:
The errors were:
- Automatic signing is unable to resolve an issue with the "watch Extension.appex" target's entitlements.
- Provisioning profile failed qualification
After restarting Xcode, switching the Automatic Signing on/off, deleting the Derived Data, and getting a new Distribution certificate, I found that one of the capabilities I needed was turned off. The watch and the app have been using App Groups for a couple years now, and the capability was on all that time. It possibly could have been turned off due to an expired provisioning profile or expired certificate?
If all that doesn't work, simply switch a Capability like Game Center On then Off or vice versa to reset things.
If all that doesn't work, simply switch a Capability like Game Center On then Off or vice versa to reset things.
Tuesday, January 10, 2017
Free up some space from Xcode
Xcode is a space hog. This post is about how to free up some space. I've gotten up to 10gb back by going through this.
~/Library/Developer/Xcode/DerivedData/*
Deleting everything within the DerivedData folder is fine. This just means Xcode will have to rebuild intermediate files for you Apps. You normally would delete some of this anyway when your build starts acting weird.
~/Library/Developer/Xcode/Archives/
Be careful deleting files in here. If you submitted an archive to the App Store and still want to debug it, don't delete it. otherwise, it's fine to delete.
~/Library/Developer/Xcode/iOS DeviceSupport
You can delete any ios versions you do not support anymore.
~/Library/Application Support/iPhone Simulator
This is the old directory used to store simulator data as of Xcode 6. Safe to delete.
~/Library/Developer/CoreSimulator
It is safer to use the "Reset content and Settings" in the options menu of the Simulator. Old versions of the simulator can be deleted here.
Try to run
xcrun simctl delete unavailable
in your terminal.
https://stackoverflow.com/questions/33419301/macos-xcode-coresimulator-folder-very-big-ok-to-delete-content
Try to run
xcrun simctl delete unavailable
in your terminal.
https://stackoverflow.com/questions/33419301/macos-xcode-coresimulator-folder-very-big-ok-to-delete-content
~/Library/Caches/com.apple.dt.Xcode
Caches can be deleted. It'll be recreated anyway.
~/Library/Application Support/MobileSync/Backup
These are your device backup files. You probably need them, but one time I found a 2-year old duplicate backup of my phone here. It's safer to use iTunes to delete your device backups.
Thursday, September 22, 2016
No Matching Provisioning Profiles found
Everything worked fine last week. Updated to Xcode 8 and trying to upload to the App Store brought up this oh so common error:
No matching provisioning profiles found for "Applications/someapp.app..."
To solve this:
No matching provisioning profiles found for "Applications/someapp.app..."
To solve this:
- open Xcode -> Preferences
- click on the Apple ID you're using to sign
- click on View Details
- Right click on the Provisioning Profiles and click on Show in Finder.
- Exit Xcode.
- Select all the files in finder and delete them.
- Re-open Xcode and rebuild (clean build first).
- All should be good now.
Get rid of extra logs like "nw_connection_endpoint_report" in Xcode 8
Of course, the solution to this answer was found on Stack Overflow:
http://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-8-logs/39461256#39461256
Add the OS_ACTIVITY_MODE = disable in the Product > Scheme > Edit Scheme Environment variables.
Posting here in case problems arise from adding that variable and I need to take it off. Some people in the SO post reported NS_Log not printing on device. This may be because Xcode was in beta at the time.
http://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-8-logs/39461256#39461256
Add the OS_ACTIVITY_MODE = disable in the Product > Scheme > Edit Scheme Environment variables.
Posting here in case problems arise from adding that variable and I need to take it off. Some people in the SO post reported NS_Log not printing on device. This may be because Xcode was in beta at the time.
Wednesday, September 21, 2016
Code signing is required for product type 'WatchKit App' in SDK
The error above appeared after updating to Xcode 8. Everything built fine before, but now it built with the error:
WatchKit App requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor
Code signing is required for product type 'WatchKit App' in SDK 'iOS 10.0'
The solution is to make sure "Automatically managed signing" is checked for each target in the General tab. If it is already checked, uncheck it and re-check it.
WatchKit App requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor
Code signing is required for product type 'WatchKit App' in SDK 'iOS 10.0'
The solution is to make sure "Automatically managed signing" is checked for each target in the General tab. If it is already checked, uncheck it and re-check it.
Monday, June 6, 2016
Xcode pod "library not found for"
After updating a pod and cleaning, we starting getting the following error:
library not found for -lAppirater
Apparently when updating pods, the Pod's project file gets completely changed. Users on stackoverflow suggested setting your "Build Active Architecture Only" in the Pod's project settings to the same setting in your app's project setting. After looking at that setting, we found that that setting did change in the Pod project.
http://stackoverflow.com/a/31429968/999816
library not found for -lAppirater
Apparently when updating pods, the Pod's project file gets completely changed. Users on stackoverflow suggested setting your "Build Active Architecture Only" in the Pod's project settings to the same setting in your app's project setting. After looking at that setting, we found that that setting did change in the Pod project.
http://stackoverflow.com/a/31429968/999816
Subscribe to:
Posts (Atom)