I’m using the cocoapods gradle plugin, 1.4.0-rc. I...
# kotlin-native
n
I’m using the cocoapods gradle plugin, 1.4.0-rc. I took the kotlin-with-cocapods-sample library, added in my own source code and podspec file. When I sync the project, the build fails when
xcodebuild -project Pods.xcodeproj -scheme Boulangerie-iOS -sdk iphoneos -configuration Release
is executed. It’s not finding all the header files. Error: “fatal error: ‘com/dough/profitability/calculation/Zoner.h’ file not found”. Relevant part of the podspec:
Copy code
s.preserve_paths = "ios/src"
  s.header_mappings_dir = "ios/src/objc"
  s.public_header_files = "ios/src/objc/**/*.h"
  s.source_files  = "ios/src/objc/**/*.{h,m}"
  s.resources = 'ios/src/resources/**/*'

  s.dependency 'J2Objc', '~> 2.6' 
  s.dependency 'AFNetworking', '~> 4.0.1'

  s.xcconfig = {
      'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/Headers/Private/Boulangerie-iOS"/**'
  }
Anyone know how I can get this to work?
s
I’ve had to use this library to get the cocoapods sample library to work, even with 1.4.0-rc: “org.jetbrains.kotlin.native.xcodekotlin native xcode 11 4 workaround1.3.72.0” You can look at this issue to more details:https://github.com/JetBrains/kotlin-native/issues/3530 Hopefully this helps.
n
thanks!
my issue is i don’t think it’s generating the headers for my pod
so i don’t think this applies to it?
s
idk…give it a try maybe? My issue was with finding the header files as well but think they said my issue was with xcode 11.4 specifically. Not sure what version you’re using..
n
ok i’ll give it a whirl, thanks!