Tealium / tealium-nativescript-plugin

Other
0 stars 0 forks source link

Unable to run on real device (iOS) #6

Closed fpaaske closed 2 years ago

fpaaske commented 2 years ago

Following the docs, I get this when targeting a real device (iPhone X):

warning: Building for iOS, but the linked and embedded framework 'TealiumWrapper.framework' was built for iOS Simulator. (in target 'demo' from project 'demo')

And when I try to run the demo from the generated workspace in Xcode, I get this:

dyld: Library not loaded: @rpath/TealiumWrapper.framework/TealiumWrapper
  Referenced from: /private/var/containers/Bundle/Application/073DB526-8C0C-4C8C-A24A-06CF793A2D5D/demo.app/demo
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/073DB526-8C0C-4C8C-A24A-06CF793A2D5D/demo.app/Frameworks/TealiumWrapper.framework/TealiumWrapper: mach-o, but not built for platform iOS
    /private/var/containers/Bundle/Application/073DB526-8C0C-4C8C-A24A-06CF793A2D5D/demo.app/Frameworks/TealiumWrapper.framework/TealiumWrapper: mach-o, but not built for platform iOS
    /private/var/containers/Bundle/Application/073DB526-8C0C-4C8C-A24A-06CF793A2D5D/demo.app/Frameworks/TealiumWrapper.framework/TealiumWrapper: mach-o, but not built for platform iOS
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

I also tried replacing the tealium dependency in package.json to 1.1.1 from NPM, but I still got the same issue.

However, when targeting simulators (iPhone X and iPhone 12 Pro) it works fine.

Is this a bug in the plugin or am I doing something wrong?

jameskeith commented 2 years ago

Hi @fpaaske Thanks for flagging this issue, we'll take a look asap and get back to you with our findings.

craigrouse commented 2 years ago

@fpaaske This should now be resolved with the latest plugin version - 1.1.2, which is also available on npm. Please let us know if this works for you. Thanks for your patience waiting for a fix.

fpaaske commented 2 years ago

Thank you for the quick response and fix! I have tested this on iOS and it works well now.

craigrouse commented 2 years ago

@fpaaske You're welcome. I'm glad the fix worked for you. Please let us know if you have any further issues or questions.