Coder Social home page Coder Social logo

firebase / quickstart-ios Goto Github PK

View Code? Open in Web Editor NEW
2.7K 213.0 1.5K 174.37 MB

Firebase Quickstart Samples for iOS

Home Page: https://firebase.google.com

License: Apache License 2.0

Objective-C 33.16% Swift 62.00% Ruby 1.12% Objective-C++ 0.16% HTML 0.48% Shell 2.92% C 0.15%
firebase ios

quickstart-ios's Introduction

Firebase Quickstarts for iOS

A collection of quickstart samples demonstrating the Firebase APIs on iOS. Each sample contains targets for both Objective-C and Swift. For more information, see https://firebase.google.com.

Samples

You can open each of the following samples as an Xcode project, and run them on a mobile device or a simulator. Simply install the pods and open the .xcworkspace file to see the project in Xcode.

$ pod install --repo-update
$ open your-project.xcworkspace

When doing so you need to add each sample app you wish to try to a Firebase project on the Firebase console. You can add multiple sample apps to the same Firebase project. There's no need to create separate projects for each app.

To add a sample app to a Firebase project, use the bundleID from the Xcode project. Download the generated GoogleService-Info.plist file, and replace the existing plist to the root directory of the sample you wish to run.

Code Formatting

To ensure that the code is formatted consistently, run the script ./scripts/style.sh before creating a PR.

GitHub Actions will verify that any code changes are done in a style compliant way. Install mint and swiftformat:

brew install mint
mint bootstrap
./scripts/style.sh

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md

License

See LICENSE

quickstart-ios's People

Contributors

andrewheard avatar asciimike avatar charlotteliang avatar dpebot avatar egilmorez avatar granluo avatar ianbarber avatar jrcrespoh avatar judyliu14 avatar karenyz avatar kevinthecheung avatar kokoro-team avatar kroikie avatar maksymmalyhin avatar morganchen12 avatar ncooke3 avatar nhnam avatar paulb777 avatar peterfriese avatar racheldosh avatar redcapua avatar revolter avatar rosalyntan avatar ryanwilson avatar samtstern avatar silvolu avatar sunmou99 avatar ulukaya avatar valeriyvan avatar yue-wang-google avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickstart-ios's Issues

Cocos2d FCM Push Notification not working

I am creating a game in which I want to integrate Push notification. For ease of use I connected to FCM, trusting Google's service.

I integrated FCM properly, as I think so, but still don't know what's missing but when I send any notification from Firebase Console, notification is not being received on my device.

From starting only 1 time, I was able to receive the notification, that also lost with my ignorance but after that I am not able to receive notification event with same code and development profile.

It would be great if someone points out my mistake and help me to clear the roadblock.

