Open skypanther opened 8 years ago
If I manually add the storyboards and assets per #4 the app doesn't crash and the survey is displayed. However, the UI of my app is totally changed after building from Xcode. For example, tab icons are missing, the title bar title is missing, spacing of graphics is too large, etc.
Seems like Ti changed the way a native module handles assets (I saw that it now supports storyboards in latest version, could be that). I'll take a look this weekend. Could you try to copy the assets under iphone folder to assets folder and re build de module?
I probably did this wrong, but I still get the same crashes.
Attempt 1: I copied TiMixpanel/ios/platform/iphone/* to TiMixpanel/assets, recompiled the module, tested in my app. Same crash.
Attempt 2: I copied TiMixpanel/ios/platform/iphone/* to myapp/app/assets/iphone, recompiled my app. Same crash.
@inakiabt have you had any time to look at this? Appcelerator suggested some steps in https://jira.appcelerator.org/browse/TIMOB-20473 which unfortunately have not worked for me.
@skypanther I've played a bit on the weekend, but I couldn't test it completely. BTW, I built an app with same Ti SDK and iOS version (I didn't touch anything about TiMixpanel module since last version built with Ti SDK 5.0) and test it on my device and it worked. Can you try build the module with Ti SDK 5.0 or earlier but build your app with 5.2? That's what I did.
@inakiabt
Can you try build the module with Ti SDK 5.0 or earlier but build your app with 5.2? That's what I did.
I think this is essentially the same as simply using the 0.8 version in your dist folder. But, I tried this as you suggested and get the same crash. I used the 3.5.1.GA SDK to build the module and the 5.2.0.GA SDK to build the app. For example, with an in-app notification (uses the same storyboards as in-app surveys), I get this error:
[ERROR] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MPNotification' in bundle NSBundle </var/mobile/Containers/Bundle/Application/849AD582-B5DC-42B0-9D94-0469F21C6EE1/DEMO.app> (loaded)'
[ERROR] *** First throw call stack:
You say when you did this, the app worked on device. Did you send a survey or simply run the app to gather analytics data? We can gather analytics without troubles. The issue comes when we create and send a survey or in-app notification (not push notification). When the app goes to show it, the app/module can't find the Mixpanel storyboards and causes the app to crash.
Could it be the age of the Mixpanel SDK included in your module? They're up to 2.9.4 and your module is using 2.6 (a year old).
I haven't had time to look in to this, but my guess would be that the storyboard compilation step is broken for newer version of Xcode. The module Xcode project has a build step that should compile them for you automatically when building the module, creating a set of .storyboardc
files in the platform folder if I remember correctly.
@skypanther If you have the time and ability I'd suggest trying 2 things:
Please feel free to update the Mixpanel SDK as well, if you have the time :)
The storyboards are being compiled. Though, maybe they're not being compiled correctly?? I do get .storyboardc
files and I see this in the console output:
Staring...
MPNotification.storyboard found, staring compilation...
MPSurvey.storyboard found, staring compilation...
Done
CompileC build/TiMixpanel.build/Release-iphoneos/TiMixpanel.build/Objects-normal/armv7/MPObjectSerializer.o Vendor/Mixpanel/MPObjectSerializer.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
...lots more CompileC related output, followed eventually by
** BUILD SUCCEEDED **
Build settings from command line:
SDKROOT = iphonesimulator9.2
=== BUILD TARGET TiMixpanel OF PROJECT TiMixpanel WITH CONFIGURATION Release ===
As for updating the Mixpanel SDK, I'm pretty green with module development. With the latest MP SDK source included, I've gotten the module to compile, but then it causes builds of my app to fail with the following:
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR] Ld build/Intermediates/DEMO.build/Debug-iphoneos/DEMO.build/Objects-normal/arm64/DEMO normal arm64
[ERROR] (1 failure)
Normally, that would mean I have a missing architecture in the manifest file. However, it has architectures: armv7 i386 x86_64 arm64
listed. I'll keep poking at that.
Any update on this?
When my app calls
mixpanel.showSurvey()
it crashes with the stack trace below.Environment:
Issues https://github.com/hyperlab/TiMixpanel/issues/4 and https://github.com/hyperlab/TiMixpanel/pull/22 suggest that the necessary storyboards should be compiled in automatically. That appears to not be working. Perhaps I've missed a step.