When I configure the FirebaseApp (by calling FirebaseApp.configure()), we get a EXC_BAD_ACCESS in CFStringGetLength. This happens since Xcode 9/iOS 11.

FirebaseApp.configure() import UIKit
import FirebaseCore
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
...
}
...
}
A few questions:
Followup question: Are you using cocoapods, or are you downloading the frameworks and manually configuring them? If so, note that there is a resource bundled into the TagManager framework that needs to be included.
Thanks for your response @eburley. Let me elaborate:
workspace 'Project.xcworkspace'
platform :ios, '9.0'
abstract_target 'Shared' do
use_frameworks!
# These pods are available to all targets
target 'Project' do
project 'ios/Project.xcodeproj'
# Native Pods specific for Project
..some pods
pod 'GoogleTagManager', '~> 6.0'
pod 'Firebase/Database'
...more pods
end
end
After some digging I found that if I disable the new buildsystem (which I enabled since Xcode 9 came out), I consistently _can_ compile and run the project. This is probably a hint. Maybe bundles aren't handled correctly with the new build system?
@tomasharkema Thanks for digging deeper and sharing.
It looks like we're seeing https://github.com/CocoaPods/CocoaPods/issues/6936. There is at currently an incompatibility between CocoaPods bundles and the beta version of the Xcode 9 build system.
@paulb777 thanks, that makes sense, we've have the same issue with TwitterKitResources.bundle, as described in the CocoaPods issue.
I'll close the issue, and we'll await the issue to be resolved at CocoaPods'. Maybe you could consider making a remark on the readme that the new buildsystem has issues with the latest Cocoapods and Firebase setup?
I'm seeing this exact issue using binary framework files, though I had to get those binary frameworks from a cocoa pods-enabled app, since they aren't distributed any other way. The bundle is included in my GoogleTagManager framework. It occurs no matter what build process I'm using.
Edit: I was able to get it working by adding the TagManagerResources.bundle into the project and dropping it into Copy Bundle Resources manually. Even though it was within the Resources folder inside the GoogleTagManager.framework, it was not being found automatically (most likely this is taken care of by a normal Cocoapods install configuration).
Now fixed on CocoaPods master : https://github.com/CocoaPods/CocoaPods/pull/7209
With xcode 9.2 and cocoapods 1.4.0.beta.2 problem still exists as @tomasharkema wrote at first place.
Most helpful comment
Followup question: Are you using cocoapods, or are you downloading the frameworks and manually configuring them? If so, note that there is a resource bundled into the TagManager framework that needs to be included.