Search results for

file uri scheme

78,592 results found

Post

Replies

Boosts

Views

Activity

Reply to UIToolbar and adaptive layout advice?
That's an interesting issue and there currently is no built-in mechanuism to automatically handle it. I'd suggest filing an enhancement request.In the meanwhile, you'll need to listen for the trait collection changes and rework your toolbar layout in response. I'd suggest moving the excess buttons into a popover, while is presented from a More button, when in the compact environment.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’15
HKWorkoutSession and keeping the app in the foreground
Hi eveyrone,Does anyone have the HKWorkoutSession working to keep a watch app runnning int he foreground? I have a session starting, and the HKWorkoutSessionDelegate that I have implemented with didChangeToState is returning a state of Running. I am not getting any errors in the other functions implemented (startWorkoutSession success == true and error == nil, didFailWithError does not fire). But alas, about 2 minutes into not using mt watch, the screen comes up to the normal watchface, not my application.Any thoughts? Not sure if its time to file a bug report as I am very much a newbie to all of this (learning xcode and swift with these betas, never know when it is my fault or if its really a bug, cause I don't know what I'm doing...) 🙂
4
0
1.1k
Jun ’15
Reply to No Audio
i placed a wkinterfacemovie in storyboard and set an outlet to the interface file, this worked for me in willActivate():let url = NSBundle.mainBundle().URLForResource(song, withExtension: mp3)myMoviePlayer.setMovieURL(url!)
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to Programmatically adding XIB
Do you have sufficient constraints to specify the horizontal and vertical size and position of all your views? For first, for example, I don't see anything specifying horizontal position. Or inside either for that matter. And I don't see any constraints at all on the view you're attempting to add as a subview of your builder UIView. Are there auto layout warnings in the console output?The only thing the XIB loading does is instantiate subviews and connect up any outlets (assuming you have the File's Owner and outlets set up properly). The positioning and sizing of the view is up to the superview.
Jun ’15
Reply to SKAudioNode init(URL:) need help
Replying to myself,If I init the node just as above and instead of running the action SKAction.play() I run the action SKAction.playSoundFileNamed(, waitForCompletion: false) i.e. leaving the name of the sound file empty it works. At least plays the sound. Have yet to test if it actually does the 3D effects.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Jun ’15
Reply to Realtime audio processing within an AVAudioEngine
While there is no there is no “realtime tap” currently in AVAudioEngine, one way you may want to go about tacking this is by writing your own effect v3 AudioUnit (Audio Unit Extensions) and then inserting that into the engine.The idea would be to create and publish the AudioUnit as an effect, then create an instance of it in AVAudioEngine using a new iOS 9 AVAudioUnit method:+ (void)instantiateWithComponentDescription:(AudioComponentDescription)audioComponentDescription options:(AudioComponentInstantiationOptions)options completionHandler:(void (^)(__kindof AVAudioUnit * __nullable audioUnit, NSError * __nullable error))completionHandler NS_AVAILABLE(10_11, 9_0);Of course this is more work than just having an AVAudioEngine provided realtime processing tap, so please file an enhancement request for that feature https://bugreport.apple.com/Audio Unit Extensions were discussed at WWDC 2015 and are going to provide a very powerful way to to extend audio processing on iOS 9 (AU components have of course b
Topic: Media Technologies SubTopic: Audio Tags:
Jun ’15
Reply to iOS 9 Beta battery life
It's a travesty on the whole. Some sort of background operation is chewing through CPU cycles, causing everything from an iPad to an iphone 6 (and Plus) to burn through battery in less than half a day. Sometimes it's drained an iPad Air 2 we have for testing within 3 hours from a full charge with zero on-time. Meaning, the device was in standby for 3 hours from a full charge then basically dead.Beyond this obvious battery problem is another of great concern regarding iCloud backups. MASSIVE storage loss on our iCloud accounts for test devices. One account has over 500 GB of the entire 1 TB available allocated to Backups and yet when you actually look at the list of backups there are only two devices with less than 20 GB in size each. Where is the rest of the storage going? More transparency for iCloud relative to backups should be made available especially when this is crippling development. We can't do anything to delete the data and have no eta on when this will be resolved, or if it will impact any pre-exi
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Playground running for ever in Xcode 7 PreRelease
Hi. I'm trying to test Swift 2.0 code in Xcode 7 but Playground doesn't show the output. It worked for a few hours and now is not working anymore. I rebooted, reinstalled Xcode, created new files and there is no way I can make it work again. I noticed that the problem started when I was testing classes from UIKit, but probably that was a coincidence because now I can't even create a variable. As soon as I hit enter, the wheel starts running and never stops (even on an empty file).Hope Apple do something about it soon, because is not possible to test Swift 2.0.Thanks
3
0
5.5k
Jun ’15
Xcode 7 beta: error while importing XCTest
I'm trying to build an existing project with Xcode 7 beta (7A120f) and my unit tests target fails to build.Here's the error message:While building module 'XCTest' imported from /Users/maksym.grebenets/Projects/ffx/ci-workspace/mobile-lib-fmcore/FMCoreTests/FMDispatchTests.m:5: In file included from <module-includes>:1: In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h:32: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestDefines.h:51:6: error: '__OBJC_GC__' is not defined, evaluates to 0 [-Werror,-Wundef] #if !__OBJC_GC__ && __OBJC2__ ^ 1 error generated. /Users/maksym.grebenets/Projects/ffx/ci-workspace/mobile-lib-fmcore/FMCoreTests/FMDispatchTests.m:5:9: fatal error: could not build module 'XCTest' @import XCTest; ~~~~~~~^~~~~~ 2 errors generated.It doesn't matter for
1
0
2.6k
Jun ’15
Inspect Bridged Signatures
Is there any way to see the translated Swift signature of an Objective-C Class imported via the Bridging Header?So e.g. given the following:// ObjC file SomeObjCClass.h @interface SomeObjCClass : NSObject - (NSString *)giveMeAStringForKey:(NSString *)key; @end // Bridging Header #import SomeObjCClass.hSwift sees this somewhat like this:// generated during compile time @objc class SomeObjCClass { func giveMeAStringForKey(key: String!) -> String! }And I'd like to inspect these generated type signatures. Any idea how to do that?
2
0
1.3k
Jun ’15
Reply to How to write a unit test which passes if a function throws?
Here are some XCTest style assertions I wrote for checking for thrown Swift errors. Hopefully by the time Xcode 7 is final, there will be built-in versions of these.// // XCTAssertSwiftError.swift // // Created by LCS on 6/17/15. // Released into public domain; use at your own risk. // import XCTest func XCTempAssertThrowsError(message: String = , file: String = __FILE__, line: UInt = __LINE__, _ block: () throws -> ()) { do { try block() let msg = (message == ) ? Tested block did not throw error as expected. : message XCTFail(msg, file: file, line: line) } catch {} } func XCTempAssertThrowsSpecificError(kind: ErrorType, _ message: String = , file: String = __FILE__, line: UInt = __LINE__, _ block: () throws -> ()) { do { try block() let msg = (message == ) ? Tested block did not throw expected (kind) error. : message XCTFail(msg, file: file, line: line) } catch let error as NSError { let expected = kind as NSError if ((error.domain != expected.domai
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15