Using Mac OS 10.8.3 and xCode 4.6.1 and using ABPeoplePickerView with a very simple Cocoa App with XIB using ABPeoplePickerView results in an run time warning coming from ABPeoplePickerView:
2013-04-02 21:58:36.848 AddressbookTest[4462:303] ** WARNING: -[NSImage compositeToPoint:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.*
but I cannot change a class crCeated by Apple itself. A Apple bug? Any workaround to avoid this or simple ignore the runtime warning?
Just ignore it. If you want to harass the Address Book team about it, use bugreport.apple.com, but it's not necessary.
Related
I have imported CallKit framework as optional only. But import CallKit crashes while running on iOS 9 at launch. But works perfectly on iOS 10.
It worked fine in XCode 8 beta 6 but this issue is happening only on XCode 8.
The code is in Swift 3.
Any help is much appreciated.
CallKit API is only for iOS 10.0+. It won't work for iOS 9.0. Use a condition for iOS version 9.0 and 10.0 to avoid the crash.
Reference : https://developer.apple.com/reference/callkit?language=objc
There is/was a bug in Swift 3 language that wrongly links module libraries github pull request, that is fixed now, but the fix is not yet implemented in XCode, not even in beta.
You could get latest swift toolchain build from link and install it to XCode to try and see the fix, but the app would not be approved for Appstore as it's stated here
You got two solutions;
wait for apple to release XCode with new version of swift 3.0.2+
or revert your code back to swift 2, where it works, with "Use Legacy Swift Language Version" flag in Build Settings
If you choose to revert back to swift 2, brace yourself with a lot of patience :D
My app uses UIUserNotificationSettings, which I noticed is deprecated in iOS 10. However Xcode isn't displaying a Buildtime deprecation error for this method. How can I make Xcode display these newly deprecated methods?
You're not seeing deprecated warnings because you're likely targeting an OS that's pre-10.0. If you wanted to see the warnings, change your deployment target to 10.0 and the 10.0 deprecation warnings will appear.
I found an example on the website of Apple developers about the library looking ImageKit in which scanners connected but there is a problem because when I connect my scanner is not detected, I ran the program and tells me there is a function NSBeginAlertSheet deprecated.
Somebody help me solve problems.
The link is here.
NSBeginAlertSheet was deprecated in OS X 10.10 and it is recommended to use NSAlert instead. Source: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Miscellaneous/AppKit_Functions/index.html#//apple_ref/c/func/NSBeginAlertSheet
That specific error is not related to ImageKit.
I am getting annoying warning messages for my targets after upgrading to osx 10.10, and the latest xcode (I can't remember which actually triggered it)
e.g: Incompatible SDK for ARC in target ApplicationName: macosx
If I change it from 'latest' to '10.10' then I get the same error:
Incompatible SDK for ARC in target ApplicationName: macosx10.10
Everything works and compiles, but still warning. The code is mixed swift and objective C, with ARC. Anyone else had this issue?
I had some older SDKs (10.5 and 10.6) from previous xcode versions that I had saved, in the xcode SDKs directory, which seemed to cause this error. I deleted these and replaced them with fresh ones downloaded from the apple website and the error went away.
I have same problem. But I found a solution:
In the Build Settings turn off the "Objective-C Automatic Reference Counting" paramter.
How can I obtain and use 10.6 as base SDK in Xcode 4.5.2?
I downloaded Xcode 4.5.2 from the Mac App Store (through a link on the Apple developer site).
Is there a way I can somehow download the 10.6 SDK separately and start using it as a base SDK?
Strangely enough, I can download the documentation for the 10.6 SDK through Xcode's Preferences window, but not the SDK itself. Any ideas?
No, you can't download the 10.6 SDK separately.
Is there a reason you can't use the 10.8 or 10.7 SDK?
Keep in mind that just because you build against the 10.8 SDK, that doesn't mean you can't also have that built application work on 10.8, 10.7 and 10.6. (This is often a cause of confusion among new developers). You control backwards-compatibility through the Deployment Target setting like shown in the image below.
By default, the deployment target is generally set to the same version of OS X as the SDK is, but changing it to 10.6, for example, should allow it to run on a machine with OS X 10.6. (Of course, you should really test to make sure that's the case).
Download xcode with MacOSX10.6.sdk. Now copy MacOSX10.6.sdk inside /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
Its also working fine with Xcode 5.0.