Why does Xcode12 give me SQLite Compiler Error? - xcode

After upgrading to Xcode 12 / iOS 14 my project is no longer compiling/importing the SQLite3 library because it is previously defined in the iOS 14 usr/include.
Is this something that I can fix in my build settings? Can I remove it from the usr/include?
The project uses a mix of ObjC/Swift, CocoaPods is bringing in SQLite.swift

I've found a temporary solution by using an experimental branch for this CocoaPod. Anyone else experiencing this problem should try:
pod 'SQLite.swift/standalone', :git => 'https://github.com/stephencelis/SQLite.swift', :branch => 'master'

Related

Primary key property 'name' does not exist on object 'RealmSwiftPermissionRole'

I'm using RealmSwift as a database in my swift project. Today, after opening my project in Xcode-beta version 11, my app crash with this error:
Terminating app due to uncaught exception 'RLMException', reason: 'Primary key property 'name' does not exist on object 'RealmSwiftPermissionRole''
My app works properly on the previous version of Xcode(10.2.1).
RealmSwiftPermissionRole is a class from the Realm and I don't have access to it. Maybe in their feature updates, they fix this bug but for now, I search a lot but didn't find any solution.
(I clean the project, delete the app from the simulator, and run the project again but nothing changed.)
Any suggestion?
There's an issue with iOS 13 and Xcode 11 which may cause this problem. All String properties of Realm classes with a default String value set are disregarded somehow.
You can fix this by updating to the latest version (currently 3.20.0) and then on Xcode: Product -> Clean Build Folder.
If you're using cocoa-pods:
Open your project's Podfile, and replace RealmSwift line with:
pod 'RealmSwift', '~> 4.4.1'
Then, open terminal on the project's folder and:
pod repo update
pod install
Developers of Realm have started working on Xcode 11 compatibility. From that page...
Using Realm with Xcode betas requires building from source, and typically will require using dev branches rather than releases.
Carthage
github "realm/realm-cocoa" "tg/xcode-11-b1"
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer carthage bootstrap -no-use-binaries
CocoaPods
pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'tg/xcode-11-b1', submodules: true
pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'tg/xcode-11-b1', submodules: true
Explicitly including the Realm pod as a dependency is required as otherwise it'll try to use the latest release of the obj-c part.
Note that last sentence. You must include the Realm pod as a dependency or it'll use the non-beta version and it won't work.
I had run into the same issue with RealmSwift 4.3.1, the problem was I forgot to mark the property as #objc
#objc dynamic var id = ""
Try deleting and reinstalling your application too.
For me,
Updating the Realm to pod 'RealmSwift', '~> 3.20.0'
and update the pod install
Works for me.

Cocoa pod v0.39.0 not working with Xcode 8

My current project using cocoa pods of version 0.39.1, and my current pod version in my system is 1.1.1, so when i try to install the cocoa pods in my project path, it gave me warning saying
[!] Invalid Podfile file: [!] Unsupported options {:exclusive=>true} for target Xxx Xxx XxxxTests..
so i have uninstalled pod v1.1.1 and installed 0.39.1. Now when i run install command i get another warning
[!] The master repo requires CocoaPods 1.0.0 - (currently using 0.39.0) Update Cocoapods, or checkout the appropriate tag in the repo.
i'm aware that Xcode 8: Only works with CocoaPods 1.1.0
Should i update my project pod file to latest pod version or should i work with lower version of xcode so it supports v0.39.0
I recently completed a project where I had to migrate a dozen or so (private) Cocoapods from 0.39 up to 1.1.X.
It's actually not that hard, once you get the hang of it (and, at least in my case, the Podfile I put together for 1.1.X continued to work the occasional times I had to drop back down to Pods 0.39)
As you've discovered, you do need to remove ":exclusive => true" and "link_with" (which gets replaced with abstract_target). More information can be found in this Pods migration guide. Here is another "mini" example.
And other people have asked related questions here before. My recommendation is to go up to Xcode 8, otherwise you'll won't be able to do pod update and keep up to date with the latest changes in the Pods you're trying to leverage in your code.

Xcode 7 - Cocoapod not importing

i am using Xcode 7 Beta3.
I tried to include one dependency, so this is my podfile:
platform :ios, '8.0'
use_frameworks!
target 'Test' do
pod 'Alamofire', '1.2.3'
end
target 'TestTests' do
end
target 'TestUITests' do
end
But when i import this class:
import Alamofire
i get:
No such module Alamofire
Anybody had this issue before?
Thanks and Greetings!
I ran into issues where Xcode 7 Beta 5 (7.1)(newest at the time) mixed with a Podfile would not recognize any of the pods I wanted to import.
Cocoapods updated to fix these issues.
[sudo] gem update cocoapods
Once that was up to date, I checked the git repositories that were included in my Podfile to see if any of them had Swift 2 branches.
After adding the :branch => 'swift-2' to the Podfile for the pod I am using, I was able to make the error in Xcode go away, and import the module.
Based on the comments on your question, Alamofire does have this branch and you should use that.
Run pod update on your project after saving your Podfile.

PromiseKit doesn't compile with Swift 2 and Xcode 7

This is the error I am seeing when I try to build my project after installing PromiseKit.
Cannot import module being compiled.
This is what my PodFile contains to install PromiseKit.
pod 'PromiseKit', :git => 'https://github.com/mxcl/PromiseKit.git', :branch => 'swift-2.0-minimal-changes'
I tried having the following statement in PodFile, but it was throwing many more compilation errors, so I tried the above statement.
pod "PromiseKit", "~> 2.0"
This is a bug in the minimal-changes branch. The swift-2.0-beta5 branch will work, though it may require more changes in your project. I will fix the bug in minimal-changes.
Edit: Fixed: https://github.com/mxcl/PromiseKit/commit/d969c72b9f959d7fb5a68f117142c79bf0c3098d

Unable to find a specification for `Mapbox` installing with CocoaPods for iOS 7

I am building an app targeted to iOS 7 and I want to use Mapbox. I added
pod 'Mapbox'
to my Podfile, but 'pod install' responds with:
[!] Unable to find a specification for Mapbox.
I cannot change back to platform :ios, '5.0' because I have other libraries that require the later version. Is there a CocoaPod for MapBox that works with iOS 7?
Thanks!
CocoaPods is case sensitive. You need to specify MapBox
The old closed issue at https://github.com/mapbox/mapbox-ios-sdk/issues/230 isn't the problem here.
This is: https://github.com/mapbox/mapbox-ios-sdk/issues/377
Which details the fix for now:
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk', :tag => '1.1.0'

Resources