xcode7-beta3

Building a Swift Framework with Xcode 7 (Beta 3) to use as an Embedded Binary

故事扮演 提交于 2019-12-03 08:22:12
Ever since Embedded Binaries were introduced in iOS 8, I have been wanting to port a lot of my common code into frameworks. I decided to wait one year before doing it and this year, with Xcode 7 Beta and iOS 9, I'm starting to do that just that. I have started a Cocoa Touch framework project in Xcode 7 and I want to compile it into a usable framework. I can get it to compile my project into a .framework, but there's a few issues; namely, the framework doesn't appear to be importable into new projects (I will describe the steps I did for that shortly). Because of that, I'm not sure if my

Integer overflow gives EXC_BAD_INSTRUCTION in Swift

核能气质少年 提交于 2019-12-01 18:01:06
While messing around with Swift, I noticed that when the 64 bit integer overflows, I get the following error: file:///Users/user/Documents/playground/MyPlayground.playground/: error: Playground execution aborted: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0). func fibonacci(which: Int) -> (fibOf: Int, isEqualTo: Int) { var i = 1, j = 1 for var k = 2; k < which; k += 1 { let tmp = i + j // this line is highlighted when error occurs j = i i = tmp } return (which, i) } print (fibonacci(92)) print (fibonacci(93)) // this triggers an error The first call,

How to open URL schemes from Safari in iOS9?

烂漫一生 提交于 2019-11-30 06:27:09
I was able to open apps from safari this way: window.location = 'myapp://do/xx'; or open facebook app: window.location = 'fb://'; But this stopped working in iOS9. How can I open apps using URL schemes in safari? IOS 9 URL Shchemes Update : iOS 9 introduces LSApplicationQueriesSchemes to allow apps to query if other apps are installed. 1- If a url scheme is declared and calling canOpenURL(scheme) YES if a installed app supports that URL scheme NO if no app supporting that url syslog will show canOpenURL: failed for URL: "urlScheme://" - error: null 2- If a url scheme is not declared and

UIAlertController:supportedInterfaceOrientations was invoked recursively

自古美人都是妖i 提交于 2019-11-29 22:08:04
When two alert present one by one, i means one alert present and over them another alert presenting and app crashing. I have used UIAlertController to display alert. App crashing only in iOS 9 device. Please help me at this point. Annie This is a bug in iOS 9 that it failed to retrieve the supportedInterfaceOrientations for UIAlertController . And it seems it dropped to an infinite recursion loop in looking for the supportedInterfaceOrientations for UIAlertController (e.g., it tracks back to UIAlertControler -> UIViewController -> UINavigationController -> UITabBarController ->

How to open URL schemes from Safari in iOS9?

血红的双手。 提交于 2019-11-29 06:08:57
问题 I was able to open apps from safari this way: window.location = 'myapp://do/xx'; or open facebook app: window.location = 'fb://'; But this stopped working in iOS9. How can I open apps using URL schemes in safari? 回答1: IOS 9 URL Shchemes Update : iOS 9 introduces LSApplicationQueriesSchemes to allow apps to query if other apps are installed. 1- If a url scheme is declared and calling canOpenURL(scheme) YES if a installed app supports that URL scheme NO if no app supporting that url syslog will

UIAlertController:supportedInterfaceOrientations was invoked recursively

百般思念 提交于 2019-11-28 17:24:07
问题 When two alert present one by one, i means one alert present and over them another alert presenting and app crashing. I have used UIAlertController to display alert. App crashing only in iOS 9 device. Please help me at this point. 回答1: This is a bug in iOS 9 that it failed to retrieve the supportedInterfaceOrientations for UIAlertController . And it seems it dropped to an infinite recursion loop in looking for the supportedInterfaceOrientations for UIAlertController (e.g., it tracks back to