Post

Replies

Boosts

Views

Activity

Reply to Swift/objC combined with Swift/C++ interop
I'm hoping that I can wrap a C++ std::function in some sort of opaque wrapper and pass that to swift, or something. Here that is, if anyone cares: // swiftcompat_voidfunc.hh #include <concepts> // swiftcompat_voidfunc is like a std::function<void(void)>, but it can be used with // Swift/C++ interop. // In Swift, arange for this header to be visible to Swift (i.e. include it from your // bridging header) and declare parameters and variables of type swiftcompat_voidfunc. // They have value semantics. Invoke the function using (). // In C++, include the other header, swiftcompat_voidfunc_cpp.hh. Construct swiftcompat_voidfunc // objects, passing the invokable (e.g. a lambda) to store. Pass these objects (by value) to // Swift APIs. // The issues that we need to address to make this work are: // - We can't pass std::function<> to Swift. // - We can't call a Swift closure type from C++. // - (We can pass objC blocks to Swift using Swift/objC interop, but we don't want to do that.) // - We can't expose std::unique_ptr<> in the bridged code (hence a raw pointer pimpl). // - The type needs to be copyable, not just moveable. // If anything changes in Swift/C++ interop that changes those assumptions, we may not need this. class swiftcompat_voidfunc { struct Impl; Impl* pimpl; public: swiftcompat_voidfunc(std::invocable<> auto cbk); ~swiftcompat_voidfunc(); swiftcompat_voidfunc(const swiftcompat_voidfunc& other); swiftcompat_voidfunc& operator=(const swiftcompat_voidfunc& other); void operator()(); }; // swiftcompat_voidfunc_cpp.hh #include "swiftcompat_voidfunc.hh" #include <functional> // See comments in swiftcompat_voidfunc.hh. // Include this file from C++ code. struct swiftcompat_voidfunc::Impl { std::function<void(void)> fn; }; swiftcompat_voidfunc::swiftcompat_voidfunc(std::invocable<> auto fn): pimpl(new Impl(fn)) {} // swiftcompat_voidfunc.cc #include "swiftcompat_voidfunc_cpp.hh" swiftcompat_voidfunc::~swiftcompat_voidfunc() { delete pimpl; } swiftcompat_voidfunc::swiftcompat_voidfunc(const swiftcompat_voidfunc& other): pimpl(new Impl(*other.pimpl)) {} swiftcompat_voidfunc& swiftcompat_voidfunc::operator=(const swiftcompat_voidfunc& other) { delete pimpl; pimpl = new Impl(*other.pimpl); return *this; } void swiftcompat_voidfunc::operator()() { pimpl->fn(); }
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’25
Reply to Appstore Connect Data Collection - Longer than Necessary
What does the point "longer than necessary" refer to? "Collection" requires two things: You need to transmit the data off the device, i.e. to your server. Your server needs to store the data for "longer than necessary to service the request". So if your server communication is a simple request/response system with no persistent state on the server side, then the server must not remember the content of the request after the response has been sent. For example, you're not allowed to log the requests (unless suitably anonymised). If you do require persistent state on the server side then you need to take care to not store more information than is actually necessary to deliver the functionality, and you must delete it once it is no longer needed. This could get complicated. Tell us more about your app's architecture?
Jan ’25
Reply to IOS App
If I understand correctly, what you've shown in the screenshot is not the "purpose string", it's the "App Privacy" information. These are two different things. The "purpose string" is something that you enter in Xcode, and is a text field where you can enter any text you like. The "privacy information" is entered in the App Store Connect web interface and is limited to selecting between various options. Please show us what you have entered as the location purpose string in Xcode, and then we can perhaps comment on it. In my experience, once App Review have decided that they don't like what you've written for a purpose string, it's not sufficient to make minor changes; you need to write something verbose that comprehensively covers everything that they want. In particular, they may require that you "give an example" as well as an abstract description.
Jan ’25
Reply to Email from app_notification@apple.com - Phishing?
Received a similar email, has anyone confirmed wether this is a legit email from Apple ? If you post the complete headers from the email you received, someone will be able to confirm whether it's genuine. Otherwise, you should definitely assume that it is genuine. Why do you doubt it? Apple terminate many thousands of developer accounts in this way each year. Happy New Year!
Jan ’25
Reply to StoreKitSubscriptionView presents an unfriendly message when network is unavailable
That's interesting, I just turned off WiFi in order to test this and I get a sensible message: "The internet connection appears to be offline. Something went wrong. Please try again". That's not what I was getting before, which was when WiFi was turned on but the network was unavailable in some way. (I note that this doesn't give any clue that it is related to the subscription, which is not ideal.)
Topic: App & System Services SubTopic: StoreKit Tags:
Dec ’24
Reply to Sync IOS cursor to app cursor.
My app controls the cursor within its text area. What exactly are you doing? UIKit or SwiftUI? Is your "text area" a custom view or a UITextField? There are various text input related protocols and interactions that you can use, including UITextInput, UITextSelectionDisplayInteraction, UITextInteraction, UIStandardTextCursorView etc. It may be that you need to work at a slightly lower level.
Dec ’24
Reply to Provisioning profile, all steps carefully taken, still rejected
Modern versions of Xcode can do much more of this automagically than in the (distant?) past. I don't know exactly what you need to do now to get to a working system, but generally you should not need to extract UDIDs or download provisioning profiles at all.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Does your app provide end-to-end encryption?
Therefore the question presumably means something other than https. But HTTPS is unlikely to be end-to-end. Most likely, it is only encryption between the app and your server.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Difference in Downloads and Installations count
If you look very carefully, you'll see that the "installations" graph says "opt-in only" and the "total downloads" doesn't.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Does your app provide end-to-end encryption?
exactly what they mean by end-to-end encryption specifically. To me "end-to-end encryption" means, in an architecture where you have users and servers, the data is encrypted by the sending user, passed to the server which cannot decrypt it, and then to the receiving user, who decrypts it. This may or may not be what Apple means.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Does your app provide end-to-end encryption?
these payloads themselves are not encrypted (beyond https) But https is encryption! however the http header contain a custom field with a JWT (so the server can verify the app is who it says it is). This JWT contains a SHA256 hash. That sounds like a digital signature, not encryption.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Swift/objC combined with Swift/C++ interop
I'm hoping that I can wrap a C++ std::function in some sort of opaque wrapper and pass that to swift, or something. Here that is, if anyone cares: // swiftcompat_voidfunc.hh #include <concepts> // swiftcompat_voidfunc is like a std::function<void(void)>, but it can be used with // Swift/C++ interop. // In Swift, arange for this header to be visible to Swift (i.e. include it from your // bridging header) and declare parameters and variables of type swiftcompat_voidfunc. // They have value semantics. Invoke the function using (). // In C++, include the other header, swiftcompat_voidfunc_cpp.hh. Construct swiftcompat_voidfunc // objects, passing the invokable (e.g. a lambda) to store. Pass these objects (by value) to // Swift APIs. // The issues that we need to address to make this work are: // - We can't pass std::function<> to Swift. // - We can't call a Swift closure type from C++. // - (We can pass objC blocks to Swift using Swift/objC interop, but we don't want to do that.) // - We can't expose std::unique_ptr<> in the bridged code (hence a raw pointer pimpl). // - The type needs to be copyable, not just moveable. // If anything changes in Swift/C++ interop that changes those assumptions, we may not need this. class swiftcompat_voidfunc { struct Impl; Impl* pimpl; public: swiftcompat_voidfunc(std::invocable<> auto cbk); ~swiftcompat_voidfunc(); swiftcompat_voidfunc(const swiftcompat_voidfunc& other); swiftcompat_voidfunc& operator=(const swiftcompat_voidfunc& other); void operator()(); }; // swiftcompat_voidfunc_cpp.hh #include "swiftcompat_voidfunc.hh" #include <functional> // See comments in swiftcompat_voidfunc.hh. // Include this file from C++ code. struct swiftcompat_voidfunc::Impl { std::function<void(void)> fn; }; swiftcompat_voidfunc::swiftcompat_voidfunc(std::invocable<> auto fn): pimpl(new Impl(fn)) {} // swiftcompat_voidfunc.cc #include "swiftcompat_voidfunc_cpp.hh" swiftcompat_voidfunc::~swiftcompat_voidfunc() { delete pimpl; } swiftcompat_voidfunc::swiftcompat_voidfunc(const swiftcompat_voidfunc& other): pimpl(new Impl(*other.pimpl)) {} swiftcompat_voidfunc& swiftcompat_voidfunc::operator=(const swiftcompat_voidfunc& other) { delete pimpl; pimpl = new Impl(*other.pimpl); return *this; } void swiftcompat_voidfunc::operator()() { pimpl->fn(); }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Crash:Exceeded system-wide per-process Port Limit
The report suggests that it may be because the app is creating an enormous number of threads.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Appstore Connect Data Collection - Longer than Necessary
What does the point "longer than necessary" refer to? "Collection" requires two things: You need to transmit the data off the device, i.e. to your server. Your server needs to store the data for "longer than necessary to service the request". So if your server communication is a simple request/response system with no persistent state on the server side, then the server must not remember the content of the request after the response has been sent. For example, you're not allowed to log the requests (unless suitably anonymised). If you do require persistent state on the server side then you need to take care to not store more information than is actually necessary to deliver the functionality, and you must delete it once it is no longer needed. This could get complicated. Tell us more about your app's architecture?
Replies
Boosts
Views
Activity
Jan ’25
Reply to Guideline 4.3(a) - Design - Spam - automatic rejection
Are all new VPN apps being rejected as spam?
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Email from app_notification@apple.com - Phishing?
Should I post the email headers here in comments or in a separate post ? Whatever, as long as it's well-formatted i.e. as code not text.
Replies
Boosts
Views
Activity
Jan ’25
Reply to IOS App
If I understand correctly, what you've shown in the screenshot is not the "purpose string", it's the "App Privacy" information. These are two different things. The "purpose string" is something that you enter in Xcode, and is a text field where you can enter any text you like. The "privacy information" is entered in the App Store Connect web interface and is limited to selecting between various options. Please show us what you have entered as the location purpose string in Xcode, and then we can perhaps comment on it. In my experience, once App Review have decided that they don't like what you've written for a purpose string, it's not sufficient to make minor changes; you need to write something verbose that comprehensively covers everything that they want. In particular, they may require that you "give an example" as well as an abstract description.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Email from app_notification@apple.com - Phishing?
Received a similar email, has anyone confirmed wether this is a legit email from Apple ? If you post the complete headers from the email you received, someone will be able to confirm whether it's genuine. Otherwise, you should definitely assume that it is genuine. Why do you doubt it? Apple terminate many thousands of developer accounts in this way each year. Happy New Year!
Replies
Boosts
Views
Activity
Jan ’25
Reply to StoreKitSubscriptionView presents an unfriendly message when network is unavailable
That's interesting, I just turned off WiFi in order to test this and I get a sensible message: "The internet connection appears to be offline. Something went wrong. Please try again". That's not what I was getting before, which was when WiFi was turned on but the network was unavailable in some way. (I note that this doesn't give any clue that it is related to the subscription, which is not ideal.)
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to Sync IOS cursor to app cursor.
My app controls the cursor within its text area. What exactly are you doing? UIKit or SwiftUI? Is your "text area" a custom view or a UITextField? There are various text input related protocols and interactions that you can use, including UITextInput, UITextSelectionDisplayInteraction, UITextInteraction, UIStandardTextCursorView etc. It may be that you need to work at a slightly lower level.
Replies
Boosts
Views
Activity
Dec ’24
Reply to Xcode: Duplicate Symbols Error
Do both files contain a main function?
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’24