As I am integrating FCM in Cocos2d game, I have written my code in MainScene.swift

    ```

override func onEnter() {
super.onEnter()

        //if !self.globalHolders.isFBaseConfigured {
            self.setupPushNotification()                
        //    self.globalHolders.isFBaseConfigured = true
        //}

    }

    override func onExit() {
        super.onExit()

        NSNotificationCenter.defaultCenter().removeObserver(self, name: kFIRInstanceIDTokenRefreshNotification, object: nil)
        NSNotificationCenter.defaultCenter().removeObserver(self, name: UIApplicationDidBecomeActiveNotification, object: nil)
        NSNotificationCenter.defaultCenter().removeObserver(self, name: UIApplicationDidEnterBackgroundNotification, object: nil)
    }


    func setupPushNotification () {
        let application = UIApplication.sharedApplication()

        // Register for remote notifications
        if #available(iOS 8.0, *) {
            let settings: UIUserNotificationSettings =
            UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)
            application.registerUserNotificationSettings(settings)
            application.registerForRemoteNotifications()
        } else {
            // Fallback
            let types: UIRemoteNotificationType = [.Alert, .Badge, .Sound]
            application.registerForRemoteNotificationTypes(types)
        }

        FIRApp.configure()

        // Add observer for InstanceID token refresh callback.
        NSNotificationCenter.defaultCenter().addObserver(self, selector: "tokenRefreshNotification:",
            name: kFIRInstanceIDTokenRefreshNotification, object: nil)

        NSNotificationCenter.defaultCenter().addObserver(self, selector: "didBecomeActive:", name: UIApplicationDidBecomeActiveNotification, object: nil)
        NSNotificationCenter.defaultCenter().addObserver(self, selector: "didEnterBackground:", name: UIApplicationDidEnterBackgroundNotification, object: nil)
    }

    func tokenRefreshNotification(notification: NSNotification) {
        let refreshedToken:String? = FIRInstanceID.instanceID().token()
        print("InstanceID token: \(refreshedToken)")

        // Connect to FCM since connection may have failed when attempted before having a token.
        connectToFcm()
    }

    func connectToFcm() {
        FIRMessaging.messaging().connectWithCompletion { (error) in
            if (error != nil) {
                print("Unable to connect with FCM. \(error)")
            } else {
                print("Connected to FCM.")
            }
        }
    }

    func didBecomeActive(application:UIApplication) {
        NSLog("Did Become Active")
        connectToFcm()
    }

    func didEnterBackground(application: UIApplication) {
        NSLog("Did enter background")
        FIRMessaging.messaging().disconnect()
        NSLog("Disconnected from FCM.")
    }

Getting Following Device token:

> cMqaF0FVwbY:APA91bFMzsUmP2NKSipGMC7NTehPjBDWE72S6Fdi13iVV51ziPZvVkVw3g5NXEGooII5IVwby3ekBS4MquWyRQyF7rXDnWTDvY6eDPtL_kQQDk3Wen6V0DPv2Yf-Ym6YPi8k66aW6I-O

I am able to get device token also, but unable to receive notification.

Let me know if you need any further clarification.

Consuming Firebase iOS SDK Seems to Require Cocoapods 1.0

My podfile looks like this:

platform :ios, '9.0'

use_frameworks!

target 'MyTarget' do
    pod 'Firebase'
    pod 'Firebase/Database'
    pod 'FirebaseUI'
end

target 'MyTargetTests' do

end

target 'MyTargetUITests' do

end

Running Cocoapods 0.39.0 with this podfile in an iOS9+ Swift project (Xcode 7.3) anytime I import FirebaseDatabase and use a class defined in that module I get a segmentation fault.

Upgrading to Cocoapods 1.0 fixed the issue.

Might want to note this in the documentation.

Subscribing to multiple topics Fail

Why am I getting <FIRMessaging/WARNING> Failed to subscribe to topic Error Domain=com.google.fcm Code=5 "(null)"

screen shot 2016-05-22 at 5 26 36 pm

When subscribing to multiple topics. Since, there is no callback to queue multiple calls, we can only call in a loop like below

screen shot 2016-05-22 at 5 30 52 pm

ios sample firebase development

Hi,
i am trying to develope sample fire base application,i have created pod file and add command like this ( pod ‘Firebase’ ) but i can not able to install pod it is holding there '' Setting up CocoaPods master repo " .what is the solution for it.

FirebaseDatabaseUI.framework/FirebaseDatabaseUI(FirebaseCollectionViewDataSource.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Unable to archive .
If I remove use bitcode , app thinning will not work.
Is there any workaround as I have to start beta testing :/

Pods/FirebaseUI/FirebaseUIFrameworks/Database/Frameworks/FirebaseDatabaseUI.framework/FirebaseDatabaseUI(FirebaseCollectionViewDataSource.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

StorageExampleSwift Download not working

Getting the error below when clicking on the Download button in the Swift example. Works fine in the Obj-C example.

Error downloading:Error Domain=FIRStorageErrorDomain Code=-13000 "An unknown error occurred, please check the server response."

<FIRAnalytics/ERROR> Data loss

I've configured my app according to the getting started guide, but I'm having some errors when using Firebase Analytics. When I log an Event, I get the following error:

<FIRAnalytics/ERROR> Data loss. Unable to update daily event counts. Name, error: screen, Error Domain=com.google.gmp.measurement.ErrorDomain Code=3 "Database operation "execute statement" failed with sqlite code 8 and error message "attempt to write a readonly database"" UserInfo={FIRAMonitorContext=execute statement,8,,, NSLocalizedDescription=Database operation "execute statement" failed with sqlite code 8 and error message "attempt to write a readonly database"}
<FIRAnalytics/ERROR> Transaction failed

Anyone know what the issue could be?

messaging: warning completionhandler

After runningthe sample project for messaging i've send an notification to the app. The notification does arrive, but the logs says:

Application delegate received call to -application:didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called.

please add completionHandler(UIBackgroundFetchResultNewData); to avoid this warning and let developers do not forget this line by copying your code ;)

No such module 'Firebase' when building Swift projects

Getting No such module 'Firebase' for Swift Example projects. Objective-C Example projects are working fine. I tried in AuthenticationExample and DatabaseExample

Would be nice if you can add documentation in the ReadMe for how to solve these issues. It has to be something related to "Link Binary With Libraries" or "changing framework search path to $(SRCROOT)", but I keep getting different errors (for example, after getting rid of the "no such module Firebase" error, I then get "use of unresolved identifier FIRFacebookAuthProvider")

Model

I know it's strange, but it does have happened here.
What I have done:
step1: pull the code from github
step2: pod install
step3: copy GoogleServices-Info.plist to my project
step4: try to run it and I simply got an error of Model 'Firebase' not found

I tried to make a clear build, even tried to clear the folder of DerivedData, but all failed. I'm using Xcode7.3.1 with Cocoapod 0.39.0

image

No such module 'Firebase'

I just cloned the repo, did a pod install.
I tried to run FCMSwift, in ViewController.swift it throws

No such module 'Firebase'

How can I fix this issue ?

[ios] Product > Archive fails due to `FirebaseAppIndexing(FIRAppIndexing.o)' was built without full bitcode.`

