When I am integrating MGTwitterEngine in my app, this error is coming:
"SeckeychainItemref" undeclared
Can anyone tell how to resolve this?
I had similar problem while building OAuthConsumer for iOS - I removed unwanted Mac specific key-chain files .h/.m and I can build it on iOS.
SeckeychainItemref is not available in the iOS SDK.
As far as I know, its only used, for testing in the iPhone simulator. (if you found it in the code for a iOS app)
If it isn't for iOS, then you should add the Security framework and import Security/Security.h in your code.
Related
I want to test my project in an iPhone device, but when I connected my device to system and run the app an error occurs. The error is like that Swift Compiler error:
cannot underlie module for 'CoreGraphics'
I am using Xcode 6.1.1 and swift language to develop apps.
I already provide same Bundle identifier in info. list and where required.
When I want to add the CoreGraphics framework from the Link frameworks and library option in Project Navigator this will not show this framework in the list.
I don't know where I am going to run..
Sometimes the Xcode is deleted unfortunately frameworks like UIKIt and CoreGraphics etc..
So i do re-install the Xcode 6.1.1 then these error is fixed...
Greetings!
I'm attempting to build an iPhone application that makes use of an iOS4-only function: 'UIGraphicsBeginImageContextWithOptions'.
I'm building for iPhone device 3.1.3 in XCode 3.2.1 and getting errors about that function not being defined.
This stackoverflow page already showed me that I should link weakly against UIKit and check that function for NULL, I am already doing this:
However, build still fails with:
Anyone have any idea?
You need to build against the iOS 4.x SDK, otherwise the compiler has no knowledge of that function.
As title described, I integrated iAd into my iPhone apps. Everything worked fine in the iPhone simulator (iOS4). However, when I try to install it on my iPhone(version 3.1.3), I got an error:
dyld: Library not loaded: /System/Library/Frameworks/iAd.framework/iAd
Referenced from: /var/mobile/Applications/...
Reason: image not found
I already properly set the deployment target to v3.0, and base SDK to 4.0. When I comment out all the iAd related code, the apps installs with no problem.
There must be a way to do this, because I downloaded the apps "showtimes" and "Yellow Pages", which use iAd. Both apps run very well on my 3.1.3 phone, and I can see the iAd as well.
Does anybody know how to do this?
To get past the loader error, double-click your target in Xcode and change the link type of the iAds.framework to "Weak" instead of "Required". You'll probably have to do some conditional coding to support other ad networks as well, because iAds are not supported on pre-4.0 systems.
In xCode 4 select "Targets"-"Build Phases"- "Link Binary With Libraries". Change the link type of the iAd.framework to "Optional" instead of "Required".
You can integrate AdWhirl into your app instead, which can deliver you iAds among others. More usefully, it will provide you with adverts you can display in iOS3.*.
I've compiled an app with IPhone base SDK 4.0, deployment target on iPhone OS 3.0. This app contains OS 4.0 new feature: local notification.
It works well on iPod 2G with OS 4.0; however it crashes every time the app start up on iPhone 1G with OS 3.0. It appears to be runtime reference error:
"dyld: Symbol not found: _OBJC_CLASS_$_UILocalNotification
Referenced from: /var/mobile/Applications/73A3FAB1-63AE-4A71-8C6B-932142A728FE/Tapatalk X.app/Tapatalk X
Expected in: /System/Library/Frameworks/UIKit.framework/UIKit"
If the UIKit framework is different between SDK3.0 & SDK4.0, why it doesn't report while compiling? How can I apply local notification feature on this app, while the app can still running on devices with OS3.0? Thanks.
This answer solved the problem for me:
That error is being triggered because
you didn't weak-link the UIKit
framework. The UIKit framework in
iPhone OS 3.2 added the
UISplitViewController, and if you link
it in as normal your application will
assume those symbols exist on 3.0,
where they don't.
To weak-link a framework, find your
application target in Xcode, inspect
it, and go to the General tab. At the
bottom of that tab should be a list of
frameworks, with a column for Type.
Change the Type for UIKit from
Required to Weak and rebuild your
application. That should take care of
the runtime errors.
This seems safe to me, given that UIKit is always going to be on the devices we're targetting.
If you use a 4.0 SDK feature and you want to support 3.0 devices, you need to check that the functionality exists before you use it.
If you're using a new class (as you are) something like the following should work:
Class localNotificationC = NSClassFromString(#"UILocalNotification");
if (localNotificationC) {
UILocalNotification* localNotification = [[localNotificationC alloc] init];
// do stuff
[localNotification release];
}
else {
// what to do with the 3.0 SDK
}
As for why the compiler doesn't tell you, well, you told the compiler that you were using the 4.0 SDK and those classes/methods work on 4.0.
I found this information really useful. However my question is how to test if the application crashes or not after this change.
The background is I had the same issue with my iPad application. I have my BaseSDK set as 4.3 and Deployment target is 3.2. I never got this crash while doing ad-hoc provisioning and running the app on 3.2 iPad and it got approved by Apple too. But users reported that when they started the application after download on iPad 3.2 it crashes before showing the main screen even.
I was using [UILocalNotifition alloc] in my code which I think could be the result of below crash:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
I seem to have fixed this by converting the above statement as per Stephen's suggestion.
However I really don't know how to test it. I am not getting any crash earlier too while testing the application before submission on 3.2 and currently also I am not getting any crash on start up.
I really need to validate this fix before I push the update to app store. Could someone please shed more light on how to test this? It would be really helpful if I can reproduce this crash with the previous version of my application and the same is not the case with current version after this fix.
We are developing an iPad app for which I am trying to use sharekit http://getsharekit.com
I am getting this error if I use the Base SDK 3.2
Cannot find protocol declaration for NSXMLParserDelegate
But if I change Base SDK to 4.0 it works fine.
I think its possible to use Base SDK 4.0 when creating Universal apps.
Does anyone knows if apple accepts iPad only apps compiled with Base SDK as 4.0 and target 3.2?
It'll work. I'm using them in the same configuration currently, but I've been using NSXMLParserDelegate with 3.2 till too, not really sure why it won't work for you.
Was googling for NSXMLParserDelegate and came across this question -
Error Building Project With NSXMLParserDelegate
or
NSXMLParserDelegate compile problem - iPhone SDK 30. vs 4.0
Maybe this will work?