Getting three20 to work using XCode 3.2.3 (Base SDK iOS 4.0) and iOS 3.1.3 devices

484 views
Skip to first unread message

Yoshi

unread,
Jul 8, 2010, 4:39:28 AM7/8/10
to Three20
I can't believe this still hasn't been addressed in the master branch,
especially since three20 in its current state DOES NOT WORK on iOS
3.1.3 with XCode 3.2.3.

I noticed the recent string of postings about things not working
directly relate to this issue. I thought I'd compile the cacophonous
mailing list postings of others into a step-by-step guide :)

1. Pull the latest code from master: cd /path/to/three20-directory-
root; git pull (of course, replace "/path/to" with your real path to
three20)

2. Apply this patch from: http://gist.github.com/423702 by Jean
Regisser
- This patch fixes the crash upon hiding the status bar (like when
tapping on an image within TTPhotoViewController) and other UI events
that called methods that were deprecated in the latest SDK but are
still used in iOS versions < 3.2
- Download patch
- Move patch file to three20 directory
- cd to three20 directory
- git apply [patch file]

3. Remove Three20 from your XCode project, and follow these
instructions to add Three20 again: http://three20.info/setup/existing

4. In your Xcode project "Groups & Files" window, under "Targets",
double-click your app name. This will open the Info window.
- In the General tab, under Linked Libraries, UIKit.framework's type
should be set to "Weak"
- In the Build tab, the iPhone OS Deployment Target should be "3.0"
- In the Build tab, Other Linker Flags should be "-all_load -
ObjC" (should be already but check to make sure)

This seems to work on iOS4 and iOS 3.1.3 devices (tested on iPhone 4,
iPhone 3GS running iOS4, iPhone 2G running 3.1.3).

Chris Lozac'h

unread,
Jul 9, 2010, 3:52:33 AM7/9/10
to thr...@googlegroups.com
Thanks so much for the summary, Yoshi...this saved me today!

After getting most of the way with your instructions, I then spent another hour trying to debug a nasty "___restore_vfp_d8_d15_regs" issue, which was only resolved after I went through and made sure that my project and the Three20 projects all had matching Base SDK (4.0) and Deployment Target OS (3.0). That still wasn't enough, so, per another thread, I also went through and unchecked "Build Active Architecture Only" in all 7 + 1 projects.

Hope this helps someone else out there.

Cheers,
Chris



--
You received this message because you are subscribed to the Google Groups "Three20" group.
To post to this group, send email to thr...@googlegroups.com.
To unsubscribe from this group, send email to three20+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/three20?hl=en.


haresh vavdiya

unread,
Jul 9, 2010, 3:59:15 AM7/9/10
to thr...@googlegroups.com
Hello Chirs,

I am getting one problem with Three20-iPad. I have added all the thing according to instructions. But i can run it only by Debug, if i am trying to run with Release or Distribution then it gives me more than 70 errors. Do you have any idea about this problem?

I am trying to find out from many days but couldn't do it.
--
Thanks & Regards,
Haresh Vavdiya.

Chris Lozac'h

unread,
Jul 9, 2010, 4:15:41 AM7/9/10
to thr...@googlegroups.com
Sadly, I don't have an iPad. I recommend posting your question (in a new thread!) and including more specifics about your project and the errors you're getting. Without details, no one here is likely to have useful answer. :)
-C

Scott

unread,
Jul 10, 2010, 12:51:48 AM7/10/10
to Three20
Yoshi,

I've followed yours and other tutorials about 10 times with
different projects of mine, and I've finally resorted to start from
scratch, and even that isn't working out for me. I cloned the latest
three20 from git://github.com/facebook/three20.git, applied the patch
you list and added three20 per the instructions. I've uploaded my
sample project to github (g...@github.com:Bauerpauer/testapp.git).
Check out the screenshot in the root to see the errors I'm getting
("_OBJC_METALCLASS_$_TTWebController", referenced from..... Symbols(s)
not found, Collect2: ld returned 1 exit status). The project compiles
and links fine until I add something that references any of the
Three20 classes (TTWebViewController in this example). If you've got
some time I'd really appreciate the help.