Love the Firebase tools. We've implemented Dynamic Links, now we are attempting AppIndexing. Apologies if this is not where we should've filed this issue. We understand this is not a quickstarat-ios issue.

Issue

When building our archive (Xcode Product > Archive), we get the following error.

ld: bitcode bundle could not be generated because 

'<path/to/app>/Pods/FirebaseAppIndexing/Frameworks/FirebaseAppIndexing.framework/FirebaseAppIndexing(FIRAppIndexing.o)' 

was built without full bitcode. 

All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • Can we work around this with linker flags?

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
 target 'nameOfMyApp' do
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/AppIndexing'
 end

<FIRAnalytics/ERROR> Transaction failed

In my app, I am calling [FIRApp configure]; not exactly in application didFinishLaunchingWithOptions but early enough before anything else starts.

And when I look at the xcode console, it says:

<Notice>: <FIRAnalytics/INFO> Firebase Analytics v.3200000 started
<Notice>: <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
<Notice>: <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
<Notice>: <FIRAnalytics/INFO> Firebase Analytics enabled
<Notice>: Sandbox: myappname(2327) deny(1) file-write-create /private/var/mobile/Containers/Bundle/Application/FIREBASE_LAST_TIMESTAMP

Which seems good, accept for the last line which I don't understand what it's about!

The actual problem is the following error message which happens as soon as I click on a test Admob banner. When my app switches to Safari browser, Firebase throws this error. but this does not crash the app at all. everything seems normal.

<Error>: <FIRAnalytics/ERROR> Data loss. Cannot record raw event. Error: Error Domain=com.google.gmp.measurement.ErrorDomain Code=3 "Database operation "execute statement" failed with sqlite code 20 and error message "could not convert floating point value to integer without loss of data."" UserInfo={FIRAMonitorContext=execute statement,20,A,3, NSLocalizedDescription=Database operation "execute statement" failed with sqlite code 20 and error message "could not convert floating point value to integer without loss of data."}
<Error>: <FIRAnalytics/ERROR> Transaction failed

Now, what this problem leads? in my Firebase console, I am not seeing reports! we have created two projects in our Firebase console, one for our Android app and another one for the iOS. We are able to see the analytic on the Android side but the iOS side still shows 0 monthly active users.

Please give us an advice on what could be the problem?

[FIRApp configure]; This method should be called after the app is launched and before using Firebase services.

NOTE: Because of some reasons, we can NOT call [FIRApp configure]; from application didFinishLaunchingWithOptions but we do call it a bit later. If this is the problem, which I don't think it is because if it was, the console logs should have said so, what solution do we have?

Thanks a lot in advanced and we can't wait to start developing using Firebase. It's just so awesome.

Error while running

/Users/xx/xxx/ios_dev/quickstart-ios/storage/StorageExample/GoogleService-Info.plist:0: error: reading data: The file “GoogleService-Info.plist” couldn’t be opened because there is no such file.

could not open the document LaunchScreen.xib" because it does not exist.

Hi
I got this error when trying to build te app

AuthenticationExampleSwift Group
/Users/rrtrtetretetr/Desktop/shared/LaunchScreen.xib
/Users/rrtrtetretetr/Desktop/shared/LaunchScreen.xib: Interface Builder could not open the document LaunchScreen.xib" because it does not exist.

