Multitude of warnings after updating to XCode 8.3
35 issues appeared after updating to XCode 8.3, similar to the one below:
ld: warning: pointer not aligned at address 0x1002FA73F (_firanalytics_PropertyFilter_fields + 79 from /Users/myUser/Documents/workspace/BestShot/Motion.git/trunk/Motion-Apple/BestShot/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics(gmp_audience.pb_f393ced1a3b55a03cc2eea8de166e335.o))
@morganchen12 apologies... just realized my local pod repo was out of date. No more warnings. Thanks!
Same here, latest version is crashing the unit tests.
import UIKit
import Firebase
@UIApplicationMain
final class ApplicationDelegate : UIResponder, UIApplicationDelegate {
// From `UIApplicationDelegate`
var window: UIWindow?
override init() {
// Configure Firebase
FIRApp.configure() // <===== Will crash here
super.init()
}
}
In a unit test file
import XCTest
@testable import ModuleName
Pressing cmd + u will result into a crash like already described by @esetnik and @mthormann-dhi.
🤦🏻♂️
@DevAndArtist In my case, it's probably what @morganchen12 hinted at. We swap out different GoogleService-info.plist files (per configuration) with a build script in Build Phases for our app targets. That build script phase doesn't exist on my test targets but previously never threw an error. Going to copy to my test targets when I get a chance to see if that does the trick. It should I think.
@DevAndArtist @morganchen12 Something has definitely changed with 3.16.0 with where Firebase is looking for the GoogleService-info.plist file for test targets (or maybe it just wasn't before for test targets). I see the GoogleService-info.plist file being put as normal into the .app that the test target is running against. Anyways I've hacked around it until I have more time to research by bypassing the FIRApp.configure() call while running unit tests (with a simple scheme argument). I do have the Firebase pods installed for my test targets as well so maybe I can remove those at some point (just install Firebase pod for the main app) to fix this issue as well.
with where Firebase is looking for the GoogleService-info.plist file for test targets
I do believe the docs state that the GoogleService-info.plist should be added to all targets.
If you're running into the tests issue with updated Firebase I'd encourage you make sure the GoogleService-Info.plist file is in your test bundle and not just your main app bundle. If for whatever reason you don't want to duplicate the plist file in your test bundle, take a look at FIROptions.init(contentsOfFile:) and FIRApp.configure(with:).
This is no longer a FirebaseUI issue and so this isn't really the right place to discuss this--please at the very least read all the comments and do some digging before posting something.
@morganchen12 I'm aware that this isn't the place for filing these issues. However there isn't a better place on https://github.com/firebase/ for these type of issues, because there is no repository for the iOS projects. The Slack channel isn't a better alternative, because everything is unstructured and no one would ever search through a humongous messaging stream.
You guys should consider open a repo exactly for that matter. Similar to what Realm does for it's Mobile Platform, even if it's closed source project.
https://github.com/realm/realm-mobile-platform
Thanks. ;)
FWIW: I did a pod update and all warnings have happily vanished.
Installing Firebase 3.16.0 (was 3.15.0)
Installing FirebaseAnalytics 3.8.0 (was 3.7.0)
Installing FirebaseCore 3.6.0 (was 3.5.2)
Installing FirebaseInstanceID 1.0.10 (was 1.0.9)
Installing FirebaseMessaging 1.2.3 (was 1.2.2)
@morganchen12 I concur with @DevAndArtist. Please tell us where to discuss this if this isn't the place. I'm still running into the exact same issue loading a valid FIROptions file or even the individual options (which should make all the test bundle stuff moot, right?) overload on init. I verified the GCM Sender ID exists in the FIROptions as well before the FIRApp.configure(with:) call. I'd be happy to take this conversation elsewhere. Just need to know where please.
Thanks a ton!
Yeah, that's why I'm answering the questions here :)
In the future there will be a better place for this sort of discussion, but this is deliberately vague because I can't talk about it until it happens. Stay tuned!
@mthormann-dhi InstanceID will look for a valid GCM sender ID in every FIRApp that's configured. Are you configuring more than one FIRApp?
@morganchen12 Thanks for sticking with this :)
No, just one time per app launch. Our app is multi-tenant (supporting different app targets) with multiple configurations but we only call FIRApp.configure once per app launch (with one .plist) in appDidFinishLaunching. The error is happening even with the explicit FIRApp.configure call (with sender ID and every parameter correctly filled in except for our unused androidClientID and deepLinkURLScheme).
If you set an exception breakpoint and print out [FIROptions defaultOptions].GCMSenderID, what does it say?
▿ Optional
- some : "123456789012" (String changed from our live GCM Sender ID)
This is most likely a bug on our end, I've let the Instance ID team know and will keep this updated.
Thanks!
3.16 Fixed all the warnings on the simulator, however when archiving I'm getting similar errors.
- Apple Mach-O Linker (id) Warning -Linker asked to preserve internal global: 'sharedInstance.shared.Instance' -Linker asked to preserve internal global: '__block_descriptor_tmp' -Linker asked to preserve internal global '__block_literal_global' along with 200+ more
I built a fresh Xcode project only configuring Firebase and the warnings only occur after installing 'Firebase/AdMob'. I tried some things with linking binaries with libraries with no luck. Also in a timely fashion this popped up on the Apple forums a few days ago https://forums.developer.apple.com/thread/75793 . Same warnings, makes me think this whole thing might be related and if it's not I'm sorry, i'm new to this.
Had 39 Warnings. Pod Update cleared them all.
Analyzing dependencies Downloading dependencies Installing Firebase 3.16.0 (was 3.14.0) Installing FirebaseAnalytics 3.8.0 (was 3.7.0) Using FirebaseAuth (3.1.1) Installing FirebaseCore 3.6.0 (was 3.5.1) Using FirebaseDatabase (3.1.2) Installing FirebaseInstanceID 1.0.10 (was 1.0.9) Using FirebaseStorage (1.1.0) Installing GTMSessionFetcher 1.1.9 (was 1.1.8) Using GoogleToolboxForMac (2.1.1)
@morganchen12 Did you guys solved the issue? Either you did or deleting the .xcworkspace file and de-integrating all pods and re-integrating them solved the issue for me. My GoogleService-Info.plist is not linked to my unit test target at all.
@DevAndArtist no I had to revert to 3.15.0. I have GoogleService-Info.plist in my test target and it still crashes. Something definitely changed.
No progress yet.