Thanks!
Scott

On Jul 8, 3:39 am, Yoshi <yoshi.sugaw...@gmail.com> wrote:
> I can't believe this still hasn't been addressed in the master branch,
> especially since three20 in its current state DOES NOT WORK on iOS
> 3.1.3 with XCode 3.2.3.
>
> I noticed the recent string of postings about things not working
> directly relate to this issue.  I thought I'd compile the cacophonous
> mailing list postings of others into a step-by-step guide :)
>
> 1. Pull the latest code from master: cd /path/to/three20-directory-
> root; git pull (of course, replace "/path/to" with your real path to
> three20)
>
> 2. Apply this patch from:http://gist.github.com/423702by Jean

ranka priyank

unread,
Jul 10, 2010, 1:16:54 AM7/10/10
to thr...@googlegroups.com
Hi,

Check the sample code which was email to the group two days back. It had every thing working fine for me. I have only uploaded the test code with expertise of Yosi.

Regards,
Priyank Ranka

--
You received this message because you are subscribed to the Google Groups "Three20" group.
To post to this group, send email to thr...@googlegroups.com.
To unsubscribe from this group, send email to three20+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/three20?hl=en.




--
Priyank Ranka

Scott

unread,
Jul 10, 2010, 1:21:14 AM7/10/10
to Three20
Tried it :) I actually just replied to your post w/ information
regarding my attempt to use your demo project. I'm almost tempted to
just format my machine and install XCode from scratch, and start with
a clean slate...

Thanks,
Scott
> > three20+u...@googlegroups.com<three20%2Bunsu...@googlegroups.com >
> > .

Michael

unread,
Jul 10, 2010, 2:30:35 AM7/10/10
to Three20
You guys are lifesavers. I've been pulling my hair out for the last
week trying to get this right!

Thank you so much.

On Jul 9, 3:52 pm, "Chris Lozac'h" <cloz...@gmail.com> wrote:
> Thanks *so* much for the summary, Yoshi...this saved me today!
>
> After getting most of the way with your instructions, I then spent another
> hour trying to debug a nasty "___restore_vfp_d8_d15_regs" issue, which was
> only resolved after I went through and made sure that my project and the
> Three20 projects all had matching Base SDK (4.0) and Deployment Target OS
> (3.0). That still wasn't enough, so, per another thread, I also went through
> and unchecked "Build Active Architecture Only" in all 7 + 1 projects.
>
> Hope this helps someone else out there.
>
> Cheers,
> Chris
>
>
>
> On Thu, Jul 8, 2010 at 1:39 AM, Yoshi <yoshi.sugaw...@gmail.com> wrote:
> > I can't believe this still hasn't been addressed in the master branch,
> > especially since three20 in its current state DOES NOT WORK on iOS
> > 3.1.3 with XCode 3.2.3.
>
> > I noticed the recent string of postings about things not working
> > directly relate to this issue.  I thought I'd compile the cacophonous
> > mailing list postings of others into a step-by-step guide :)
>
> > 1. Pull the latest code from master: cd /path/to/three20-directory-
> > root; git pull (of course, replace "/path/to" with your real path to
> > three20)
>
> > 2. Apply this patch from:http://gist.github.com/423702by Jean
> > three20+u...@googlegroups.com<three20%2Bunsu...@googlegroups.com >
> > .

Scott

unread,
Jul 10, 2010, 4:29:20 AM7/10/10
to Three20
Priyank,

I was finally able to get my project running using the three20 fork
@ http://github.com/jamiebriant/three20 and the instructions he lists
there (big difference is that the only lib you add is Three20 itself,
not all of its dependencies). Thanks for your example project though,
it definitely helped me out.

Thanks,
Scott