BR
DAvid

FirebaseAppIndexing(FIRAppIndexing.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7

I have integrated FirebaseAppIndexing SDK using cocoapods. It complies and runs fine. But when I try to archive the build I receive this error:

FirebaseAppIndexing(FIRAppIndexing.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7

What could be the possible fix for this?

No such module 'Firebase DatabaseUI'

Just cloned the repo.

Tried running the swift example. In PostDataSource.swift, it raises this error.

I noticed this happens with a lot of other Firebase apps. How do you fix the import issue?

Error "Command failed due to signal: Segmentation fault: 11"

import Firebase
......
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FIRApp.configure()
}

When I add firebase into my project via cocoa pod, It occurs error " Command failed due to signal: Segmentation fault: 11"
Please help me.
Thank!

App crash at Firebase Anaytics

<FIRAnalytics/INFO> Firebase Analytics enabled
fatal error: unexpectedly found nil while unwrapping an Optional value

screen shot 2016-05-22 at 3 56 26 pm

Sandbox testing

How can I send messages to testing devices and TestFlight users?

FCMSwift. Notifications don't appear

I send notifications like this:
{
"aps" : {
"alert" : {
"title" : "Game Request",
"body" : "Bob wants to play poker"

    },
    "badge" : 1

},

"data":{
"to_user_ids":[1],
"subject":"TEXT",
"msg":"STRINGS"
}
}

My app receives the notifications and in the "func application(application: UIApplication, didReceiveRemoteNotification userInfo.."
it prints userInfo with data. But the app doesn't show any notifications at the device and, when the app in background it neither prints message on console nor shows notifications at device.

Could you give me clear clues how to recive notifications when the app in background, handle in the code and show them on the notifications area?

Thanks

P.S.
I wasn't able to figure out it on https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW1

Firebase dynamic link not opening the app iOS9

I have developed & installed an iOS app locally on my device.
And have set custom scheme in the info.plist as mydlink
Set associated domains as weel: applinks:.app.goo.gl
Created dynamic link on firebase as:
https://.app.goo.gl/?link=http://<mysite.com>/&ibi=&ius=mydlink&ifl=https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id%3D%26mt%3D8&pt=
When i open or click on dynamic link, it opens app page in the "App Store" app and not opening app itself though its installed.
Can you point out here what i am missing..

Unexpected behavior with dynamic links on iOS 9

I found the link shared on Facebook is not work as expected on iOS 9.

Let's say we create a link:
https://xxxxx.app.goo.gl/?link=https://refer.example.com&isi=99999999&ibi=com.example&ius=dlscheme&umt_source=dlscheme&umt_medium=Facebook&umt_campaign=example_referral&utm_content=2PCQ95

With Facebook App, it would go to https://refer.example.com rather than opening the app or App Store.
If we open Facebook with safari (https://m.facebook.com), it works fine.

Then I created a landing page for https://refer.example.com and paste the same link inside a . With Facebook App, it goes to the app as expected if the app is installed. However, it won't go anywhere but the landing page if we haven't get the app yet.

Seems this problem appears if in app browser take places but social media is a important medium for marketing. Do I miss any steps for social media setup?

Reproduction steps:

  1. Set up the quickstart project following tutorial
  2. Generate a dynamic link
  3. Paste it to Facebook
  4. Test it in both Facebook app and Safari

Can't get FCM token in production

I've implemented Parse push notifications in my app and now I'm replacing it with Firebase Cloud Messaging.

Everything works well in a development build. But when I published the app to the app store, the FIRInstanceID.instanceID().token() method always returns nil.

Also, the console prints this (many times):

Unable to connect with FCM. Error Domain=com.google.fcm Code=2001 "(null)"

I had to enable some logs and update the app in the app store to know what is going on... :/

My AppDelegate.swift looks like:

import UIKit
import Firebase
import FirebaseInstanceID
import FirebaseMessaging

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        let uns: UIUserNotificationSettings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)
        application.registerUserNotificationSettings(uns)
        application.registerForRemoteNotifications()

        FIRApp.configure()

        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(self.tokenRefreshNotification), name: kFIRInstanceIDTokenRefreshNotification, object: nil)

        if let token = FIRInstanceID.instanceID().token() {
            sendTokenToServer(token)
        }

        return true
    }

    func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {

        Utilities.Log.debug("didRegisterForRemoteNotificationsWithDeviceToken()")

        // if FirebaseAppDelegateProxyEnabled === NO:
        FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: .Sandbox)

        Utilities.Log.debug("APNS: \(deviceToken)")

    }

    func application(application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: NSError) {
        Utilities.Log.debug("Registration for remote notification failed with error: \(error.localizedDescription)")
    }

    func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler handler: (UIBackgroundFetchResult) -> Void) {

        Utilities.Log.debug("didReceiveRemoteNotification()")

        //if FirebaseAppDelegateProxyEnabled === NO:
        FIRMessaging.messaging().appDidReceiveMessage(userInfo)

        handler(.NoData)

    }

    func applicationDidEnterBackground(application: UIApplication) {
        FIRMessaging.messaging().disconnect()
        Utilities.Log.debug("Disconnected from FCM.")
    }

    func applicationDidBecomeActive(application: UIApplication) {
        connectToFcm()
    }

    func sendTokenToServer(currentToken: String) {
        Utilities.Log.debug("sendTokenToServer() Token: \(currentToken)")
        // Send token to server ONLY IF NECESSARY
    }

    func connectToFcm() {
        FIRMessaging.messaging().connectWithCompletion { (error) in
            if error != nil {
                Utilities.Log.debug("Unable to connect with FCM. \(error!)")
            } else {
                Utilities.Log.debug("Connected to FCM.")
            }
        }
    }

    func tokenRefreshNotification(notification: NSNotification) {
        Utilities.Log.debug("tokenRefreshNotification()")
        if let token = FIRInstanceID.instanceID().token() {
            Utilities.Log.debug("InstanceID token: \(token)")
            sendTokenToServer(token)
            FIRMessaging.messaging().subscribeToTopic("/topics/global")
            Utilities.Log.debug("Subscribed to: /topics/global")
        }
        connectToFcm()
    }

}

