Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

165,591 results found

Post

Replies

Boosts

Views

Activity

Aligning two images
Hi,I just started learning swift and was wondering, if there is any way to align two images to each other. My scenario would be the following: I have two picutures taken shortly after each other and now I have to align them. In python I am using a histogram registration approach for that and I was wondering, if an implementation of this exists already somewhere in swift. Or some other algorithm that does that.I really appreciate your help.Best,
0
0
352
Apr ’16
Two way SSL failed on WatchOS2.1
I was trying to communicate with a service with two way SSL from a watch.I found the connection was cancelled immediately after the client (watch) provide the client certificate, by calling completeHandler(NSURLSessionAuthChallengeUseCredential, credential).The error got is NSURLErrorDomain Code=-999 cancelled.But I've tried run the same piece of code on a phone, it did succeed. Apart from two way ssl, all other requests work fine on the watch.Since, the frameworks on watchOS and iOS are different, I am wondering if that might be an issue for WatchOS? Or is there anything specifically need to be configured for the watch?Cheers.
4
0
918
Feb ’16
How do you "add" two text fields?
Ok, so in my app I have got two textfields, one label and one button. I manage to get the content of the one textfield to be displayed in the label, but i want to display the content of both of the textfields.@IBAction func buttonPushed(sender: UIButton) { Label.text = (textfield1.text) + (textfield2.text)The code above is the closest I´ve com, but the Label displays: Optionalwhatever i typed in the textfieldOptionalwhatever i typed in the textfield
3
0
5.6k
Oct ’15
Schedule 2
Hello! I would like to clarify some things regarding Apple Developer Program License Agreement (Schedule 2).i live in Belarus. And for my tax service it is important to know for what exact services Apple takes a commission of 30%.a) in p.3.4 it says: Apple shall be entitled to the following commissions in consideration for its services as Your agent and/or commissionaire under this Schedule 2: - For sales of Licensed Applications to End-Users... ...Apple shall be entitled to a commission equal to thirty percent (30%) of all prices payable by each End-User.What is this service? It is important to know whether these are marketing(promotions/advertising) services or sales services.b) in p.1.1 it says that Apple acts as my agent («Your agent for the marketing and delivery of the Licensed Applications to End-Users»). Could you please explain what is meant by marketing? Is te meaning for marketing the same as <Promotions> or <Sale>? What exact services are included in the marketing?c)T
6
0
3.2k
Feb ’19
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
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
837
May ’20
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.5k
May ’23
Storekit 2 some question
Hello,The Storekit 2 is pretty good, i want to Use it in my app right now,but i found some question? 1、unfinished transation never Automatic trigger on any where,such as when I start up again, how can i fetch the unfinished transations on some way? 2、i call transaction.finish(),but, when i user Transaction.unfinished to fetch all unfinished transations, the transaction i just finished, alway be funded 3、how can i verified jws myself, not call the autoVafified api you provide,can you has some demo?
3
0
1.7k
Oct ’21
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.4k
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
571
Jul ’16
Aligning two images
Hi,I just started learning swift and was wondering, if there is any way to align two images to each other. My scenario would be the following: I have two picutures taken shortly after each other and now I have to align them. In python I am using a histogram registration approach for that and I was wondering, if an implementation of this exists already somewhere in swift. Or some other algorithm that does that.I really appreciate your help.Best,
Replies
0
Boosts
0
Views
352
Activity
Apr ’16
Two way SSL failed on WatchOS2.1
I was trying to communicate with a service with two way SSL from a watch.I found the connection was cancelled immediately after the client (watch) provide the client certificate, by calling completeHandler(NSURLSessionAuthChallengeUseCredential, credential).The error got is NSURLErrorDomain Code=-999 cancelled.But I've tried run the same piece of code on a phone, it did succeed. Apart from two way ssl, all other requests work fine on the watch.Since, the frameworks on watchOS and iOS are different, I am wondering if that might be an issue for WatchOS? Or is there anything specifically need to be configured for the watch?Cheers.
Replies
4
Boosts
0
Views
918
Activity
Feb ’16
How do you "add" two text fields?
Ok, so in my app I have got two textfields, one label and one button. I manage to get the content of the one textfield to be displayed in the label, but i want to display the content of both of the textfields.@IBAction func buttonPushed(sender: UIButton) { Label.text = (textfield1.text) + (textfield2.text)The code above is the closest I´ve com, but the Label displays: Optionalwhatever i typed in the textfieldOptionalwhatever i typed in the textfield
Replies
3
Boosts
0
Views
5.6k
Activity
Oct ’15
Schedule 2
Hello! I would like to clarify some things regarding Apple Developer Program License Agreement (Schedule 2).i live in Belarus. And for my tax service it is important to know for what exact services Apple takes a commission of 30%.a) in p.3.4 it says: Apple shall be entitled to the following commissions in consideration for its services as Your agent and/or commissionaire under this Schedule 2: - For sales of Licensed Applications to End-Users... ...Apple shall be entitled to a commission equal to thirty percent (30%) of all prices payable by each End-User.What is this service? It is important to know whether these are marketing(promotions/advertising) services or sales services.b) in p.1.1 it says that Apple acts as my agent («Your agent for the marketing and delivery of the Licensed Applications to End-Users»). Could you please explain what is meant by marketing? Is te meaning for marketing the same as <Promotions> or <Sale>? What exact services are included in the marketing?c)T
Replies
6
Boosts
0
Views
3.2k
Activity
Feb ’19
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
Reply to iOS: "Sign in with Apple" state does not restore after app restart
ps: i'm getting two conflicting messages: Credential State request returned with error: Error Domain=AKAuthenticationError Code=-7073 this is printed to the console and credentialState 2, error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1000 (null) this is the error message i'm getting back in the callback (different codes? why?)
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’20
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
837
Activity
May ’20
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.5k
Activity
May ’23
Storekit 2 some question
Hello,The Storekit 2 is pretty good, i want to Use it in my app right now,but i found some question? 1、unfinished transation never Automatic trigger on any where,such as when I start up again, how can i fetch the unfinished transations on some way? 2、i call transaction.finish(),but, when i user Transaction.unfinished to fetch all unfinished transations, the transaction i just finished, alway be funded 3、how can i verified jws myself, not call the autoVafified api you provide,can you has some demo?
Replies
3
Boosts
0
Views
1.7k
Activity
Oct ’21
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.4k
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
571
Activity
Jul ’16