Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Latest version - Use of unresolved identifier 'AppEventsLogger' #433

Closed
5 tasks done
guidev opened this issue May 2, 2019 · 23 comments
Closed
5 tasks done

Latest version - Use of unresolved identifier 'AppEventsLogger' #433

guidev opened this issue May 2, 2019 · 23 comments
Labels
bug Something is broken or being fixed

Comments

@guidev
Copy link

guidev commented May 2, 2019

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Xcode Version: 10.2.1
  • Swift Version: 5.0
  • Installation Platform & Verison: [Cocoapods] version 1.6.1

Goals

Upgrade from FacebookCore 0.6.0 to FacebookCore 0.7.0

Expected Results

Being able to upgrade without any major change to the code.

Actual Results

AppEventsLogger is undefined.

Steps to Reproduce

Code Samples & Details

My Podfile

platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!

target 'Cinema' do
  pod 'SDWebImage'
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'Alamofire'
  pod 'ObjectMapper'
  pod 'FacebookCore'
  pod 'Firebase/Core'
  pod 'Firebase/Performance'
end

@guidev guidev added the bug Something is broken or being fixed label May 2, 2019
@maksymhusar
Copy link

The same for me

@dfmarulanda
Copy link

Nothing is working in 0.7.0.
I had to downgrade.

@ethanwa
Copy link

ethanwa commented May 3, 2019

Same problem for me as well.

@iKisliy
Copy link

iKisliy commented May 3, 2019

Same for me

@adrianorezena
Copy link

adrianorezena commented May 3, 2019

I had the same problem and the changed the AppEventsLogger.log to AppEvents.logEvent.

It's compiling and logging for me now, but in the test events each log seems to be quadruplicated.
Does anyone had the same problem?

@iKisliy
Copy link

iKisliy commented May 3, 2019

@adrianorezena did you had changed your .activate method? Neither AppEventsLogger.activate, nor AppEvents.activate works

@adrianorezena
Copy link

@iKisliy , have you tried AppEvents.activateApp()?

@AmrKafina
Copy link

Yup, spent more than two hours trying to integrate the SDK with my app.

@sglushchenko
Copy link

I added
pod 'FacebookSDK'
and use

import FBSDKCoreKit
...
AppEvents.activateApp()

@NikitaSkripchenko
Copy link

@dfmarulanda on which one you had downgraded?

@mouness2020
Copy link

same problem here

@piyush-cashify
Copy link

Facing same issue

@geronimowheeli
Copy link

Having the same problem. Going to downgrade right now.

@dfmarulanda
Copy link

13 days and @facebook-github-bot hasn't fixed this yet. SHAME

@idrougge
Copy link

idrougge commented Jun 3, 2019

One month…

@andrassomogyi
Copy link

Any workaround for this?

@kershner
Copy link

Can someone please walk through their steps for a working solution, via downgrading or otherwise? This is still very much a problem, and I bet most people who go to implement the SDK in their Swift apps using the official FB docs are going to end up here sooner or later.

@piyush-cashify
Copy link

Can someone please walk through their steps for a working solution, via downgrading or otherwise? This is still very much a problem, and I bet most people who go to implement the SDK in their Swift apps using the official FB docs are going to end up here sooner or later.

#463 (comment)

@rromanchuk
Copy link

The official docs are a complete mess, has anyone dug into the source to figure out what the actual signatures are to send analytics. All these language specific are bogus.

Screen Shot 2019-07-02 at 12 34 19 PM

@joesus
Copy link
Contributor

joesus commented Aug 20, 2019

So the long story is that this SDK is a wrapper around the ObjC SDK. There's a little more information about this in the recently merged roadmap.

TLDR: If you look at the changes between v0.6.0 and v0.7.0 - compare we updated to point to version 5.0 of the ObjC SDK. This was a breaking change and we should have cut a major release to reflect that. We also deprecated a number of wrapper classes including AppEventsLogger.

Those changes constituted a major effort to enhance the usability of the Swift interface that's generated from the ObjC SDK but it was not communicated well in terms of this project. The changes are documented reasonably well in this changelog under the 5.0 release.

While it is completely reasonable to be upset about this series of events, I hope that this is enough explanation to unblock people who upgraded. Closing the issue as this was a bug in an evolving process and cannot be fixed by a simple code change.

@moesalih
Copy link

@joesus the docs you're linking to don't say what changes were done to AppEventsLogger. What's the solution? This is not resolved.

@joesus
Copy link
Contributor

joesus commented Aug 22, 2019

@moesalih, good call. I just merged a pr to update the changelog so it's easier to see what was changed on the Swift SDK end of things. Check out: v0.6.0...v0.7.0

I just realized I referenced this change-set in the previous message but did not call out the Swift changes specifically. I updated the previous message to include that breadcrumb. Thanks for bringing that to my attention!

@ethanwa
Copy link

ethanwa commented Sep 6, 2019

For those who have simple implementations, the answer to get things working is simply this change:

AppEventsLogger.activate(application)

is now

AppEvents.activateApp()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something is broken or being fixed
Projects
None yet
Development

No branches or pull requests