What does "Error Domain=com.google.fcm Code=2001" means?
And why this only fails in a production build?

Thank you.

UPDATE:

Problem solved using a different FIRInstanceIDAPNSTokenType depending on type of build:

//If debug build:
FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: .Sandbox)

//If production build:
FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: .Prod)

//Or let firebase find out the type of build:
FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: .Unknown)

Reference

Crash reporting - IOS Objective C

Users/testeuphony/Library/Developer/Xcode/DerivedData/innerVoice-fkokqiykrziydyhhujludfggkytb/Build/Intermediates/innerVoice.build/Debug-iphonesimulator/InnerVoice.build/Script-0EB62B041D13493D0096F953.sh: line 12: /Users/testeuphony/Desktop/innerVoice_Git/InnerVoice/iOS/Pods/FirebaseCrash/upload-sym: No such file or directory

This error popped when tried to integrate the crash reporting.

Manual SDK installation of Firebase 3.3.0 doesn't work

I'd rather not use Cocoapods so downloaded the SDK directly as described in the 'Integrate without CocoaPods' section here: https://firebase.google.com/docs/ios/setup#available_pods

At the time I did that, the link to the SDK was https://dl.google.com/firebase/sdk/ios/3_3_0/Firebase.zip

The README.md tells me that I should copy these frameworks from the Analytics SDK:

## Analytics
  - frameworks
  - FirebaseInstanceID.framework
  - GoogleInterchangeUtilities.framework
  - GoogleSymbolUtilities.framework
  - GoogleUtilities.framework

The zip file doesn't contain a 'frameworks' (whatever that is). I did copy the four analytics frameworks to my project and the two from the Message SDK:

## Messaging (~> Analytics)
  - FirebaseMessaging.framework
  - GoogleIPhoneUtilities.framework

I copied the Firebase.h header file and when I import that in my own project I get an error because the first line of Firebase.h tries to import a non-existent file:

#import <FirebaseAnalytics/FirebaseAnalytics.h>

There's no FirebaseAnalytics framework in the SDK download.

Is the zip file missing some framework(s)?

Error 501 when registering for push notifications

I migrated an existing GCM app to Firebase and implemented all methods exactly like the sample code. However, I keep getting an error whenever the app tries to get an instance id. The logged messages are:

2016-07-05 16:41:49.298: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:42:01.676: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:42:26.735: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:43:05.580: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:44:03.260: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:44:03.261: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries

Does anyone know why this happens? I contacted Firebase support and they couldn't help.

Knowing that this is an app that was working fine before switching to Firebase, I know that push configurations on the app side are working. And considering that all the configuration on the Firebase Console was imported from my previous Google Project, I would assume that my certificates are all working as well.

