This target might include its own product - iphone

File .../FaceDeFace.app depends on itself.
This target might include its own product.
File .../FaceDeFace.app depends on itself.
This target might include its own product.
I have done my project in os Snow leopard but now my os version also changed and it is now 10.7.3. This is installed in my Imac machine. This app start first in MacBook but now I want to develop it in IMac. But the above error is shown so what i have to do. Though I have change all of my certificate, and all provisioning profiles newly.
Please help.
Thanks i advance.

Select the target in your Xcode project and click the Build Phases tab. Look at the Target Dependencies list; the target's product should not be listed there, but it sounds like it may have been added to that list by mistake. Also check the other areas in that same tab -- you don't want your product listed in Copy Bundle Resources or Link Binary With Libraries, either -- you obviously can't use the thing that you're building as a resource or library to build the product in the first place. That's what Xcode seems to be complaining about.

Ran across this issue using Xcode 7 (beta 1) when trying to build a Static Library target. Here was the error message from the build output:
Unable to run command 'CopySwiftLibs libMyStaticLibraryName.a' - this target might include its own product.
(I substituted libMyStaticLibraryName.a above in place of the actual name of my static library.)
The problem turned out to be that this static library target had the Embedded Content Contains Swift Code build setting (EMBEDDED_CONTENT_CONTAINS_SWIFT) set to YES, when in reality there was no Swift code associated with this target. Setting this to NO in Xcode fixed the issue.
Static libraries cannot include Swift code, so if this build setting is set it causes the error, even if there is no actual Swift code in the target.

In my case, very simple, please delete Universal target, then add new target.
That's all

In my case my project had submodule inside, so commands
git submodule add submoduleURL
git submodule init
git submodule update
solved this issue.

I had the same problem, when podspec file was incorrect. My mistake was that I didn't specify .h and .m extensions for source_files. Because of that .xib files were added twice. This is a correct example:
s.source_files = 'YourTarget/Classes/**/*.{h,m}'
s.resources = ['YourTarget/Classes/UIComponents/**/*.xib']
See https://guides.cocoapods.org/syntax/podspec.html#source_files

Related

Convert regular xcode application project to iOSOpenDev

I'm new to jailbroken dev. I have a regular xcode application project. Now I need to convert it, or create a new application project using iOSOpenDev for jailbroken dev. I found the same question:
xcode project conversion to iOSOpenDev
But I have no idea what to do with the first step. Do I need to add some settings or change some values of existed settings? Pleas give some more details.
thanks!
About the first step, I did some tryings and it worked out. The following steps is just the same as kokoabim said:
1.change the install path to /Applications; add iOSOpenDev's include,lib,framework folder path to Framework Search Paths,delete iphonesimulator from Supported Platforms in Build Settings, Header Search Paths, Library Search Paths(I'm not sure if it's necessary);
Add a run script build phase (must be last in order) to existing target that executes /opt/iOSOpenDev/bin/iosod --xcbp.
3.Create the Debian package control file under the existing target's folder as (target's directory)/Package/DEBIAN/control.
4.Perform a Build For Profiling (Cmd-Shift-I).

lexical or preprocessor issue file not found occurs while archiving?

