Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

165,591 results found

Post

Replies

Boosts

Views

Activity

TextKit 2 Demo Question
Hi there, I have a small question regards to the TextKit 2 demo app: In macOS / TextDocumentView.swift / viewportBounds(for:) / Line 106 , why compare overdrawRect.minY with max(visibleRect.minY, 0)? Isn’t overdrawRect.minY always the smaller one (as it’s an overdraw rect)? Another question would be, if I'm planning to start working on an application with complex text editing features, would you recommend using NSTextView for now and wait for further updates, or just use the TextKit 2 stack (with CALayers) like the one used in the demo? I really love TextKit 2 and so far the demo seems pretty performant. But I don't know if there is any drawbacks if I build a TextKit 2 stack on my own so I'm looking forward to your advice. Many thanks
0
0
1.1k
Dec ’21
Getting two commands from control center
Hi,It seems that when I press next on control center when playing something, my code gets called on twice instead of once, using MPRemoteCommandCenter.The two calls:1. nextTrackCommand2. seekForwardCommandBoth functions are enabled, but it doesn't make sense that both get called upon tapping the next button once.I've linked bellow to an example project that demonstrates this issue.https://github.com/gerbil802/MPRemoteCommandCenterProblem
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
1k
Sep ’18
AVCaptureFileOutputRecordingDelegate not writing to file, Swift 2
My view controller contains a preview layer, which projects the image from my camera live. When pressing and holding a button, my code is supposed to record a video, and write it to a temporary file locally. This worked well with Swift 1.2 and Xcode 6, but stopped working after I converted the code to Swift 2 when updating to Xcode 7. When I let go of the button, the captureOutput doesn´t get called, and there is no file written to the given path.The relevent code lies here: http://stackoverflow.com/questions/34030277/avcapturefileoutputrecordingdelegate-not-writing-to-file-swift-2 (I couldn't figure out how to paste it here smoothly).I would appreciate any help!
2
0
509
Dec ’15
Reply to Where's my code?
I built a screen with two buttons in Swift. Do you mean you created 2 buttons in the storyboard ? . But where is the source code? To start with, you will not see any code when you create buttons (or objects) in Interface builder. What you do next usually: display the code of the view controller and the storyboard control drag from the button to the code to create an IBAction you will write the code to execute when tapping the button here if you need to access the button itself, control drag again to create an IBOutlet Note: you should study Intro to App development with Swift in Apple Books to learn the basics.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
IOS10 Beta 2
Hey there, I am running IOS10 Beta 1 on my iPhone 6 and I was reading somewhere that all I need to so is go into software update and just click download and install. So I went into software update and I saw the IOS 10 Beta 2 update. So I clicked download and install, the terms and conditions came up as normal, then it went into requesting update. About 20ish seconds later it comes up with Update failed with the options settings or close. Is there a way around this? Thanks!
2
0
729
Jul ’16
Xcode 8 can't archive “Command /usr/bin/codesign failed with exit code 1” part 2
I continue to have the problem that Geezus wrote about here:https://forums.developer.apple.com/message/178039#178039And although part of the problem is resolved by KMT's suggestion toTry:execute xattr -rc . both in DerivedData directory and Project directoryThat workaround only works for me when I'm building for a simulator or attached device.But when I try to Archive so I can load to TestFlight/iTunes Conect, the origianl problem persists:resource fork, Finder information, or similar detritus not allowedCommand /usr/bin/codesign failed with exit code 1I understand the original thread is closed, but since I'm still having trouble, I hope someone can offer additional help.
10
0
4.5k
Sep ’16
Two versions of ViewController?
Hello,I am working my way through the Apple tutorial, Food Tracker.https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/ConnectTheUIToCode.html#//apple_ref/doc/uid/TP40015214-CH22-SW1I ran into an error while attempting to create Outlets. i.e. the app would no longer run in the simulatorIt was easy enough to delete the elements on the interface and start over.I am trying to take my time, do every step just as instructed, etc. I am confused by one view I stumble across. It appears like there are two different versions of ViewController. On the left-hand selecting ViewController.swift from the navigator, I see// // // // // // // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } }When I select the Assistant Editor, on the right I see// // // // // // // import UIKit internal class ViewController : UIViewController { override inter
2
0
604
Oct ’17
Bluetooth CBPeripheralManager has two identical service
I user the code [_peripheralManager stopAdvertising]; [_peripheralManager removeAllServices]; .................................................................... _service = [[CBMutableService alloc]initWithType:[CBUUID UUIDWithString:KServiceUUID] primary:YES]; [_service setCharacteristics:@[readwriteCharacteristic, notiyCharacteristic]]; [_peripheralManager addService:_service]; [_peripheralManager startAdvertising:@{ CBAdvertisementDataServiceUUIDsKey :@[[CBUUID UUIDWithString:advId]], CBAdvertisementDataLocalNameKey : KLocalName, }]; sometimes has has two identical service One of them cannot work, _peripheralManager removeService does not work why? How do I delete that that can t work? thanks
0
0
394
Aug ’22
Predictive Code Completion
In Xcode16Beta4, it contains Predictive Code Completion, and Predictive Code Completion is also with other SDKs in the page opened by Xcode for the first time. Waiting for download. However, I want to know: 1. What is Predictive Code Completion? 2. I didn't download Predictive Code Completion on the SDK download page when I first opened Xcode. Where should I download it later?
1
0
1.5k
Jul ’24
Reply to Rookie Question about SpriteKit Wizard in Swift
I don't know the answer for sure, but the code as originally written is slightly more subtle than your re-writes. There are 3 possible cases:1. a SKView2. a NSView that is not a SKView3. nilThe original code will crash deliberately on case 2 (which is a mis-configured storyboard, in effect), and branch on the difference between 1 and 3. Your 1st rewrite branches on 2 and 3, and your second rewrite crashes on 2 and 3.In any actual use case, where you have direct control over the storyboard, you can probably customize the code to require a top-level SKView (or subclass), in which case your second rewrite may well be sufficient, and less confusing to future readers of the code.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’17
TextKit 2 Demo Question
Hi there, I have a small question regards to the TextKit 2 demo app: In macOS / TextDocumentView.swift / viewportBounds(for:) / Line 106 , why compare overdrawRect.minY with max(visibleRect.minY, 0)? Isn’t overdrawRect.minY always the smaller one (as it’s an overdraw rect)? Another question would be, if I'm planning to start working on an application with complex text editing features, would you recommend using NSTextView for now and wait for further updates, or just use the TextKit 2 stack (with CALayers) like the one used in the demo? I really love TextKit 2 and so far the demo seems pretty performant. But I don't know if there is any drawbacks if I build a TextKit 2 stack on my own so I'm looking forward to your advice. Many thanks
Replies
0
Boosts
0
Views
1.1k
Activity
Dec ’21
Getting two commands from control center
Hi,It seems that when I press next on control center when playing something, my code gets called on twice instead of once, using MPRemoteCommandCenter.The two calls:1. nextTrackCommand2. seekForwardCommandBoth functions are enabled, but it doesn't make sense that both get called upon tapping the next button once.I've linked bellow to an example project that demonstrates this issue.https://github.com/gerbil802/MPRemoteCommandCenterProblem
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
1k
Activity
Sep ’18
AVCaptureFileOutputRecordingDelegate not writing to file, Swift 2
My view controller contains a preview layer, which projects the image from my camera live. When pressing and holding a button, my code is supposed to record a video, and write it to a temporary file locally. This worked well with Swift 1.2 and Xcode 6, but stopped working after I converted the code to Swift 2 when updating to Xcode 7. When I let go of the button, the captureOutput doesn´t get called, and there is no file written to the given path.The relevent code lies here: http://stackoverflow.com/questions/34030277/avcapturefileoutputrecordingdelegate-not-writing-to-file-swift-2 (I couldn't figure out how to paste it here smoothly).I would appreciate any help!
Replies
2
Boosts
0
Views
509
Activity
Dec ’15
Reply to Where's my code?
I built a screen with two buttons in Swift. Do you mean you created 2 buttons in the storyboard ? . But where is the source code? To start with, you will not see any code when you create buttons (or objects) in Interface builder. What you do next usually: display the code of the view controller and the storyboard control drag from the button to the code to create an IBAction you will write the code to execute when tapping the button here if you need to access the button itself, control drag again to create an IBOutlet Note: you should study Intro to App development with Swift in Apple Books to learn the basics.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
IOS10 Beta 2
Hey there, I am running IOS10 Beta 1 on my iPhone 6 and I was reading somewhere that all I need to so is go into software update and just click download and install. So I went into software update and I saw the IOS 10 Beta 2 update. So I clicked download and install, the terms and conditions came up as normal, then it went into requesting update. About 20ish seconds later it comes up with Update failed with the options settings or close. Is there a way around this? Thanks!
Replies
2
Boosts
0
Views
729
Activity
Jul ’16
Xcode 8 can't archive “Command /usr/bin/codesign failed with exit code 1” part 2
I continue to have the problem that Geezus wrote about here:https://forums.developer.apple.com/message/178039#178039And although part of the problem is resolved by KMT's suggestion toTry:execute xattr -rc . both in DerivedData directory and Project directoryThat workaround only works for me when I'm building for a simulator or attached device.But when I try to Archive so I can load to TestFlight/iTunes Conect, the origianl problem persists:resource fork, Finder information, or similar detritus not allowedCommand /usr/bin/codesign failed with exit code 1I understand the original thread is closed, but since I'm still having trouble, I hope someone can offer additional help.
Replies
10
Boosts
0
Views
4.5k
Activity
Sep ’16
Two versions of ViewController?
Hello,I am working my way through the Apple tutorial, Food Tracker.https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/ConnectTheUIToCode.html#//apple_ref/doc/uid/TP40015214-CH22-SW1I ran into an error while attempting to create Outlets. i.e. the app would no longer run in the simulatorIt was easy enough to delete the elements on the interface and start over.I am trying to take my time, do every step just as instructed, etc. I am confused by one view I stumble across. It appears like there are two different versions of ViewController. On the left-hand selecting ViewController.swift from the navigator, I see// // // // // // // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } }When I select the Assistant Editor, on the right I see// // // // // // // import UIKit internal class ViewController : UIViewController { override inter
Replies
2
Boosts
0
Views
604
Activity
Oct ’17
Bluetooth CBPeripheralManager has two identical service
I user the code [_peripheralManager stopAdvertising]; [_peripheralManager removeAllServices]; .................................................................... _service = [[CBMutableService alloc]initWithType:[CBUUID UUIDWithString:KServiceUUID] primary:YES]; [_service setCharacteristics:@[readwriteCharacteristic, notiyCharacteristic]]; [_peripheralManager addService:_service]; [_peripheralManager startAdvertising:@{ CBAdvertisementDataServiceUUIDsKey :@[[CBUUID UUIDWithString:advId]], CBAdvertisementDataLocalNameKey : KLocalName, }]; sometimes has has two identical service One of them cannot work, _peripheralManager removeService does not work why? How do I delete that that can t work? thanks
Replies
0
Boosts
0
Views
394
Activity
Aug ’22
Predictive Code Completion
In Xcode16Beta4, it contains Predictive Code Completion, and Predictive Code Completion is also with other SDKs in the page opened by Xcode for the first time. Waiting for download. However, I want to know: 1. What is Predictive Code Completion? 2. I didn't download Predictive Code Completion on the SDK download page when I first opened Xcode. Where should I download it later?
Replies
1
Boosts
0
Views
1.5k
Activity
Jul ’24
Reply to Rookie Question about SpriteKit Wizard in Swift
I don't know the answer for sure, but the code as originally written is slightly more subtle than your re-writes. There are 3 possible cases:1. a SKView2. a NSView that is not a SKView3. nilThe original code will crash deliberately on case 2 (which is a mis-configured storyboard, in effect), and branch on the difference between 1 and 3. Your 1st rewrite branches on 2 and 3, and your second rewrite crashes on 2 and 3.In any actual use case, where you have direct control over the storyboard, you can probably customize the code to require a top-level SKView (or subclass), in which case your second rewrite may well be sufficient, and less confusing to future readers of the code.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’17