Upgrade to FirebaseCrashlytics and 'No such module FirebaseCrashlytics' - ios

I am trying to upgrade to FirebaseCrashlytics from Crashlytics. I am able to import Firebase but not FirebaseCrashlytics. Here is my podfile:
platform :ios, :deployment_target => "9.0"
def shared_pods
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
pod 'SVProgressHUD'
pod 'IGHTMLQuery'
pod 'OpenTok', '~> 2.16.3'
end
target 'MyApp' do
#use_frameworks!
shared_pods
end
I cannot uncomment use_frameworks! since it breaks other pods I am already using.
My bridging header:
#import "FirebaseCrashlytics/FirebaseCrashlytics.h"
#import "FirebaseCore/FirebaseCore.h"
This is what I am getting:

According to the firebase docs then you just have to import Firebase, not FirebaseCrashlytics.
https://firebase.google.com/docs/crashlytics/get-started?platform=ios

If you're using it as a Swift framework then make sure you add it to your target's Frameworks, Libraries, and Embedded Content

Related

ARC Semantic issue: No known class method for selector 'componentsWithLink:domain:'

I am stuck with an issue since past 5+ hours, I am working on a react native project of version 0.59.0, it is a 1.5 years old project and it is working fine on android, but when building it for iOS, I was facing many issues one of which was:
ld: library not found for -lFirebaseCore
So to make it work, I included arm64 in excluded architecture and my build started working on simulator but my IPA was not working on a real device, again after removing arm64 and resolving multiple issues, I am stuck with the following issue which is coming in RNFirebaseLinks.m file as :
ARC Semantic Issue Group: No known class method for selector 'componentsWithLink:domain:'
Also sharing my device specifications:
macos: Macbook pro(11.0.1), chip: Apple M1,
Xcode version: 12.4
PodFile content:
**# Uncomment the next line to define a global platform for your project**
platform :ios, '10.0'
target 'PropertiesPublisherNew' do
**# Uncomment the next line if you're using Swift or would like to use dynamic frameworks**
#use_frameworks!
**# Pods for PropertiesPublisherNew**
pod 'Firebase/Core', '6.3.0'
pod 'Firebase/Messaging'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Database'
**# pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'**
**# pod 'RNScreens', :path => '../node_modules/react-native-screens'**
**# pod 'react-native-netinfo', :path => '../node_modules/#react-native-community/netinfo'**
#pod 'react-native-webview', :path => '../node_modules/react-native-webview'
target 'PropertiesPublisherNewTests' do
inherit! :search_paths
**# Pods for testing**
end
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
target 'PropertiesPublisherNew-tvOS' do
**# Uncomment the next line if you're using Swift or would like to use dynamic frameworks**
**# use_frameworks!**
**# Pods for PropertiesPublisherNew-tvOS**
target 'PropertiesPublisherNew-tvOSTests' do
inherit! :search_paths
**# Pods for testing**
end
end
Can anyone please help me out with this?
Add pod 'Firebase/Core', '~> 5.15.0' in PodFile inside IOS Folder

swift linker command failed with exit code 1 Google Maps iOS Util pod install

My build failed with swift linker command failed with exit code 1. The logs specifically say symbol(s) not found for architecture x86_64
This happened ever since I tried setting up Google-Maps-iOS-Utils.
This is my Podfile. There is a pre_install portion because without it, pod install will have a 'Pods-Project' target has transitive dependencies that include static binaries error.
# platform :ios, '9.0'
target 'My App' do
use_frameworks!
platform :ios, '11.3'
# Pods for My App
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils' #the new pod that caused issues
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'GoogleSignIn'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'FirebaseUI/Storage'
pod 'Fabric', '~> 1.7.9'
pod 'Crashlytics', '~> 3.10.5'
target 'My AppTests' do
inherit! :search_paths
# Pods for testing
end
end
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
This is my Bridging-Header.h
#ifndef Bridging_Header_h
#define Bridging_Header_h
#import <Google-Maps-iOS-Utils/GMUMarkerClustering.h>
#endif /* Bridging_Header_h */
Some troubleshooting measures I tried:
Cleaning Build Folder and Building again;
de-integrating pods and pod installing again.
Any help is appreciated. Thanks.
This solution worked for me. There is no need for this portion in the Podfile as well.
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
I also had to delete the framework the binary search path in Build Phases.
Try to add library location in binary search path of build setting.