On Jul 10, 12:16 am, ranka priyank <priyank.ra...@gmail.com> wrote:
> > three20+u...@googlegroups.com<three20%2Bunsu...@googlegroups.com >
> > .

Emil Palm

unread,
Jul 10, 2010, 9:35:48 AM7/10/10
to thr...@googlegroups.com
To fix the Xcode projects to be able to run on Xcode 3.2 with iOS4 SDK's:

Open up terminal;
cd /your/folder/three20/
find . -name project.pbxproj -exec sed -i "" 's/iphonesimulator3.0/iphonesimulator3.2/' {} \;

That will replace all instances of "iphonesimulator3.0 with iphonesimulator3.2 which should make it work and compile :)

This worked for me atleast :)

Cheers

> To unsubscribe from this group, send email to three20+u...@googlegroups.com.

Scott

unread,
Jul 10, 2010, 11:39:15 PM7/10/10
to Three20
Emil,

Thanks for the tip. I ran your search/replace, but it ended up that
the following process FINALLY got me where I needed:

1) Remove any prior reference to three20 from your app

2) Open (in Finder) the three20 folder, drag Three20.xcodeproj to your
project's Groups & Files panel

3) Click on Three20.xcodeproj in the Groups & Files panel, then click
the "Target" checkbox for libThree20.a

4) Expand the "Targets" node in the Groups & Files panel, double-click
your target, click the General tab, and add Three20 as a Direct
Dependency

5) Double-click your project (top of Groups & Files panel), the click
the Build tab. Ensure that the following values are setup
appropriately for both Debug and Release builds: Architectures (armv6
armv7), Base SDK: iPhone Device 4.0, Build Active Architecture Only:
UNCHECKED, Valid Architectures: armv6 armv7, Target Device Family:
iPhone, iPhone OS Deployment Target: iPhone OS 3.1.3, Other Linker
Flags: -ObjC, Header Search Paths: ../relative/path/to/three20/Build/
Products/three20

6) Perform Step 6 for your app's target, Three20 and EACH OF ITS
DEPENDENCIES AND THEIR TARGETS. Its time consuming for sure, but
combing through each project, target, and build configuration (Debug,
Release) yielded some strange settings... If a setting is in bold
letter it means that it is specific to that project/target and
configuration type. Targets inherit from their project, so when I
found values set on targets that might as well pick up their config
from their project, I selected the row and pressed Delete.


Hopefully that helps someone who is still tearing their hair out like
I was :)

Thanks,
Scott

After that, I've got 0 problems building for both Simulator and
Device, in Debug and Release modes.


On Jul 10, 8:35 am, Emil Palm <e...@x86.nu> wrote:
> To fix the Xcode projects to be able to run on Xcode 3.2 with iOS4 SDK's:
>
> Open up terminal;
> cd /your/folder/three20/
> find . -name project.pbxproj -exec sed -i "" 's/iphonesimulator3.0/iphonesimulator3.2/' {} \;
>
> That will replace all instances of "iphonesimulator3.0 with iphonesimulator3.2 which should make it work and compile :)
>
> This worked for me atleast :)
>
> Cheers
>
> On 10 Jul 2010, at 09:29, Scott wrote:
>
>
>
> > Priyank,
>
> >  I was finally able to get my project running using the three20 fork
> > @http://github.com/jamiebriant/three20and the instructions he lists

Scott

unread,
Jul 11, 2010, 4:30:05 AM7/11/10
to Three20
Quick edit to my last post... I've had to add "-all_load" to my
"Other Linker Flags" setting in my app's project configuration for the
Debug build. Without it certain categories (TTImageView (TTInternal)
for example) weren't being linked properly and I'd experience odd
behavior when running my app in the simulator (unrecognized selector
setImage on TTImageView).

The problem now is that if I add "-all_load" to my Release build I get
duplicate symbol errors again on _TTSwapMethods. Any ideas?

Thanks,
Scott
> > > @http://github.com/jamiebriant/three20andthe instructions he lists

Scott

