The biggest problem with this approach is that you need to guarantee that Tealium has loaded eluminate.js before your native code runs on the page. If your native code runs and tries to call functions which are only defined inside eluminate.js, then the functions will be undefined, and the calls will fail. If you have implemented utag.sync.js in the head of the page, it might be best to (temporarily) load eluminate.js here instead, as this will guarantee that the CoreMetrics functions are ready when the page loads.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.