Open caramdache opened 6 years ago
What's the name of the cocoapod and version?
What function are you invoking?
Hi Amir, I don't use pods in this instance, I downloaded the latest version (3.17) at:
https://developers.google.com/analytics/devguides/collection/ios/v3/sdk-download
Here are the methods that I use:
GAI.sharedInstance.trackUncaughtExceptions = false
GAI.sharedInstance.dispatchInterval = UIDevice.development? ? 5 : 60*2
#GAI.sharedInstance.logger.setLogLevel(KGAILogLevelVerbose)
#GAI.sharedInstance.dispatch # manual dispatch
GAI.sharedInstance.trackerWithTrackingId(GoogleKey)
tracker = GAI.sharedInstance.defaultTracker
tracker.set(KGAIScreenName, string)
params = {
GAIFields.customDimensionForIndex(index) => userLevel,
GAIFields.customMetricForIndex(index) => value,
}
builder = GAIDictionaryBuilder.createScreenView
builder = GAIDictionaryBuilder.createEventWithCategory(string, action, label, value)
tracker.send(builder.setAll(params).build)
Is there a possibility that you can put up a sample app that includes the sdk in the ./vendor
directory as you are doing?
Aside: double check and make sure that any cached files are removed from ~/Library/RubyMotion/build
.
And if you can share the output of rake config
that would be helpful too.
Also, it seems like Google is deprecating "everything" (eg Crashlytics) and putting it all into their Firebase SDK. Just something to look out for.
Here is a sample project that demonstrate the issue. ga.zip
Inside the projet, there is a file called rake.config
. It is the output of rake config
.
Thanks for the tip, I'll have a look at Firebase (again).
BTW, using pod 'Firebase/Core
will also create an expection in gen-bridge-metadata.
I'll take a look this weekend and get you an update 👍
@caramdache are you on High Sierra or Mojave?
Mojave of course.
Mind joining this Slack discussion (if you're not already a part of it)? https://motioneers.slack.com/archives/C055RDLS0/p1537915072000100
Related and may fix your issue. Mind trying it? https://trac.macports.org/ticket/54939
Run the following command:
cd /Applications/Xcode.app/Contents/Developer/Toolchains
sudo ln -s XcodeDefault.xctoolchain OSX10.14.xctoolchain
Here is what we are doing in the Slack channel right now (you may want to try it and see if it works for you):
https://github.com/amirrajan/bridgesupport
rbenv
installedmake
sudo make install DESTDIR=/Library/RubyMotion/lib/BridgeSupport2
cd /Applications/Xcode.app/Contents/Developer/Toolchains
sudo ln -s XcodeDefault.xctoolchain OSX10.14.xctoolchain
The following steps should resolve your issue. After I've tested it, it'll be part of RubyMotion vNext (which I'll release ASAP): https://gist.github.com/Atastor/2e85ee4fab03aaab391594b6fa769931
Thanks Amir, I'm on slack now. Recompiling BridgeSupport is a huge endeavour. I will wait for RM's next release to be available.
try this out: https://www.dropbox.com/s/ixryj9ne9o7c83h/bridge_support_2.tgz?dl=0
just back up what's under /Library/RubyMotion/lib/BridgeSupport2
and replace the contents with what's under the tarbal
after copying the following files over, run:
sudo mkdir -p /usr/local/lib/
sudo ln -s "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib" /usr/local/lib/
It's much better now, thanks !
This constant is no longer defined though and causes a crash:
KGAIScreenName
Here's how it's defined in GoogleAnalytics:
GAIFields.h: extern NSString *const kGAIScreenName;
Take a look at the generated bridgesupport file and see if its in there.
The bridgesupport files should be under ~/Library/RubyMotion/build
I've released a beta: https://s3.us-east-2.amazonaws.com/amirrajan-public/RubyMotion+5.15.pkg
Mind giving that a shot?
Hmm... looks bad. A simple app that I was working on these past 2 weeks now raises this error when running rake. I did a rake clean:all
first of course. This happening at link phase.
Undefined symbols for architecture x86_64:
"_DATETIME_COMPONENTS_DO_NOT_USE", referenced from:
___concrete__DATETIME_COMPONENTS_DO_NOT_USE in EventKit_stubs.o
(maybe you meant: ___concrete__DATETIME_COMPONENTS_DO_NOT_USE)
"_DATE_COMPONENTS_DO_NOT_USE", referenced from:
___concrete__DATE_COMPONENTS_DO_NOT_USE in EventKit_stubs.o
(maybe you meant: ___concrete__DATE_COMPONENTS_DO_NOT_USE)
"_EK_LOSE_FRACTIONAL_SECONDS_DO_NOT_USE", referenced from:
___concrete__EK_LOSE_FRACTIONAL_SECONDS_DO_NOT_USE in EventKit_stubs.o
(maybe you meant: ___concrete__EK_LOSE_FRACTIONAL_SECONDS_DO_NOT_USE)
"_NSNotFound", referenced from:
_MREP_24D7704EB71146F78E6F6C542012B873 in NSString_extensions.rb.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rake aborted!
Command failed with status (1): [/Applications/Xcode.app/Contents/Developer...]
/Library/RubyMotion/lib/motion/project/builder.rb:375:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:78:in `build'
/Users/jj/.rubymotion/rubymotion-templates/motion/project/template/ios.rb:70:in `block (2 levels) in <top (required)>'
/Users/jj/.rubymotion/rubymotion-templates/motion/project/template/ios.rb:183:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => build:simulator
HELP Amir! How do I go back to a version that compiles? Is there a package I can download? I am stuck now.
Work around until there is a fix:
EventKit
from app.frameworks
. This means I won't be able to submit apps though, but at least I can compile.NSString
which uses rangeOfString
and tests if the result is NSNotFound
. Weird that this is no longer defined although it is still in the method definition (https://developer.apple.com/documentation/foundation/nsstring/1416849-rangeofstring?language=objc).
I have been using GoogleAnalytics with RM for years without any issue and suddenly it crashed RM immediately after running
rake
. I downloaded the latest version of GA, but RM still crashes.It looks like the issue is in gen_bridge_metadata.