Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

165,591 results found

Post

Replies

Boosts

Views

Activity

How do I run two ViewController simultaneously?
I'm trying to use ARWorldTrackingConfiguration and ARBodyTrackingConfiguration together. ARConfiguration here it says, a session can run only one configuration at a time. So, I made two ViewControllers that switches each ViewController through buttons but I can't run the two ViewControllers at the same. Is there any way to run two ViewControllers simultaneously or switching ViewControllers automatically?
1
0
611
Apr ’22
Reply to Function not returning values if in a separate file
There are two problems here.1. You have 2 variables called 'scalaRiduz'. They may look the same, but they are completely different. You could have written:var scalaRiduz1111:Double = 0 … func scalaTrafila (…) { var scalaRiduz2222:[Double] = [0, 1, 2] … }Why? Because a 'var' statement always declares a new variable. In your existing code, the 'scalaRiduz' inside the function hides the 'scalaRiduz' outside the function. But they're still different variables.2. This isn't your real code. In your main program, your 'scalaRiduz' isn't even array — it has type Double, not [Double].Here's what I think happened. You had code like this, in a single file:var scalaRiduz:[Double] = [] func scalaTrafila (…) { scalaRiduz:[Double] = [0, 1, 2] // <-- Note that there is NO var } print (scalaRiduz[0]) // prints 0Then you split it into 2 files:var scalaRiduz:[Double] = [0] scalaTrafila () print (scalaRiduz[0])func scalaTrafila () { scalaRiduz:[D
Topic: Programming Languages SubTopic: Swift Tags:
May ’16
Can you detect a two-finger click?
I'd like to notice when a user clicks their Siri remote with two fingers on the trackpad instead of one. (A one-finger click increments; I'd like a two-finger click to decrement.) Is there a way to do this? A UITapGestureRecognizer with numberOfTouchesRequired set to 2 seems like the obvious solution, but it doesn't seem to be getting me anywhere.
3
0
883
Nov ’15
Issues with sharedSession.downloadTaskWithURL in Swift 2
I'm having am issue when trying to download a file via URL in Xcode Beta 5 and Swift 2 running iOS9Would really appreciate any help as I am going crazy trying to find out what it doesn't like about the code in swift2 ? The documentation says the method signature has not changed. I click on the code suggestion to get the completion handlers then it gives me errors. I took the code back into Swift 1.2 in Xcode 6.4 and it ran straight away 😕This code runs fine in iOS 8.4 Xcode 6.4let messageURL = NSURL(string: http:/ let sharedSession = NSURLSession.sharedSession() let downloadTask: NSURLSessionDownloadTask = sharedSession.downloadTaskWithURL(messageURL!, completionHandler: { (location: NSURL!, response: NSURLResponse!, error: NSError!) -> Void in var urlContents = NSString(contentsOfURL: location, encoding: NSUTF8StringEncoding, error: nil) println(response : (response)) println(urlContents) }) downloadTask.resume()I get a response and urlContents printed.The sam
2
0
1.2k
Aug ’15
Inference Provider crashed with 2:5
I am trying to create a slightly different version of the content tagging code in the documentation: https://developer.apple.com/documentation/foundationmodels/systemlanguagemodel/usecase/contenttagging In the playground I am getting an Inference Provider crashed with 2:5 error. I have no idea what that means or how to address the error. Any assistance would be appreciated.
1
0
598
Jul ’25
Apple Configurator 2 - iPad air 2 requires itunes login when starting app
Hi at all,thats my issue: I have two iPad 4 and two iPad air 2 devices, both with iOS 10.2.1. I am managing the devices with Apple Conf. 2 and roll out the same profile on all devices. When starting ⚠ (not purchase, download, etc.) an app, itunes login is required at iPad air 2, not at iPad 4.Because we offer the devices to our library users to learn and live with them, I want a free use of apps. If a user wants to buy apps additionally, he may login with his own account. As I said, it all works with iPad 4, but not with iPad air 2. Any ideas?thx, Olli
0
0
433
Mar ’17
Reply to UIAlertController UIAlertAction
the alert action is displayed briefly then it disappears before the user has time to enter anything into the 2 text fields and before the OK button is pressed.I embedded your code in an @IBAction method, and I couldn't have find a behavior as such.The problem may very probably hide somewhere in the lines you have not shown yet.At least two lines of your code: foundLatitude.text = stringLatitude foundLongitude.text = stringLongitudedo not work as expected. (Or I may be mistaking your expectation for these two lines.)They should be in the action handler of OK.Generally, you should not write any code after calling presentViewController:animated:completion: .
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’15
Two Watches, One iPhone
https://support.apple.com/en-us/HT205792 Clearly says: watchOS doesn't support wearing two watches at once There are many fitness apps that could benefit from information on both wrists. Juggling being my interest. Wearing two watches at once is an important developer requirement to capture the whole of the observables of many activities. Everyone has two wrists. Are there any fundamental reasons why one iPhone could not support two watches simultaneously, running an integrated fitness app?
1
0
706
Oct ’20
arc4random - setting gap between two objects
Hi,I have two objects that get their Y axis randomised by arc4random_uniform. I want to be able to set a minimum gap of atleast 60px between the two objects where ever they randomise. I could randomise one object and then add 60px to the other objects but I wanted the gap between them to be completely random but no less than 60px.Below is my code that generates the two objects, but I am in need of a way to set a minimum gap of 60px between them-(void)GenerateLines { CGRect BlackTop = Black.superview.bounds; CGRect BlackBottom = BlackOne.superview.bounds; CGFloat topMargin = 80; CGFloat bottomMargin = 140; CGFloat RandomX, RandomY; RandomX = arc4random_uniform(500) + topMargin; CGFloat BlackYMax = BlackTop.size.height-topMargin-bottomMargin- Black.bounds.size.height/2; RandomY = arc4random_uniform(BlackYMax) + topMargin; Black.center = CGPointMake(300, RandomY); CGFloat TopMargin = 140; CGFloat BottomMargin = 80; RandomX = arc4random_uniform(500) + TopMargin; CGFloa
1
0
325
Sep ’15
Watch OS 2 requirement
Starting June 1, 2016, all new watchOS apps submitted to the App Store must be native apps built with the watchOS 2 SDK or later.Our iOS app contains both a Watch OS 2 component and a Watch OS 1 component. Users of Watch OS 2 find themselves using the Watch OS 2 version; users of Watch OS 1 find themselves using the Watch OS 1 version.I'm finding it hard to understand whether Apple's announcement (shown above) meansthat we should provide a Watch OS 2 app (which we do)or that we should remove the Watch OS 1 app (which we can, but it might inconvenience someone).Does anyone have any ideas?
2
0
729
Apr ’16
HTTP/2 Notifications - How?
So I saw the stuff on HTTP/2 now for push notifications, but I'm not really finding details on the web on how to implement it. I'm using PHP for example right now to build my packet and send it via a stream_socket_client connection. Are there details I'm missing somewhere that show how to use the new format?
0
0
287
Dec ’15
how to merge two entitlements
We need your help to merge two special entitlements into a single entitlement or provide a provisioning profile with both of these special entitlements so that our app can have them. The entitlements: Name: ApplePay In-App Provisioning Distribution com.apple.developer.payment-pass-provisioning and Name: Apple Pay Pass Suppression iOS (Dist) com.apple.developer.passkit.pass-presentation-suppression how can we achieve this?
2
0
795
Nov ’21
How do I run two ViewController simultaneously?
I'm trying to use ARWorldTrackingConfiguration and ARBodyTrackingConfiguration together. ARConfiguration here it says, a session can run only one configuration at a time. So, I made two ViewControllers that switches each ViewController through buttons but I can't run the two ViewControllers at the same. Is there any way to run two ViewControllers simultaneously or switching ViewControllers automatically?
Replies
1
Boosts
0
Views
611
Activity
Apr ’22
Reply to Function not returning values if in a separate file
There are two problems here.1. You have 2 variables called 'scalaRiduz'. They may look the same, but they are completely different. You could have written:var scalaRiduz1111:Double = 0 … func scalaTrafila (…) { var scalaRiduz2222:[Double] = [0, 1, 2] … }Why? Because a 'var' statement always declares a new variable. In your existing code, the 'scalaRiduz' inside the function hides the 'scalaRiduz' outside the function. But they're still different variables.2. This isn't your real code. In your main program, your 'scalaRiduz' isn't even array — it has type Double, not [Double].Here's what I think happened. You had code like this, in a single file:var scalaRiduz:[Double] = [] func scalaTrafila (…) { scalaRiduz:[Double] = [0, 1, 2] // <-- Note that there is NO var } print (scalaRiduz[0]) // prints 0Then you split it into 2 files:var scalaRiduz:[Double] = [0] scalaTrafila () print (scalaRiduz[0])func scalaTrafila () { scalaRiduz:[D
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’16
CFNetwork and HTTP/2
Hi,I understand that NSURLSession from iOS 9 automatically handles HTTP/2 without any user interaction.Is the same correct using CFNetwork (CFHTTP for example)? Or I need to handle the whole upgrade flow?Thanks, Israel
Replies
2
Boosts
0
Views
1.5k
Activity
Jul ’15
Can you detect a two-finger click?
I'd like to notice when a user clicks their Siri remote with two fingers on the trackpad instead of one. (A one-finger click increments; I'd like a two-finger click to decrement.) Is there a way to do this? A UITapGestureRecognizer with numberOfTouchesRequired set to 2 seems like the obvious solution, but it doesn't seem to be getting me anywhere.
Replies
3
Boosts
0
Views
883
Activity
Nov ’15
Issues with sharedSession.downloadTaskWithURL in Swift 2
I'm having am issue when trying to download a file via URL in Xcode Beta 5 and Swift 2 running iOS9Would really appreciate any help as I am going crazy trying to find out what it doesn't like about the code in swift2 ? The documentation says the method signature has not changed. I click on the code suggestion to get the completion handlers then it gives me errors. I took the code back into Swift 1.2 in Xcode 6.4 and it ran straight away 😕This code runs fine in iOS 8.4 Xcode 6.4let messageURL = NSURL(string: http:/ let sharedSession = NSURLSession.sharedSession() let downloadTask: NSURLSessionDownloadTask = sharedSession.downloadTaskWithURL(messageURL!, completionHandler: { (location: NSURL!, response: NSURLResponse!, error: NSError!) -> Void in var urlContents = NSString(contentsOfURL: location, encoding: NSUTF8StringEncoding, error: nil) println(response : (response)) println(urlContents) }) downloadTask.resume()I get a response and urlContents printed.The sam
Replies
2
Boosts
0
Views
1.2k
Activity
Aug ’15
Inference Provider crashed with 2:5
I am trying to create a slightly different version of the content tagging code in the documentation: https://developer.apple.com/documentation/foundationmodels/systemlanguagemodel/usecase/contenttagging In the playground I am getting an Inference Provider crashed with 2:5 error. I have no idea what that means or how to address the error. Any assistance would be appreciated.
Replies
1
Boosts
0
Views
598
Activity
Jul ’25
Apple Configurator 2 - iPad air 2 requires itunes login when starting app
Hi at all,thats my issue: I have two iPad 4 and two iPad air 2 devices, both with iOS 10.2.1. I am managing the devices with Apple Conf. 2 and roll out the same profile on all devices. When starting ⚠ (not purchase, download, etc.) an app, itunes login is required at iPad air 2, not at iPad 4.Because we offer the devices to our library users to learn and live with them, I want a free use of apps. If a user wants to buy apps additionally, he may login with his own account. As I said, it all works with iPad 4, but not with iPad air 2. Any ideas?thx, Olli
Replies
0
Boosts
0
Views
433
Activity
Mar ’17
Reply to UIAlertController UIAlertAction
the alert action is displayed briefly then it disappears before the user has time to enter anything into the 2 text fields and before the OK button is pressed.I embedded your code in an @IBAction method, and I couldn't have find a behavior as such.The problem may very probably hide somewhere in the lines you have not shown yet.At least two lines of your code: foundLatitude.text = stringLatitude foundLongitude.text = stringLongitudedo not work as expected. (Or I may be mistaking your expectation for these two lines.)They should be in the action handler of OK.Generally, you should not write any code after calling presentViewController:animated:completion: .
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’15
Two Watches, One iPhone
https://support.apple.com/en-us/HT205792 Clearly says: watchOS doesn't support wearing two watches at once There are many fitness apps that could benefit from information on both wrists. Juggling being my interest. Wearing two watches at once is an important developer requirement to capture the whole of the observables of many activities. Everyone has two wrists. Are there any fundamental reasons why one iPhone could not support two watches simultaneously, running an integrated fitness app?
Replies
1
Boosts
0
Views
706
Activity
Oct ’20
arc4random - setting gap between two objects
Hi,I have two objects that get their Y axis randomised by arc4random_uniform. I want to be able to set a minimum gap of atleast 60px between the two objects where ever they randomise. I could randomise one object and then add 60px to the other objects but I wanted the gap between them to be completely random but no less than 60px.Below is my code that generates the two objects, but I am in need of a way to set a minimum gap of 60px between them-(void)GenerateLines { CGRect BlackTop = Black.superview.bounds; CGRect BlackBottom = BlackOne.superview.bounds; CGFloat topMargin = 80; CGFloat bottomMargin = 140; CGFloat RandomX, RandomY; RandomX = arc4random_uniform(500) + topMargin; CGFloat BlackYMax = BlackTop.size.height-topMargin-bottomMargin- Black.bounds.size.height/2; RandomY = arc4random_uniform(BlackYMax) + topMargin; Black.center = CGPointMake(300, RandomY); CGFloat TopMargin = 140; CGFloat BottomMargin = 80; RandomX = arc4random_uniform(500) + TopMargin; CGFloa
Replies
1
Boosts
0
Views
325
Activity
Sep ’15
Watch OS 2 requirement
Starting June 1, 2016, all new watchOS apps submitted to the App Store must be native apps built with the watchOS 2 SDK or later.Our iOS app contains both a Watch OS 2 component and a Watch OS 1 component. Users of Watch OS 2 find themselves using the Watch OS 2 version; users of Watch OS 1 find themselves using the Watch OS 1 version.I'm finding it hard to understand whether Apple's announcement (shown above) meansthat we should provide a Watch OS 2 app (which we do)or that we should remove the Watch OS 1 app (which we can, but it might inconvenience someone).Does anyone have any ideas?
Replies
2
Boosts
0
Views
729
Activity
Apr ’16
HTTP/2 Notifications - How?
So I saw the stuff on HTTP/2 now for push notifications, but I'm not really finding details on the web on how to implement it. I'm using PHP for example right now to build my packet and send it via a stream_socket_client connection. Are there details I'm missing somewhere that show how to use the new format?
Replies
0
Boosts
0
Views
287
Activity
Dec ’15
how to merge two entitlements
We need your help to merge two special entitlements into a single entitlement or provide a provisioning profile with both of these special entitlements so that our app can have them. The entitlements: Name: ApplePay In-App Provisioning Distribution com.apple.developer.payment-pass-provisioning and Name: Apple Pay Pass Suppression iOS (Dist) com.apple.developer.passkit.pass-presentation-suppression how can we achieve this?
Replies
2
Boosts
0
Views
795
Activity
Nov ’21