unread,
Jul 11, 2010, 3:59:11 PM7/11/10
to Three20
Problem solved. I was able to remove the "-all_load" Linker Flag,
which got rid of the Duplicate Symbol errors, so long as I added
sprinkled some more FIX_CATEGORY_BUG macros into more Category-only .m
files (specifically TTImageViewInternal.m), as per the thread @
http://groups.google.com/group/three20/browse_thread/thread/60630131d9961416/8d2044681ad58f13.
You can grab the relevant commit
(b5bfabc345115fd14a4449b557439597fce5448c) from git://github.com/Bauerpauer/three20.git

Thanks,
Scott
> > > > @http://github.com/jamiebriant/three20andtheinstructions he lists

Skotch

unread,
Jul 12, 2010, 7:35:37 PM7/12/10
to Three20
Hey Scott,

Thanks for posting this summary. After about a day of struggling to
get the steps right on my own, and failing, I just did this and it
worked:

1) pulled three20 from your git://github.com/Bauerpauer/three20.git
2) got rid of of the all_load in my project (solved the duplicate
symbol with _TTCreateNonRetainingArray)

Questions:
1) Do you recommend / not recommend that we pull your branch of git?
Is there a better branch until the master is finally updated?
2) I notice that your version of three20 is based on 3.1.3 deployment
target, but in my project I have deploy to 3.0. This miss-match
between my project and three20 appears to be working, but I wonder if
there are going to be problems? If I wanted to change three20, do I
only need to modify the deployment target in each of the seven project
dependencies?

Thanks to you and everyone else for trying to solve this. Now to fix
bugs in my own code!

On Jul 11, 12:59 pm, Scott <bauer.m...@gmail.com> wrote:
> Problem solved.  I was able to remove the "-all_load" Linker Flag,
> which got rid of theDuplicateSymbolerrors, so long as I added
> sprinkled some more FIX_CATEGORY_BUG macros into more Category-only .m
> files (specifically TTImageViewInternal.m), as per the thread @http://groups.google.com/group/three20/browse_thread/thread/60630131d....
> You can grab the relevant commit
> (b5bfabc345115fd14a4449b557439597fce5448c) from git://github.com/Bauerpauer/three20.git
>
> Thanks,
> Scott
>
> On Jul 11, 3:30 am, Scott <bauer.m...@gmail.com> wrote:
>
> > Quick edit to my last post...  I've had to add "-all_load" to my
> > "Other Linker Flags" setting in my app's project configuration for the
> > Debug build. Without it certain categories (TTImageView (TTInternal)
> > for example) weren't being linked properly and I'd experience odd
> > behavior when running my app in the simulator (unrecognized selector
> > setImage on TTImageView).
>
> > The problem now is that if I add "-all_load" to my Release build I get
> >duplicatesymbolerrors again on _TTSwapMethods.  Any ideas?
> > > > > @http://github.com/jamiebriant/three20andtheinstructionshe lists

Scott

unread,
Jul 14, 2010, 7:09:12 PM7/14/10
to Three20
Glad I could help out :) If my fork works for you right now, I say go
with it, but you might be better off forking three20 yourself and
pulling in my changes, just in case I decide to blow something in my
fork ;) I'm not real sure about your deployment target question, I
say test it on every device you can get your hands on and if it works,
you're all set.

Thanks,
Scott

enrico

unread,
Jul 15, 2010, 7:04:20 AM7/15/10
to Three20
Hy Guys,
I'm using your tutorial and I can make my application run in iphone OS
4 and 3.1.3 installed on several 3GS devices.

Now I've a problem: trying it on iphone 3G (even OS 4 or OS 3.1.3)
three20 crashes exactly in UIViewAddictions.m at
descendantOrSelfWithClass method (EXC_BAD_INSTRUCTION), that has been
called everywhere in the applications. So with these devices the app
doesn't respond to any touch event without crashes.

I think it should be a common problem, so can someone help me to find
a way to resolve this three20 bug?

