Three20 and iOS 4 - iphone

I'm trying to complie my app for iOS 4. It includes Three20. I've set the base SDK to "iPhone Device 4.0" and the Deployment Target to "iPhone OS 3.0" but I get this message:
"_OBJC_CLASS_$_TTURLRequestModel", referenced from:
_OBJC_CLASS_$_MockPhotoSource in MockPhotoSource.o
What do I have to do?

I think this thread explains most of the problems.
http://groups.google.com/group/three20/browse_thread/thread/90a57d469dfcc32d/85750d0c9b7c79de?lnk=gst&q=ios4#85750d0c9b7c79de
Also the updated code is available here..
http://github.com/ECP/three20
Hope this will help.
Thanks.

I had the same problem. I fixed it by ensuring that "Build active architecture only" (ONLY_ACTIVE_ARCH) in the xcode project properties, is checked in both the Three20 project and my project.

I was pulling my hair out as well since adding three20 correctly to your new iOS4 with really basic instructions listed here: http://github.com/facebook/three20 did not work as well.
Issue: Can compile newly three20 to your iOS project and got this error: Can't find #import "Three20/Three20.h".
Here is the best solution for those have the same issue:
Add your three20 to your iphone project path like this:
[yourProjectPath]/[iOSProjectName]/three20/..
cd three20 dir
run:
python src/scripts/ttmodule.py -p [yourProjectPath]/[iOSProjectName]/[iOSProjectName].xcodeproj Three20 -c Debug -c Release
go to XCode and do a build now.
Thanks to jverkoey for adding this in, you saved us a lot of headaches.
http://github.com/facebook/three20/commit/0814b1c149cbe987557c88a271f999c3f9f3ae64

Related

XCode 4.5 (4G182) + iPhone 5 iOS6 - Choose a destination with a supported architecture in order to run on this device

So I have a brand new app I created last night for iOS6, using XCode 4.5. I can properly develop on my iPhone 4 with iOS6.
Today I got my new iPhone 5 with iOS6 and, after updating the certificates with the new device UUID, I tried to run my app on it and got this error:
XCode cannot run using the selected device. Choose a destination with
a supported architecture in order to run on this device.
I've enabled the device for development. Both armv7 and armv7s are on the settings.
I have included the sources from the Facebook 3.0 SDK and the linker flag '-lsqlite3.0'. I'm guessing the issue has to be related, but cannot figure what is wrong.
Any ideas how to solve it?
PS: The issue happens too when running the app on the simulator. No idea what changed on my project or XCode between last night and today, other than I have a new device and new certificates.
The selected destination does not support the architecture for which the selected software is built. Switch to a destination that supports that architecture in order to run the selected software.
Also you need to select the compiler LLVM in
Project --> Build Settings --> Build Options
I have found the same issue while running an OLD project on XCode 5.0 and My solution is:
You need to do following steps for getting out with this:
1. Set Valid Architectures : armv7,armv7s
2. Set compiler as LLVM in Project ---> Build Settings ---> Build Options.
3. Set Base and Deployment sdk properly.
This is my solution. Happy To Help.
You need to add armv7s to your valid architectures under your Target's Build Settings.
You included src/Framework/Resources/Info.plist when added Facebook SDK files to your project. Just remove it from your project and everything will work again. Guaranteed! :)
I have solve the problem using the below steps.
Close the Xcode
Delete the application from device
Restart the device
then re-run the application
it is working fine..
Make sure the bundle name (in plist file) is same as the project name. I changed it and it worked.
One of my 3rd party libraries couldn't run on armv7s so I removed that option. I also removed armv6 and kept armv7 as the only option. It built and ran on the phone with only armv7.
I have solve the problem using the below steps.
Close the Xcode
Delete the application from device
Restart the device
then re-run the application
it working fine..
I faced this problem because Build settings-> Complier for C/C++/Objective c was set wrong.
So I changed it to default compiler available, it worked!
Just need to select the compiler LLVM in
Targets --> Build Settings --> Build Options
I ran into the same problem. When I check the compiler it is showing incompatible compiler. you need to make it valid one. To set valid compiler follow the steps
select your
project----> build settings-->
on the search bar type compiler and search
now you can find build options under build options you will find compiler for c/c++/objective c set it to valid one.
So basically I created a new project, copied all the sources and everything seems to work fine. At least the app runs.
I am not sure which setting was causing the problem.
I had an issue with an out of data library that was built for iOS 4.x and I was building a new app for iOS 6 with iPhone 5 support. I received this error and the only way I resolved it was to make armv7 the only architecture and valid architecture listed in my project and target build settings.
remove info.plist refrence. And then re-drag info.plist to proj but don't copy to "target"
You just goto Build setting Then valid architecture Replace armv7 armv7s instead of armv7 .Then it will work fine .
Ok, not sure if this is the Problem in Your Project. But what fixed it for me, was to change the Name of the Info.plist File.
I changed the name from Info.plist to my-project-info.plist
also change it under target-build-settings/Packaging/Info.plist
Than delete the App from Devices/Simulators and re-run the App through Xcode
In my Case, everything worked fine since than. In my Case there was nothing wrong with the specifications made in the plist file or with the valid architectures.
some times this happens when your project was build in xcode 4.5 and you are trying to run in xcode 5.0.
so in my case I found the solution.
Change your compiler for C/C++/ObjectiveC Go to Build
Settings->Build OPtions->compiler for C/C++/ObjectiveC; select
Default(Apple LLVM5.0)

XCode 4.4.1: Can't Deploy to Device or Simulator: Unsupported architecture

I'm having some trouble deploying to any device in XCode 4.4. I have only tested on armv7 devices, but I only wish to deploy to armv7. The application compiles without issue.
Device Error
Simulator Error
I have checked that the Architectures and the Valid Architectures in the build settings contain only armv7.
I'm working in an XCode Workspace with one project and one subproject. The subproject creates a static library which acts as a target dependancy to the main project.
Other questions suggest that the deployment target might be wrong, but I checked this too and it is set to iOS4.0 for all projects and targets. (All devices are iOS5.0 +)
Does anyone have any suggestions please?
Though I couldn't find exactly why this was happening. I fixed it by removing the project data.
Close XCode
Open Terminal
cd to your .xcodeproj directory
Recursively delete any project data files associated with the current user name
find . -name "YOUR_OSX_USERNAME_HERE*" | xargs rm -rf
Reopen XCode
Just for luck, do a clean build
Edit
Had this error again and wasn't solved by the above steps alone. There were two other factors:
Make sure Info.plist isn't part of the Target Membership
Clear DerivedData
Quit Xcode and iPhone simulator
Unplug your devices
Goto ~/Library/Developer/Xcode/DerivedData/
Delete all data under this folder
Start Xcode again and run your project
I've found that Xcode really seems to like '$(ARCHS_STANDARD_32_BIT)' for 'Architectures'. If its not set to that try it, 'Valid Architectures' with armv7.
Just curious - if building for newer phones only, why not use a deployment target of 4.3? You'll be able to use some of the new block technologies not in the earlier releases.

Xcode 4 Strip All symbols error when Archiving

I have some static libraries in my Xcode 4 (iOS 4.3 SDK) project. When I archive the project i am getting the following error below when the tool attempts to strip symbols. I have the same settings i used for Xcode 3.2. I have noticed if i change the 'Strip Style' option in build settings from All Symbols to Debugging Symbols then the archive is built successfully.
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip failed with exit code 1
As mentioned above I have not changed this setting from 3.2 so am wondering how to fix this issue?
Thanks
I have met the question like this. I used three20 library in my project, when I archived it. "Strip Symbols Error" about the three20 libraries was produced.
I found the three20 library's "iOS Deployment Target" was "iOS 3.0", but xcode 4.6.3 has no iOS 3.0 sdk. I think it's a problem.
When I changed all three20 libraries' "iOS Deployment Target" to "iOS 5.1", these problems solved.
The fixed place is "Target"->"Build Settings"(All)->"Deployment"->"iOS Deployment".
Please try the following steps. It may be robust for you.
open Terminal window.(find in spotlight
type same code:
sudo /Developer/Library/uninstall-devtools --mode=all
hit enter,it will be ask for ur admin username/pass then press enter.
it will clean your previous directory.
after clean up,it will ask for something,type exit and close terminal.
Now, try installing your Xcode, if you get notification about iTunes (optional)
open activity indicator
find itunes helper process,select it,end process.
After installing new Xcode, restart mac and check.
Thanks
Have you tried to set to NO the build for active architecture only? Are you using in adhoc for your archive? Please try that to see what happens.

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.

iphone warning libsqlite3.dylib is not of required architecture?

I'm writing an iPhone app which seems to run fine on the simulator, however when I try and run it on the device I get a libsqlite3.dylib, file is not of the required architecture error. I'm using os 3.0 on a 3GS. Any ideas on what could be causing this?
Thanks!
When you added the SQLite library to your project, it sounds like you chose the one from the iPhoneSimulator sdk. You need to choose the one in the iPhoneOS sdk for whichever version you're building for.
If you still get the error make sure you haven't accidentally copied the simulator version of the lib into your own project directory. You need to delete it if you have. This would have occurred because you accidentally selected 'Copy items into destination groups folder' when you added the lib to your project. Also make sure reference type is 'Relative to Current SDK'.
I had a similar issue which caused by the search paths for the linked library pointing to incompatible files.
I wrote a blog post on how to fix it here:
Fixing the "missing required architecture arm in file" error when developing for iPad