Hello there, I have an Android/iOS library project...
# kotlin-native
n
Hello there, I have an Android/iOS library project, its main build script is attached. It builds without a problem, then I run
:podspec
and then I plug it to Podfile like this:
Copy code
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'AnalyticsDemo' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for AnalyticsDemo
  pod "analytics", :path => "../analytics-root/analytics"

end
When I try to run it in Xcode, it successfully runs several Gradle tasks and then it fails with
Copy code
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios13.2-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -L/Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Products/Debug-iphonesimulator -L/ -L/Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Products/Debug-iphonesimulator/Analytics -F/Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Products/Debug-iphonesimulator -FPods -FPods/Headers -FPods/Local\ Podspecs -FPods/Target\ Support\ Files -FPods/Target\ Support\ Files/Pods-AnalyticsDemo -FPods/Target\ Support\ Files/analytics -filelist /Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Intermediates.noindex/AnalyticsDemo.build/Debug-iphonesimulator/AnalyticsDemo.build/Objects-normal/x86_64/AnalyticsDemo.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Intermediates.noindex/AnalyticsDemo.build/Debug-iphonesimulator/AnalyticsDemo.build/Objects-normal/x86_64/AnalyticsDemo_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Intermediates.noindex/AnalyticsDemo.build/Debug-iphonesimulator/AnalyticsDemo.build/Objects-normal/x86_64/AnalyticsDemo.swiftmodule -ObjC -lc++ -framework analytics -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Intermediates.noindex/AnalyticsDemo.build/Debug-iphonesimulator/AnalyticsDemo.build/AnalyticsDemo.app-Simulated.xcent -framework Pods_AnalyticsDemo -Xlinker -dependency_info -Xlinker /Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Intermediates.noindex/AnalyticsDemo.build/Debug-iphonesimulator/AnalyticsDemo.build/Objects-normal/x86_64/AnalyticsDemo_dependency_info.dat -o /Users/xlebnick/Library/Developer/Xcode/DerivedData/AnalyticsDemo-cvvffnvreniysughwjnehpslgvqy/Build/Products/Debug-iphonesimulator/AnalyticsDemo.app/AnalyticsDemo

ld: framework not found analytics
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My multiplatform module has name
analytics
. Why doesn't Xcode see my framework?
a
Hello! Are you pointing at the
gradlew
file location at the Podfile
:path
parameter?
n
Hello! No, to the root of Kotlin module,
gradle
is one directory above; sorry for the late reply
Copy code
#use_modular_headers!
use_frameworks!

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'AnalyticsDemo' do
  # Comment the next line if you don't want to use dynamic frameworks
  # use_frameworks!
  # Pods for AnalyticsDemo
#  pod "Analytics", "~> 3.7.0", :modular_headers => true
  pod 'analytics', :path => '/Users/xlebnick/projects/analytics-root/analytics'

end
a
I assume that you already solved this problem, what was the cause of it?
n
To be honest, I'm not sure. I removed an iOS project totally and created another one. I suspect framework search paths settings of the old project because the only thing I've done with it is to add more framework search paths