Thanks in advance
> ...
>
> leggi tutto

Chris Lozac'h

unread,
Jul 15, 2010, 7:49:36 AM7/15/10
to thr...@googlegroups.com
For the record, my app, which admittedly doesn't use much more than TTPhotoView, works fine on my 3G running 3.1.2. Not saying there isn't something wrong with three20, enrico, just adding a data point for you. :)

-Chris

> To unsubscribe from this group, send email to three20+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/three20?hl=en.
>

amartin

unread,
Jul 16, 2010, 6:41:46 AM7/16/10
to Three20
Thanks for step-by-step guide. It worked for me after switching to
Snow Leopard and XCode 3.2.3 of the current SDK for iPad and iPhone 4.

I can compile the TTCatalog sample and newly created Three20 projects
set to release sucessfully. But build fails in debug mode with:

Undefined symbols:
"___restore_vfp_d8_d15_regs", referenced from:
+[TTEntityTables(TTSingleton) sharedInstance] in
libThree20Core.a(TTEntityTables.o)
+[TTEntityTables(TTSingleton) releaseSharedInstance] in
libThree20Core.a(TTEntityTables.o)
+[TTEntityTables(TTSingleton) allocWithZone:] in
libThree20Core.a(TTEntityTables.o)
"___save_vfp_d8_d15_regs", referenced from:
+[TTEntityTables(TTSingleton) sharedInstance] in
libThree20Core.a(TTEntityTables.o)
+[TTEntityTables(TTSingleton) releaseSharedInstance] in
libThree20Core.a(TTEntityTables.o)
+[TTEntityTables(TTSingleton) allocWithZone:] in
libThree20Core.a(TTEntityTables.o)
ld: symbol(s) not found

Does anyone have an idea whats the problem in debug mode?

enrico

unread,
Jul 16, 2010, 6:47:26 AM7/16/10
to Three20
I hope it could be my application's problem, but I can't realize if it
is so or if it's a Three20 problem.

I try to explain:
I'm only allocating an UIToolbar and adding on it one
UIBarButtonItem.

On 3GS this simple operation works fine, on iphone 3g (with OS 4.0)
the UIToolbar setItems method fails with an EXC_BAD_INSTRUCTION
signal.

I found that the error was thrown by the method
descendantOrSelfWithClass on UIViewAdditions (exactly on for (UIView*
child in self.subviews) cycle)

Can anyone help me to use the UIToolbar on iphone 3g?

Thanks

On 15 Lug, 13:49, Chris Lozac'h <cloz...@gmail.com> wrote:
> For the record, my app, which admittedly doesn't use much more than TTPhotoView, works fine on my 3G running 3.1.2. Not saying there isn't something wrong with three20, enrico, just adding a data point for you. :)
>
> -Chris
>
> ...
>
> leggi tutto

DAMNiaTX

unread,
Aug 18, 2010, 12:17:10 PM8/18/10
to Three20
just trying this patch, and there is error. it seems doesn't work.

error: patch failed: src/Three20UICommon/Sources/
UIViewControllerAdditions.m:294
error: src/Three20UICommon/Sources/UIViewControllerAdditions.m: patch
does not apply
error: patch failed: src/Three20UICommon/Sources/
TTBaseViewController.m:91
error: src/Three20UICommon/Sources/TTBaseViewController.m: patch does
not apply
error: patch failed: src/Three20UI/Sources/UIViewAdditions.m:453
error: src/Three20UI/Sources/UIViewAdditions.m: patch does not apply
error: patch failed: src/Three20UI/Sources/TTPostController.m:142
error: src/Three20UI/Sources/TTPostController.m: patch does not apply

any idea to apply this patch ?, thanks
> > >>>>>>>>>>>  - This patch fixes...
>
> read more »

Ambert Ho

unread,
Aug 30, 2010, 3:49:19 PM8/30/10
to Three20
don't worry about the patch, just use Scott's fork git://github.com/Bauerpauer/three20.git
after doing all the settings changes discussed around base sdk/deploy
target in each Three20 library

On Aug 18, 9:17 am, DAMNiaTX <damni...@gmail.com> wrote:
> just trying thispatch, and there is error. it seems doesn't work.
>
> error:patchfailed: src/Three20UICommon/Sources/
> UIViewControllerAdditions.m:294
> error: src/Three20UICommon/Sources/UIViewControllerAdditions.m:patch
> does not apply
> error:patchfailed: src/Three20UICommon/Sources/
> TTBaseViewController.m:91
> error: src/Three20UICommon/Sources/TTBaseViewController.m:patchdoes
> not apply
> error:patchfailed: src/Three20UI/Sources/UIViewAdditions.m:453
> error: src/Three20UI/Sources/UIViewAdditions.m:patchdoes not apply
> error:patchfailed: src/Three20UI/Sources/TTPostController.m:142
> error: src/Three20UI/Sources/TTPostController.m:patchdoes not apply
>
> any idea to apply thispatch?, thanks
> > > >>> On Jul 11, 12:59 pm,Scott<bauer.m...@gmail.com> wrote:
>
> > > >>>> Problem solved.  I was able to remove the "-all_load" Linker Flag,
> > > >>>> which got rid of theDuplicateSymbolerrors, so long as I added
> > > >>>> sprinkled some more FIX_CATEGORY_BUG macros into more Category-only .m
> > > >>>> files (specifically TTImageViewInternal.m), as per the thread @http://groups.google.com/group/three20/browse_thread/thread/60630131d....
> > > >>>> You can grab the relevant commit
> > > >>>> (b5bfabc345115fd14a4449b557439597fce5448c) from git://github.com/Bauerpauer/three20.git
>
> > > >>>> Thanks,
> > > >>>>Scott
>
> > > >>>> On Jul 11, 3:30 am,Scott<bauer.m...@gmail.com> wrote:
>
> > > >>>>> Quick edit to my last post...  I've had to add "-all_load" to my
> > > >>>>> "Other Linker Flags" setting in my app's project configuration for the
> > > >>>>> Debug build. Without it certain categories (TTImageView (TTInternal)
> > > >>>>> for example) weren't being linked properly and I'd experience odd
> > > >>>>> behavior when running my app in the simulator (unrecognized selector
> > > >>>>> setImage on TTImageView).
>
> > > >>>>> The problem now is that if I add "-all_load" to my Release build I get
> > > >>>>> duplicatesymbolerrors again on _TTSwapMethods.  Any ideas?
>
> > > >>>>> Thanks,
> > > >>>>>Scott
>
> > > >>>>>>>>> On Sat, Jul 10, 2010 at 10:21 AM,Scott<bauer.m...@gmail.com> wrote:
> > > >>>>>>>>>> Yoshi,
>
> > > >>>>>>>>>>  I've followed yours and other tutorials about 10 times with
> > > >>>>>>>>>> different projects of mine, and I've finally resorted to start from
> > > >>>>>>>>>> scratch, and even that isn't working out for me.  I cloned the latest
> > > >>>>>>>>>> three20 from git://github.com/facebook/three20.git, applied thepatch
> > > >>>>>>>>>> you list and added three20 per the instructions.  I've uploaded my
> > > >>>>>>>>>> sample project to github (g...@github.com:Bauerpauer/testapp.git).
> > > >>>>>>>>>> Check out the screenshot in the root to see the errors I'm getting
> > > >>>>>>>>>> ("_OBJC_METALCLASS_$_TTWebController", referenced from..... Symbols(s)
> > > >>>>>>>>>> not found, Collect2: ld returned 1 exit status).  The project compiles
> > > >>>>>>>>>> and links fine until I add...
>
> read more »

Laurent C

unread,
Aug 30, 2010, 6:15:18 PM8/30/10
to Three20
The main branch works fine with XCode 3.2.3 base SDK iOS 4.0 and
target deployment 3.x
That's what I use right now.

L
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages