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
Related
Despite the release notes stating this is supported and previous version of Xcode 6 working ok, I have a rather verbose error message when trying to build with 7.1 SDK.
"iOS targets using Swift cannot be built against an SDK older than 8.0, but the effective SDK is 7.1."
Has anyone else seen this?
I just had this issue, but with the app store build of Xcode 6.0.1 (6A317).
The issue was that I had copied old SDK's (7.0, 7.1) into the Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs directory. This was causing Xcode to use the wrong SDK for building.
Deleting them solved this problem for me. That'll teach me for mucking around with Xcode.
Apple has now announced Xcode 6 (and iOS 8). I currently have Mavericks on my Mac (and am not planning to upgrade to Yosemite yet), and am wondering if I can download the Xcode 6 dev preview, while still maintaining my current version of Xcode 5. This is so that I can use the new Xcode 6 features, while still being able to work on, and upload, my current applications. Is that possible?
Also, if I update my phone to iOS 8 Beta, will I be able to run apps from Xcode 5, or only Xcode 6?
Answers would be hugely appreciated! Thanks :)
Even I use Mavericks, I installed Xcode 6. In order to be sure about my maintenance projects, I've also downloaded Xcode5.1.1 from Apple developer portal, copied it into my Desktop, renamed it as XCode 5.1.1 and then moved it to my applications folder.
I have both versions at the moment without any issues and can also select the version of Xcode while opening an existing Xcode project by using open with menu feature.
I hope this helps...
Xcode 6 Beta Release Notes
Xcode 6 Beta requires a Mac running OS X version 10.9.3 (or later) or 10.10.
I think its possible that you can do all things you was able to do with Xcode 5 but I will tell you when my xcode 6 download is finished.
You may install XCode 6 Beta on OS X 10.9.3, and I think that you'll need XCode 6 in order to run iOS8 apps.
One thing that you didn't ask, but that you should keep in mind (as you mentioned your phone):
Devices updated to iOS 8 beta can not be restored to earlier versions
of iOS.
i've installed Xcode6 in Mavericks and iOS simulator crash with message : Unable to boot the iOS Simulator. :-(
You can download the preview of Xcode 6 and use your existing installed Xcode 5 side by side without affecting anything you're doing. Just make sure if you click on a project file that you open it in the correct version of Xcode.
Download xcode dmg file from Apple's developer site. Install it in a different location other than the Applications folder. There you go !!
My app is crashing when I try to display another view controller. It does work correctly when the iOS SDK is set to 7.0 and I am targeting iOS 7.0. But I need the app to target iOS 6.0. UIKit is (obviously) declared in the imports. The UITableViewController I am trying to present works perfectly fine as far as I'm aware - I created it for another app, using XCode 4.6.3, targeting 6.0 and it compiled without error (as does this one) but it also displays without crashing.
I could provide code, code which does nothing more than present the table view controller using a modal transition, but I even went to the point of connecting a UIButton to the UITableViewController - it worked on iOS 7, but not 6. It's my belief that when I compile with the iOS 6.1 SDK, it should be using iOS 6.1 frameworks?
UIKeyCommand is only available in iOS 7 and later, according to this. That gives me reason to believe that it is using the iOS 7.0 frameworks even though the iOS 6.1 SDK has been specified.
I've tagged this with the xcode tag as I believe it could possibly be caused by xcode incorrectly searching for the specified SDK's frameworks.
I had the same problem as you and here is what i did to solve it:
I opened the Storyboard as Source Code and searched for the tag : keyCommands , I found a tag similar to
<keyCommands> <keyCommand/> </keyCommands>
and i deleted it.
After that i runned the app in iOS 6 & 7 and it worked with no problem.
Let me know if this works on your app too!
Cheers!
I am getting multiple warnings when I am trying to run my XMPP chat client on iOS 6
'dispatch_get_current_queue' is deprecated: first deprecated in iOS 6.0
Not sure how to fix these warnings. Is updated XMPP framework available for objective C compatible with iOS 6?
This was reported at the project page:
https://github.com/robbiehanson/XMPPFramework/issues/115
https://github.com/robbiehanson/XMPPFramework/pull/140
Someone uploaded a patch. Either give that a try, or just live with the warning until the patch is accepted.
You can fix the warning in the XMPPFramework with this line:
NSAssert(dispatch_get_specific(moduleQueueTag), #"Invoked on incorrect queue");
Hey I have problem compiling code in xcode 3.2
I have a code where it's using iOS 4's API, "MFMessageComposeViewController"
It would compile fine with 4.0 under xcode, but when when i try to compile with 3.2 I get error because of "MFMessageComposeViewController".
It seems that xcode can't find keyword for MFMessageComposeViewController.
In order to be able to compile for 4.0 and 3.2 and still use MFMessageComposeViewController, what should i do?
thank you!
I can't determine whether the version numbers you are referring to are to do with the iPhone OS version of the Xcode version.
The documentation for MFMessageComposeViewController shows that it is only available in iOS 4.0 and later, so you can't use it at all in earlier versions of iPhone OS.
If you are having trouble with Xcode version 4, you cannot ask for help here because it is under a non-disclosure agreement, as far as I am aware. If you are using Xcode 3.2 to compile for source code targeting iOS 4.0, ensure that your project settings are correct and are set to use the iOS 4.0 SDK.