Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ARAnalytics with GoogleAnalytics #218

Open
arielelkin opened this issue Oct 20, 2015 · 11 comments
Open

Using ARAnalytics with GoogleAnalytics #218

arielelkin opened this issue Oct 20, 2015 · 11 comments

Comments

@arielelkin
Copy link
Contributor

I've added this to my podfile (Cocoapods 0.39.0):

pod 'ARAnalytics', :subspecs => ['GoogleAnalytics']

But I get this error when running pod install:

$ pod install
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing ARAnalytics (3.8.0)
Using Bolts (1.3.0)
Using CardIO (5.1.1)
Using CircleProgressView (1.0.7)
Using Crashlytics (3.3.4)
Using FBSDKCoreKit (4.7.0)
Using FBSDKLoginKit (4.7.0)
Using Fabric (1.5.5)
Installing Google (1.1.1)
Installing GoogleAnalytics (3.13.0)
Installing GoogleInterchangeUtilities (1.0.0)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSymbolUtilities (1.0.0)
Installing GoogleUtilities (1.1.0)
Using JVFloatLabeledTextField (1.1.0)
Using Lookback (1.1.3)
Using LookbackSafe (1.1.3)
Using MBProgressHUD (0.9.1)
Using PDKTZipArchive (0.3.5)
Using Parse (1.9.0)
Using SDWebImage (3.7.3)
Using SwiftKeychain (0.1.5)
Using TAPageControl (0.2.0)
Using UIImageViewAligned (0.0.1)
[!] The 'Pods-MyProject' target has transitive dependencies that include static binaries: (/myproject/Pods/Google/Libraries/libGGLAnalytics.a and /project/Pods/Google/Libraries/libGGLCore.a)
@arielelkin
Copy link
Contributor Author

I saw this has been raised before: #145

and @orta recommends using Google's static frameworks. So I downloaded it, integrated it manually (eeew), left the Podfile unchanged.

But then running pod install results in exactly the same error.

So I did this: pod 'ARAnalytics', :subspecs => [], and the pod install runs fine.

But now ARAnalytics isn't installed at all!

How does one use ARAnalytics with Google Analytics??

@arielelkin arielelkin changed the title GoogleAnalytics subspec causes "transitive dependencies" error Using ARAnalytics with GoogleAnalytics Oct 20, 2015
@orta
Copy link
Owner

orta commented Oct 20, 2015

So until Google supports Dynamic Frameworks, you have to do the integration manually; I had to do this for Intercom in one of my apps.

  1. Copy in the provider into your app.
  2. If it was the only provider, only link to CoreIOS ( pod "ARAnalytics/CoreIOS" )
  3. Add the integration manually before you setup all your analytics.

@floskel
Copy link

floskel commented Nov 16, 2015

Is there a place we can see if/when Google updates to Dynamic Frameworks?

@kidsid49
Copy link

kidsid49 commented Feb 8, 2016

@orta adding GoogleAnalyticsProvider manually inside the app leading to lots of compilation errors inside the ARAnalyticalProvider.h file inside the pod.
Am I missing something?

Here is what I did -
(1) I added Google analytics separately via Pod.
(2) Then I copied the Google analytics provider inside the app.
(3) Added appropriate code in app delegate.
(4) On compilation its showing lots of error - eg. "Unknown type String" inside the ARAnalyticalProvider.h

Here is the two lines inside my podfile.

pod 'Google/Analytics'
pod "ARAnalytics", :subspecs => ["Flurry"]

Update :-

Quite weird thought but I fixed it by adding
#import <Foundation/Foundation.h>
on top of ARAnalyticalProvider.h

@orta
Copy link
Owner

orta commented Feb 8, 2016

Cool, might be worth sending a PR adding the Foundation import?

@timbroder
Copy link

@kidsid49 Did you do anything else? (or can you go into more detail on step 3?)

AR_GOOGLEANALYTICS_EXISTS doesn't hold true when I try your approach:

image

Thanks

@timbroder
Copy link

whoops. nevermind. Didn't read Orta's step 3 clearly enough
Add the integration manually before you setup all your analytics

@BenchR267
Copy link
Collaborator

@orta are there any updates on this? As far as I understand, Google is offering Google Analytics as a dynamic framework, but I am not sure how to fix this.. I have currently copied the provider in my project and set it up manually, but this is not a very clean solution..

@orta
Copy link
Owner

orta commented May 9, 2016

Nothing from my side, I don't use Google Analytics etc, you're welcome to fix it upstream 👍

@BenchR267
Copy link
Collaborator

@orta I really tried to fix this and I have a strange issue right now. In an example project I created an podspec and just copied the content of ARAnalytics.podspec to it. (I changed 'GoogleAnalytics' to 'Google/Analytics' since this is the dynamic framework from Google).
This works with use_frameworks!
Using ARAnalytics with the exact same change does not (transitive dependencies). The resolved local podspecs Cocoapods is building (Pods/Local Podspecs/*) have only one diff: the name of the pods.
Do you have any clue why this happens? I can show you the project if you want.

@CavalcanteLeo
Copy link

any fixes about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants