Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

167,665 results found

Post

Replies

Boosts

Views

Activity

Swift 2 CFType Conversion
In Swift 1.2 I had a C function with the following signature:__nonnull CFArrayRef FDCreateSupportedAudioFileExtensions() CF_RETURNS_RETAINED;I know that this function returns an array of CFStringRef instances, so I called it from Swift like this:let supportedAudioTypes = FDCreateSupportedAudioFileExtensions() as! [String]and everything worked as expected. However, in Swift 2 this code fails at runtime due to the forced cast (EXC_BAD_INSTRUCTION). I'm able to get things working with the following:let supportedAudioTypes = FDCreateSupportedAudioFileExtensions() as NSArray as! [String]I'm unsure what changed from Swift 1.2 to 2.0. Is this a bug in the current version of Swift or have I missed something? Everything I've read implies that CFTypes are toll-free bridged to their Swift counterparts so I'm not sure why what used to work is now failing.
6
0
998
Aug ’15
Conflict between 2 network extensions/ 2 transparent proxies
We have a problem when another solution uses a transparent proxy or an app proxy provider. (Network Extension OTHER). When this solution is installed (Network Extension OTHER) we will exclusively receive in our network extension (Network Extension AAA) all the connections from the mentioned network extension (no flow received from browsers or other applications; this is a normal behaviour if the mentioned solution received the connections first). In our network extension we redirect all the connections for all monitored apps. If we monitor the mentioned solution we will intercept all connections from the VPN (from Network Extension OTHER), but these connections will be redirected to our local proxy. In our local proxy we will analyze the traffic and one connection will be created from our local proxy to the server, intercepted again by the mentioned third party solution (infinite loop). If the vpn solution uses NETransparentProxyProvider, they can ignore our local proxy process to not monitor again the flow a
4
0
1.4k
Oct ’21
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
Bad Code
Hello: I have the code below to try to get a random selection from CoreData store. However i'm getting a crash on line 33 with the error:Thread 1: EXC_BAD_ACCESS (code=1, address=0x232). After studying the code for hours, I still can't figure out why the crash. The code actually worked one time!!!let fetchRequest = NSFetchRequest(entityName: TempSCQ) fetchRequest.includesPropertyValues = false var selector = Int() nameGrade = gradeValue.stringValue print (Grade entered is (nameGrade)) func getRandomRecord () { if nameGrade == 2 { selector = Int.random(in: 0 ..< 355) } else if nameGrade == 4 { selector = Int.random(in: 0 ..< 418) } else if nameGrade == 6 { selector = Int.random(in: 0 ..< 375) } else if nameGrade == 8 { selector = Int.random(in: 0 ..< 813) } else if nameGrade == 12 { selector = Int.random(in: 0 ..< 355) } } getRandomRecord() fetchRequest.predicate = NSPredicate(format: qid == %@, selector) //Thread 1: EXC_BAD_ACCESS (code=1, a
2
0
813
Dec ’19
Optimal way to merge 2 apps
Searching for insight on the best and most compliant way to essentially merge two apps. They have the same functionality but one is much more advanced than the other, although the legacy app has a higher user count. Instead of letting both run, we want to push the legacy app an update with the code from the new app and ultimately kill the newer one. What is the best way to do this? Is it allowed to simply push the source code from new app to legacy and update the identifier? We do not wan't to break any app store rules and want to limit the potential of losing users by forcing them to download a new app.
2
0
1.4k
Dec ’23
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
COMPARING 2 STRINGS
I am trying to compare two strings and then do something. The first string is a string that is captured in UITextView using the following code:********************************** func updateIncomingData () { NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: Notify), object: nil , queue: nil) { notification in let appendString = n let myFont = UIFont(name: Helvetica Neue, size: 30.0) let myAttributes2 = [NSFontAttributeName: myFont!, NSForegroundColorAttributeName: UIColor.red] let attribString = NSAttributedString(string: + (characteristicASCIIValue as String) + appendString, attributes: myAttributes2) let newAsciiText = NSMutableAttributedString(attributedString: self.consoleAsciiText!) self.password_P_F.attributedText = NSAttributedString(string: characteristicASCIIValue as String , attributes: myAttributes2) newAsciiText.append(attribString) self.consoleAsciiText = newAsciiText self.password_P_F.attributedText = self.consoleAsciiText let pwmatch:String = The p
2
0
602
Sep ’17
Reply to background moving
i changed my code now my code is this var background = SKSpriteNode() var background2 = SKSpriteNode() override func didMove(to view: SKView) { background = SKSpriteNode(imageNamed: New_Background) background.position = CGPoint(x: 0, y:0) background.zPosition = -2 / background.size = CGSize(width:self.frame.size.width*2,height:self.frame.size.height*2) background2 = SKSpriteNode(imageNamed: New_Background) background2.position = CGPoint(x: 0, y:0) / background2.zPosition = -2 background2.size = CGSize(width:self.frame.size.width*2,height:self.frame.size.height*2) self.addChild(background) self.addChild(background2) self.addChild(background3) vitesse = SKAction.repeatForever(SKAction.move(by: CGVector(dx: -self.frame.size.width, dy: 0), duration: 2)) background.run(vitesse) background2.run(vitesse) } override func update(_ currentTime: TimeInterval) { / if background.position.x <= -self.frame.size.width { background.position.x
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Mar ’18
apple two factor authentication
i went into an apple store back in 2014 and long story short, the apple guy tried to help me by setting my two factor authentication number to one of the demo phones at the store. no idea why he suggested that but it ended up using that phone number as my two factor authentication phone number and i have no idea what it is... im trying to access that email and I guess my question is, who do I contact to reset the two factor authentication? It's acting like the phone number is the only option but there has to be another way.
1
0
322
Feb ’22
Installing beta 2?
I clicked on the update for b2, which took me to the iTunes page to redeem the code, which I did.A few minutes later it brought the installer up. I quit out of the installer as I was in the midst of other work, but when I went back to install the update, it just reinstalled beta1.When I go back to the download page and reenter my download code, it says it's already been redeemed.Why is this so hard to download? I have 3 test machines I want to upgrade, and I'm at a loss of how to download the latest.Would love any insight.- wave
7
0
1.5k
Jul ’16
Reply to Conversion from Swift2 to Swift3
Your working Swift 2 Code Block has so many flaws and cannot be compiled with Swift 2. Please try to show us an actually buildable (or testable) Swift 2 code.Without proper info provided, we need huge amount of guesses to fix your issue.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’16
Swift 2 CFType Conversion
In Swift 1.2 I had a C function with the following signature:__nonnull CFArrayRef FDCreateSupportedAudioFileExtensions() CF_RETURNS_RETAINED;I know that this function returns an array of CFStringRef instances, so I called it from Swift like this:let supportedAudioTypes = FDCreateSupportedAudioFileExtensions() as! [String]and everything worked as expected. However, in Swift 2 this code fails at runtime due to the forced cast (EXC_BAD_INSTRUCTION). I'm able to get things working with the following:let supportedAudioTypes = FDCreateSupportedAudioFileExtensions() as NSArray as! [String]I'm unsure what changed from Swift 1.2 to 2.0. Is this a bug in the current version of Swift or have I missed something? Everything I've read implies that CFTypes are toll-free bridged to their Swift counterparts so I'm not sure why what used to work is now failing.
Replies
6
Boosts
0
Views
998
Activity
Aug ’15
Conflict between 2 network extensions/ 2 transparent proxies
We have a problem when another solution uses a transparent proxy or an app proxy provider. (Network Extension OTHER). When this solution is installed (Network Extension OTHER) we will exclusively receive in our network extension (Network Extension AAA) all the connections from the mentioned network extension (no flow received from browsers or other applications; this is a normal behaviour if the mentioned solution received the connections first). In our network extension we redirect all the connections for all monitored apps. If we monitor the mentioned solution we will intercept all connections from the VPN (from Network Extension OTHER), but these connections will be redirected to our local proxy. In our local proxy we will analyze the traffic and one connection will be created from our local proxy to the server, intercepted again by the mentioned third party solution (infinite loop). If the vpn solution uses NETransparentProxyProvider, they can ignore our local proxy process to not monitor again the flow a
Replies
4
Boosts
0
Views
1.4k
Activity
Oct ’21
iOS 10 beta 2
Any ideas when beta 2 will be released?
Replies
73
Boosts
0
Views
43k
Activity
Jun ’16
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
beta 10 versions 2?
Where can I find and download beta 10 version 2?
Replies
5
Boosts
0
Views
355
Activity
Jul ’16
Bad Code
Hello: I have the code below to try to get a random selection from CoreData store. However i'm getting a crash on line 33 with the error:Thread 1: EXC_BAD_ACCESS (code=1, address=0x232). After studying the code for hours, I still can't figure out why the crash. The code actually worked one time!!!let fetchRequest = NSFetchRequest(entityName: TempSCQ) fetchRequest.includesPropertyValues = false var selector = Int() nameGrade = gradeValue.stringValue print (Grade entered is (nameGrade)) func getRandomRecord () { if nameGrade == 2 { selector = Int.random(in: 0 ..< 355) } else if nameGrade == 4 { selector = Int.random(in: 0 ..< 418) } else if nameGrade == 6 { selector = Int.random(in: 0 ..< 375) } else if nameGrade == 8 { selector = Int.random(in: 0 ..< 813) } else if nameGrade == 12 { selector = Int.random(in: 0 ..< 355) } } getRandomRecord() fetchRequest.predicate = NSPredicate(format: qid == %@, selector) //Thread 1: EXC_BAD_ACCESS (code=1, a
Replies
2
Boosts
0
Views
813
Activity
Dec ’19
Optimal way to merge 2 apps
Searching for insight on the best and most compliant way to essentially merge two apps. They have the same functionality but one is much more advanced than the other, although the legacy app has a higher user count. Instead of letting both run, we want to push the legacy app an update with the code from the new app and ultimately kill the newer one. What is the best way to do this? Is it allowed to simply push the source code from new app to legacy and update the identifier? We do not wan't to break any app store rules and want to limit the potential of losing users by forcing them to download a new app.
Replies
2
Boosts
0
Views
1.4k
Activity
Dec ’23
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
iOS 9 beta 2
When beta 2 is released, where do I go to download it?
Replies
4
Boosts
0
Views
837
Activity
Jun ’15
COMPARING 2 STRINGS
I am trying to compare two strings and then do something. The first string is a string that is captured in UITextView using the following code:********************************** func updateIncomingData () { NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: Notify), object: nil , queue: nil) { notification in let appendString = n let myFont = UIFont(name: Helvetica Neue, size: 30.0) let myAttributes2 = [NSFontAttributeName: myFont!, NSForegroundColorAttributeName: UIColor.red] let attribString = NSAttributedString(string: + (characteristicASCIIValue as String) + appendString, attributes: myAttributes2) let newAsciiText = NSMutableAttributedString(attributedString: self.consoleAsciiText!) self.password_P_F.attributedText = NSAttributedString(string: characteristicASCIIValue as String , attributes: myAttributes2) newAsciiText.append(attribString) self.consoleAsciiText = newAsciiText self.password_P_F.attributedText = self.consoleAsciiText let pwmatch:String = The p
Replies
2
Boosts
0
Views
602
Activity
Sep ’17
Reply to How to solve the error: Type '()' cannot conform to 'View' when the problem is inside "if"
I don't understand your question. Please show the code. Of course you can call a func in an if: struct ContentView: View { let un = 1 let deux = 2 func one() -> some View { Text(One) } func two() -> some View { Text(Two) } var body: some View { if un > deux { one() } else { two() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to background moving
i changed my code now my code is this var background = SKSpriteNode() var background2 = SKSpriteNode() override func didMove(to view: SKView) { background = SKSpriteNode(imageNamed: New_Background) background.position = CGPoint(x: 0, y:0) background.zPosition = -2 / background.size = CGSize(width:self.frame.size.width*2,height:self.frame.size.height*2) background2 = SKSpriteNode(imageNamed: New_Background) background2.position = CGPoint(x: 0, y:0) / background2.zPosition = -2 background2.size = CGSize(width:self.frame.size.width*2,height:self.frame.size.height*2) self.addChild(background) self.addChild(background2) self.addChild(background3) vitesse = SKAction.repeatForever(SKAction.move(by: CGVector(dx: -self.frame.size.width, dy: 0), duration: 2)) background.run(vitesse) background2.run(vitesse) } override func update(_ currentTime: TimeInterval) { / if background.position.x <= -self.frame.size.width { background.position.x
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Mar ’18
apple two factor authentication
i went into an apple store back in 2014 and long story short, the apple guy tried to help me by setting my two factor authentication number to one of the demo phones at the store. no idea why he suggested that but it ended up using that phone number as my two factor authentication phone number and i have no idea what it is... im trying to access that email and I guess my question is, who do I contact to reset the two factor authentication? It's acting like the phone number is the only option but there has to be another way.
Replies
1
Boosts
0
Views
322
Activity
Feb ’22
Installing beta 2?
I clicked on the update for b2, which took me to the iTunes page to redeem the code, which I did.A few minutes later it brought the installer up. I quit out of the installer as I was in the midst of other work, but when I went back to install the update, it just reinstalled beta1.When I go back to the download page and reenter my download code, it says it's already been redeemed.Why is this so hard to download? I have 3 test machines I want to upgrade, and I'm at a loss of how to download the latest.Would love any insight.- wave
Replies
7
Boosts
0
Views
1.5k
Activity
Jul ’16