Post

Replies

Boosts

Views

Activity

Reply to Wrong write to Sqlite database
I think the issue is related to the lifetime of the strings. Try changing sqlite3_bind_text(insertStatement, sqlite3_bind_parameter_index(insertStatement, ":name"), name, -1, nil) etc. to sqlite3_bind_text(insertStatement, sqlite3_bind_parameter_index(insertStatement, ":name"), name, -1, SQLITE_TRANSIENT) Re String(describing: …), isn’t it sufficient to have the String(cStirng: …)? Why have you wrapped that in describing: ? That seems unnecessary / unhelpful to me, but maybe I have missed something.
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’24
Reply to Using boost::interprocess::file_lock cause app crash
I believe it is using fcntl(F_SETLK) everywhere except on Windows: https://github.com/boostorg/interprocess/blob/develop/include/boost/interprocess/sync/file_lock.hpp https://github.com/boostorg/interprocess/blob/develop/include/boost/interprocess/detail/os_file_functions.hpp struct ::flock lock; lock.l_type = F_WRLCK; lock.l_whence = SEEK_SET; lock.l_start = 0; lock.l_len = 0; int ret = ::fcntl(hnd, F_SETLK, &lock);
Topic: App & System Services SubTopic: Core OS Tags:
Feb ’24
Reply to Refund Request
Is it possible for us to handle a refund for a specific customer who contacted product support to request the cancellation of his subscription? No. When people ask this, I always write something like this: ”You need to contact Apple for refunds, as your purchase is from Apple not from me. Compare with buying a book in a shop and then contacting the author.”
Topic: App & System Services SubTopic: StoreKit Tags:
Feb ’24
Reply to Using boost::interprocess::file_lock cause app crash
Maybe didEnterBackground is too late; try unlocking in willResignActive? You call unlock unconditionally in didEnterBackground; you shouldn’t call it unless you are sure the lock is held. I don’t think that’s the problem though. How is boost::interprocesss::file_lock implemented on iOS? P.S. m_lock can be a unique_ptr, no need for make_shared.
Topic: App & System Services SubTopic: Core OS Tags:
Feb ’24
Reply to Short question: much too low number of reported downloads compared to real registrations -> privacy issue?
can they also opt out of the main "download" metric? No, I don't think so. There may be some cases where an app is installed but not downloaded, e.g. when restoring from a backup. Cases like institutional purchases and iOS apps running on macOS can also cause confusion. Is there no way that your app can register more than once for a given download? Is there no way to reset it to a state where it will re-register?
Feb ’24
Reply to Poor precision with fract in MSL fast-math mode
Here's my guess as to what it is doing: Note that fract(x) = x - floor(x). let C = ceil(0.1 + in.texCoord.x * 0.8) * 1000000 = 1000000 colorSample.x = fract(C) + in.texCoord.x = C - floor(C) + in.texCoord.x = ( C + in.texCoord.x ) - floor(C) <--- this is what fast-math allows The range of C + in.texCoord.x will be 1000000 to 1000001. This reduces the available precision for the fractional part. Is this a bug? Probably not, it's what fast-math is for. Don't enable fast-math unless you have a good reason.
Topic: Graphics & Games SubTopic: General Tags:
Feb ’24