I am new to this iPhone development and i have almost completed my first application but when i try for creating an archive it gives an error lexical or preprocessed issue file not found But it runs fine in simulator and also has also tested on device. I have included SDwebimage architecture for lazy loading of image in table view.Can any tell me what is the issue?
Few things to try, Ensure the Framework and all it's headers are imported into your project properly.
Also in your Build Settings set YES to Always search user paths, and make sure your User header paths are pointing to the Framework.
Finally, Build->Clean and Restart Xcode.
Hope this helps !
UPDATE: According to SDWebImage's installation, it's required you make a modification to Header Search Path and not User header paths, As seen below.
Have you done this as well? I suggest slowly, re-doing all the installation steps from the beginning.
Spaces in a folder name in your header search path can cause this problem. Make sure the folders in your project do not have spaces in their names.
My project was building fine until I updated to Xcode 10.1. After the Xcode update, started getting Lexical or preprocessor Issue errors on build. Some XCDataModel header files could not be found.
This fixed the issue.
Go to Build Settings, Header Search Paths
Change the appropriate value from $(SRCROOT) non-recursive to recursive.
This ensures that subfolders are also searched for headers during build.
I had this same issue now and found that my sub-projects 'Public Header Folder Path' was set to an incorrect path (when compared with what my main project was using as its 'Header Search Path' and 'User Header Search Path').
e.g.
My main project had the following:
Header Search Paths
Debug "build/Debug-iphoneos/../../Headers"
Release "build/Debug-iphoneos/../../Headers"
And the same for the User Header Search Paths
Whereas my sub-project (dependency) had the following:
Public Header Folder Path
Debug "include/BoxSDK"
Release "include/BoxSDK"
Changing the 'Public Header Folder Path' to "../../Headers/BoxSDK" fixed the problem since the main project was already searching that folder ('../../Headers').
PS: I took some good screenshots, but I am not allowed to post an answer with images until I hit reputation 10 :(
I had this problem after changed project name. I used all the methods mentioned on the internet but still doesn't work. Then I realized that all the header files not found was from cocoapods, so I re-installed the cocoapods using pod install, and thus solved the problem.
Hope this could help.
In my case I was developing a framework and had a test application inside it, what was missing is inside the test application target -> build settings -> Framework Search Paths:
The value needed to be the framework path (the build output - .framework) which is in my case:
"../FrameworkNameFolder/" - the 2 points indicates to go one folder up.
Also, inside the test application target -> Build Phases -> Link Binary With Libraries:
I had to remove the framework file, clean the project, add the framework file again, compile and this also solved the issue.
The new version contain fix for this, feel free to update.
Or you can just replace
#include "iPhone_View.h"
with
#if UNITY_VERSION < 450
#include "iPhone_View.h"
#endif
Delete the unit testing from your project follow the below steps this will solve the issue.
select your project from the project navigator to open the project editor. From the target delete the test from the left side of the project editor and press the Delete key.
I know this is old, but I'm gonna chime in anyway because it may be useful to someone. If you can still see the file in Finder, then click on the file in your project and delete it, selecting "remove references" and not "move to trash".
Once the reference is removed, drag and drop the file from finder into your project again and it should sort itself out.
Just adding another thing that worked for me :
react-native link
Evidently my ReactNative files were no longer there. I could figure that out by clicking on
Build Phases -> Link Binary with Libraries ->
Then right clicking a file I knew was responsible for React, and clicking Show In Finder .
But nothing opened. So assuming the library went missing, I just ran the above command which relinked everything again.
Also if you havn't, try :
rm -rf node_modules/ && npm install
This happened to me after I renamed a file. For some reason it was still looking for the file with the old name. What I did was create the file that it was complaining about and added to the project. Then I did a Project->clean, then Project->Build and verified the error was gone. Then I selected the newly added files and deleted them. This removed all references and I no longer see the error.
I fixed mine. The fb sdk downloaded (from my browser) as 'FacebookSDKs-iOS-4.22.0' -- I just had to rename the folder to FacebookSDK. So now in Build
Settings --> Framework Search Paths
the path looks something like /Users/.../Documents/FacebookSDK (where as before it was /Users/.../Documents/FacebookSDKs-iOS-4.22.0)
Hope this helps!
For what it's worth, my problem was completely unrelated to the error Xcode was giving. I stumbled onto a solution by deleting the .h reference, compiling, adding the reference back and compiling again. The actual error then became evident.

'libxml/xmlversion.h' file not found in xcode 4.2?

i am integrating twitter application in my application my application is created in xcode 4.2 using ARC when i implemented code for twitter from this code.
it worked perfectly when i just download the project & run it. when i integrate this twitter sdk code in my xcode 4.2 based application it gave me error of 'libxml/xmlreader.h' file not found i have solved it just changing header file this way #include <libxml2/libxml/xmlreader.h> but after changing this previous error was solved but than i got new error 'libxml/xmlversion.h' file not found. i tried to change header of file xmlreader.h but this file is not editable i have changed permissions for this file, too. but it didn't work. in the format like this #include <libxml2/libxml/xmlreader.h> but it doesn't work.
please tell me how to solve this error.
i have seen several question in stack overflow for some that kind of question
but they didn't work for me in xcode 4.2.
please guide me.
You need to put all the libxml headers on the include path. For Xcode do this by adding /usr/include/libxml2 to the header paths (that will pass -I/usr/include/libxml2 to the c compiler)
This is in the build settings tab in Search Paths -> Header Search Paths
Works for me.
Remember to add the library in Link Binary en Build Phases Section of the target project.
Go to Project -> Build Settings and search for "User Header Search Paths" key and add this value:
"${SDK_DIR}"/usr/include/libxml2
It works perfectly in my xcode 4.5 + iOS 6
I had the same problem as you. For me the problem was that I setup "Header Search Path" in Project Build Settings, but my Target Build Settings overrided that setting. I fixed this by adding $(inherited) line to Target Build Settings Header Search Paths.
If you're using CocoaPods and get this error, you'll have to fork the spec and the following lines to it:
s.libraries = 'xml2'
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }
You'll have to remove the Pod, then re-install it as well, with the podspec pointing to your fork. The reason why you have to fork the Pod is because the Target where you would normally change this is generated by CocoaPods when you perform pod install.
Note that if you have other libraries that the Pod depends on, include them on the s.libraries line.
Source for this fix in the CocoaPods issue "Pod Integration Issues"
In your build settings, for the key "Header Search Paths", add "$(SDK_DIR)"/usr/include/libxml2
I got the same errors and come to here, then I find the answer in below url
https://github.com/ZaBlanc/RaptureXML#adding-rapturexml-to-your-project
Hope this can help you, I've solved it now.
Add header search path as $(SDKROOT)/usr/include/libxml2
Be sure to use the non-recursive option when you add the key "Header Search Paths."
/usr/include/libxml2 -- This is the non-recurisve option
/usr/include/libxml2\** -- This is the recursive option and WILL
In XCode 5:
Add "${SDK_DIR}"/usr/include/libxml2 to your Header Search Paths
Add libxml2.dylib in Build Phases

