Hi All,I have having some issue with using NSURLSession in Xcode7 and Swift2. For some reason I keep getting NSURLErrordomain error but the same codeis working on Xcode6 with swift 1.2.let baseURL = NSURL(string: https://itunes.apple.com/search?term=one%20republic) let downloadTask = session.downloadTaskWithURL(baseURL!, completionHandler: { (location, response, error) -> Void in if(error == nil){ let objectData = NSData(contentsOfURL: location!) let tmpData :NSString = NSString(data: objectData!, encoding: NSUTF8StringEncoding)! print(success) } else { print(Failed) } }) downloadTask!.resume()https://drive.google.com/file/d/0B-bZj242s5iAX2Z0bzVETjE3akk/view?usp=sharingPlease let me know if I am missing something here.
Search results for
file uri scheme
78,591 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
From a Swift perspective, these methods can potentilly return nil because that's how they were declared (as nullable) in the obj-c header.To get an answer about why they were declared that way, you will probably need to get the attention of an Apple engineer that works on GameKit.The Game Center section is probably a better bet https://forums.developer.apple.com/community/graphics-and-games/game-center,or file a bug report about GameKit requesting that the GKPlayer nullability annotations be fixed or the methods be properly documented to explain in what circumstances they might return nil.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
File a radar. I'm sure this isn't intentional behavior, but a side effect of min()/max() being defined as generics, as you suggested. They clearly need to provide an alternate implemenation for floating point types.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
I filed one (18371906) nine months ago, it is one of the few that is still open, hence this thread : ).
Topic:
Programming Languages
SubTopic:
Swift
Tags:
If you're not getting results you expect, please file a bug report and attach a sample project illustrating the issue. If you can post any bug numbers that'll let me track them on our side.
Topic:
App & System Services
SubTopic:
General
Tags:
And now I've filed my own bug report: 21432613
Topic:
Programming Languages
SubTopic:
Swift
Tags:
I wrote an app which handles external storage devices, to work with this devices i create a plist file on the device.My question is, if im allowed (by means of a mac app store review ) to hide this files with a preceding dot to not distract the user.I think it is nice if there isnt an (for most people) unknown file on the device and i think it will reduce the risk of people deleting the file.On the other hand this file will stay there unnoticed even if the user isnt using my app anymore.Typical size will be 1kb...Thanks!
Yes-are you using file vault?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I had the same issue with Xcode 7 beta on my primary Mac (running the current public release of Yosemite). I could fix the issue by checking the Code Sign On Copy box next to the frameworks (in this case, also Sparkle) in the Copy Files build phase.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Sorry, meant to come back to this thread days ago...As others have noted, Swift 2 doesn't seem to support what you want it to do. I see a workaround, though... There's still boilerplate code, but it seems less error-prone to meFirst, we need a way to iterate over the enum cases (and provide their default values):class StoryBookStateGenerator : AnyGenerator<StoryBookState> { var optcase:StoryBookState? = nil override func next() -> Generator.Element? { if let cas = optcase { switch cas { case .Welcome: optcase = .Praise(nil, nil) case .Praise: optcase = .InvitationToRepeat(nil, nil) case .InvitationToRepeat: optcase = .TurnToNextPage(nil) case .TurnToNextPage: optcase = .End case .End: optcase = nil } } else { optcase = .Welcome(nil) } return optcase } }Second, we need a way to parse the source code and extract the case labels. For some reason, I couldn't get String(contentsOfFile) to work. Fortunately, someone on stackoverflow was kind enough to post a class that'll read each line of a file
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Hi All,I've read the other comments but haven't figured this out. Is it possible to play audio to the watch speaker as of beta 1? I can get the mp3 file to tell me I need an external bluetooth speeker on the simulator but my watch just crashes. I just can't figure it out and it looks like others can't fix it either. Then I see a hack for nanoFlappy that plays all audio to the watch speaker...***? I have tried the code on other post but it just doesn't work. So if anyone has code (Swift) that actually works, I would appreciate seeing it...Thanks.
I did try all of the standard methods of troubleshooting, including your suggestion.However, none worked until...I signed out, deleted all iCloud related files including Keychain entries. Voila!
Topic:
App & System Services
SubTopic:
Core OS
Tags:
The On-Demand Resources Guide, Appendix A, says: Files generated by scripting languages can be on-demand resources. Does that mean I can generate ODR data files dynamically using server-side scripts? I see no other hints that this is possible.
HelloYesterday I successfully uploaded a build to iTunes Connect from inside XCode Version 6.3.2 (6D2105), but today, every time I try to upload XCode crashes.I have tried cleaning, rebuilding, restarting my laptop.I am starting to think this is a bug in Xcode or some kind of change between how Xcode & the store interact to upload my build.Has anyone else seen this or something like it?Are there any work arounds to upload a build to the store?Thank youRayCRASH LOG:Process: Xcode [952]Path: /Applications/Xcode.app/Contents/MacOS/XcodeIdentifier: com.apple.dt.XcodeVersion: 6.3.2 (7718)Build Info: IDEFrameworks-7718000000000000~2App Item ID: 497799835App External ID: 812404257Code Type: X86-64 (Native)Parent Process: ??? [1]Responsible: Xcode [952]User ID: 501Date/Time: 2015-06-17 18:34:32.916 -0700OS Version: Mac OS X 10.10.3 (14D136)Report Version: 11Anonymous UUID: 37388F5A-50D7-FA67-C88B-B59927DE7E82Time Awake Since Boot: 620 secondsCrashed Thread: 17 Dispatch queue: NSOperationQueue 0x7fe241ba0b90 :: NS
How do you propose you would get such dynamically generated files into your app bundle, tagged appropriately, and retroactively reviewed, approved and distributed to App Store servers?(In other words: no, it's not possible.)
Topic:
App & System Services
SubTopic:
Core OS
Tags: