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
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:
Replies
Boosts
Views
Activity
Feb ’24
Reply to What kind of Accelerometer is in the iPhone13 (or other models)?
Is it public knowledge? Apple don’t publish a spec.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Tax on IAP with US government
I don’t believe there are any US taxes that you need to worry about, but you should check the US/Taiwan tax treaty for details.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Wrong write to Sqlite database
The first thing you should do is to check if the problem is during the INSERT or the SELECT. Inspect your sqlite file with e.g. the sqlite command line program and see if the data is correct in the file. Why are you using String(describing: …) ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Feb ’24
Reply to privacy manifests
What you mean is that even if SDK doesn't have anything to write in 'PrivacyInfo', should I add it? Yes.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Tax on IAP with US government
What country are you in? Which taxes specifically are you concerned about?
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Can't Post On This Forum
P u t s p a c e s b e t w e e n e v e r y c h a r a c t e r .
Replies
Boosts
Views
Activity
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?
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Feb ’24
Reply to privacy manifests
Should we add the privacy manifest file to our SDK? Yes please.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to My app was rejected because it offers repair services for mobile devices not produced by Apple
how can I avoid app rejection due to it You can't avoid it; they don't want your app on their store.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Can't post on the forum
Obligatory xkcd: https://xkcd.com/1313/
Replies
Boosts
Views
Activity
Feb ’24