Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,517 results found

Post

Replies

Boosts

Views

Activity

poll(2) slower than select(2)
I have a program that creates a TCP server socket and listens on it. When the program accepts a connection from a client, it calls poll(2) repeatedly to see if there is any input available, like this: for (int i = 0; i < 1000000; i++) { struct pollfd fds[] = {{ .fd = clientfd, .events = POLLIN, .revents = 0 }}; int r = poll(fds, 1, 0); if (r < 0) { perror(poll); exit(1); } } On my Intel iMac, this takes about 15 seconds. If I use select(2) instead, as follows, it takes about 550ms. for (int i = 0; i < 1000000; i++) { struct timeval timeout = { .tv_sec = 0, .tv_usec = 0 }; fd_set infds; FD_ZERO(&infds); FD_SET(clientfd, &infds); int r = select(1, &infds, 0, 0, &timeout); if (r < 0) { perror(select); exit(1); } } https://gist.github.com/xrme/cd42d3d753ac00861e439e012366f2cf is a C source file that contains a complete example. If you're inclined to take a look, please download the file from the gist and do cc poll-test.c and then ./a.out. Connect to it with nc 127.0.
2
0
311
Sep ’24
Xcode 10 beta 2 not working on two items
Hi All,I have been experiencing the following issue on XCode 10.0 beta 1) VoIP Push Registration is not working, same code working on XCode 9.3, but does not work Xcode 10.0 beta, it will not trigger VoiP token.2) Notification Extension not working properly, With Customized Notifiction UI, it can launch extension notification UI, but all the action does not work, press action button does not call delegate.Is there anyone has the same issue?Thanks,
0
0
1.9k
Jun ’18
Is StoreKit 2 for Swift only?
My app is a hybrid of ObjC and Swift as I have been converting it from ObjC to Swift a bit at a time. I need to integrate In-App Purchases now and I'd like to use StoreKit 2. However, when I have one of my Swift classes return a Product object, my ObjC classes don't seem to have access to the Product type and referring to it as an SKProduct type doesn't work either. Is it possible to interact with the Store Kit 2 APIs from ObjC code? Or am I going to need to isolate all of the StoreKit2 stuff in my Swift code and communicate differently when it's time to communicate with my old ObjC code? Thanks, Kenny
1
0
2.2k
Nov ’22
How to debug watchOS 2 complication
I'm experimenting with creating a watchOS 2 complication. Although I have some simple working code, I can't seem to debug the code of the ComplicationController class. When I set a breakpoint it never hit while if I set a breakpoint in the ExtensionDelegate it does get hit when I launch the app.Any help is appreciated.
2
0
1.3k
Jun ’15
XCode Help 2
Whenever I create a segue between two view controllers, the second view controller gets gray frame around it that ruins my layout. I trying to get rid of it, but I don't know how. Please someone help me? It only happen in IB, and it's when a I make a segue through IB not code. I have a picture, but there is no image attachment or can't find it.
3
0
466
Aug ’20
2 Requests for Rosetta: support BMI1/2 and F16C and support also AVX1/2 on Rosetta Linux..
Hi, REQUEST 1: seems Microsoft is ahead of Apple in X86 ARM emulation support at least in features supported.. see: https://blogs.windows.com/windows-insider/2024/11/06/announcing-windows-11-insider-preview-build-27744-canary-channel/ x64 emulated applications through Prism will now have support for additional extensions to the x86 instruction set architecture. These extensions include AVX and AVX2, as well as BMI, FMA, F16C BMI1/2 and F16C aren't yet supported by Rosetta.. would be useful for games like Alan Wake 2.. so asking for Rosetta equaling features to Prism emulator.. REQUEST 2: there is no way to currently enable AVX1/2 on Rosetta Linux.. on macOS using export ROSETTA_ADVERTISE_AVX=1 does the trick.. but not on Linux VM's.. tested setting this via: /bin/launchctl setenv ROSETTA_ADVERTISE_AVX 1 on Mac before VM launch and inside Linux VM but AVX2 isn't exposed..
3
0
1.9k
Nov ’24
Storekit 2 Error
I got this error while fetching products using storekit 2 in swiftui. 2023-05-23 12:19:51.196042+0530 SKDemo[1183:172700] [Default] Error enumerating unfinished transactions for first transaction listener: Error Domain=ASDErrorDomain Code=500 (null) UserInfo={client-environment-type=Sandbox, storefront-country-code=AUS, NSUnderlyingError=0x2812e0210 {Error Domain=AMSErrorDomain Code=301 Invalid Status Code UserInfo={NSLocalizedDescription=Invalid Status Code, AMSURL=https://mzstorekit-sb.itunes.apple.com/inApps/v1/history?REDACTED, AMSStatusCode=500, AMSServerPayload={ errorCode = 5000001; errorMessage = An unknown error occurred. Please try again.; okButtonString = OK; }, NSLocalizedFailureReason=The response has an invalid status code}}} 2023-05-23 12:19:58.672549+0530 SKDemo[1183:172693] [Default] Error enumerating all current transactions: Error Domain=ASDErrorDomain Code=500 (null) UserInfo={NSUnderlyingError=0x2812d5f50 {Error Domai
1
0
1.3k
May ’23
Two ViewController with one View
I am a view that want to present two different look while receiving different data. And I don't want to use if-else statement to handle cause it will make the code too clumsy and hard to modify. So I create two viewController to do it, but it doesn't seem to be a good way. Any suggestion with this situation? Thank you guys.
1
0
330
May ’22
El capitan Beta 2
I am unable to download El Cap Beta 2, as it says my code has already been redeemed.* Updates in the App Store only shows the previous Beta 1, that wouldn't install at all (El Cap doesn't my hard disk in beta 1, this was similar in yos beta 1).* I need to do a clean install of beta 2 (as beta 1 wouldn't install, i can't simply update it) Does anyone know a way around this, some way to remove the previous purchase of beta 1, or reset my redeem code some other way?Any ideas would be awesome.
7
0
3.2k
Jun ’15
Learn to Code 2 > Variables > Three Gems, Four Switches
My while loop continues execution after reaching gemsCollected = 3 if I use OR logical operator (||) and stops execution if I use AND logical operator (&&). IMHO it should be the other way around, right? var gemsCollected = 0 var switchesToggled = 0 while gemsCollected < 3 || switchesToggled < 4 { moveForward() if gemsCollected < 3 && isOnGem { collectGem() gemsCollected = gemsCollected + 1 } else if switchesToggled < 4 && isOnClosedSwitch { toggleSwitch() switchesToggled = switchesToggled + 1 } else if isBlocked && !isBlockedRight { turnRight() } else if isBlocked && !isBlockedLeft { turnLeft() } }
1
0
1.3k
Jul ’23
Two-Factor Authentication Loop?
So I have the following devices:- MacBook (10.12 BETA 2)- iPhone (10 BETA 2)- iPad (10 BETA 2)- Apple Watch (3.0 BETA 2)Two-factor authentication is enabled for the Auto-Unlock with Watch feature.Everything was working fine. Then I've decided to login on iCloud in my work computer (MacBook, 10.11). iPhone went crazy with the iCloud security stuff, so now it seems it has remained in a mid-term state.So my iPhone is a trusted-device still, but for some reason, trusted features are disabled (Keychain, HomeKit). Trying to login on iCloud in the phone requires password AND a security code, which shouldn't be required as the phone is still a trusted iCloud device. However I can't seem to type the security code on the phone since the keyboard does not appear.Crazy scenario, I reckon, but it might happen for other users as well, so it's good to point it out.I've already filled a bug report, but this post might be helpful too.
0
0
956
Jul ’16
Merge Two iPhone Apps Into One Yet Two Teams
We have two iPhone/iPad apps. We most likely will merge them into one app. Let's say two teams from different companies that were working on the separate apps will work on the single merged app. From an inner-app architecture point of view and from the above multi-team context, what's a good way to merge the two apps together? (KMT, thank you for your feedback. I totally agree that the question was not clear.)
1
0
699
Aug ’16