Does anyone have any clue what I could do to solve this?

Google FCM ios-quickstart error on click local notification - unrecognized selector sent to instance

After push message from Google Firebase Console, The push message notification show on top of ios iphone device and then I click the message and xcode thow exception as below:

[UIConcreteLocalNotification setAlertTitle:]: unrecognized selector sent to instance 0x17e1a810

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIConcreteLocalNotification setAlertTitle:]: unrecognized selector sent to instance

here this code:

//show notification to status bar
UILocalNotification *local_notification = [[UILocalNotification alloc] init];

local_notification.userInfo = userInfo;
local_notification.alertBody = userInfo[@"notification"][@"body"];
local_notification.alertTitle = userInfo[@"notification"][@"title"] ? userInfo[@"notification"][@"title"]: @"VietAir.tv Thông báo";
local_notification.fireDate = [NSDate dateWithTimeIntervalSinceNow:0]; // todo item due date (when notification will be fired). immediately here

[[UIApplication sharedApplication] scheduleLocalNotification:local_notification];
Please help me, thanks for your suggestion

Can not build on iPhone 5 / armv7 devices

The app builds fine using the new Firebase pods on iPhone 5s, 6, 6s but I get this using the same code on an iPhone 5 with the latest iOS version:

Segmentation fault 11

  1. While loading members for 'ViewController' at
  2. While deserializing decl #101 (PATTERN_BINDING_DECL)
  3. While deserializing decl #7 (VAR_DECL)

Thanks for your input.

Crash reporting - SymbolUpload issues

I'm using cocoapods to install FirebaseCrash(1.0.6),
and I setting up Firebase Crash Reporting on my project (including add roles in firebase permission/service accounts, imported necessary json file, add run script in build Phases). After I build/run project on my iPhone, I got multiple upload symbol issues warning :

warning: dump_syms: /var/folders/dt/cx1btjxs0n546bsr0_941pqr0000gn/T/com.google.FirebaseCrashReporter.I7QUjQOr/project_name.dSYM/Contents/Resources/DWARF/project_name: in compilation unit '/Users/mikelehen/firebase/firebase-client-objc/Firebase/Firebase/Utilities/FUtilities.m' (offset 0x2a6b6):
warning: dump_syms: /var/folders/dt/cx1btjxs0n546bsr0_941pqr0000gn/T/com.google.FirebaseCrashReporter.I7QUjQOr/project_name.dSYM/Contents/Resources/DWARF/project_name: the DIE at offset 0x2ac44 has a DW_AT_abstract_origin attribute referring to the die at offset 0x2acd4, which either was not marked as an inline, or comes later in the file
warning: dump_syms: /var/folders/dt/cx1btjxs0n546bsr0_941pqr0000gn/T/com.google.FirebaseCrashReporter.I7QUjQOr/project_name.dSYM/Contents/Resources/DWARF/project_name: warning: function at offset 0x2ac44 has no name
warning: dump_syms: /var/folders/dt/cx1btjxs0n546bsr0_941pqr0000gn/T/com.google.FirebaseCrashReporter.I7QUjQOr/project_name.dSYM/Contents/Resources/DWARF/project_name: in compilation unit '/Users/mikelehen/firebase/firebase-client-objc/Firebase/APLevelDB/APLevelDB.mm' (offset 0x64085):

And I found the same issue in StackOverFlow

Crash while running dynamicLinks demo proj

I changed the bundle id and include my GoogleService-Info.plist then run it.

Here is the error message
*** Terminating app due to uncaught exception 'com.firebase.durabledeeplink', reason: 'Configure Durable Deep Link fails.'

Pod version:
Installing Firebase (3.2.0)
Installing FirebaseAnalytics (3.2.0)
Installing FirebaseDynamicLinks (1.0.3)
Installing FirebaseInstanceID (1.0.6)
Installing GoogleAppUtilities (1.1.1)
Installing GoogleAuthUtilities (2.0.1)
Installing GoogleInterchangeUtilities (1.2.1)
Installing GoogleNetworkingUtilities (1.2.1)
Installing GoogleParsingUtilities (1.1.1)
Installing GooglePlusUtilities (1.1.1)
Installing GoogleSignIn (4.0.0)
Installing GoogleSymbolUtilities (1.1.1)
Installing GoogleUtilities (1.3.1)

Which step am I missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.