Skip to content

Commit

Permalink
Added cocoapod import and starting point to create mappings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reedyuk committed Nov 27, 2023
1 parent 23a52c0 commit d08b692
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 18 deletions.
1 change: 0 additions & 1 deletion library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ kotlin {
pod("NewRelicAgent") {
version = "7.4.7"
moduleName = "NewRelic"
headers = "NewRelic.xcframework/ios-arm64/NewRelic.framework/Headers/NewRelic.h"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.myunidays.newrelik

actual class NewRelic internal constructor(android: com.newrelic.agent.android.NewRelic){
actual companion object {
actual fun withApplicationToken(token: String): NewRelic =
NewRelic(com.newrelic.agent.android.NewRelic.withApplicationToken(token))
}

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.myunidays.newrelik

expect class NewRelic {

companion object {
fun withApplicationToken(token: String): NewRelic
}
}

This file was deleted.

12 changes: 12 additions & 0 deletions library/src/iosMain/kotlin/com/myunidays/newrelik/NewRelic.ios.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.myunidays.newrelik

actual class NewRelic internal constructor(ios: cocoapods.NewRelicAgent.NewRelic){
actual companion object {
actual fun withApplicationToken(token: String): NewRelic {
val newRelic = cocoapods.NewRelicAgent.NewRelic.new()!!
cocoapods.NewRelicAgent.NewRelic.startWithApplicationToken(token)
return NewRelic(newRelic)
}
}

}

This file was deleted.

0 comments on commit d08b692

Please sign in to comment.