Xcode 10 Realm Swift "Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2 compiler"

I just updated to Xcode 10 but can't make my project compile because of Realm.
When I use import RealmSwift I have this issue:
Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2
compiler
I use Cocoapod and updated my pods. I have the last version of RealmSwift which is supposed to be Xcode 10 compatible. In the preferences the CLT is set to Xcode 10. In my project settings the language is set to Swift 4.
Using Realm (3.10.0)
Using RealmSwift (3.10.0)
I tried:
clean project and build folder
remove Realm from pods, build project then re-add
delete derived data
Here's my podfile:
source 'https://github.com/CocoaPods/Specs.git'
workspace 'ProjectName'
use_frameworks!
platform :ios, '10.0'
#deduplicate_targets: 'false'
inhibit_all_warnings!
def sharedPods
pod 'TwitterKit'
#pod 'TwitterCore'
pod 'Fabric'
pod 'Crashlytics'
pod 'RealmSwift'
end
target 'ProjectName' do
sharedPods
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
target 'ProjectNameTests' do
inherit! :search_paths
pod 'TwitterKit'
end
end
target 'ProjectNameExtension' do
sharedPods
end
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
I also tried removing the last part or changing with Swift 4.0 and even Swift 3.2.
I already saw similar questions on SOF but any reply worked for me.

Firebase ambiguous reference "FIRMessagingAPNSTokenType... is ambiguous"

After upgrading the Firebase Pods the project have ambiguous reference problems, any suggestions?
when I use the Pods with Version 4.10.0 it works perfectly, but if I use the latest version (5.0.0) I get the error.
My Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'AppName' do
pod 'OpenSSL-Universal'
pod 'Firebase/Core', '4.10.0'
pod 'Firebase/Messaging', '4.10.0'
pod 'GoogleToolboxForMac/Logger'
pod 'AppCenter'
end
target 'AppName DEV' do
pod 'OpenSSL-Universal'
pod 'Firebase/Core', '4.10.0'
pod 'Firebase/Messaging', '4.10.0'
pod 'GoogleToolboxForMac/Logger'
pod 'AppCenter'
end`
Thaks and advance!!
This usually happens if you have the same class in 2 different frameworks. Can it be that you reference both 4 and 5 at the same time?
Try to comment out "BRy-Autenticador DEV" section and build only the 'BRy-Autenticador' target.
Check your Podfile.lock after running "pod install". It should contain only one version of Firebase frameworks.
I solved this problem writing...
[FIRMessaging messaging].APNSToken = deviceToken;
instead...
On didRegisterForRemoteNotificationsWithDeviceToken method.
Thanks!!

Cannot find Objective-C pod on Swift

I have this pod on my project:
Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'AFNetworking'
pod 'Parse'
pod 'Fabric'
pod 'Crashlytics'
pod 'MagicalRecord'
pod 'Socket.IO-Client-Swift'
pod 'SDWebImage'
pod 'MBProgressHUD'
pod 'HexColors'
pod 'SWTableViewCell'
pod 'AKPickerView'
pod 'CRToast'
pod 'MTDates'
pod 'JazzHands'
Project-Bridging-Header
#import <JazzHands/IFTTTJazzHands.h>
#import <MTDates/NSDate+MTDates.h>
#import <MTDates/NSDateComponents+MTDates.h>
I can use any MTDates function at any Objective-C or Swift file.
And I can use any JazzHands function/class at any Objective-C file, but when I try to use it on Swift like this:
import UIKit
class GICalendarViewController: UIViewController{
var separatorFrameAnimation: IFTTTFrameAnimation!
I've got this error:
Use of undeclared type 'IFTTTFrameAnimation'
I've tried to add #objc tag on this class, and this doesn't work.
Any ideas why this is happening?
You use these libraries as frameworks (use_frameworks!). So you have to add
import JazzHands
in your source files. The same you do with Cocoa's frameworks like UIKit.

Resources