I'm trying to install Card.io (5.2.2) with cocoaPods on Xcode (7.1). But when i run my project the compilator shows me this error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CardIOUtilities", referenced from:
type metadata accessor for __ObjC.CardIOUtilities in CheckoutTableViewController.o
"_OBJC_CLASS_$_CardIOPaymentViewController", referenced from:
type metadata accessor for __ObjC.CardIOPaymentViewController in CheckoutTableViewController.o
ld: symbol(s) not found for architecture arm64
My Podfile contains:
# Uncomment this line to define a global platform for your project
platform :ios, '8.1'
# Uncomment this line if you're using Swift
use_frameworks!
target 'MyApp' do
pod 'Mobile-Buy-SDK'
pod 'HanekeSwift'
pod 'Parse'
pod 'CardIO'
end
i just typed pod install, and launched the .xcworkspace it created.
I think it has something to do with the static libraries inside card.io, but i can't get this to work. Can anyone help me ?
Try adding $(inherited) to your 'Other linker flags' build setting.
Related
I'm having trouble implementing InMobi mediation SDK and adapter into iOS app. Built is resulting with error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GADMediatedNativeAdNotificationSource", referenced from:
objc-class-ref in InMobiAdapter(GADMAdapterInMobi.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm using coocapods as dependency manager. Here is my Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'APP-mobile' do
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleMobileAdsMediationInMobi'
pod 'lottie-ios'
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
end
target 'APP-desktop' do
end
I manage to solve it by using
pod 'InMobiSDK'
instead of
pod 'GoogleMobileAdsMediationInMobi'
and adding InMobiAdapter into project, download from here.
Complete instruction on InMobi Support Center.
I have configured GoogleSignIn using pod.
My pod file
target ‘MyApp’ do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'p2.OAuth2'
pod 'GoogleSignIn'
target 'MyAppUITests' do
inherit! :search_paths
# Pods for testing
pod 'p2.OAuth2'
pod 'GoogleSignIn'
end
end
I am able to Sign In to google.
For XCUITest, I am getting error
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GIDSignIn", referenced from:
objc-class-ref in Myclass.o
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In those classes I have imported "GoogleSignIn".
How do I solve this issue?
Bitcode is off, other liner flags -ObjC is added.
I have checked build setting for test target.
test target-> build setting -> other linker flags
I have added "-framework" and next to it "GoogleSignIn". It worked.
I have a MyApp.xcodeworkspace that uses a homegrown MyAppKit iOS framework.
MyAppKit is included as xcodeproject inside the parent MyApp project.
When I include Firebases and Google Tag Manager via Cocoapods in MyAppKit framework and compile the parent project, I get this error.
ld: framework not found Pods_MyAppKit
and a bunch of warnings:-
ld: warning: directory not found for option '-F/Users/this.user/Library/Developer/Xcode/DerivedData/MyApp-enzvpdzsyhjszqbnwiclnpszlyri/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-F/Users/this.user/Library/Developer/Xcode/DerivedData/MyApp-enzvpdzsyhjszqbnwiclnpszlyri/Build/Products/Debug-iphonesimulator/FirebaseInstanceID'
ld: warning: directory not found for option '-F/Users/this.user/Library/Developer/Xcode/DerivedData/MyApp-enzvpdzsyhjszqbnwiclnpszlyri/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/this.user/Library/Developer/Xcode/DerivedData/MyApp-enzvpdzsyhjszqbnwiclnpszlyri/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-F/Users/this.user/Library/Developer/Xcode/DerivedData/MyApp-enzvpdzsyhjszqbnwiclnpszlyri/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/this.user/Library/Developer/Xcode/DerivedData/MyApp-enzvpdzsyhjszqbnwiclnpszlyri/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-F/Users/this.user/Library/Developer/Xcode/DerivedData/MyApp-enzvpdzsyhjszqbnwiclnpszlyri/Build/Products/Debug-iphonesimulator/nanopb'
Background...
Came the need to import Firebase and Google Tag Manager as Cocoapods in MyAppKit framework.
I've done the required pod init, pod install in MyAppKit without any errors.
MyAppKit.xcworkspace on its own builds and compiles successfully.
The Podfile in MyAppKit looks like this:-
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
target 'MyAppKit' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyAppKit
pod 'Firebase/Core', '~> 5.19'
pod 'Firebase/ABTesting'
pod 'Firebase/Performance'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Analytics'
pod 'GoogleTagManager', '~> 7.1'
pod 'Google-Mobile-Ads-SDK'
end
I expect there to be minimal changes to the parent project and ideally don't want to include the same Pods (as in the framework MyAppKit) in the main project as well.
Is there anything incorrect in the way I'm including the Pods in MyAppKit framework.
Is there something additional that I need to do in my parent project MyApp to make this work ?
Thanks,
Tas
I recently moved my data model objects to their own framework by adding clicking the + button on the project screen. I moved all the files and changed their target memberships to AppCore as opposed to App. The project is purely in Swift.
I updated my podfile to the below:
platform :ios, '10.0'
inhibit_all_warnings!
target 'App' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/Storage'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
target 'AppCore' do
inherit! :search_paths
end
end
Whenever I try to build I get 4 errors:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRDataSnapshot", referenced from:
objc-class-ref in SSWorkout.o
"_OBJC_CLASS_$_FIRDatabase", referenced from:
objc-class-ref in SSReference.o
objc-class-ref in SSReferrable.o
"_OBJC_CLASS_$_FIRAuth", referenced from:
objc-class-ref in SSUser.o
"_OBJC_CLASS_$_FIRDatabaseReference", referenced from:
objc-class-ref in SSOperation.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have deintegrated and reinstalled pods, cleaned the project, cleaned build folder, deleted derived data etc, I can't get it to compile.
You can reproduce this in the demo project, run pod install and try to build.
https://github.com/Raesu/Demo-Proj
The libraries in Firebase's pod are currently built as static libraries. It is not possible to link static libraries into a dynamic library framework -
DemoCore in your example.
Try enabling bitcode in Xcode build settings and do a clean build, this helps me to resolve the issue
Xcode > Build settings> Enable bitcode
I got an error when migrating my project from Xcode 5 to 6.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in QCRoomListControllerViewController.o
objc-class-ref in libQCBase.a(QCHttpRequestAdapter.o)
objc-class-ref in libQCBase.a(QCHttpApi.o)
"_OBJC_CLASS_$_AFHTTPResponseSerializer", referenced from:
objc-class-ref in QCRoomListControllerViewController.o
"_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
objc-class-ref in libQCBase.a(QCHttpApi.o)
ld: symbol(s) not found for architecture i386
I choose cocoapods as package manager, and the project structure is like below:
both major project and BaseLib are using some pods, at the same time project is using BaseLib.a.
I've try combinations like Xcode 5 with iOS 7.1 SDK(which is the only working one), Xcode 6 with iOS 7.1 SDK and Xcode 6 with iOS 8.0 SDK.
My current conclusion is whenever Xcode 6 is involved, links will fail, no matter which version of iOS SDK I choosed.
Relevant settings are described below.
The xcconfig file are correctly set on both project and BaseLib:
Architectures setting:
My Podfile content:
#platform :ios, "6.0"
source 'https://github.com/CocoaPods/Specs.git'
workspace 'QiChengWS.xcworkspace'
xcodeproj 'QiChengNew/QiChengNew.xcodeproj'
xcodeproj 'QCBase/QCBase.xcodeproj'
target :QiChengNew do
pod 'JSONModel'
pod 'SDWebImage', '~>3.6'
pod 'AutoNSCoding', '~> 0.1.3'
platform :ios, '7.0'
pod 'ProtocolBuffers', '~> 1.9'
pod 'CocoaAsyncSocket', '~> 7.3'
pod 'GBInfiniteScrollView', '~> 1.6'
pod 'GBInfiniteScrollView/PageControl'
pod 'UMengAnalytics', '~> 3.1.2'
platform :ios, '7'
pod 'MWPhotoBrowser', '1.4.0'
xcodeproj 'QiChengNew/QiChengNew.xcodeproj'
end
target :QCBase do
platform :ios, '7.0'
pod "AFNetworking", "~> 2.0"
pod 'SVPullToRefresh', :head
pod 'Toast', '~> 2.3'
xcodeproj 'QCBase/QCBase.xcodeproj'
end
I hope you have found the solution by now. If not updating to AFNetworking 2.4 solved this for me
I have face this type of issue after installing 'pod' file to my project. I resolve this problem by using below code.
[!] The `sftest [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-sftest/Pods-sftest.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
Change "Other Linker Flags" to $(inherited) and it solve my problem.