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
Related
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.
I recently upgraded XCode to run iOS 4.2 from iOS 3.2. However, now, when I try to run my iPad app, it appears as an iPhone app in the simulator! It appears as the smaller box with the option to expand 2x. Does anyone know why this would be so?
In addition, although the application builds and runs (albeit incorrectly), XCode still says that the Base SDK is missing. I have gone into the Build Info for the target and the project and set the following:
Base SDK: Latest iOS (currently set to iOS 4.2)
Targeted Device Family: iPad
iOS Deployment Target: iOS 3.2
Edit Thanks a lot for the comments; now there is no longer a Base SDK missing, but unfortunately, the app still runs as an iPhone app...
When I load a UISplitViewController, I get an exception 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad'.
This all seems very strange to me. Any help is greatly appreciated.
Thanks
The installed app could be broken.
What happens when you delete the app from the Simulator and do a clean build and run?
The Simulator could be broken.
What happens when you create a new different iPad app from an Xcode template?
You configuration could be broken, or you could have different settings for different targets and builds than you want, or the wrong plist or plist keys, or the wrong xib. If the new template app works, compare these one by one.
I eventually was able to fix this problem. I attempted all the methods outlined by the other answerers, but none of them worked. However, when I upgraded to XCode 4, the problem fixed itself.
I honestly don't know what changes to my app were made by this upgrade, and I am still baffled at why the project was not compiling before. I suppose upgrading your environment is one (somewhat unsatisfying) way to fix this sort of bug....
Check that you have set the appropriate settings for the current build target as well as the base project. So from the project menu:
Edit Project Settings
Edit Active Target blah
I have often forgotten to check the settings for the current target and had a similar experience.
I was just wondering if anyone knows of any articles relating to upgrading an iPhone application from 3.0 to iOS4. (Thanks for this iWasRobbed).
While the application still runs on iOS4, it will not run on the iPhone 4, but does on my iPhone 3G.
When I deploy the app on the iPhone 4, the Default screen loads and it will sit there hanging. The only inclination towards a problem I get is this warning:
warning: UUID mismatch detected with the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit
warning: UUID mismatch detected with the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress
Thanks
James
James,
Apple has provided this checklist: http://developer.apple.com/iphone/checklist/
It generally should not be that big of an issue. Typically, you just set the baseline SDK as 4.0 and the deployment target as either 4.0 or something 3.0+.
If it is not running on an iPhone 4, you may wish to explain further what specifically it is doing or not doing when you attempt to run it on that device. Keep in mind that all apps (for the most part) that were designed to run on 3.0 and above will typically run well on an iPhone 4.
There might be some issues with deprecated methods, so make sure you resolve those prior to installing and running the app. You should get a compiler warning for any of those, if not check your target settings and there should be a checkbox for it.
Other than that, I'm not sure what else would prevent you without understanding further details of your project.
As additional information, you should really look into the WWDC 2010 video called "Future Proofing Your Applications" (watching it now :)
That is most likely a mismatch between what iOS your iPhone 4 is running and what SDK you're using in Xcode. The UUIDs are mismatched because the iPhone 4 is using a different version SDK to what you've coded in.
Solution, install the latest SDK and make sure your iPhone matches this. The latest out is 4.1
I had the same problem and think I have solved it because the problem has gone away.
Firstly I deleted the build folder. Then I Installed the latest version of ios (4.1 in this case) onto my iphone through itunes. Afterwards i installed the latest xcode and iphone sdk package from the apple devlopers site.
This in itself probably fixed the problem but just to be sure I added a new provisioning profile for the phone on my computer and everything worked great afterwards.
Hope that helps
I have created an app which runs fine on devices using iOS 3.2 or above but on older versions of the OS it crashes with the error
dyld: Symbol not found: _OBJC_CLASS_$_CATextLayer Referenced from: /var/mobile/Applications/70D5888B-B531-484F-997D-776B432FFA52/Test.app/Test Expected in: /System/Library/Frameworks/QuartzCore.framework/QuartzCore
I realize this is because CATextLayer wasn't available before 3.2 but does anyone know what I can do to still make it run in older versions? I have tried checking the version and only calling the layers if it's 3.2+ but the crash seems to happen when it loads in the framework instead of when it actually tries to change a layer.
Thanks.
weakly link the framework, then check to see if the class exists before using it in your code. There are multiple questions here on how to do that.
Follow the process that I describe in this answer, only weak link the QuartzCore framework in addition to UIKit. It's the same problem the asker was having there, only for a different symbol in a different framework.
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.