https://kotlinlang.org logo
#ios
Title
# ios
a

Andrew Reed

11/27/2023, 8:44 PM
I am trying to write a KMP new relic wrapper for iOS and Android, when importing in the cocoapod for ios (NewRelicAgent)
Copy code
pod("NewRelicAgent") {
    version = "7.4.7"
    moduleName = "NewRelic"
    headers = "NewRelic.xcframework/ios-arm64/NewRelic.framework/Headers/NewRelic.h"
}
It seems like its unable to find the headers, i tried a few variants, and the same result in unable to import. The frustrating thing, we only really need the header files to generate the mappings. The aim is to open source it, here is pointing at this branch for now. https://github.com/MyUNiDAYS/newrelik/tree/s/dependencies Any help? i guess its because the cocoapod is basically a universal framework. One option would be to create a private pod that exposes a single framework but seems like a sledgehammer approach.
t

Timofey Solonin

11/27/2023, 8:54 PM
Hi! Could you please try just the:
Copy code
pod("NewRelicAgent") {
    version = "7.4.7"
    moduleName = "NewRelic"
}
It seems to work for me
a

Andrew Reed

11/27/2023, 8:55 PM
its empty
no mappings, no headers
im pretty sure its to do with it being a cocoapod that includes a universal framework as its source
t

Timofey Solonin

11/27/2023, 9:04 PM
Is there a specific thing that doesn't work? I tried checking out the branch and this pod seems to work for me if I don't specify the
headers
a

Andrew Reed

11/27/2023, 9:06 PM
what is this black magic
using kotlin 1.9.10?
and xcode 15?
t

Timofey Solonin

11/27/2023, 9:06 PM
Yes
a

Andrew Reed

11/27/2023, 9:08 PM
are you using an intel mac?
t

Timofey Solonin

11/27/2023, 9:08 PM
No, I have an arm macOS machine. Is there any chance you could be importing the pod in
commonMain
by accident?
a

Andrew Reed

11/27/2023, 9:08 PM
Screenshot 2023-11-27 at 21.08.23.png
so you dont get any of that?
ah hang about
i have been tricked
it does seem to be generating the bindings
thanks @Timofey Solonin
🎉 1
3 Views