Here's a code snippet that compiles and works as expected, but I get a warning for depricated use of the unit .NSYearCalendarUnit. This is within XCode 7 (Swift 2.0)Playground execution failed: /var/folders/37/2hl0kpw50lv18q1d48gbbb5r0000gn/T/./lldb/16158/playground8.swift:52:20: warning: 'NSYearCalendarUnit' was deprecated in iOS 8.0: Use NSCalendarUnitYear insteadvar TermEndDate = NSDate() if (TermYears>0) { TermEndDate = userCalendar.dateByAddingUnit( NSCalendarUnit.NSYearCalendarUnit, value: TermYears, toDate: TermStartDate, options: .WrapComponents )! } if (leaseMonths>0) { TermEndDate = userCalendar.dateByAddingUnit( NSCalendarUnit.NSMonthCalendarUnit, value: TermMonths, toDate: TermEndDate, options: .WrapComponents )! } If I switch to the recommended syntax, it errors out. /var/folders/37/2hl0kpw50lv18q1d48gbbb5r0000gn/T/./lldb/16158/playground8.swift:60:5: error: 'NSCalendarUnit.Type' does not have a member named 'NSCalendarUnitMonth'NSCalendarUnit.NSCalendarUnitMonth,^ ~~~~~~~~~~~~~~~~
Search results for
DTiPhoneSimulatorErrorDomain Code 2
158,663 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I believe its suppose to work, am I wrong? I know split screen needs Air 2, but I heard SLideOver is suppose to work.
Also.... I found a very informative website that has a ton of examples specifically on how to work with dates within Swift.Here's a code snippet that he uses as an example, but does not compile for me, and I have no idea why I get the error: could not find member 'CalendarUnitDay'. Was this syntax changed with Swift 2.0?Every example I could find uses this syntax, but for me... no luck.// Playground - noun: a place where people can play import UIKit let userCalendar = NSCalendar.currentCalendar() // Let's create some dates to work with // ==================================== // It's 3:45:30 a.m., New Year's Day. Time to go home. let goHomeYoureDrunkTimeComponents = NSDateComponents() goHomeYoureDrunkTimeComponents.year = 2015 goHomeYoureDrunkTimeComponents.month = 1 goHomeYoureDrunkTimeComponents.day = 1 goHomeYoureDrunkTimeComponents.hour = 3 goHomeYoureDrunkTimeComponents.minute = 45 goHomeYoureDrunkTimeComponents.second = 30 let goHomeYoureDrunkTime = userCalendar.dateFromComponents(goHomeYoureDru
Topic:
Programming Languages
SubTopic:
Swift
Tags:
They renamed some enums / options to be more consistent.In Swift, it would now be NSCalendarUnit.Year (type NSCalendarUnit, case .Year). If you double command-click on NSCalendarUnit (or NSYearCalendarUnit) in Xcode in your playground, it will pull up the Swift version of the header.And as far as the example code goes, OptionSets are handled differently now in Swift 2.0 and use set syntax instead of bitwise operators to join and test them.See the Xcode 7 beta release notes or https://forums.developer.apple.com/thread/3623 for more info on that.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
My Apple Watch also got battery drains from 100% to 55% in 6 hours last night ..........I can do nothing to downgrade only can wait till the beta 2 comes out
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I expected an increase of iPhone battery usage, but not at this level. 100% at 6:00 PM, 61% at 8:00 PM. There has been no physical interaction, on my part, with the two devices (iPhone 6 and Apple Watch) during this period. This is terrible, even for a Beta release. iOS 9 is Alpha at best!I hope there is a point release in the very near future. I cannot build and compile that fast!
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Using Xcode 7 beta, running the following OpenGL ES 2 code on Debug configuration on a iPhone 6 device running iOS 8.3, with Address Sanitizer enabled for the scheme, crashes:#include <OpenGLES/ES2/glext.h> //... EAGLContext *contextA = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; if (!contextA || ![EAGLContext setCurrentContext:contextA]) { return; } GLuint renderBuffer = 0; glGenRenderbuffers(1, &renderBuffer); glBindRenderbuffer(GL_RENDERBUFFER, renderBuffer); [contextA renderbufferStorage:GL_RENDERBUFFER fromDrawable:nil]; GLuint frameBuffer = 0; glGenFramebuffers(1, &frameBuffer); glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderBuffer); glFlush(); EAGLContext *contextB = [[EAGLContext alloc] initWithAPI:contextA.API sharegroup:contextA.sharegroup]; if (!contextB || ![EAGLContext setCurrentContext:contextB]) { return; } [contextB presentRenderbuffer:GL_RENDERBUFFER]; // E
Same on my side,it is awsome that a beta version is as worse as this IOS9 Beta 1. With only less improvements the battery is empty in extremely shorten time. But battery is one of the important things at MOBILE phones. So I really do not know why Apple was doing this Beta 1 because it is much more a pre-Alpha. Same at OSX 10.11 with Mail. It crashes totally against Exchange accounts. Really worse. I think they are not ready and / or WWDC was too early. Hopefully we get an update during the next 2 weeks, otherwise I think battery is damadged.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
My app status is waitng for review about 2 weeks ago .So I want to know what the problem Because I didn't submit In-App Purchases for my app.Any want is there any problem or not if I didn't submit In-App Purchases for my app.Because this is free app.
When I opened my project for the first time in Xcode 7, I was given the option to convert all of my code to Swift 2, which I did. But my WatchApp was never updated to WatchOS2. Now when I try to change the Base SDK, Xcode just crashes on me. Is there any other way to migrate my WatchApp and WatchKitExtension to WatchOS 2?
If you did install iOS9 as an upgrade your data should be there on the phone. If your did wipe your phone during the install process just restore it with the backup data from the last backup before upgrading.But downgrading after installing iOS9 or watchOS 2 is not recommended. It can work on the phone but as some iOS upgrades also update the firmware for cellular connections you can have many problems after a downgrade. For watchOS 2 a downgrade is not possible.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I also have this same issue. From what i can remember (only 2 weeks ago) i had this also on the day i got my watch, it looks like there are some background processes running wich could cause this.I found some Threats on the web wich said u need to reset the Network settings on your iphone (did this) and setup your watch as a new one instead of putting back the backup. Most users report bettter battery at day 2. I will let u know how mine is reacting today!
Topic:
App & System Services
SubTopic:
Core OS
Tags:
from the Keynote…it works on:iPad AiriPad Air 2iPad mini 2iPad mini 3& 'SplitView' is just on iPad Air 2…
Topic:
App & System Services
SubTopic:
Core OS
Tags:
That is what I'll try at first. We'll see what the bridging brings with the new Xcode 7 and Swift 2. I never tried it with earlier versions but it didn't look to be very seamless.Thanks/Peter
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Tried the Start Up Disk options right from the start, hence the thread topic name. Neigher of two backup ones work. Each ends up in the same 10.11 system.Running the disk command in terminal yielded: No CoreStorage logical volume groups found.Yosemite started out as a terrible release and so far 10.11 is similar.
Topic:
App & System Services
SubTopic:
Core OS
Tags: