iOS Programming, Xcode 6.1.1. Error: Data file 'library.a-x86_64.fin' does not exist. Finalizing - Failed - ios

I am using third party library files which contains .h, static library (.a), .fin, .key files. The readme says:
1) .fin, .key & .a files should be present on same location.
2) Add flags "-finalize -prefinalized-library library_name.a" in "Other Linker Flags" option.
3) Click Yes on "Write Link Map File" option.
I have created a new group/folder in the project from the "Xcode's Project Navigator" window & placed .a, .key, .fin files & followed the same steps as mentioned & when I was trying to compile the application, .fin files were not found during linking.
When I removed the "Other Linker Flags option" the application was getting compiled. But the readme says "Other Linker Flags option" is mandatory for using the library.
Apart from this. When I copied .a, .key, .fin files without creating any folder then the application compiles successfully. But if these files are placed inside a folder in the application then application fails to compile.
Can anyone please help me on this. How & where to provide the path to .key, .fin files so that the application gets compiled using the finalizer.
Xcode 6.1.1
iOS SDK version 8.1
OS X - Yosemite 10.10.2

I had the same issue. I resolved by adding the flag -Wfin-data-files {PATH}. The path is where Xcode can find the .fin files

Related

Qt application build for ios using cmake and xcode

I have a Qt application which I can build and run with 2 differents ways, the application works properly on my Mac.
I can run from QtCreator using qbs files.
I can run from Xcode using a .xcodeproject generated by cmake.
Now I want to run my application on an Ipad.
I try from QtCreator but the signing is not working properly (bundle id)
I think i need to use Xcode for the Info.plist generation and let him do the work for selecting the appropriate compiller but i don't know how to add a new "target device".
I open my XcodeProject but my Ipad is not showing on the device pannel next to the run Button.
When I go on the settings i need to tell him where to find the info.plist but when I hit the "find plist file" i got none. Should I create it in my application folder or use some cmake method ?
Last things my project is using different libraries, i compile them for ios using the appropriate CC and CXX flags.
Where should I specify the location folder for thoose libraries.
inside the CMakeList with something like this or create a new CMakeList file just for the ios build ?
if(WIN32)
elseif(APPLE) #ios flags ???
endif()

How to embed framework without copying in project

There was a similar question, but the answer is no
I use appodeal-ios-sdk-mobile-adapter. I want to add them to your projects without copying each.
in the Link Binary with Libraries framework added
But I get:
ld: framework not found GoogleMobileAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In order to add the framework to your project without copying proeta folder, drag the folder using the (Create groups), and add the path where you have a set framework -> "Build Setting -> Library Search Paths and Framework Search Paths
/Users/username/Framework/AppodealAdapters/**
Well you can open the system directory where all the frameworks are present
that is in the system folder where all the frameworks are installed
Hit Shift+Command+G
and use the below address
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks
Once in the directory copy the framework which you want to use. Take care to not mess around other frameworks in this directory.
Once the frameworks are copied into this directory you can add them to your project just like you include a regular system defined framework.
Try it out it works for me. I am using XCode 7.3.

Can't link fat iOS static library

I recently downloaded a fat, iOS static library for the popular C library boost. All my attempts in coaxing Xcode to link it have failed.
Things I have tried:
Adding it to Link Binary With Libraries.
Changing file type to Mach-O Object Code using File Inspector.
Renaming the file to libboost.a and adding -lboost to Other Linker Flags.
I am using Xcode 6.3 with the latest command line tools.
How To Link to an Xcode Project?
In Xcode Build Settings for your project: LIBRARY_SEARCH_PATHS
ofxiOSBoost/libs/boost/lib/ios
(Set this to the directory where the static library is)
In Target under Build Phases for your project
Add to 'Link Binary With Libraries' the boost.a found in the ofxiOSBoost/libs/boost/lib/ios directory.
Renaming to libboost.a may be breaking it. The ofxiOSBoost renames this file as to not conflict with internal OSX libs in the linking process if in path / sys, so it links correctly with the iOS Binary.
If you are still having this problem, please open an issue here:
https://github.com/danoli3/ofxiOSBoost/issues

libsqlite3.dylib framework accidenlty deleted from xcode

libsqlite3.dylib is accidently deleted from my Xcode . It is shown as red in "Link Binary with Libraries" (Build Phases) . Not in Trash too . Do I need to install xcode again ?
While the above answers do tell you how to go about adding the library to Xcode, what happens if you cannot find the library? I noticed this issue, and then did a search in Spotlight for libsqlite3, which did not locate any files. While it is kind of crude, you can jump to a Terminal session to locate files throughout your file system. Spotlight does not index everywhere on your drives, and my suspicion is that it does not include the locations where this file lives. At a terminal prompt, type:
find / -name libsqlite3.dylib -print
This is a UNIX command that will locate the file, starting at the root, and printing out the results it finds. You can press CTRL-C to cancel the search at any time. I actually found it within the Xcode bundle; in this case I am running Xcode 7 Beta, so it was found in:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
For convenience, I copied the file from this folder to a Resources folder under Documents, where I keep libraries and other files for easy reference in my projects.
Please note, if you are developing in Swift, then you need to edit your Bridging-Header.h file, and add the line:
#imports <sqlite3.h>
If you don't have the Bridging Header, you can add it to your project, follow the steps:
Create a new file, Bridging-Header.h in your project.
Add the line above.
Go to your Project Build Settings (click on the Project,
click on Build Settings tab).
Locate "Swift Compiler - Code
Generation", "Objective-C Bridging Header" setting, and add the name
of the file above "Bridging-Header.h"
It looks your library is missing libsqlite3.dylib and libsqlite3.0.dylib, so copy these files from any other computer and place these files in your computer.
Procedure:
Open xcode on the computer where these files exists, add libsqlite3.0.dylib in your project from link binary with libraries.
Right click on the libsqlite3.0.dylib and show in finder.
Copy two files libsqlite3.0.dylib and libsqlite3.dylib and place on the same location on other computer where these files are missing.
original post:
XCode 4 - libsqlite3.dylib: No such file or directory

PhoneGap Facebook Connect Plugin on iOS

I was wondering if any succeeded with the instructions at : https://github.com/phonegap/phonegap-facebook-plugin ?
My environment is as follows:
1) xcode: Version 4.5.1 (4G1004)
2) Phonegap: 2.5
3) Macbook Pro 64bit.
4) Facebook SDK 3.2
5) Target build is iOS5 ( tried 6 but also failed )
After following the instructions at https://github.com/phonegap/phonegap-facebook-plugin for iOS, my build failed.
And the error message is:
ld: 379 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
can anyone point me as to how to fix this error ?
any online tutorials, or step by step instructions will be great too.
Thanks!
I had the same issues, and fixed it by following this on Github : https://github.com/ghn/phonegap-facebook-plugin/commit/83d41c1b3e999f11333ff7da89918ff6e58bf72f
Add the Cordova Facebook Plugin:
Locate the plugins section of your Project Navigator and create a group "ios". Make sure it is added as a "group" (yellow folder)
From the Cordova Facebook Plugin folder copy FacebookConnectPlugin.h and
FacebookConnectPlugin.m from the src folder into the new group "ios".
Find the config.xml file in the project navigator and add a new entry as a child to the plugin tag:
< plugin name="org.apache.cordova.facebook.Connect" value="FacebookConnectPlugin" />
You have to create an ios folder into the plugins directory. And ensure FacebookConnectPlugin.h and FacebookConnectPlugin.m are removed from plugins directory.
This error usually comes from including both a compiled library (as a framework in the project or as a build target in the "Build Phases" project properties tab) and the .m source files that generate it.
Some tutorials tell you to include the FacebookSDKResources.bundle frameworks and some tell you to copy the source files in Plugins/ios/facebook. If you do both you'll get this error.

Resources