CorePlot: how to run on device? (works OK on simulator)

My app uses CorePlot and runs fine on simulator
(it accesses libCorePlot-CocoaTouch.a from:
/Users/myName/core-plot/build/Debug-iphonesimulator ).
To run on device, xcode expects libCorePlot-CocoaTouch.a in:
/Users/myName/core-plot/build/Debug-iphoneos
but that file is missing, so xcode gives error:
'/Users/Giovanni/core-plot/build/Debug-iphoneos/libCorePlot-CocoaTouch.a: No such file or directory'
I tried generating one by doing:
CorePlot-CocoaTouch.proj > set Xcode to build on 'device' > 'Build And Run'
but 'Build and Run' is grayed out.
Copying the simulator version obviously does not work.
Any ideas?
Consider adding CorePlot-CocoaTouch.xcodeproj as a sub-project and then add libCorePlot-CocoaTouch as a dependency.
Try opening the Core Plot project itself and building the framework first. You should build (not "Build and Run") the CorePlot-CocoaTouch target. Do it for each combination of SDK {simulator, device} and configuration {debug, release} (total of four builds). This will create the .a files you need.
After Core Plot is built, go back to your project and build it. It should now link and run correctly.
Check out my answer here if you don't want to use the CorePlot-CocoaTouch.xcodeproj import method (don't need to import the whole project, only the CorePlotHeader folder and the libCorePlot-CocoaTouch.a library file) Fix linker errors for Core Plot when using Xcode 5
Ultimately you might need to delete the old library by right clicking on your MyApp.app file in the Products folder and copy and past the new CorePlot_1.4 .a file into the Debug-iphoneos folder...clean, build, and it should run on an iOS 7 device.
SOLUTION: the issue was CorePlot-CocoaTouch.xcodeproj must also be added as Targets>MyApp>getInfo>DIRECT dependency (in addition to as subproject and in addition to libCorePlot-CocoaTouch being added as Targets>MyApp>getInfo>LinkedLibraries). Thanks

Adding a static library to an iPhone project

The motivation for this question is me trying to get LDAP functions to work with an iPhone application which is a project I'm attempting for part of my dissertation.
When I was developing the application I used the ldap.framework framework that is part of Mac OS X. This works fine in the simulator, but when I try to now get the app on a device it tells me that I'm not allowed to use this framework.
After some research I found that I could build openldap using the arm architecture and add the static library to my application destined for my device.
I eventually managed to compile configure and build openldap by setting variables as mentioned here and using the following commands...
Ade$ ./configure CC=$DEVROOT/usr/bin/arm-apple-darwin9-gcc-4.0.1 \
LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin --with-yielding_select=yes
Ade$ make depend
Ade$ make
I was told that the file I'm looking for will have an extension of '.a' so I searched for a '.a' file that mentions ldap...
Ade$ sudo find / -name *ldap*.a
Password:
/Users/Ade/Desktop/openldap-2.4.16/libraries/libldap/.libs/libldap.a
/Users/Ade/Desktop/openldap-2.4.16/libraries/libldap_r/.libs/libldap_r.a
So I assume these are the files I need?
My question is what do I do next? I know I need to add the library to the Xcode project and probably add a load of '.h' files too?
If anyone can give me a pointer to documentation or shed any light on the next stage I would be really grateful.
Many thanks,
Ade
ps. I have also talked about this process on my blog at www.greenpasta.com.
I've done this same thing to build an LDAP client for the iPhoneOS 2.2. You just to drag the .a into the "link with libraries" build stage. I recommend using the regular (non _r) version of the library, unless you specifically need reentrancy on your ldap stuff (which I don't recommend). You can also add the .h's to your project, which is generally the easiest way to access them.
Simply drag the .a files into the Xcode project and choose "copy files into project". I'm not familiar with OpenLDAP but I think the _r version is just a threadsafe version. I would recommend using that and not copying the other. You should probably not copy both files into Xcode or you will get link errors.
Then do the same for the .h files that define the client APIs of OpenLDAP - again I'm not sure which these are but I'm sure you can find out easily.
I would advise organising the .a and .h files together in a Xcode group under resources.
Include the header files in your source and you should be good to go.
You may also need to add -lldap to your linker command (in the build settings pane).