Weird iOS4 XCode framework error - iphone

I'm converting a OS3 application to the new iOS4 release. What I did was download the new XCode and the new SDK, and just opened the application. I clicked on the "Build & Run" and I'm getting an error that looks like this for every the Foundation, CoreGraphics and CoreLocation frameworks-
warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/CoreLocation.framework/CoreLocation, missing required architecture i386 in file
The application worked perfectly under 3.0 and I never had any issues. I did make sure that the Base SDK is set to iPhone Device 4.0.
Would you guys be able to tell me what I'm doing wrong or point me in the right direction to get this fixed? Thanks for any help!

Open up the Target Info and make sure that "Framework search paths" only has the $(inherited) option.

Related

iOS app has changed behaviour after made available on appStore

I have created an app targeted for ios 4.1 with base SDK ios 5.0 and tested it with 3G(ios 4.3.3) 3GS(5.1) 3GS(5.0) iPad(5.1). My App has behaved well on all these devices. However, when apple has finaly accepted the app, and i have downloaded it on the same devices, the behaviour has changed. The problem is that the pages which are displayed are oversized, but if i move them, they properly start fitting the screen.
Has any of you came across similar situation when the app after publishing changed its behaviour?
And most important. How am i supoosed to reproduce this bug when the same app run from mac on real devices performs excellent?
I may add that base SDK was set to latest(5.0) but app was archived with XCode 4.2 which doesnt support ios 5.1.
Be kind to me, this is my first question :)
EDIT:
After hotpaw's helpful hint, i have checked that the problem was the release build. I can reproduce the bug on the device after changing target in run conf. from debug to release.
What is interesting, and frustrating, I cannot solve the issue, however, I have tested my application in release mode on xcode 4.3 and it is working perfectly. I have not changed anything, but it works. It can't pack the build( see problem Xcode 4.3.1 - Packaging operation failed), so i am stuck with xcode 4.2
For a while i have suspected that the bug is caused by the compiler when compiling for thumb, and the solution would be to add -mno-thumb to other c flags. But i fail to force that flag. See : iOS5 Xcode4.2 floating-point byte align error?
When I compare the compilation log, i can see that xcode 4.3 compiles with -arch armv6 when xcode 4.2 with -arch armv6. But it is the same device which I connect to the computer. I haven't spotted other differences, but they may exist. I can paste the compilation log for sample file if it would help.
This can happen if you test only Debug Builds, and then submit a Release Build to the App store. For final test, you need to force Xcode to test with a Release build (perhaps by editing the default schemes), and then submit this build with absolutely no changes to the Build settings, other than code signing.
You might also want to final test your Release build by Ad Hoc installation via iTunes on a freshly reset device from which all previous builds of the app have been deleted. See Apple's directions for doing this.
The problem was with the buggy compiler!
I couldn't notice the difference after applying -mno-thumb to my project, because the library which i used ( Three20) was set to compile only for armv6 which caused the problem and not my project. After adding -mno-thumb to all the projects of Three20 the bug has vanished!
I am going to notice the Three20 team about the issue.

Phonegap no architecture issue when build

I am new to iPhone development and I use Phonegap since I know web development. I followed instruction in below sites:
http://wiki.phonegap.com/w/page/16494778/Getting-Started-with-PhoneGap-%28iOS%29
https://github.com/phonegap/phonegap-iphone/blob/master/README.md
But I got this error
No architectures to compile for (ARCHS=i386 ppc, VALID_ARCHS=armv6 armv7).
I already went to Project Setting and changed Base SDK to iPhone Device 3.1.3 but the problem is still there.
Any advice?
set the "valid archictectures" in Project Info
Had the same prob.
If testing in the simulator: Click top left where you can choose the simulator and check if the top item "Device" is checked. If yes ckeck "Simulator" and try again.

XCode 3.2.3 running on iOS3 - Wired framework

I looked around on Stack Overflow and I didn't find the solution of a strange problem.
I started developing a project on XCode 3.1 then I decided to upgrade on XCode 3.2.4 and targeting iOS3 iPhones. I then followed the topics dealing with that and I changed the Base SDK to iOS 4.1 and the target os to 3.0. Everything worked fine until I made changes to my project.
Indeed I added CoreMedia.framework to my project.
It worked well on simulator, but crashed at launch on the iPhone. Here is the log I can get:
<Notice>: dyld: Library not loaded: /System/Library/Frameworks/CoreMedia.framework/CoreMedia
Referenced from: /var/mobile/Applications/72F009B5-82A8-49DC-A5CD-708EE1A4553C/myapp.app/myapp
Reason: image not found
(I had the same problem with other frameworks like CoreVideo for example)
I tried on an iOS4 iPhone and it worked well, so I think XCode doesn't link/copy the right framework on the iPhone. When I get info on a framework under XCode, here is the path I get:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/System/Library/Frameworks/MediaPlayer.framework
But I get the same path when I get info on a framework of the first version of the project (when I was using XCode 3.1). It sounds like the new frameworks added have a wrong reference.
Does anybody have an idea of how to solve this problem? Any help would be greatly appreciated. :)
You have to weak link your libraries.
On xcode go to targets-> right click get info. on General tab on the lower section you will see your libs, change the CoreMedia type to be weak.
Ofcourse the lib won't be available on os3 so you'll need to add checks in your code so you wont call the lib on os3

device not working with mapkit

my device doenst work at all when i load an project that contains any mapkit framework files
it says
ld: warning: in /APP/MapKit.framework/MapKit, file was built for i386 which is not the architecture being linked (armv6)
and it doesnt let me test it on the device, however when i load this on my simulator it works.
Any help?
Maybe this post help you : Error building my app to my ipod touch:building with 'Targeted Device Family' set to iPhone only ('1') not supported with SDK 'Device - iPhone OS 3.2
It appears to be loading MapKit from the wrong directory; it's somehow trying to link against the simulator MapKit. Switch to the simulator build, right-click the framework, and make the path "relative to SDK directory" or so, and then switch back to the device build.
Alternatively, delete and re-add MapKit under "Add Existing Frameworks", which should do it correctly.

There is no SDK with the name or path 'iphoneos2.0'

I keep getting this error.
There is no SDK with the name or path 'iphoneos2.0'
I am running some templates at
http://appsamuck.com/day1.html
I'm running the latest sdk, in the pop up menu (simulator) there is an option iPhone Device 2.0 (missing) (Base SDK)
Then just select another SDK: 3, 3.2 or 4.
Most examples will work, even if they were prepared for SDK 2.
Oh, i have just met this problem last night :) I think your project write in xCode 3.2.2 or earlier but you try to run it on xCode 3.2.3. And you need to tell xCode to run your app in iPhone Simulator with iOS 4 (iPhone running iOS 4 can run iPhone's app write for iOS 3). If that's your problem do some step to slove it:
Select "Project" menu on xCode.
Select "Edit Project Settings" submenu.
Look at line "Base SDK for All Configurations", select iPhone Simulator 4.0 (May be it look like disable but you can select).
Run your project to compile your project.
Good luck :)
Looking at the code here, it's one of the very first iPhone dev tutorials written, and it's evidently not been updated to reflect the current SDK and Xcode versions.
I would suggest starting with a more modern tutorial, then coming back to this once you have the confidence to be able to understand and fix the code.
Go to the project
project> Edit project Setting
Change BASE SDK to the latest IOS
after that
Code Signing Identity: Change it to DON'T CODE SIGN
after doing this some of my applications was working fine but not all of them.