Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

162,370 results found

Post

Replies

Boosts

Views

Activity

Issue with Reachability.m in Swift 2
Hello.Updated to xCode 7 and swift 2 and now cannot implement the Reachability functionality in my application. Using the following code to check the status of connection:func statusChangedWithReachability(currentReachabilityStatus: Reachability) { var networkStatus : NetworkStatus = currentReachabilityStatus.currentReachabilityStatus() var statusString : String = print(Network Status value: (networkStatus.value)) if networkStatus.value == NotReachable.value { print(Network Not Reachable...) reachabilityStatus = kNOTREACHABLE } else if networkStatus.value == ReachableViaWiFi.value { print(Reachable via WIFI...) reachabilityStatus = kREACHABLEWITHWIFI } else if networkStatus.value == ReachableViaWWAN.value { print(Reachable via WWAN...) reachabilityStatus = kREACHABLEWITHWWAN } }Against each networkStatus.value have an error: Value of type 'NetworkStatus' has no member 'value'. How should I implement this function in Swift 2?Thanks a lot!
3
0
4.9k
Sep ’15
Performance Issues with UITextView and TextKit 2
I've been working with UITextView and TextKit 2, which became the default text engine since iOS 16, and I've encountered performance issues when handling very large text documents. Even on iPhone 14 Pro, I've noticed stuttering and frame drops when scrolling through the text view containing a large amount of text. To reproduce the issue, you can use the following code: // In iOS 16 let textView = UITextView() textView.text = some really large string (say 1 million characters) The scrolling performance in this scenario is not smooth. However, if you switch to TextKit 1 by accessing the layoutManager property, the performance significantly improves: // In iOS 16 let textView = UITextView() let _ = textView.layoutManager // this enables the compatibility mode textView.text = some really large string (say 1 million characters) With this code, scrolling remains smooth even with large text documents. It's very disappointing to see TextKit 2 performing worse than TextKit 1, even t
2
0
2.1k
May ’23
Reply to How to Use eSIM api
We now have eSim with SM-DP+ and Activation Code (Matching Code) from our MVNO. Upon adding these two values manually in Settings Cellular Add Cellular Plans, eSim is added. How can we pass these two values to add eSim automatically directly to device without user manually entering these two values please? Thanks Samin918144598181
Apr ’21
Two finger swipe on a UIImage
The code below allows the user to do a 2 finger swipe down on an imageView and thus presenting a popover/actionSheet. That process works fine. Normally it is possible to tap outside the popover/actionSheet to close it.The problem is that once the popover/actionSheet is presented, it doesn't allow tapping the background to close the popover/actionSheet. You actually need to tap inside the popover/actionSheet to close it.There are other places in the app that present a popover/actionSheet but these are presented using a simple button tap.Here's the really weird scenario. If I do the 2 finger swipe on the imageView and open the popover/actionSheet, the inability to tap the backGround is broken on all the other popover/actionSheet in the app too. If I bypass the 2 finger swipe on the imageView all of the other popover/actionSheet work as normal.I've stripped out all the code other than what's needed to present the popover/actionSheet. And I created a new project with o
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
828
May ’20
If C static buffer exceed 249440 bytes, dispatch async get EXC_BAD_ACCESS code=2 on Intel simulator
Not too hopeful that anyone can explain this but here is goes. I have some C code being used from an iOS app in Swift. Logs in the C code are passed by a callback to Swift and put on a serial queue using: Log.serialQueue.async {} So, the C function could look like: int do_some_c_stuff(void) { log(Do some logging); } And in Swift we have something like this to process the log that came through the callback: class func log(_ message: String, logInfo: LogInfo = appLogInfo, type: OSLogType = .default) { Log.serialQueue.async { os.os_log(%@, log: logInfo.log, type: type, message) } } This works perfectly in all cases except one (Intel iPhone simulator only). Now, some C functions allocate a static buffer to parse incoming messages. Like this: int do_some_c_stuff(void) { log(Do some logging); char buf[100000]; } and here is the interesting part. If this buffer exceeds exactly 249440 bytes, any call to Log.serialQueue.async in the swift layer gets a EXC_BAD_ACCESS code=2 but only
5
0
1.1k
Mar ’23
Apple Watch 2 Factor Authentification
I have changed my MacBook Air, the iMac and a iPhone 6S to 2 Factor Authentification. in iCloud Settings i can see my Devices. When i click on my Apple Watch, it says: This device can not be used to obtain an Apple ID code. See (german) Screenshot: http://i64.tinypic.com/2450q6h.png Is it possible to add an Apple Watch to 2 Factor Authentification? Tweak
1
0
569
Jul ’16
playgrounds/ learn to code 2/ 3 gems, 4 switches/ problem with conditons in while loop
hello all,I am at the beginning of learning swift with the ipad playgrounds.in the chapter, where you have to go through a labyrinth till you collected 3 gems and toggled 4 switches, I have the following problem.ar numberGem = 0 var numberSwitch = 0 } func direction() { if isBlocked && isBlockedLeft { turnRight() } else if isBlocked && isBlockedRight { turnLeft() } } func gemSwitchVar() { if isOnGem { collectGem() numberGem += 1 } else if isOnClosedSwitch { toggleSwitch() numberSwitch += 1 } } while numberGem < 4 && numberSwitch < 5 { gemSwitchVar() direction() moveForward() }the while loop always stops after the figure collected 3 gems. It does not continue till it also toggled 4 switches. I always thought that with AND both conditions had to be fullfilled. And the OR operator would display the behaviour it does now.I had the same problem with a while loop in an earlier chapter where I tried a while loop likewhile !isBlocked && !isBlockLeft && !isBlockedRightto m
2
0
5.6k
Mar ’19
Two apps into one
Can we submit an app that shows a facade to select which app(web project) to go to for eg: If my app is Banking App can I have a home page that says Corporate Accounts or Credit CardsCorporate Accounts and Credit Cards are two separate web applications made using same technology stack wrapped in cordovaTo summarise I have 2 corodva apps and want to make them as 1 app
1
0
284
Jun ’15
Where's my code?
Seasoned C developer with i86 and embedded hardware but new to ios. I built a screen with two buttons in Swift. But where is the source code? I see source listings that look like frameworks but nothing that contains my two buttons. My next step is to assign a TCP/IP data string to each button. What library would be recommended for that? TIA
1
0
395
Dec ’21
How to download metal 2?
i am on the metal 2 info page, but I cannot find a link to download it? Thanks for your help.
Replies
1
Boosts
0
Views
12k
Activity
Aug ’17
Issue with Reachability.m in Swift 2
Hello.Updated to xCode 7 and swift 2 and now cannot implement the Reachability functionality in my application. Using the following code to check the status of connection:func statusChangedWithReachability(currentReachabilityStatus: Reachability) { var networkStatus : NetworkStatus = currentReachabilityStatus.currentReachabilityStatus() var statusString : String = print(Network Status value: (networkStatus.value)) if networkStatus.value == NotReachable.value { print(Network Not Reachable...) reachabilityStatus = kNOTREACHABLE } else if networkStatus.value == ReachableViaWiFi.value { print(Reachable via WIFI...) reachabilityStatus = kREACHABLEWITHWIFI } else if networkStatus.value == ReachableViaWWAN.value { print(Reachable via WWAN...) reachabilityStatus = kREACHABLEWITHWWAN } }Against each networkStatus.value have an error: Value of type 'NetworkStatus' has no member 'value'. How should I implement this function in Swift 2?Thanks a lot!
Replies
3
Boosts
0
Views
4.9k
Activity
Sep ’15
Performance Issues with UITextView and TextKit 2
I've been working with UITextView and TextKit 2, which became the default text engine since iOS 16, and I've encountered performance issues when handling very large text documents. Even on iPhone 14 Pro, I've noticed stuttering and frame drops when scrolling through the text view containing a large amount of text. To reproduce the issue, you can use the following code: // In iOS 16 let textView = UITextView() textView.text = some really large string (say 1 million characters) The scrolling performance in this scenario is not smooth. However, if you switch to TextKit 1 by accessing the layoutManager property, the performance significantly improves: // In iOS 16 let textView = UITextView() let _ = textView.layoutManager // this enables the compatibility mode textView.text = some really large string (say 1 million characters) With this code, scrolling remains smooth even with large text documents. It's very disappointing to see TextKit 2 performing worse than TextKit 1, even t
Replies
2
Boosts
0
Views
2.1k
Activity
May ’23
Reply to How to open a view
I have a window controller and two views. With my code, I open view1. I try to open view2 with code. I do not understand your code. It gives me error.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to How to Use eSIM api
We now have eSim with SM-DP+ and Activation Code (Matching Code) from our MVNO. Upon adding these two values manually in Settings Cellular Add Cellular Plans, eSim is added. How can we pass these two values to add eSim automatically directly to device without user manually entering these two values please? Thanks Samin918144598181
Replies
Boosts
Views
Activity
Apr ’21
Two finger swipe on a UIImage
The code below allows the user to do a 2 finger swipe down on an imageView and thus presenting a popover/actionSheet. That process works fine. Normally it is possible to tap outside the popover/actionSheet to close it.The problem is that once the popover/actionSheet is presented, it doesn't allow tapping the background to close the popover/actionSheet. You actually need to tap inside the popover/actionSheet to close it.There are other places in the app that present a popover/actionSheet but these are presented using a simple button tap.Here's the really weird scenario. If I do the 2 finger swipe on the imageView and open the popover/actionSheet, the inability to tap the backGround is broken on all the other popover/actionSheet in the app too. If I bypass the 2 finger swipe on the imageView all of the other popover/actionSheet work as normal.I've stripped out all the code other than what's needed to present the popover/actionSheet. And I created a new project with o
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
3
Boosts
0
Views
828
Activity
May ’20
If C static buffer exceed 249440 bytes, dispatch async get EXC_BAD_ACCESS code=2 on Intel simulator
Not too hopeful that anyone can explain this but here is goes. I have some C code being used from an iOS app in Swift. Logs in the C code are passed by a callback to Swift and put on a serial queue using: Log.serialQueue.async {} So, the C function could look like: int do_some_c_stuff(void) { log(Do some logging); } And in Swift we have something like this to process the log that came through the callback: class func log(_ message: String, logInfo: LogInfo = appLogInfo, type: OSLogType = .default) { Log.serialQueue.async { os.os_log(%@, log: logInfo.log, type: type, message) } } This works perfectly in all cases except one (Intel iPhone simulator only). Now, some C functions allocate a static buffer to parse incoming messages. Like this: int do_some_c_stuff(void) { log(Do some logging); char buf[100000]; } and here is the interesting part. If this buffer exceeds exactly 249440 bytes, any call to Log.serialQueue.async in the swift layer gets a EXC_BAD_ACCESS code=2 but only
Replies
5
Boosts
0
Views
1.1k
Activity
Mar ’23
Apple Watch 2 Factor Authentification
I have changed my MacBook Air, the iMac and a iPhone 6S to 2 Factor Authentification. in iCloud Settings i can see my Devices. When i click on my Apple Watch, it says: This device can not be used to obtain an Apple ID code. See (german) Screenshot: http://i64.tinypic.com/2450q6h.png Is it possible to add an Apple Watch to 2 Factor Authentification? Tweak
Replies
1
Boosts
0
Views
569
Activity
Jul ’16
Two back buttons
Document based app on 17.5 has two back buttons, but 17.0 as only one. Did anyone experience this?
Replies
1
Boosts
0
Views
507
Activity
May ’24
watchos 2 beta 2
Has anyone not gotten the over the air update yet i still havent and i want to make sure im not the only one thanks
Replies
28
Boosts
0
Views
5.0k
Activity
Jun ’15
Swift 2 timeline
Is there any offical word on the Swift 2 rollout? Is it launching with iOS 9/OS X or is Xcode 7 planned to be released before the fall?
Replies
3
Boosts
0
Views
977
Activity
Jun ’15
playgrounds/ learn to code 2/ 3 gems, 4 switches/ problem with conditons in while loop
hello all,I am at the beginning of learning swift with the ipad playgrounds.in the chapter, where you have to go through a labyrinth till you collected 3 gems and toggled 4 switches, I have the following problem.ar numberGem = 0 var numberSwitch = 0 } func direction() { if isBlocked && isBlockedLeft { turnRight() } else if isBlocked && isBlockedRight { turnLeft() } } func gemSwitchVar() { if isOnGem { collectGem() numberGem += 1 } else if isOnClosedSwitch { toggleSwitch() numberSwitch += 1 } } while numberGem < 4 && numberSwitch < 5 { gemSwitchVar() direction() moveForward() }the while loop always stops after the figure collected 3 gems. It does not continue till it also toggled 4 switches. I always thought that with AND both conditions had to be fullfilled. And the OR operator would display the behaviour it does now.I had the same problem with a while loop in an earlier chapter where I tried a while loop likewhile !isBlocked && !isBlockLeft && !isBlockedRightto m
Replies
2
Boosts
0
Views
5.6k
Activity
Mar ’19
Two apps into one
Can we submit an app that shows a facade to select which app(web project) to go to for eg: If my app is Banking App can I have a home page that says Corporate Accounts or Credit CardsCorporate Accounts and Credit Cards are two separate web applications made using same technology stack wrapped in cordovaTo summarise I have 2 corodva apps and want to make them as 1 app
Replies
1
Boosts
0
Views
284
Activity
Jun ’15
Where's my code?
Seasoned C developer with i86 and embedded hardware but new to ios. I built a screen with two buttons in Swift. But where is the source code? I see source listings that look like frameworks but nothing that contains my two buttons. My next step is to assign a TCP/IP data string to each button. What library would be recommended for that? TIA
Replies
1
Boosts
0
Views
395
Activity
Dec ’21
iOS11 beta 2
How soon are apple most likey releasing beta version 2 to iOS11? and same goes for the apple watch?Thanks
Replies
6
Boosts
0
Views
3.7k
Activity
Jun ’17