Nikita Khlebushkin
02/17/2020, 1:22 AM:podspec
and then I plug it to Podfile like this:
# 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
/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?Artyom Degtyarev [JB]
02/17/2020, 7:18 AMgradlew
file location at the Podfile :path
parameter?Nikita Khlebushkin
02/17/2020, 11:43 PMgradle
is one directory above; sorry for the late replyNikita Khlebushkin
02/17/2020, 11:45 PM#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
Artyom Degtyarev [JB]
02/18/2020, 7:02 AMNikita Khlebushkin
02/18/2020, 7:22 AM