Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

163,103 results found

Post

Replies

Boosts

Views

Activity

Error in Swift 2: Overloading a function
Hi there!I am a novice to Swift and Xcode, but know C++.I tried to mimick the code in a Stanford University course for iOS 8 App development (2014-15) using Xcode 7 and swift 2 for the calculator example.In his lecture 2 video on https://www.youtube.com/watch?v=QLJtT7eSykg,the lecturer suggested over loading a function like this (and I think they were using Xcode 6 and an earlier Swift standard):func performOperation(operation: (Double, Double) -> Double) { if operandStack.count >= 2 { displayValue = operation(operandStack.removeLast(), operandStack.removeLast()) enter() } } func performOperation(operation: Double -> Double) { //////////////////////////////// if operandStack.count >= 1 { displayValue = operation(operandStack.removeLast()) enter() } }However, the compiler seems to have problem with this overloading attempt, and the error is:/Users/.../Calculator/ViewController.swift:50:10: Method 'performOperation' with Objective-C selector 'performOperation:' co
1
0
772
Dec ’15
TextKit 2 and SwiftUI
Is it possible to use/draw a SwiftUI view in TextKit 2? The NSTextLayoutManagerDelegate seems to be built around returning a NSTextLayoutFragment. Since NSTextLayoutFragment is a class, I can't subclass it and use SwiftUI. I'd love to create my views using SwiftUI, since it's a lot faster than figuring out CGPaths, pixel perfect anti-aliasing, etc. Thanks!
0
0
1.2k
Sep ’21
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
Reading from a file swift 2
I'm trying to read a file which exist with the below code in Swift 2. It seems to be failing. Appreciate any inputs:let someText = NSString(string:some text)let destinationPath = /users/johnt/myFile.txtvar filemgr = NSFileManager.defaultManager()if filemgr.fileExistsAtPath(destinationPath) { print(File exists) do { let readFile = try String(contentsOfFile: destinationPath, encoding: NSUTF8StringEncoding) // Throws this error// How do I read the file contents from here? print((readFile)) } catch let error as NSError { print(Error: (error.domain)) }} else { print(File does not exist) do { try someText.writeToFile(destinationPath, atomically: true, encoding: NSUTF8StringEncoding) } catch let error as NSError { print(Error: (error.domain)) }}
4
0
14k
Aug ’15
Two Dimensional Village
I have just begun programming Swift, and am a novice, so please bear with me.I would like a basic understanding of how to do the following:Create a two dimensional array where each cell represents an individualRepresent that array graphically so that every pixel represents the person in that cell and the pixel would be pink if the person is female and blue if the person is maleThank you in advance for any and all help!
2
0
312
Dec ’15
Reply to App review rejected for External payment system
You may have some problem implementing your ‘promo code’ system into Apple’s IAP because they don’t want you to ‘sell’ a promo code and use that sale to get around IAP. For example, purchase the IAP for $10 or buy a promo code for $6 and get the same IAP for $2. So you can’t sell or otherwise get value for a promo code. If you tell App Review that you will not sell promo codes they may allow it. To use a promo code just create 2 identical IAP products with different prices. If the user enters the code offer them the lower priced IAP.
Topic: App & System Services SubTopic: StoreKit Tags:
Feb ’19
How to Simulate for iPad Air 2?
I'm learning to develop iOS apps. And I'd like to test it on my iPad Air 2. My Xcode is set up as follows: iOS 13.0 Xcode 12.3 Swift 5.3 My iPad is on iOS Version 14.3. I had my iPad Air 2 set up before, but its simulator disappeared when I upgraded the Xcode version. How do I set up Xcode so I can simulate/run apps on an iPad Air 2? Thank you very much in advance.
0
0
681
Jan ’21
Reply to How do I handle duplicated symbols in a loadable NSBundle/plug-in?
Both targets at the same time want to use TDWUtils symbols for their own purposes The best way to handle this depends on the nature of that code. There are two factors: Is the code large? — If it is, you want to take steps to share it rather than ship two copies. What language is the code written in? — Most notably, Objective-C uses a single namespace for its classes, so you can’t load two copies of a class in the process even if you do manage to avoid linker issues. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’23
Reply to LLDB error: type for self cannot be reconstructed: type for typename
There are 3 projects in a workspace. The main project and two separate projects for two static libraries. Both static libs depend on a framework, a regular framework not a XCFramework. Everything is built from scratch, I own all the source code. The code for the framework is in a swift module. I set DWARF with dSYM on all the three projects, it was DWARF only for the libs, but no luck. I can debug the source code from the main project, it works just fine. However, the two static libraries contain the majority of the functionality and I can't debug it. I was adding logs here and there but it takes a lot of time.
Jan ’25
Connect Two Apps
I wanted to know how would I connect two apps to each other. I am making an app similiar to Uber. An example of what I need help with is in Uber when someone requests a ride that person can see who their driver is and the drivers info on the customer app, and the driver gets the passengers info in the Uber employee app. Even if one person is using an iPhone and the other is using Android.One app is for customers and the other is for employees.
4
0
1.4k
Jul ’18
eGPU Thunderbolt 2 Support
Hi, all, I recently bought an iMac 5K(Late 2015 model) with thunderbolt 2 ports. I was wondering if the eGPU support in high sierra would work on my Mac through a thunderbolt 3 to thunderbolt 2 adapter.
Replies
0
Boosts
0
Views
687
Activity
Sep ’17
Reply to Auto-Renewable subscription with trials or without, depending on user segment
As long as what differentiates users in Segment 1 and Segment 2 is something within the app then it is allowable. If a user gets into Segment 2 by, for example, sending you a check for $10 and getting a special code to unlock access to Segment 2, then no.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jun ’17
Error in Swift 2: Overloading a function
Hi there!I am a novice to Swift and Xcode, but know C++.I tried to mimick the code in a Stanford University course for iOS 8 App development (2014-15) using Xcode 7 and swift 2 for the calculator example.In his lecture 2 video on https://www.youtube.com/watch?v=QLJtT7eSykg,the lecturer suggested over loading a function like this (and I think they were using Xcode 6 and an earlier Swift standard):func performOperation(operation: (Double, Double) -> Double) { if operandStack.count >= 2 { displayValue = operation(operandStack.removeLast(), operandStack.removeLast()) enter() } } func performOperation(operation: Double -> Double) { //////////////////////////////// if operandStack.count >= 1 { displayValue = operation(operandStack.removeLast()) enter() } }However, the compiler seems to have problem with this overloading attempt, and the error is:/Users/.../Calculator/ViewController.swift:50:10: Method 'performOperation' with Objective-C selector 'performOperation:' co
Replies
1
Boosts
0
Views
772
Activity
Dec ’15
TextKit 2 and SwiftUI
Is it possible to use/draw a SwiftUI view in TextKit 2? The NSTextLayoutManagerDelegate seems to be built around returning a NSTextLayoutFragment. Since NSTextLayoutFragment is a class, I can't subclass it and use SwiftUI. I'd love to create my views using SwiftUI, since it's a lot faster than figuring out CGPaths, pixel perfect anti-aliasing, etc. Thanks!
Replies
0
Boosts
0
Views
1.2k
Activity
Sep ’21
is there a combo updater to beta 2?
OR - how can i reinstall the beta 2?
Replies
0
Boosts
0
Views
431
Activity
Feb ’18
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
Reading from a file swift 2
I'm trying to read a file which exist with the below code in Swift 2. It seems to be failing. Appreciate any inputs:let someText = NSString(string:some text)let destinationPath = /users/johnt/myFile.txtvar filemgr = NSFileManager.defaultManager()if filemgr.fileExistsAtPath(destinationPath) { print(File exists) do { let readFile = try String(contentsOfFile: destinationPath, encoding: NSUTF8StringEncoding) // Throws this error// How do I read the file contents from here? print((readFile)) } catch let error as NSError { print(Error: (error.domain)) }} else { print(File does not exist) do { try someText.writeToFile(destinationPath, atomically: true, encoding: NSUTF8StringEncoding) } catch let error as NSError { print(Error: (error.domain)) }}
Replies
4
Boosts
0
Views
14k
Activity
Aug ’15
Two Dimensional Village
I have just begun programming Swift, and am a novice, so please bear with me.I would like a basic understanding of how to do the following:Create a two dimensional array where each cell represents an individualRepresent that array graphically so that every pixel represents the person in that cell and the pixel would be pink if the person is female and blue if the person is maleThank you in advance for any and all help!
Replies
2
Boosts
0
Views
312
Activity
Dec ’15
Reply to App review rejected for External payment system
You may have some problem implementing your ‘promo code’ system into Apple’s IAP because they don’t want you to ‘sell’ a promo code and use that sale to get around IAP. For example, purchase the IAP for $10 or buy a promo code for $6 and get the same IAP for $2. So you can’t sell or otherwise get value for a promo code. If you tell App Review that you will not sell promo codes they may allow it. To use a promo code just create 2 identical IAP products with different prices. If the user enters the code offer them the lower priced IAP.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’19
How to Simulate for iPad Air 2?
I'm learning to develop iOS apps. And I'd like to test it on my iPad Air 2. My Xcode is set up as follows: iOS 13.0 Xcode 12.3 Swift 5.3 My iPad is on iOS Version 14.3. I had my iPad Air 2 set up before, but its simulator disappeared when I upgraded the Xcode version. How do I set up Xcode so I can simulate/run apps on an iPad Air 2? Thank you very much in advance.
Replies
0
Boosts
0
Views
681
Activity
Jan ’21
Reply to iCloud Query Subscription - Multiple Notification for single Subscription
So there is 2 Users one is AGENT and other is ADMIN......When they use app, app code subscibe, 2 notification fired by icloud to all users.Can you explain what AGENT and ADMIN are?
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Dec ’18
Reply to How do I handle duplicated symbols in a loadable NSBundle/plug-in?
Both targets at the same time want to use TDWUtils symbols for their own purposes The best way to handle this depends on the nature of that code. There are two factors: Is the code large? — If it is, you want to take steps to share it rather than ship two copies. What language is the code written in? — Most notably, Objective-C uses a single namespace for its classes, so you can’t load two copies of a class in the process even if you do manage to avoid linker issues. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to LLDB error: type for self cannot be reconstructed: type for typename
There are 3 projects in a workspace. The main project and two separate projects for two static libraries. Both static libs depend on a framework, a regular framework not a XCFramework. Everything is built from scratch, I own all the source code. The code for the framework is in a swift module. I set DWARF with dSYM on all the three projects, it was DWARF only for the libs, but no luck. I can debug the source code from the main project, it works just fine. However, the two static libraries contain the majority of the functionality and I can't debug it. I was adding logs here and there but it takes a lot of time.
Replies
Boosts
Views
Activity
Jan ’25
Connect Two Apps
I wanted to know how would I connect two apps to each other. I am making an app similiar to Uber. An example of what I need help with is in Uber when someone requests a ride that person can see who their driver is and the drivers info on the customer app, and the driver gets the passengers info in the Uber employee app. Even if one person is using an iPhone and the other is using Android.One app is for customers and the other is for employees.
Replies
4
Boosts
0
Views
1.4k
Activity
Jul ’18
iOS 9 beta 2
Hi, any idea when beta 2 comes out?
Replies
2
Boosts
0
Views
660
Activity
Jun ’15