How can I quickly set the iPhone deployment target in Xcode? - iphone

I was reading this great article about Base SDK and Deployment targets and decided to try it out myself. The Deployment target seems to be buried in the Build settings, and not that easy to access compared to the Base SDK target (which is right there in the General tab of the project settings). To get to the Deployment settings now I have to Get Info, go to the Build tab, then search for "Deployment".
Is there a quick way to check and access the Deployment target in Xcode that I'm missing?

Sure. Never use the build pane. Just put the setting in your xcconfig files, and then it's easy to maintain, easy to find, and easy to comment. I have a detailed talk on how to convert from the Build Pane to xcconfig files and why you'd want to.

Related

Tumblr integration in iPhone SDK

Using https://github.com/tumblr/TMTumblrSDK link, i am trying to integrate tumbler sdk and compile the Photosharing sample project under the Example folder. But i am getting the following error message:
diff: /../Podfile.lock: No such file or directory
I am not able to understand the pod file concept. Can anyone please explain me the proper steps that need to be followed to integrate this sdk in iOS app.
The targets in your xcode projects have a build phase to perform a lock file. But it seems like your xcode projects configurations are not referencing the user defined settings configured in Pods/Pods-libPods.xcconfig.
It looks like you are trying to link a Pod with specific targets in multiple xcodeprojs. If my assumption is correct, you are using the target attribute incorrectly. The target attribute creates a new static library within the Pods project that includes the Pods you configured within that target.
The default target for the Pods xcodeproj is libPods which generates the libPods.a static library. This is generated if you do not specify a target. So if you don't care about generating multiple static libaries in the Pods xcodeproj, don't bother defining a target and use the link_with attribute to link the default libPods target (static library) to the targets in your xcodeprojs.
check this link for further reading here

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).

This target might include its own product

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

Can you create per-user project settings in Xcode?

I'm collaborating on an iPhone application, with the project files (.xcodeproj directory) checked into source control. One important setting is the "Code Signing Identity", which specifies the certificates to use to sign the application in order that it can run on the iPhone.
Each developer on the project has his own Code Signing Identity, so whenever anyone makes a change to the project, his Code Signing Identity gets saved into the project settings, and then everyone else inherits that change. They then have to change that to their CSI before they can continue.
Is there a way to have the Code Signing Identity saved in some local per-user project file that doesn't get checked into source control?
You could base the Xcode project on an .xcconfig file, then make each developer use their own .xcconfig file and keep the identity setting in there.
Either that or have your source control system ignore the file that contains the signature, in git you can create a file called .gitignore, theres probably a similar thing for what you are using. It means even though you've changed it the change won't get mirrored.
I worked around this by making different builds. The one named "Dev - Rob" had my settings in it, and the one named "Dev - [Other Guy's Name]" had Other Guy's settings.
We also used this to make builds like "Release - Beta" and "Release - AppStore" etc., for all situations where we'd have different signing configurations.

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).