I am trying to implement the in-app Chat SDK from Mirrorfly to my project, however when i try to initialize their UIKit i get the following error:
Failed to build module 'FlyUIKit' for importation due to the errors
above; the textual interface may be broken by project issues or a
compiler bug.
I tried deleting my cache as well as re-installing all my Cocoapod dependencies, which didn't help. Afterwards i updated my xcode since it might have been an xcode problem but afterwards i got this error:
Failed to build module 'FlyUIKit'; this SDK is not supported by the
compiler (the SDK is built with 'Apple Swift version 5.7.1
(swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is
'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5
clang-1400.0.29.51)'). Please select a toolchain which matches the
SDK.
My Settings are:
MacBook Pro (M1)
MacOs Ventura
Xcode 14.2
enable Bitcode is disabled
BUILD_LIBRARY_FOR_DISTRIBUTION is true
other than that SDK there was nothing else imported.
My Podfile:
target 'iosApp' do
use_frameworks!
platform :ios, '14.1'
pod 'shared', :path => '../shared'
pod 'Alamofire'
pod 'XMPPFramework/Swift'
pod 'Toaster'
pod 'Firebase/Auth'
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'SDWebImage'
pod 'libPhoneNumber-iOS'
pod 'NicoProgress'
pod 'SocketRocket'
pod 'Socket.IO-Client-Swift', '~> 15.2.0'
pod 'GoogleWebRTC' # WebRTC for Calls
pod 'RealmSwift', '10.20.1'
pod 'IQKeyboardManager'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1'
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
Related
After I added watchOS target, "No such module 'FirebaseFirestore'" appeared in the file which is a member of both targets (main target and watches target). The rest of the pods seem to work correctly. (despite the FirebaseFirestoreSwift, which is not installing when pod install)
I am using Xcode 14.0.1 on an M1 mac.
What is wrong with this pod and how can I fix it?
My Podfile
#platform :ios, '16.0'
use_frameworks!
def firebase_pods
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/RemoteConfig'
#pod 'FirebaseFirestoreSwift'
end
def helpers_pods
pod 'R.swift'
pod 'Resolver'
end
target 'HonestMate' do
platform :ios, '16.0'
use_frameworks!
helpers_pods
firebase_pods
target 'HonestMateTests' do
inherit! :search_paths
# Pods for testing
end
target 'HonestMateUITests' do
# Pods for testing
end
end
target 'HonestMate Watch App' do
platform :watchos, '9.0'
use_frameworks!
firebase_pods
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
end
end
end
```
`
I tried Command+Option+K, cleaned Derived Data, checked is xcworkspace opened. Tried deleting and reinstalling the pods, updated cocoa pods to cocoapods-1.11.3.
Using SPM is not suitable, because I have R.Swift pod.
I also tried installing pods from GitHub repo (https://github.com/firebase/firebase-ios-sdk/blob/master/README.md#installing-from-github):
pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
but have an error The platform of the target HonestMate Watch App (watchOS 9.0) is not compatible with FirebaseFirestore (10.3.0), which does not support watchOS.
Firestore is not available for watchOS. See this table for the Firebase Apple platform matrix support details.
I've been having a recurring issue that has to do with my pod file and my target swift language version. In the past I have gotten it solved by changing my language version to 4.0 (I think).
What happens is that I update my pod file and then I start getting errors in the framework files that I cannot change because it says they are locked.
I do not understand my pod file and language settings that well which is making it hard to troubleshoot.
I'd like to migrate my frameworks to a newer language version like it recommends, but it says I cannot do that until I make them compile with the previous version.
I'm not sure how to troubleshoot or what steps to take to get this all cleared up. Can anyone help?
Here is my podfile
target 'DarkhorseDFS' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
#pod 'RAMAnimatedTabBarController', '~> 4.0'
#pod 'XLPagerTabStrip', :git => 'https://github.com/KelvinJin/XLPagerTabStrip', :branch => 'swift3'
#pod 'BTNavigationDropdownMenu', :git => 'https://github.com/PhamBaTho/BTNavigationDropdownMenu.git', :branch => 'swift-3.0'
pod 'BTNavigationDropdownMenu'
pod 'XLPagerTabStrip'
pod 'SCLAlertView'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'SwiftyJSON', '~> 4.0'
pod 'Fabric'
pod 'Crashlytics'
pod 'Kingfisher'
pod 'Tutti'
pod 'Segmentio'
#pod 'PVSwitch'
pod 'MBProgressHUD'
pod 'Alamofire'
end
target 'DarkhorseDFSTests' do
inherit! :search_paths
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
I've also tried changing the settings in under 'Target'.
Heres an example of some errors I'm getting, but also many 'name has been changed' errors.
All these frameworks worked before trying to install a new pod. But now I can't get the errors to go away, even when I uninstall!
Can anyone please help?
I needed to change my swift language version for each pod individually, not just in project build settings.
Click on Pods in the navigator, then the language version can be set in build settings.
I've tried creating a file with the following:
create Podfile
'
platform :osx, '10.0'
use_frameworks!
target 'MyApp' do
pod 'SwiftyJSON', '~> 2.2.0'
end
run command
pod install
this is retuned:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "SwiftyJSON":
In Podfile:
SwiftyJSON (~> 2.2.0)
Specs satisfying the `SwiftyJSON (~> 2.2.0)` dependency were found, but they required a higher minimum deployment target.
I thought maybe it had to do with the platform so I go to the SwiftJSON documentation on CoCaoPods.org.
This is what I found
Oh look maybe instead of 'osx' it's expecting 'macOS'. I update my Podfile to this:
platform :macOS, '10.0'
use_frameworks!
target 'Maconomi' do
pod 'SwiftyJSON', '~> 2.2.0'
end
and run the previous command again and get this error instead:
[!] Invalid `Podfile` file: Unsupported platform `macOS`. Platform must be `:ios`, `:osx`, `:tvos`, or `:watchos`..
# from /Users/travis.rivera/Documents/macOSAPP/Maconomi/Podfile:1
# -------------------------------------------
> platform :macOS, '10.0'
# use_frameworks!
# -------------------------------------------
so now I'm stuck.
platform :osx, '10.10'
use_frameworks!
target 'MyApp' do
pod 'SwiftyJSON', '~> 2.2.0'
end
then
pod install
I missed the osx minimum version number.
I'm upgrading some pods, namely to support ParseLiveQuery. I'm now running into an error in one of my header files
Could not build module 'FBSDKShareKit'
Also in my errors:
Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.3'
inhibit_all_warnings!
use_modular_headers!
workspace 'myApp'
target 'myApp' do
pod 'ROGoogleTranslate'
pod 'Parse', '1.16.0'
pod 'Parse/FacebookUtils'
pod 'ParseUI', '1.2.0'
pod 'ParseLiveQuery'
pod 'SocketRocket'
pod 'Bolts', '1.9.0'
pod 'Bolts-Swift', :git => 'https://github.com/BoltsFramework/Bolts-Swift', :commit => 'e9baa72d04521c3b25ef4fa6fef12b340953ee02'
pod 'JSQMessagesViewController', '7.3.3'
pod 'FBSDKCoreKit', '~> 4.28.0'
pod 'FBSDKShareKit', '~> 4.28.0'
pod 'FBSDKLoginKit', '~> 4.28.0'
end
I've deleted derived data, cleaned, cleared out my Pods directory and Podfile.lock. Any suggestions on how to fix?
Edit: this is being caused by including use_modular_headers! which stems from my actions after seeing this error
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod ParseLiveQuery depends upon Parse and Bolts, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.
use_modular_headers!
Works for me
I have a project written in Swift with CocoaPods installed. The project have a Today Extension and I added some Pods to this Target. So far so good.
Running on Simulator it's okay! But running on device I got this error:
dyld: Library not loaded: #rpath/Alamofire.framework/Alamofire
Searching on web I found a post from Natasha The Robot talking about the right way to create your Pod file and my Pod seems like this:
# Podfile
platform :ios, '8.0'
use_frameworks!
# My other pods
def my_pods
pod 'Alamofire'
end
target 'MyAppTarget' do
my_pods
end
target 'MyTodayExtensionTarget' do
my_pods
end
I've tried to use link_with but the same error appears
The only solution that I found was deintegrate Cocoapods and add manually the Frameworks.
Does anyone have other solution?
Thanks
Have you tried to repeat your pods in your two targets?
Maybe it's not a very clean solution but I've a project with the same situation as yours an it's working with a Podfile like this one:
# Podfile example
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
target 'mainapp', :exclusive => true do
platform :ios, '8.0'
#Crashlytics
pod 'Fabric'
pod 'Crashlytics'
#Google analytics
pod 'Google/Analytics', '~> 1.0.0'
end
target 'widget', :exclusive => true do
platform :ios, '8.0'
#Crashlytics
pod 'Fabric'
pod 'Crashlytics'
#Google analytics
pod 'Google/Analytics', '~> 1.0.0'
#Logging
pod 'CocoaLumberjack', '~> 2.0'
end