Search results for

Swift 6

49,207 results found

Post

Replies

Boosts

Views

Activity

AppleWatch (watchOS2b1) looses pairing iPhone6+ (iOS9b1)
Dear all,I've installed sucessfully watchIS2b1 and iOS9b1 (iPhone 6+) and get both devices paird.After a while (5-7h) the Apple Watch shows the red disconnected Symbol (even when the Phone is about 30cm away) and I can't re-pair :-) them.Even when I reboot the Apple Watch they will pair again.Anybody knows about that? Is it a bug or just a setting-problem?best regardsSebastian
2
0
312
Jun ’15
ld: warning: directory not found
After upgrading an existing swift project I am seeing the following warning when it builds the tests:ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks'That directory does not exist.. should it be looking for SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks?Is this something that needs fixing within my project files/build settings/etc?
10
0
23k
Jun ’15
Swift build error: "SIL verification failed: non-generic function definitions cannot have context archetypes"
I'm getting the following error while compiling a generic class. Can anyone tell me what I'm doing wrong?SIL verification failed: non-generic function definitions cannot have context archetypes: !FTy->isPolymorphic() In function: / sil shared [transparent] [thunk] @_TTRGRq_8RealmKit18IdentifiableStruct_XFo_dV10ObjectiveC8ObjCBool_dT__XFo_dSb_dT__ : $@convention(thin) <τ_0_0 where τ_0_0 : IdentifiableStruct> (Bool, @owned @callee_owned (ObjCBool) -> ()) -> () { bb0(%0 : $Bool, %1 : $@callee_owned (ObjCBool) -> ()): / %2 = function_ref @_TF10ObjectiveC22_convertBoolToObjCBoolFSbVS_8ObjCBool : $@convention(thin) (Bool) -> ObjCBool / %3 = apply %2(%0) : $@convention(thin) (Bool) -> ObjCBool / %4 = apply %1(%3) : $@callee_owned (ObjCBool) -> () / return %4 : $() / } 0 swift 0x0000000107ae3e0b llvm::sys::PrintStackTrace(__sFILE*) + 43 1 swift 0x0000000107ae454b SignalHandler(int) + 379 2 libsystem_platform.dylib 0x00007fff93ae3f1a _sigtramp + 26 3 libsystem_platform.dyli
1
0
697
Jun ’15
session.dataTaskWithRequest wrong URL
hi,I'm converting my app to Swift 2. I found something different in session.dataTaskWithRequest. In the code below I use an HTTP URL to post the request. But this is somewhere converted to a HTTPS URL. So the server isn't reachable because the server don't use SSL? Why is this happening? Could I change this to HTTP anyway? func post(params : NSDictionary, url : String, postCompleted : (succeeded: Bool, msg: String, json: NSDictionary?) -> ()) { let request = NSMutableURLRequest(URL: NSURL(string: url)!) let session = NSURLSession.sharedSession() request.HTTPMethod = POST do { request.HTTPBody = try NSJSONSerialization.dataWithJSONObject(params, options: []) } catch let error as NSError { print(Error in request post: (error)) request.HTTPBody = nil } catch { print(Catch all error: (error)) } request.addValue(application/json, forHTTPHeaderField: Content-Type) request.addValue(application/json, forHTTPHeaderField: Accept) let task = session.dataTaskWithRequest(request, completionHandler: {data, resp
2
0
1.5k
Jun ’15
NSScrollview not scrolling
I am attempting to implement an NSScollview for a Mac app. I have created a simple test app. In the IB, I just create a view controller with its view set to an NSScrollview.In the viewDidLoad, I have just this code:- (void)viewDidLoad { [super viewDidLoad]; NSImage * image = [NSImage imageNamed:@harley-davidson-electra-glide-6]; NSImageView *imageView = [[NSImageView alloc]initWithFrame:CGRectMake(0, 0, image.size.width, image.size.height)]; imageView.image = image; [self.scrollView setDocumentView:imageView];}Note that the image size is:(width = 1920, height = 1200)When I run this I get a window which shows just a small portion of the image. For a half-second, a horizontal scrollbar appears, then disappears; however, there is no scrolling capability. I can click and drag anywhere in the window and nothing happens.
6
0
2.1k
Jun ’15
Reply to iOS 9 Beta battery life
I disabled mobile data completely and enabled power saving mode and Wi-Fi and the battery drainage/leaking stopped completely for me. I am testing iOS 9 beta 1 on my iPhone 6. Now it's been in standby mode that way for 1 hour and 14 minutes and have dropped only 1 %. I've already reported it to Apple.Any one else that can try the same thing on their devices?Cheers!
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to Swift and Mathematics
Swift and math are just fine. Your expectations on how the syntax should look may be throwing you off but once you get past using, for example, pow instead of ^, it becomes much easier. You'll discover any number of libraries and utilities such as Accelerate and CoreGraphics that not only support mathematical expression and problem solving but make them fun!
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to iOS 9 Beta battery life
Yes, I am going to charge it to 100% now and enable 2G and see what happens with it. Seems like it has something to do with mobile data enabled and maybe the 3G/4G? Or just having mobile data enabled at all.. At least on my iPhone 6 128GB.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to Swift 1.2 and Swift 2 in the same project?
There is always a penalty for using bleeding edge stuff. In the case of Swift, there has been significant penalties for early adopters as people have already discovered.From my understanding, people who have deployed Swift 1.x apps before will be forced to update to Swift 2 if they want to target anything specific to iOS 9 or OS X 10.11 (assuming those SDKs will not be available for Swift 1.x on Xcode 6 at least officially). Otherwise, it is safer to stay with Swift 1.x on Xcode 6 for now (and even more safer if you had not adopted Swift at all so you can target latest APIs in Xcode 7 without penalties).They have not officially confirmed yet which older iOS or OS X versions will be (and not be) supported for Swift 2. So, I am not sure how one can make a safe and informed decision on a migration path for a significant project using Swift.What is your compelling use case that requires you to convert an existing project to Swift
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15