Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-11-2011, 10:45 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 82
Guthook is on a distinguished road
Default Trouble going from iOS Simulator to iOS

I finally paid for a developer account so I can start testing my app on my iphone, after many months just using the simulator, and I'm having trouble getting something to work.

My app uses code from this demo to display a map, and the problem seems to arise from the three20 files. When I build the app for the simulator, everything works fine. When I build it for "device" it fails with the error code:

/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Clicking on the more info button, it says it can't find the libThree20Network.a and libThree20Core.a files... it's looking for them in the directory:
[my projects folder]/three20/Build/Products/Debug-iphoneos/libThree20Core.a
Looking in the three20 folder, the two missing files are in "Debug-iphonesimulator" instead of "Debug-iphoneos" folder. I tried switching the name of the folder, but that resulted in many more errors. No simple fix there.

Sigh... And just using the simulator seemed so simple!
Can anybody lend their expertise to help me figure out what I'm doing wrong?
Guthook is offline   Reply With Quote
Old 09-11-2011, 12:11 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 176
Rifts is on a distinguished road
Default

instead of using a demo why don't you just create an empty app and try to get it to run on your phone?
Rifts is offline   Reply With Quote
Old 09-11-2011, 12:44 PM   #3 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 82
Guthook is on a distinguished road
Default

Quote:
Originally Posted by Rifts View Post
instead of using a demo why don't you just create an empty app and try to get it to run on your phone?
Not sure I understand how this would solve anything. Do you mean just make an app that does nothing and run it on the iphone to show that something should run?

From the error message I got it doesn't sound like the problem lies in the code so much as an issue with the missing .a files. Is there a way to fix the missing files problem?
Guthook is offline   Reply With Quote
Old 09-11-2011, 03:33 PM   #4 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by Guthook View Post
I finally paid for a developer account so I can start testing my app on my iphone, after many months just using the simulator, and I'm having trouble getting something to work.

My app uses code from this demo to display a map, and the problem seems to arise from the three20 files. When I build the app for the simulator, everything works fine. When I build it for "device" it fails with the error code:

/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Clicking on the more info button, it says it can't find the libThree20Network.a and libThree20Core.a files... it's looking for them in the directory:
[my projects folder]/three20/Build/Products/Debug-iphoneos/libThree20Core.a
Looking in the three20 folder, the two missing files are in "Debug-iphonesimulator" instead of "Debug-iphoneos" folder. I tried switching the name of the folder, but that resulted in many more errors. No simple fix there.

Sigh... And just using the simulator seemed so simple!
Can anybody lend their expertise to help me figure out what I'm doing wrong?
I haven't used three20 before, so I can't give you specifics about making that library work.

However, I can tell you what's going wrong in general.

Third party code libraries need to be built separately for the simulator and the device. Under the covers, the machine code for the simulator is 80x86 code, and for the iOS device, it's Arm6 and/or Arm7 code. At link time, your app needs to have the correct flavor of the library(s) you're using or the app won't build.

You should have a three20 directory structure that has Debug-iphoneos and Debug-iphonesimulator directories. Each of those directories will contain the library files for that platform. You can't just rename the simulator directory with the iOS directory name, because the simulator files won't work for iOS devices.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-11-2011, 06:38 PM   #5 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 82
Guthook is on a distinguished road
Default

Thanks Duncan. I did some more exploring and found that the folder with the iphone OS files was missing from the three20 directory I had imported, but I re-downloaded the one from the demo and found the missing file there. Copied into my folder, and everything works now. I finally have evidence on my iPhone that I haven't just been wasting hundreds of hours in xcode!
Guthook is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 406
10 members and 396 guests
7twenty7, apatsufas, Eclectic, eski, fiftysixty, JackReidy, teebee74, tim0504, UMAD, yuncarl28
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,121
Posts: 402,904
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:04 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0