Post not yet marked as solved
I don't believe that App Review have a limit, but I could be wrong. The question is, how long will your users be prepared to wait? I suggest that you check how quickly other comparable apps start up, and make yours no worse than average. The danger is a pile of 1-star reviews from impatient people.
Is there some particular reason why yours is slow? Maybe someone can suggest how to improve it.
Post not yet marked as solved
My big break thru was realizing the a file's URL (returned from the Swift code) needs to be
modified (replace, for example "%20" with " ") before using them as a file name in the fopen() call.
You should be using NSURL.getFileSystemRepresentation to do that.
I need to figure out why these files are not visible in the Files app.
I don't yet see them being uploaded to my desktops
Possibly because of the lack of a coordinated write.
Post not yet marked as solved
Contact them at the start of the deletion process and say "we won't contact you at the end of the deletion process, because at the end of the process, we won't have your contact details any more. If you would like confirmation, you may contact us in 14 days; we will not say 'your account has been deleted' but we will say 'who are you?'".
An intelligent user will understand this.
(P.S. I have no idea what requirements Apple has.)
Post not yet marked as solved
How would I manually create the Documents/ directory?
In C, mkdir(path, 0777).
In C++, create_directory(path).
In objC, [[NSFileManager defaultManager] createDirectoryAtURL: [NSURL urlWithFileSystemRepresentation: path] withIntermediateDirectories: false attributes: @[Some@[Extra]VerboSity]here] error: everyonejustpassesnil_becausewe'vegivenup_bythispoint_butReallyWeShouldDoSomethingToHandleErrors]
In Swift, same as objC but with different punctuation.
I'm not sure if this is necessary. What does seem to be the case is that if you haven't done anything then the empty directory is not visible in e.g. the Files app. I don't know if this is because the Documents directory doesn't exist, or because it is empty and empty directories are somehow hidden. Quite a few apps put a "readme" file in their iCloud Documents directory to make it appear. That is what I have done, using an NSFileManager method called something like copyFileFromHere: toThere: creatingIntermediateDirectoriesIfNecessary: true. So that would create Documents/ if necessary.
I don't know what a coordinated write block is
You need to look at the documentation for NSFilePresenter, NSFileCoordinator, and UIDocument. These are required for iCloud files, and also for local files if they are accessible from other apps, including the Files app.
Basically if you're going to read from a file, you need to do a "coordinated read" so that e.g. an instance of your app on another device or the Files app on the same device are told to save the file first. Coordinated writes are the converse. UIDocument simplifies a lot of this. But one important feature of these coordinated things is that they give you a potentially different path to access, in place of the path that you think you want to use. The point is that if there are conflicts between different devices you can have multiple versions of each file.
Having said all that - I don't think it would explain fopen(w) returning "no such file or directory".
It there a particular naming convention for the container name?
I would suggest reverse-dns i.e. com.your-business-name.your-app-name.this-container-name.
Post not yet marked as solved
atomic_compare....() returns true if the location was 0 and has been updated to 1.
Your atomic_store...() stores 0.
Why do you have the ! in bool test = !atomic_compare...()? (A better name than "test" would help.)
Maybe I'm missing something, but I think you want:
expected = 0; // We hope it is unlocked
bool succeeded_in_locking = atomic_compare_exchange....(flag, &expected, 1, ....); // Try to lock by storing a 1 in place of the 0.
if (succeeded_in_locking) {
// OK, we have the lock this is where we would do the work protected by it.
// Now we want to unlock.
// Just write 0:
atomic_store...(flag, 0, ....);
} else {
// We didn't lock - presumably some other thread has it.
// Try again.
}
Anyway... I'm not convinced that a memory_order_relaxed atomic can be used to implement a lock, as there are no constraints on the ordering of those atomic operations relative to the operations that you are trying to protect.
But I know nothing about Metal.
Post not yet marked as solved
I don't think you're supposed to be able to see iCloud Drive files in the CloudKit developer page. CloudKit != iCloud Drive. Have you enabled CloudKit instead of iCloud Drive somewhere?
You may need to create the Documents/ directory initially.
Are you using a coordinated write block?
Post not yet marked as solved
Those will all be included in U.K.
(Absolutely certainly, in the case of Northern Ireland; only 99% certain for IoM and the Channel Islands.)
Post not yet marked as solved
No, you can't do that.
IAP doesn't work for low-margin business models. It only really works when you have high enough margins that a difference of 20% or so doesn't matter - or, if you're only operating in one currency.
Beware that exchange rate fluctuations, and Apple's changes to IAP price tiers, can also interfere.
Post not yet marked as solved
Is there any functions in CoreLocation that will allow me to calculate coordinate
of the point by heading and distance?
No. The only bit of spherical geometry that Core Location has is a method to report the distance between two points:
https://developer.apple.com/documentation/corelocation/cllocation/1423689-distancefromlocation
There are various difficulties with what you want to do.
Firstly, the earth is not flat. But if you're only comparing points that are nearby and you don't need a very accurate answer and you're not worried about corner-cases like the poles or the middle of the Pacific, then you can use an approximation that pretends that the earth is flat. (See Jineshsethia's comment: "a distance on the coordinate plane..." - the earth is not a plane!)
Secondly, the earth isn't even a sphere. But if you don't need super-accurate answers then you can ignore that (the error is probably less than 1 %). Distance and bearing between two points on a sphere is something you could probably implement from equations on Wikipedia if you can manage "high school maths". (I think this is what the Stack Overflow posts that you linked to are all doing.)
If you actually want the "right" answer, you need the more complicated maths to work with the "squashed sphere" that better approximates the shape of the earth. My recommendation is to use GeographicLib. https://geographiclib.sourceforge.io It seems to be high-quality, and I use it in my mapping apps. It does much more than you need, though. What you need is its functions for "geodesics". See this page: https://geographiclib.sourceforge.io/C++/doc/classGeographicLib_1_1Geodesic.html and scroll down to the example, which I have copied in part below:
Geodesic geod(Constants::WGS84_a(), Constants::WGS84_f());
// Alternatively: const Geodesic& geod = Geodesic::WGS84();
{
// Sample direct calculation, travelling about NE from JFK
double lat1 = 40.6, lon1 = -73.8, s12 = 5.5e6, azi1 = 51;
double lat2, lon2;
geod.Direct(lat1, lon1, azi1, s12, lat2, lon2);
cout << lat2 << " " << lon2 << "\n";
}
{
// Sample inverse calculation, JFK to LHR
double
lat1 = 40.6, lon1 = -73.8, // JFK Airport
lat2 = 51.6, lon2 = -0.5; // LHR Airport
double s12;
geod.Inverse(lat1, lon1, lat2, lon2, s12);
cout << s12 << "\n";
}
I suspect that putting the code in main.m is too early. It wants to access the "shared UIApplication" but in main() that hasn't been created yet. Maybe.
I think you probably need to ask the Kivy people about how to do this. There must be some way of calling arbitrary objC or Swift code from slightly later on.
What's different? Here's what's different. If you write:
var number: Int = 3
Then the next person to look at this code will have no trouble understanding what it is doing.
On the other hand, if you write this:
var number: Int { return 3 }
then the only people who fully understand it will be swift experts. And today, as Swift is a relatively new language, there is a very good chance that the next person who looks at your code will not be an expert. In fact, you should assume that the next person who tries to understand your code will be a psychopath who knows where you live. So avoid not-syntactically-obvious features unless you have a very good reason to use them!
What you should do if you want a variable-like-thing whose value is computed when it is used, is use the slightly more verbose "get" syntax that claude shows at the end of his post, which I think is equivalent (someone correct me if I'm wrong):
var number: Int {
get {
return 3
}
}
The additional syntax there gives the psychopathic future reader a clue what is going on - return 3 is a statement executed in the getter for this not-a-normal-variable thing - so they should have deciphered what your code does before they arrive at your house with their axe.
Right, yes that TP thing will do what you need.
StoreKit 2 has this in iOS 16.
P.S. I got an email notification when you posted your reply 17 minutes ago, but not when you posted your comment 12 hours earlier. Another reason to not post comments on this forum!
Post not yet marked as solved
Do you test your production build configuration?
(If you don't test your production build configuration - why don't you test your production build configuration ???!!!)
Anyway, put something inside the #if DEBUG that will cause it to not compile (example: !"£$%^&*), and try to build for production.
Is it worth spending time on engaging in a conversation with the review team to figure out what’s going on?
It's probably more productive to talk to Developer Technical Support.
Edited to add:
I've just googled what LSApplicationWorkspace might be used for, and I think you need to be very cautious going forward. It seems that it can perhaps be used to enumerate all the apps on the device! That's a nasty bit of user privacy violation, and has no doubt raised a "red flag" against you and the app. Why on earth was it there in the first place?
Post not yet marked as solved
where the first sends a private key to the second
No.
unknowable, but now stored in two devices?
Unknowable but known to a second device..... no, that's a contradiction.
It sounds like you might be trying to design your own cryptography system. Don't do that!
Do you have functioning code that checks for the IAP in the receipt?
There is no "product ID" for the original app purchase in the app receipt. The original purchase is not an IAP purchase. You need to be looking at attribute type 19, "Original Application Version".