deezer-ios adding static library - iphone

I'm trying to use the iOS SDK provided by Deezer to develop an iPhone application. I downloaded the framework here.
I started a new projet on Xcode (xcode 3.2.6), then I imported all the headers files (and the pics in Resources). Then I made right click on Frameworks and chose "add > add existing framework" and selected the "libDeezer.a" provided by deezer.
I wrote some code in my application delegate class, and when I try to build and run the project I got one warning and one error :
ld: warning: in /Users/.../deezer-ios-sdk-0.5 3/deezer-ios-0.5/libDeezer.a, missing required architecture i386 in file
Undefined symbols:
"_OBJC_CLASS_$_DeezerConnect", referenced from:
objc-class-ref-to-DeezerConnect in deezer5AppDelegate.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
How can I link the library to my project? Any ideas?

Double click on project target, and in the search path group, there is a attribute called Library Search path. please specify the path correctly.
if you have still doubt let me know , i will specify more

Are you building for simulator or device ?
The Deezer's iOS SDK is not working on simulator, but devices only.

Related

Flutter Plugin containing static library (.a File) is not linked correctly

I have a Flutter Plugin, which for iOS uses a static library (.a file). If I add the plugin to my pubspec.yaml and install it via flutter pub get, it installs a pod, which I can see in my app`s XCode project, everything correct so far.
pubspec.yaml:
XXX_flutter:
git:
url: git#gitlab:XXX-solutions/app/flutter/plugin_XXX.git
ref: "develop"
However if I build the app, I get the following error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_XXX", referenced from:
objc-class-ref in XXX.o
ld: symbol(s) not found for architecture arm64
In the XCode workspace, in the Pods project, if I select the XXX pod, I can add the .a file manually to "Pod Project -> TARGETS XXX -> Build Phases -> Link Binary With Libraries". This would solve the problem, but I had to do it any time I do a flutter clean, pub upgrade, team member checks out project etc.. since the Pods are not under source control, so this solution is not good.
I tried to add the .a file to my app`s project "Link Binary With Libraries", but this didnt fix it. I have no idea how to solve this.
Note: The library is proprietary software, so it´s blacked out because I think the developers dont want to see problems issued with their software. The plugin itself is just Flutter wrappers for the library and is written by our team.
This is because the static lib you are using isn't compiled for arm64 devices, so you need to exclude this architecture from your build. See pic.
*Note: it's only on release, you may have issues excluding arm64 for debug if you have an M1/M2 mac and using simulators.
You can release to App Store for ios devices with arm64 excluded with no issue.
Alternatively, you could include a version of your static lib that is compiled for arm64 arc.

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have developed an iOS Application with Xcode 5, release 6.
I have successfully run the application on the iOS simulator and on my iPhone 5 (iOS7 beta6)
I'm following Apple's tutorial on how to release the app onto the app store (bit complicated).
I've gotten to the point where they want me to "Archive" my project. Everytime I attempt to archive it, it gives me this error:
ld: file not found:
/Users/name/Library/Developer/Xcode/DerivedData/Mobile-cwvgezbobyhhzzccadgoqizqcmfd/Build/Intermediates/ArchiveIntermediates/trial/InstallationBuildProductsLocation/Applications/libCordova.a
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Well, since you are using Xcode 5, Apple says on the member center:
"Xcode 5 Developer Preview cannot be used to submit apps to the iOS or
Mac App Store. Continue to use the publicly released version of Xcode
to compile and submit apps to the App Stores."
But I will show some suggestions anyway:
With Xcode, click on your project's icon on the left, select the tab Build Phases > Compile Sources and click on the "+" to check if there is some file .m to be imported.
Check if you imported all the frameworks you are using to your project.
Go to Build Settings and look for Architectures and set armv7 instead of armv6 and armv7s.
I hope this helps.

Social.framework not found

I'm trying to link Facebook SDK 3.1 with my existing iOS application. Base SDK is 6.1, iOS Deployment Target is set to 5.1.
I added Social, Accounts and AdSupport framework to the project and set them to Optional in the Build Phases > Link Binary with Libraries. I also tried to manually link them with -weak_framework in "Other Linker Flags".
However, I always end up with:
ld: framework not found AdSupport
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What am I doing wrong?
Thanks in advance!
EDIT: Using XCode version 4.6 by the way!
the social framework is new in iOS6, if you are supporting iOS5 you has to go to your Target Properties/Build Phases/Link Binary with Libraries and mark the Social framework as Optional as shown in the image

facebook ios sdk build fails on device, works on simulator

I am trying to build an app (with ARC) that uses the facebook_ios_sdk (the latest version on github).
As recommended by Facebook, I used the build script to create a static library and then added it to the project.
Now when I build the project for an iPhone 5.1 Simulator, it works fine. However, on running it for an actual device (which is running 5.1), it gives the following build error -
ld: in ../facebook-ios-sdk/libfacebook_ios_sdk.a, file is universal but does not contain a(n) armv7 slice for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions on how to resolve this?
You could modify the build script for static library (which was too complicated for me), or just skip the library approach:
add the Facebook sources from SDK to your project
if using ARC, go to "target->build phases->compile sources" and mark all the Facbook source files with the--fno-objc-arc flag
That's it, works for me.
One work around that worked was to change the Valid Architectures from"armv6 armv7" to just armv6

problem while installing app on iphone

H everyone
i have up graded my xcode to xcode 4 & i am trying to install a app through this xcode on to a iphone but i am getting following error & i am unable to launch the app
warning: Unable to read symbols for /var/mobile/Applications/7A08B9EA-DD46-47B4-8E0C-BF081BDB1F4B/QIA All.app/QIA All (file not found).
dyld: Library not loaded: /System/Library/Frameworks/QuickLook.framework/QuickLook
Referenced from: /var/mobile/Applications/7A08B9EA-DD46-47B4-8E0C-BF081BDB1F4B/QIA All.app/QIA All
Reason: image not found
i have following warning in my app
ld: warning: directory not found for option '-F/Developer/new xcode/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/PrivateFrameworks'
is from this warning
how can i fix this?,,,thanx in advance
you have to check that all images and framework are included friend. may b any image is missing that is deleted from project folder .check if you get any image in red then add that image
Looks like your app is still trying to link to the 3.1.2 SDK. You need to change the SDK in the project settings to Base SDK: Latest (iOS 4.3). Also make sure to clear out any settings in the target for this value so that it inherits it properly.