building TestFlightSDK with cocoapods - ios

I seem to be getting the error message while trying to compile TestFlightSDK in my app via cocoapods
Im my Podfile i have the line:
pod 'TestFlightSDK'
And the pod update works fine.
When i try and compile the app i get the message:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TestFlight", referenced from:
objc-class-ref in OurDealAppDelegate_iPhone.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
my app is only supporting Architecture armv7 (because if i add armv7s or arm64 older libraries fail to compile - so i assume its something to do with this.
Is there any work around for this?

Okay, you need to confirm whether Cocoapods has included libTestFlight.a library in your project. Cocoapods has never added the library for me.
So, please follow the steps below:
Open the Pods-TestFlightSDK target in the Pods.xcodeproj project
Open Build Phases tab and add libTestFlight.a
libTestFlight.a can be found at [$SRCROOT]/Pods/TestFlightsSDK

Related

iOS Unity Firebase Messenger Xcode Compile Error: FIRDynamicLinks

Building with Unity 2018.4.2 - Xcode 10.2 - Latest iOS Targets
Firebase Latest (6.1.1) for Unity with .Net 4
For Firebase We are using the following unity packages:
- FirebaseMessaging.unitypackage
- FirebaseAnalytics.unitypackage
Get the following Build Error in Xcode:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRDynamicLinks", referenced from:
objc-class-ref in libFirebaseCppApp.a(invites_receiver_internal_ios_aa7b75b2efc3269e88f1077e55250e5a.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
On another Machine same error however armv7 target:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_FIRDynamicLinks", referenced from:
objc-class-ref in libFirebaseCppApp.a(invites_receiver_internal_ios_aa7b75b2efc3269e88f1077e55250e5a.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Tested Solutions (no solution yet):
Obj-C to frameworks (was already there)
Updated Cocoa Pods to Latest
Deleted Developer/Xcode/DerivedData
Updated Cocoa Pods and deleted caches
The strangest thing is this only started happening on Monday, previously was working, nothing else was changed, so this leads to believe this is Google changed something in their Cocoa pods library which is linking agains't another package which is not included now.
Problem does not occur in the same Android Variant of the Project.
Solution:
It now requires you to also include and install Firebase: DynamicLinks in order to compile for iOS.
FirebaseDynamicLinks.unitypackage
So install the following package into your unity project from the download of Firebase Unity.

Integrating AppRTC to Ionic - iOS linker error

I am integrating AppRTC to my hybrid app (ionic 3 and angular 4)...
iOS AppRTC Integration: https://github.com/ISBX/apprtc-ios
I've successfully installed the pod and build the project without errors but when I add
[RTCPeerConnectionFactory initializeSSL];
to my
application:didFinishLaunchingWithOptions:
When I build the project I get the following errors:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RTCPeerConnectionFactory", referenced from:
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)
Already searched the net but couldn't find a solution...
Added " ${inherited} $(OTHER_LDFLAGS) -ObjC -all_load" to the linker library, restart and clean xcode, deleted the DerivedData file but the issue still persist.
Not sure if this will help as you have installed from a pod but we got the same error when the framework search path was wrong. $(inherited) pathToWebrtcFramework. With this option we had built the webrtc framework ourselves using the instructions at https://webrtc.org/native-code/ios/.
Also set build active architecture only to yes.

MSCollectionViewCalendarLayout example: undefined symbols for architecture

I want that the example of MSCollectionViewCalendarLayout compiles and run.
Steps I've done:
installed CocoaPods
downloaded project
run pod install in the Example project directory
run the project from the .xcworkspace
Now I'm getting
Undefined symbols for architecture i386:
"_RKLogCoreDataError", referenced from:
___33-[RKEntityByAttributeCache load:]_block_invoke in libRestKit.a(RKEntityByAttributeCache.o)
___43-[RKManagedObjectImporter finishImporting:]_block_invoke in libRestKit.a(RKManagedObjectImporter.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried the tips from here, but the version seem to be wrong.
How can I run this project?
Problem is, that RestKit version (0.22.0) specified in the Podfile is not compatible with Cocoapods 0.38.x. Switching to latest version 0.24.1 should fix this:
In Podfile:
pod 'RestKit', '0.24.1'

xCode failed linker

When trying to build my iOS app in Xcode, I get the following error message.
Undefined symbols for architecture i386: "OBJC_CLASS$UIPresentationController", referenced from: _OBJC_CLASS$SSSidebarPresentationController in libtools.a(SSSidebarPresentationController.o) "_OBJC_METACLASS$UIPresentationController", referenced from: _OBJC_METACLASS$_SSSidebarPresentationController in libtools.a(SSSidebarPresentationController.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have the latest version of Xcode. I have tried cleaning and deleting derived data but that did not help. I've noticed a lot of other people on the internet have similar error messages but the solutions did not help me.
Add the AVFoundation and CoreLocation frameworks to your target. After you do this, delete derived data, clean, and build again.
Also, check in your architectures under build settings and make sure that you have armv7 and armv7s listed under valid architectures. If the above answer does not fix your problem then try adding or removing arm64.

xcode 6 test target Mach-O linker error

I just finished installing CocoaPods. My app target builds and runs.
I added a link_with line in my Podfile to allow cocoapods to also add the frameworks to my Tests target. Now I get some linker errors when trying to run tests. I was able to resolve a missing XCTest error by specifying the XCTest framework in other linker flags as in the picture.
I'm still left with this, which is a reference to a class in my project. There are a couple other references to other classes in my tests that don't seem to cause an error, I can see nothing different ServerController.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ServerController", referenced from:
objc-class-ref in TestServerController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here's my header search paths:
To me, this looks like you're trying to compile and run tests on the simulator without actually building for the simulator's processor architecture.
Your test project might have i386 listed as a valid architecture, but does your main project have it listed there as well?
Check Valid Architectures in your build settings for your product's target and make sure i386 is listed as a valid architecture, then clean and build for testing again.

Resources