Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

ld: framework not found AFNetworking #4749

Closed
HorseFarmer-Ma opened this issue Apr 23, 2021 · 3 comments
Closed

ld: framework not found AFNetworking #4749

HorseFarmer-Ma opened this issue Apr 23, 2021 · 3 comments

Comments

@HorseFarmer-Ma
Copy link

HorseFarmer-Ma commented Apr 23, 2021

image

  1. cd shared, and then execute "gradlew podspec"
cocoapods {
        // Configure fields required by CocoaPods.
        summary = "RealtimeDB-ServerLess"
        homepage = "XXXX"

        ios.deploymentTarget = "13.5"

        pod("AFNetworking") {
            source = git("https://github.com/AFNetworking/AFNetworking") {
                tag = "4.0.0"
            }
        }
}
  1. cd iosApp, and then execute "pod init"

  2. my podFile is =>

target 'iosApp' do

  use_frameworks!
  use_modular_headers!
  platform :ios, '13.5'
  pod 'shared', :path => '../shared'
end
  1. cd iosApp, pod install

  2. After build in xcode, I receive the error

Ld /Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Products/Debug-iphonesimulator/iosApp.app/iosApp normal (in target 'iosApp' from project 'iosApp')
    cd /Users/80238163/AndroidStudioProjects/CloudStoreKMM/iosApp
    /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/iPhoneSimulator14.4.sdk -L/Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Products/Debug-iphonesimulator -F/Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Products/Debug-iphonesimulator -F/Users/80238163/AndroidStudioProjects/CloudStoreKMM/iosApp/../shared/build/xcode-frameworks -filelist /Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Intermediates.noindex/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/x86_64/iosApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Intermediates.noindex/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/x86_64/iosApp_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/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Intermediates.noindex/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/x86_64/iosApp.swiftmodule -ObjC -lc++ -framework AFNetworking -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Intermediates.noindex/iosApp.build/Debug-iphonesimulator/iosApp.build/iosApp.app-Simulated.xcent -framework Pods_iosApp -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Intermediates.noindex/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/x86_64/iosApp_dependency_info.dat -o /Users/80238163/Library/Developer/Xcode/DerivedData/iosApp-aqnpdwxnfnxltcbhyxitjndbdwfj/Build/Products/Debug-iphonesimulator/iosApp.app/iosApp

ld: framework not found AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can i do!

@SvyatoslavScherbina
Copy link
Collaborator

How did you create this issue?

"New issue" button on the kotlin-native issues page on GitHub website opens the following page for me: https://github.com/JetBrains/kotlin-native/issues/new/choose.
It doesn't seem to have an option to create new issue on GitHub on my side.

So did you use a custom GitHub client or whatever?

@HorseFarmer-Ma
Copy link
Author

How did you create this issue?

"New issue" button on the kotlin-native issues page on GitHub website opens the following page for me: https://github.com/JetBrains/kotlin-native/issues/new/choose.
It doesn't seem to have an option to create new issue on GitHub on my side.

So did you use a custom GitHub client or whatever?

image
I create this issue by click "new issue", so can you help me resolve this problem, thanks

@SvyatoslavScherbina
Copy link
Collaborator

Please ensure you open iosApp.xcworkspace in Xcode, not iosApp.xcodeproj.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants