Building dependencies in Xcode 4 - iphone

I have a project that has a dependency on a static library. In Xcode 3.2.3 the project that builds the library is setup as a direct dependency in the target settings so that the library is built whenever the main project is built.
I can't for the life of me figure out how this is supposed to work in Xcode 4. I haven't changed any project/target settings but the dependent library will not build. Has anyone successfully setup library dependencies so that they automatically build in Xcode 4?

Without breaking NDA, I highly recommend watching the WWDC 2010 videos for session 308 - Developing Your App with Xcode 4 and session 314 - Building and Distributing Your App with Xcode 4. Setting up dependencies in Xcode 4 is demonstrated in these videos.
If those videos are unable to answer your specific questions, I recommend heading over to the Apple Developer Forums to ask the engineers themselves.

I write article on topic. Check this out.

Related

xcode 11 xcode 10 compatibility

I have several projects developed in Xcode 10, but now Apple is saying (April 2020) that will not accept apps developed in Xcode 10, only Xcode 11. Is there any compatibility problem ? All my projects will compile properly in Xcode 11 ?
Is there any compatibility problem ? All my projects will compile properly in Xcode 11 ?
Try it and see? You don't really have a choice in the matter if Apple is going to stop accepting your Xcode 10 apps, so you might as well get started.
You can have multiple versions of Xcode installed at the same time. The best plan is to download Xcode from the developer site instead of the App Store, and rename each one with its version (e.g. Xcode-10.1, Xcode 11.4, etc.) so that they can all exist in your /Applications folder at the same time.
Xcode 11 will happily open your Xcode 10 projects, and everything should be fine. You may need to update some project settings to whatever Xcode 11 recommends, and your code will probably benefit from updates for the latest macOS or iOS versions.
What Apple will require is that apps be built with the latest versions of their platform's SDKs in order to be submitted and approved to be distributed through the App Store. They have extended the deadline for this to June 30, 2020 at the time I'm writing this (as you can see here).
This means that you need to make sure your project can be built using the latest SDK major versions. Make sure to open and build your projects using Xcode 11, which has the latests SDKs embedded in it. If your project fails to build, it can usually be because of 2 things:
The new SDKs API have changed and code that you wrote a while back might now be invalid. Go through the issues found by Xcode and update your code to make it work with the latest API.
The Swift language itself might have changed and code that you wrote a while back might now be invalid. These type of issues can be avoided by setting a specific Swift version to be used on your project in its build settings. Migrating your codebase to the latest Swift version (the one that's bundled with Xcode) might not be mandatory, but I'd recommend you do it if it involves just minor changes.
if after doing this, your project can be built, you should be good to go.

Restkit compatibility in iOS 7

when I tried to include RestKit to my project in iOS 7 Platform, I got error <RestKit/RestKit.h> file not found..
I followed this tutorial http://www.raywenderlich.com/13097/intro-to-restkit-tutorial
and I did exactly the same thing, but I used iOS 7 as my base platform..
I tried the example project inside restKit folder, but used iOS 7,
then I got same error...
Is there any compatibility issue in iOS 7?
if yes, can anyone recommend me alternate framework?
after strugling...
i solved it by compiling Restkit in its own project,,, then continue including to my own project
and its work..
The tutorial you followed is really old. You should look at this for a guide on how to install RestKit. Ensure you're using the most recent version (don't start using 0.10 now...). The base RestKit Github page contains a number of examples and the code contains lots of tests that you can look at.
RestKit should basically always be included in your project as a reference to the RestKit project. The current version doesn't have any compatibility issues.

Crash with Google's Objective-c SDK

I've been stuck with this problem for many days now.
I'm using google's objective-C SDK for getting user's name and email to login into my app.
I added the project and the classes to my project (because it didn't compile) and when testing everything goes right.
The problem is, when I compile for release and download the app directly into my iPad (iOS 5.1, it's working ok on ipads with iOS 6.0.1), the app is crashing when create google's login view controller.
the log sais:
Dyld Error Message: Symbol not found: _objc_setProperty_atomic_copy
Referenced from:
/var/mobile/Applications/58E1CEC8-FDAD-46B7-8684-92F919BA03A7/Nearpod.app/Nearpod
Expected in: /usr/lib/libobjc.A.dylib Dyld Version: 199.6
I've been looking for this error and everything I found are things like these questions: ARC App Crashes when accessing #property form ARC static lib and Xcode 4.5 error on IOS 5.
I've already checked that the Base SDK and IOS Development Target of both projects matches (Actually, this was what make the app work fine on Debug mode at first)
I have iOS Develpoment Target sett on 5.0 and Base SDK on Latest IOS (iOS 6.1)
I'd checked the differences between Debug and Release configs on both Projects and Target's and didn't found anything suspicious...
I've also added the -fobjc-arc flag to all gtl classes, and both projects.
can anybody help me?
After spending two days on this and making major changes to my code, I discovered that the solution is unbelievably simple: Just make sure that the deployment version of the GTL project (or GData project) is the same as deployment target of your main .

iOS iPhone SQLite and Monotouch issue

I have successfully developed a small iPhone+Monotouch (latest version) application with Monodevelop 2.8, which use a "compiled by me" version of SQLite to enable FTS4.
To compile SQLite as static library (libSQLite.a) I used this topic as tutorial: How to use FTS in SQLite with Monotouch for iOS
Also I've followed this tutorial to create a Simulator+Device compliant static library:
Build fat static library (device + simulator) using Xcode and SDK 4+
Things are working great on the simulator. :)
Bad news comes from the device, an iPhone 4 with iOS 4. When I deploy and run the application on the device, it suddenly crashes.
To use the libSQLite.a static library in my monotouch project I've followed this tutorial http://docs.xamarin.com/ios/advanced_topics/linking_native_libraries
It seems that something is going wrong when running the application on the device compiled with this additional command:
-gcc_flags "-L${ProjectDir} -lSQLite3 -force_load ${ProjectDir}/libSQLite3.a"
If I compile and deploy the application without the additional command (to use the static link library) the program start without crashing.
Any suggestion?
Anybody already use SQLite with FTS4 on a monotouch application for iOS?
This is related to our bug #707, in short it's an issue which is usually provoked by using external libraries with thumb instructions. This also means the workaround is easy: just disable thumb support in Xcode when compiling your static libraries.
As a sidenote we've tracked down the bug and it will hopefully be fixed in the next MonoTouch release.

Developing in Xcode with MonoTouch?

I am new to Xcode and MonoTouch, so please bear with me.
Is it possible to develop MonoTouch applications with Xcode instead of with MonoDevelop? I have read the MonoTouch Xcode tutorial but unfortunately the process described does not seem to work with the latest MonoTouch version (I get a "No SDK in directory" error, there is also no resource rules file in the root SDK directory). Finally, where am I supposed to put the directives to the MonoTouch compiler?
I have downloaded the trial version of MonoTouch.
Thanks in advance.
Its technically possible, but not in the supported MonoTouch workflow, so you'd be somewhat on your own. What you'd need to do is look at the output of a MonoTouch build with "-v -v -v" in the Extra Arguments field to see how we invoke the AOT compiler. You'll also need to look at the main.m generated by -keeptemp and adapt that in to your Xcode workflow. Lastly you would not be able to use the linker unless you maintained a parallel monotouch project which compiled and linked, and then you did a secondary build step to update your Xcode project.
Xcode does not support third-party plug-ins or environments.