Paddy O'Brien
02/02/2023, 5:15 PMlanguage = Objective-C
package = StripeTerminal
compilerOpts = -framework StripeTerminal -DNS_FORMAT_ARGUMENT(A)= -D_Nullable_result=_Nullable
linkerOpts = -framework StripeTerminal -framework CoreBluetooth -framework ExternalAccessory -framework CoreLocation -framework Security -framework Foundation
# M1 Simulator
compilerOpts.ios_simulator_arm64 = -FiOSLibs/StripeTerminal.xcframework/ios-arm64_x86_64-simulator/StripeTerminal.framework
linkerOpts.ios_simulator_arm64 = -FiOSLibs/StripeTerminal.xcframework/ios-arm64_x86_64-simulator/StripeTerminal.framework
# X86 Simulator
compilerOpts.ios_x64 = -FiOSLibs/StripeTerminal.xcframework/ios-arm64_x86_64-simulator/StripeTerminal.framework
linkerOpts.ios_x64 = -FiOSLibs/StripeTerminal.xcframework/ios-arm64_x86_64-simulator/StripeTerminal.framework
# Device
compilerOpts.ios_arm64 = -FiOSLibs/StripeTerminal.xcframework/ios-arm64/StripeTerminal.framework
linkerOpts.ios_arm64 = -FiOSLibs/StripeTerminal.xcframework/ios-arm64/StripeTerminal.framework
Landry Norris
02/02/2023, 5:18 PMios-arm64_x86_64-simulator
. This is for ios-arm64 and x86_64-simulator (the -simulator doesn’t distribute to both), so it’s possible it’s not finding anything for M1 simulator, so the intersection of all 3 is the empty set.Adam Vastopa
02/02/2023, 5:22 PM> Task :PointOfSale-StripeWrapper:compileKotlinIos
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/commonMain/kotlin/com/shopify/pos/stripewrapper/StripeTerminalEventListener.kt: (365, 81): Unresolved reference: it
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeConnectionTokenCallback.kt: (3, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeConnectionTokenCallback.kt: (6, 72): Unresolved reference: SCPConnectionTokenCompletionBlock
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (4, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (5, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (6, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (7, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (8, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (9, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (10, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (11, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (12, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (13, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (14, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (15, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (16, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (17, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (18, 8): Unresolved reference: StripeTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (79, 27): Unresolved reference: SCPTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (81, 17): Unresolved reference: SCPTerminal
e: /Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt: (82, 17): Unresolved reference: SCPTerminal
/Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt:82:17: error: Unresolved reference: SCPTerminal
/Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt:88:37: error: Unresolved reference: SCPCancelable
/Users/vastopa/src/github.com/Shopify/rn-pos-2/multiplatform/PointOfSale-StripeWrapper/src/iosMain/kotlin/com/shopify/pos/stripewrapper/StripeDeviceController.kt:89:36: error: Unresolved reference: SCPCancelable
Landry Norris
02/02/2023, 5:22 PMios-arm64_x86_64-simulator
suffixed framework, so that’s probably not the issue.Paddy O'Brien
02/02/2023, 5:23 PMLandry Norris
02/02/2023, 5:24 PMPaddy O'Brien
02/02/2023, 5:25 PMdef iosPlatform = findProperty("kn.ios.platform") ?: "iphonesimulator"
def iosTarget
if (iosPlatform == "iphoneos") {
iosTarget = iosArm64("ios")
} else {
iosTarget = iosSimulatorArm64("ios")
}
final String buildType = findProperty("kn.ios.buildType") ?: "Debug"
def isRelease = buildType == "Release"
iosTarget.compilations.getByName("main").cinterops.create("StripeTerminal")
We use this setup on other modules using cinterop and have no issues, but those libraries are static or xcframeworks wrapping static libraries instead of frameworks.
This one is an xcframework wrapping frameworksLandry Norris
02/02/2023, 5:29 PMPaddy O'Brien
02/02/2023, 5:29 PMiosSimulatorArm64
Landry Norris
02/02/2023, 5:29 PMPaddy O'Brien
02/02/2023, 5:30 PMLandry Norris
02/02/2023, 5:37 PMPaddy O'Brien
02/02/2023, 5:38 PMLandry Norris
02/02/2023, 5:38 PMPaddy O'Brien
02/02/2023, 5:38 PMLandry Norris
02/02/2023, 5:39 PMPaddy O'Brien
02/02/2023, 5:39 PMLandry Norris
02/02/2023, 5:40 PMAdam Vastopa
02/02/2023, 5:40 PMheaderFilter = StripeTerminal/**
resulted in the same Unresolved reference errorPaddy O'Brien
02/02/2023, 5:41 PMLandry Norris
02/02/2023, 5:42 PMFoo.h
Bar/Baz.h
Bar/FooBar.h
Baz/FooBaz.h
and frameworks sometimes flatten it to
Foo.h
Baz.h
FooBar.h
FooBaz.h
Paddy O'Brien
02/02/2023, 5:43 PM> Task :PointOfSale-StripeWrapper:cinteropStripeTerminalIos FAILED
Exception in thread "main" java.lang.Error: iOSLibs/StripeTerminal.xcframework/ios-arm64_x86_64-simulator/StripeTerminal.framework/Headers/StripeTerminal.h:12:9: fatal error: 'StripeTerminal/SCPAddress.h' file not found
Landry Norris
02/02/2023, 5:46 PMPaddy O'Brien
02/02/2023, 5:47 PMcompilerOpts.ios_simulator_arm64 = -IiOSLibs/StripeTerminal.xcframework/ios-arm64_x86_64-simulator/StripeTerminal.framework/Headers -FiOSLibs/StripeTerminal.xcframework/ios-arm64_x86_64-simulator/StripeTerminal.framework
Landry Norris
02/02/2023, 5:48 PMheaders/StripeTerminal
in your project folder, then copy the headers there.Paddy O'Brien
02/02/2023, 5:49 PMLandry Norris
02/02/2023, 5:49 PMheaders/{platform}/StripeTerminal
and copy each one?Paddy O'Brien
02/02/2023, 5:50 PMLandry Norris
02/02/2023, 5:51 PMPaddy O'Brien
02/02/2023, 5:53 PMLandry Norris
02/02/2023, 5:56 PMPaddy O'Brien
02/02/2023, 6:01 PMStripeTerminal
to suggest that that’s what we are seeing.
Our previous hack rewrote framework includes to be file includes. It’s not prettylibraryPaths
?Landry Norris
02/02/2023, 6:22 PMPaddy O'Brien
02/02/2023, 6:23 PMLandry Norris
02/02/2023, 6:23 PMPaddy O'Brien
02/02/2023, 6:24 PMLandry Norris
02/02/2023, 6:24 PMPaddy O'Brien
02/02/2023, 6:25 PMLandry Norris
02/02/2023, 6:26 PMPaddy O'Brien
02/02/2023, 6:26 PMLandry Norris
02/02/2023, 6:28 PM