iOS - SoundCloud - Integration number of frameworks (Sound cloud) in workspace - ios

I know that CocoaSoundCloudAPI has no longer pull request support. But as per my project requirement it is necessary to use this api.
I'm following - https://github.com/soundcloud/CocoaSoundCloudAPI
I have created workspace and getting following WARNINGS and ERRORS
ld: warning: ignoring file /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libJSONKit.a, file was built for archive which is not the architecture being linked (x86_64): /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libJSONKit.a
ld: warning: ignoring file /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libOHAttributedLabel.a, file was built for archive which is not the architecture being linked (x86_64): /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libOHAttributedLabel.a
ld: warning: ignoring file /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libSoundCloudAPI.a, file was built for archive which is not the architecture being linked (x86_64): /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libSoundCloudAPI.a
ld: warning: ignoring file /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libSoundCloudUI.a, file was built for archive which is not the architecture being linked (x86_64): /Users/(account_name)/Library/Developer/Xcode/DerivedData/PrankWorkSpace-cckuzufjvkoglfdwnllxgiisuwot/Build/Products/Debug-iphonesimulator/libSoundCloudUI.a
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SCShareViewController", referenced from:
objc-class-ref in SplashVC.o
"_OBJC_CLASS_$_SCSoundCloud", referenced from:
objc-class-ref in AppDelegate.o
"_SCUICanceledErrorCode", referenced from:
___18-[SplashVC upload]_block_invoke in SplashVC.o
"_SCUIErrorDomain", referenced from:
___18-[SplashVC upload]_block_invoke in SplashVC.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note : I have followed all the steps given in git Doc.
anyone have idea about this kind of problem.
Thank You.
-- UPDATE --
I have configured my Target Build Settings like
Architecture -> $(ARCHS_STANDARD_32_64_BIT)
Build Active Architecture Only -> No
Other linker flags -> -all_load - ObjC
Always Search User Paths -> No
Header Search Paths -> recursive
Implicitly link objective-c runtime support -> No

Related

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_InterstitialAdView", referenced from:

I have created a framework & integrated in the another app(Demo). When i run this Demo app on simulator then there is not any error...
But when do i run on device its gets error.
ld: warning: ignoring file /Users/mac/Desktop/library file/Demo/pk.framework/pk, file was built for x86_64 which is not the architecture being linked (arm64): /Users/mac/Desktop/library file/Demo/pk.framework/pk
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_InterstitialAdView", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please share your experience.
I am using Xcode 9.0
Thanks
You have to know simulator and devices have different cpu types, when you build Xcode will build the app and link the libraries according to the target type.
From the error info, it seems your framework only provide the x86_64 architecture (for simulator), you should build your framework for the device architecture (arm64) instead !

Apple Mach-O for libAppLovinSdk.a in cocos2d for iPhone

I am trying to display AppLovin sdk in my cocos2d project in Xcode and I'm currently unable to debug this Apple Mach-O error as described below.
Undefined symbols for architecture i386:
"_CMTimeGetSeconds", referenced from:
-[ALVideoViewController timeLeft] in libAppLovinSdk.a(ALVideoViewController.o)
-[ALVideoViewController percentViewed] in libAppLovinSdk.a(ALVideoViewController.o)
"_CMTimeMakeWithSeconds", referenced from:
-[ALVideoViewController createCountdownTimeObserver] in libAppLovinSdk.a(ALVideoViewController.o)
"_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
"_MPMoviePlayerPlaybackDidFinishReasonUserInfoKey", referenced from:
___53-[ALInterstitialViewController moviePlayerDidFinish:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
"_MPMoviePlayerPlaybackStateDidChangeNotification", referenced from:
___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
"_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
objc-class-ref in libAppLovinSdk.a(ALInterstitialViewController.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I went to build phases -> add other -> Selected libAppLovinSdk.a file from the finder displayed.
I also set the value of Build Active Architectures only to NO and removed arm64 from architectures. There is no i386 architecture.
You are missing the CoreMedia and MediaPlayer frameworks.
(I found this out by Googling for CMTimeGetSeconds and MPMoviePlayerPlaybackDidFinishNotification and seeing what section of the Apple docs got hits, however the CM and MP prefixes should be enough to tell you).

ld: warning: ignoring file

I am getting below warning
ld: warning: ignoring file [path]/libMAKit.a, missing required architecture i386 in file Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MAViewController", referenced from: _OBJC_CLASS_$_AnalysisViewController in AnalysisViewController.o
"_OBJC_CLASS_$_MAChartView", referenced from: objc-class-ref in AnalysisViewController.o
"_OBJC_CLASS_$_MAKitTheme_WelterWeightDark", referenced from: objc-class-ref in AnalysisViewController.o
"_OBJC_METACLASS_$_MAViewController", referenced from: _OBJC_METACLASS_$_AnalysisViewController in AnalysisViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Looks like libMAKit.a not have simulator (i386) architecture, if you have source you can rebuild it but frequently third party libs ships without i386 architecture and can be usable only on real device
Try to find some missing files (red letters) like images. We spend most of one day just to figure it out that I didn't had all the images locally. (Sorry if it's bad english)

How to run Chart Boost demo on Xcode in unity3d?

I have run chart boost demo which have been provided at chart boost site.
It shows error like below,
ld: warning: ignoring file /Users/jeganselvaraj/Unity3D/SlotMachine_IOS/Libraries/libChartboost.a, missing required architecture i386 in file /Users/jeganselvaraj/Unity3D/SlotMachine_IOS/Libraries/libChartboost.a (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CBAnalytics", referenced from:
objc-class-ref in ChartBoostBinding.o
"_OBJC_CLASS_$_Chartboost", referenced from:
objc-class-ref in ChartBoostBinding.o
objc-class-ref in ChartBoostManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What can I do for this issue?
Seems like there is no libChartboost.a in your Xcode project's Libraries folder.
You need to ensure that file libChartboost.a is in directory Assets/Plugins/iOS. All files from Assets/Plugins/iOS are copied to the Xcode project automatically during Unity's build process. Note that subdirectories within Assets/Plugins/iOS are not considered.

Linker command failed error for static library 'libiphone-exif.a' [duplicate]

This question already has answers here:
build failed with: ld: duplicate symbol _OBJC_CLASS_$_Algebra5FirstViewController
(28 answers)
Closed 9 years ago.
I have downloaded a source code which was attached with my mail. There was a static library named 'libiphone-exif.a' which was not working & showing error. Then I downloaded that library from code.google.com & added it through 'Link Binary With Libraries' but now I cant build this & its showing the following error:
ld: warning: ignoring file /Users/codemenmini2012-2/Downloads/iphone-exif-0-9/Release- iphoneos/libiphone-exif.a, file was built for archive which is not the architecture being linked (i386): /Users/codemenmini2012-2/Downloads/iphone-exif-0-9/Release-iphoneos/libiphone-exif.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_EXFGPSLoc", referenced from:
objc-class-ref in PictureViewController.o
"_OBJC_CLASS_$_EXFJpeg", referenced from:
objc-class-ref in PictureViewController.o
"_OBJC_CLASS_$_EXFUtils", referenced from:
objc-class-ref in PictureViewController.o
"_OBJC_CLASS_$_EXFraction", referenced from:
objc-class-ref in PictureViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I downloaded library from below link, and in it I found two folders for library,
https://code.google.com/p/iphone-exif/downloads/list
1) Release-iphoneos,
2) Release-simulator-iphonesimulator
so when you run it in simulator (i386 architecture) use .a file from Release-simulator-iphonesimulator folder and when you run it for device use .a file from Release-iphoneos.
Try to do this and let me know if you get any error.
Create universal library and try again,
Open terminal
Cd to your iphone-ex download folder
lipo -arch i386 Release-simulator-iphonesimulator/libiphone-exif.a -arch armv6 Release-iphoneos/libiphone-exif.a -create -output libiphone-exif-universal.a
after that use libiphone-exif-universal.a in your project.
checkout you target->build setting -serch path is set the static path multiple

Resources