Post

Replies

Boosts

Views

Activity

Reply to Apple Appstore Summary Sales Report API updates historical reports without notification
This is causing a lot of ... manual effort for our accounting teams. Ideally the accountants should use only the Financial Reports, which are definitive (in some sense). Is there some reason why your accounts - rather than your "sales tracking", or whatever you want to call it - need the extra detail of the other reports?
Jun ’24
Reply to StoreKit Free Trial Period
In iOS 1.72 and newer, check transaction.offer.paymentMode == freeTrial, and then status.renewalInfo.willAutoRenew, then status.renewalInfo.renewalDate. For a while I was confused because I thought the free trial was part of the first subscription period and the renewal date would be after e.g. 1 year. But no, the free trial its its own subscription period of e.g. 3 days. I would not try to calculate how many days are remaining; just show the renewalDate. (Because: https://xkcd.com/2867/ )
Topic: App & System Services SubTopic: StoreKit Tags:
Jun ’24
Reply to Compiling the JPEG-XL reference for iOS, or, "Is compiling C++ for iOS really this difficult!?"
C++ doesn’t have any sort of package manager It has vcpkg, but that's not an Apple product so it doesn't exist apparently. You might be able to just vcpkg install libjxl --triplet=arm64-ios, or something. Not that I use it. The stack of package manager (vcpkg) --> build system (cmake) --> low-level build system (make) --> compiler (clang) tries to make things easier for you by hiding the details of the lower levels behind easier-to-use higher levels. But in my experience, they rarely succeed at that; you inevitably get an error from a lower level that is impossible to relate to the higher-level command that you actually ran. Learning vcpkg doesn't remove the need to understand, and be able to debug, cmake, make and the compiler. The same is true of autotools and to some extent xcode. Package managers, IMO, work well for binaries i.e. homebrew or dpkg, and maybe for interpretted languages, e.g. npm, but not really for compiled languages.
Jun ’24
Reply to Reducing storage of similar PNGs by compressing them into a video and retrieving them losslessly--possibility or dumb idea?
% cd /usr/local/src/ % git clone https://github.com/leetal/ios-cmake.git % cd /usr/local/src/ % git clone https://github.com/libjxl/libjxl.git --recursive --shallow-submodules % cd libjxl At this point I hacked third_party/brotli/CMakeLists.txt to disable three lines around line 214: # install( # TARGETS brotli # RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" # ) Without this, I was getting this error: CMake Error at third_party/brotli/CMakeLists.txt:214 (install): install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable target "brotli". The clue is the word "executable" in the message; we don't want it to try to build any executables, but it seemed to be trying to build a brotli executable. My change is a hack. Anyway: % mkdir build.ios % cd build.ios % cmake .. \ -DCMAKE_TOOLCHAIN_FILE=../../ios-cmake/ios.toolchain.cmake \ -DPLATFORM=OS64 \ -DENABLE_BITCODE=false \ -DENABLE_VISIBILITY=true \ -DCMAKE_INSTALL_PREFIX=/some/path/ \ -DBUILD_SHARED_LIBS=false \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=OFF \ -DJPEGXL_ENABLE_TOOLS=false \ -DJPEGXL_ENABLE_MANPAGES=false \ -DJPEGXL_ENABLE_BENCHMARK=false \ -DJPEGXL_ENABLE_EXAMPLES=false \ -DJPEGXL_ENABLE_JNI=false \ -DJPEGXL_ENABLE_FUZZERS=false % make % make install You should now have .a static libraries in /some/path/lib Let me know if that works for you.
Topic: Media Technologies SubTopic: Video Tags:
Jun ’24
Reply to Invalid argument error from tcsetattr when setting speed to anything other than predefined
I have a vague recollection... I've found the code in question, where I have this comment: // The glibc docs used to say: // In the GNU library, the functions [cfsetispeed, cfsetospeed, etc] accept // speeds measured in bits per second as input, and return speed values // measured in bits per second. Other libraries require speeds to be indicated // by special codes. // At some point, however, this note has been removed and currently the // Bnnnn definitions are not the same as the numeric values; attempting to // use a numeric baud rate will result in an error. So Bnnnn symbols for // baud rates must be used. I added that in 2017.
Jun ’24
Reply to Acceptable location purpose strings
Here's what I used for that app, which was approved: When you tap the app's Location button, a marker will be displayed on the map at your current location. For example, if you're standing on the summit of Denali and you tap the Location button, the app will show a marker on the map at the summit of Denali (subject to the accuracy of the data received from the device). The app will continue to receive location updates from the device and move the marker until you turn off the Location button. When you tap the app's Record button, the app will display a line on the map indicating where you have been, and will store this data in a file. None of this data leaves the app, unless you choose to export the file containing the recording.
Jun ’24
Reply to Reducing storage of similar PNGs by compressing them into a video and retrieving them losslessly--possibility or dumb idea?
I normally tell cmake to build Makefiles (which is possibly the default?), rather than using -G Xcode. Is that error telling you that it is trying to build a dynamic library? For iOS builds, you probably want to tell it to build only a static library, and not to build executables i.e. the cjxl / djxl utilities. Something like -DBUILD_SHARED_LIBS=false ? If you're lucky, there will be a cmake invocation that will list all the available flags. You're already turning off testing, see what else there is.
Topic: Media Technologies SubTopic: Video Tags:
Jun ’24
Reply to How to do a postorder enumeration of a directory?
I want to pick up on this from a comment: I would rather use built-in functionality if possible Why? Seriously. Write it yourself. It will do exactly what you want with no confusion about whether it is borked or just "working as intended". Oh, and it will be portable, and it won't get deprecated in 2 years time.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Apple Appstore Summary Sales Report API updates historical reports without notification
This is causing a lot of ... manual effort for our accounting teams. Ideally the accountants should use only the Financial Reports, which are definitive (in some sense). Is there some reason why your accounts - rather than your "sales tracking", or whatever you want to call it - need the extra detail of the other reports?
Replies
Boosts
Views
Activity
Jun ’24
Reply to StoreKit Free Trial Period
In iOS 1.72 and newer, check transaction.offer.paymentMode == freeTrial, and then status.renewalInfo.willAutoRenew, then status.renewalInfo.renewalDate. For a while I was confused because I thought the free trial was part of the first subscription period and the renewal date would be after e.g. 1 year. But no, the free trial its its own subscription period of e.g. 3 days. I would not try to calculate how many days are remaining; just show the renewalDate. (Because: https://xkcd.com/2867/ )
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Compiling the JPEG-XL reference for iOS, or, "Is compiling C++ for iOS really this difficult!?"
C++ doesn’t have any sort of package manager It has vcpkg, but that's not an Apple product so it doesn't exist apparently. You might be able to just vcpkg install libjxl --triplet=arm64-ios, or something. Not that I use it. The stack of package manager (vcpkg) --> build system (cmake) --> low-level build system (make) --> compiler (clang) tries to make things easier for you by hiding the details of the lower levels behind easier-to-use higher levels. But in my experience, they rarely succeed at that; you inevitably get an error from a lower level that is impossible to relate to the higher-level command that you actually ran. Learning vcpkg doesn't remove the need to understand, and be able to debug, cmake, make and the compiler. The same is true of autotools and to some extent xcode. Package managers, IMO, work well for binaries i.e. homebrew or dpkg, and maybe for interpretted languages, e.g. npm, but not really for compiled languages.
Replies
Boosts
Views
Activity
Jun ’24
Reply to Reducing storage of similar PNGs by compressing them into a video and retrieving them losslessly--possibility or dumb idea?
% cd /usr/local/src/ % git clone https://github.com/leetal/ios-cmake.git % cd /usr/local/src/ % git clone https://github.com/libjxl/libjxl.git --recursive --shallow-submodules % cd libjxl At this point I hacked third_party/brotli/CMakeLists.txt to disable three lines around line 214: # install( # TARGETS brotli # RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" # ) Without this, I was getting this error: CMake Error at third_party/brotli/CMakeLists.txt:214 (install): install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable target "brotli". The clue is the word "executable" in the message; we don't want it to try to build any executables, but it seemed to be trying to build a brotli executable. My change is a hack. Anyway: % mkdir build.ios % cd build.ios % cmake .. \ -DCMAKE_TOOLCHAIN_FILE=../../ios-cmake/ios.toolchain.cmake \ -DPLATFORM=OS64 \ -DENABLE_BITCODE=false \ -DENABLE_VISIBILITY=true \ -DCMAKE_INSTALL_PREFIX=/some/path/ \ -DBUILD_SHARED_LIBS=false \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=OFF \ -DJPEGXL_ENABLE_TOOLS=false \ -DJPEGXL_ENABLE_MANPAGES=false \ -DJPEGXL_ENABLE_BENCHMARK=false \ -DJPEGXL_ENABLE_EXAMPLES=false \ -DJPEGXL_ENABLE_JNI=false \ -DJPEGXL_ENABLE_FUZZERS=false % make % make install You should now have .a static libraries in /some/path/lib Let me know if that works for you.
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Invalid argument error from tcsetattr when setting speed to anything other than predefined
I have a vague recollection... I've found the code in question, where I have this comment: // The glibc docs used to say: // In the GNU library, the functions [cfsetispeed, cfsetospeed, etc] accept // speeds measured in bits per second as input, and return speed values // measured in bits per second. Other libraries require speeds to be indicated // by special codes. // At some point, however, this note has been removed and currently the // Bnnnn definitions are not the same as the numeric values; attempting to // use a numeric baud rate will result in an error. So Bnnnn symbols for // baud rates must be used. I added that in 2017.
Replies
Boosts
Views
Activity
Jun ’24
Reply to When two memset struct with the same name will crash on ios18 beta1
We need to know whether iOS18 has made any improvements to the API for operating memory such as memset. No. Is memory management more stringent? No. Why do versions below iOS18 not cause problems? You were lucky. The important question is: why did you not get a compiler error, or at least a warning, about this? Were you ignoring warnings?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Acceptable location purpose strings
Here's what I used for that app, which was approved: When you tap the app's Location button, a marker will be displayed on the map at your current location. For example, if you're standing on the summit of Denali and you tap the Location button, the app will show a marker on the map at the summit of Denali (subject to the accuracy of the data received from the device). The app will continue to receive location updates from the device and move the marker until you turn off the Location button. When you tap the app's Record button, the app will display a line on the map indicating where you have been, and will store this data in a file. None of this data leaves the app, unless you choose to export the file containing the recording.
Replies
Boosts
Views
Activity
Jun ’24
Reply to Reducing storage of similar PNGs by compressing them into a video and retrieving them losslessly--possibility or dumb idea?
I normally tell cmake to build Makefiles (which is possibly the default?), rather than using -G Xcode. Is that error telling you that it is trying to build a dynamic library? For iOS builds, you probably want to tell it to build only a static library, and not to build executables i.e. the cjxl / djxl utilities. Something like -DBUILD_SHARED_LIBS=false ? If you're lucky, there will be a cmake invocation that will list all the available flags. You're already turning off testing, see what else there is.
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Jun ’24