Post

Replies

Boosts

Views

Activity

Reply to Similar app name in appstore
You have a number of things to worry about: Will there be competition for things like website domain names, social media handles, etc.? Are you violating any trademarks? Will these other people try to attack you legally? (Even if they have no basis in law, that doesn't stop them from threatening you; that can get expensive if you have to get your own lawyers, and can cause sleepless nights.) Will Apple notice and complain? What will happen when people search (Google / App Store) for this app name? Your example is a bit difficult to follow, because you say your name is "unusual ... just made up", but then you give the example "Car", which is not a made-up word at all. Contrast: Apple is not a made-up or unusual word; Tgweoxy is a made-up word.
Mar ’23
Reply to Cannot figure out a very basic issue...
We can't tell what you're doing wrong without seeing how you invoked the compiler, but Quinn is probably right that you've not linked with the file with the implementation of your welcome() function. A couple of other things to note: You're probably not using g++/gcc. Apple alias g++ and gcc to clang++ and clang. This has some advantages, i.e. some things "just work", but I think it also has the potential to cause some confusion. Put \n at the end of your "Hello World" string.
Mar ’23
Reply to Submit bug reports or not?
I find that sending bug reports is about as useful as asking questions on this forum. Of my last 10 posts here asking a question, none got useful responses. (The 11th got an answer from Quinn - thanks!) There are a couple of other things, though. Firstly, the act of writing a (good) bug report or forum question can help you to better understand your problem. Going through the documentation one more time to find the right bit to copy into your post might be enough to find the bit you mis-read previously. Or distilling your code down to something you can share might be enough to reveal your bug. But actually, this works just as well if you're explaining the problem to the invisible rabbit who sits on your shoulder. Maybe write the bug report, but then press "cancel" instead of "submit"? Secondly, remember that even if Apple fixed bugs as quickly as possible, it would literally be years before those fixes were in the hands of all your customers. So unless you're working on a project that's got very long timescales, fixes don't help. What you need is work-arounds. Bug reports are unlikely to deliver those. The main beneficiaries of your bug reports, therefore, are other developers who try to use the same feature in a few years time. And they may be your competitors. This is a real issue: I have an app that dates from 2009, and it is full of code to work around bugs and missing features in ancient iOS versions. My competitors, whose apps are much newer, don't need any of those work-arounds and should have much cleaner and easier to maintain code as a result.
Feb ’23
Reply to Can a WKWebView somehow display SF Symbols?
OK, here's what I've got. In my help.html: <p>To show more options, press the More <img src="symbol:ellipsis.circle"/> button.</p> In my help screen's view controller, I have something like symbol_handler = [[SymbolURLHandler alloc] init]; auto config = [[WKWebViewConfiguration alloc] init]; [config setURLSchemeHandler: symbol_handler forURLScheme: @"symbol"]; webview = [[WKWebView alloc] initWithFrame: self.bounds configuration: config]; SymbolURLHandler is: // SymbolURLHandler.hh: #import <WebKit/Webkit.h> @interface SymbolURLHandler: NSObject<WKURLSchemeHandler> { }; @end // SymbolURLHandler.mm: #import "SymbolURLHandler.hh" #import <UIKit/UIImage.h> #import <UIKit/UIImageSymbolConfiguration.h> @implementation SymbolURLHandler -(void) webView: (WKWebView*) webView          startURLSchemeTask: (id<WKURLSchemeTask>) urlSchemeTask {   auto req = urlSchemeTask.request;   auto url = req.URL;   auto name = [url.absoluteString substringFromIndex: 7];  // 7 == strlen("symbol:");   UIImageConfiguration* image_configuration =     [UIImageSymbolConfiguration configurationWithPointSize: 16  // ???                                                     weight: UIImageSymbolWeightLight                                                      scale: UIImageSymbolScaleMedium];   UIImage* uiimg = [UIImage systemImageNamed: name                            withConfiguration: image_configuration];   if (!uiimg) {     auto error = [NSError errorWithDomain: NSURLErrorDomain                                      code: NSURLErrorFileDoesNotExist                                  userInfo: nil];     [urlSchemeTask didFailWithError: error];     return;   }      auto data = [[NSMutableData alloc] init];      auto dest = CGImageDestinationCreateWithData((CFMutableDataRef)data, (CFStringRef)@"public.png", 1, NULL);   CGImageDestinationAddImage(dest, uiimg.CGImage, NULL);   CGImageDestinationFinalize(dest);   CFRelease(dest);   auto resp = [[NSURLResponse alloc] initWithURL: req.URL                                         MIMEType: @"image/png"                            expectedContentLength: data.length                                 textEncodingName: nil];      [urlSchemeTask didReceiveResponse: resp];   [urlSchemeTask didReceiveData: data];   [urlSchemeTask didFinish]; } -(void) webView: (WKWebView*) webView         stopURLSchemeTask: (id<WKURLSchemeTask>) urlSchemeTask { } @end And it works! There are clearly a few things missing: The webview doesn't tell the symbol handler what the current font size, colour etc. is. The symbol handler doesn't tell the webview the symbol's baseline or padding metrics. The image is shown with scale 1, not at "retina" resolution. I'm not sure if I should use dispatch_async() to make multiple invocations run concurrently, or whether WebKit does that for me. I'm not sure if I should be caching my PNGs, or whether WebKit does that for me, or maybe I need to include something in the response telling it that they are cacheable. Any thoughts about those or other improvements would be gratefully received!
Topic: Safari & Web SubTopic: General Tags:
Feb ’23
Reply to OpenGL on future iPhones and Macs?
I was told to do opengl since I'm new to the api graphics programming, and it was said MANY times to do opengl if your completely new. Not by us in your previous thread. Who exactly has suggested that to you? Is it something that you've read on an old website, maybe? Right now, I think most people would tell you that you must learn most of the APIs (Metal, Vulkan, and DirectX, and maybe WebGL) to create a portable application - unless you use a higher-level system like Unity. As I wrote previously, I think in another year or two WebGPU will be the "start here" API for portable 3D - and not only for web apps, thanks to native webgpu.h. I hesitate to say that WebGPU is what you should learn today - because it's much less mature than the alternatives, and learning materials are thin on the ground. And I could be wrong about its rosy future!
Topic: Graphics & Games SubTopic: General Tags:
Feb ’23
Reply to SF Symbols interpolation error
Do file a bug asking for a more detailed error message when it fails to interpolate. I had the same issue, and had to look at the SVG. By tediously comparing the code for the strokes I could eventually work out where the problems were. What SVG editor are you using?
Topic: Design SubTopic: General Tags:
Feb ’23
Reply to Similar app name in appstore
You have a number of things to worry about: Will there be competition for things like website domain names, social media handles, etc.? Are you violating any trademarks? Will these other people try to attack you legally? (Even if they have no basis in law, that doesn't stop them from threatening you; that can get expensive if you have to get your own lawyers, and can cause sleepless nights.) Will Apple notice and complain? What will happen when people search (Google / App Store) for this app name? Your example is a bit difficult to follow, because you say your name is "unusual ... just made up", but then you give the example "Car", which is not a made-up word at all. Contrast: Apple is not a made-up or unusual word; Tgweoxy is a made-up word.
Replies
Boosts
Views
Activity
Mar ’23
Reply to Cannot figure out a very basic issue...
We can't tell what you're doing wrong without seeing how you invoked the compiler, but Quinn is probably right that you've not linked with the file with the implementation of your welcome() function. A couple of other things to note: You're probably not using g++/gcc. Apple alias g++ and gcc to clang++ and clang. This has some advantages, i.e. some things "just work", but I think it also has the potential to cause some confusion. Put \n at the end of your "Hello World" string.
Replies
Boosts
Views
Activity
Mar ’23
Reply to Submit bug reports or not?
I find that sending bug reports is about as useful as asking questions on this forum. Of my last 10 posts here asking a question, none got useful responses. (The 11th got an answer from Quinn - thanks!) There are a couple of other things, though. Firstly, the act of writing a (good) bug report or forum question can help you to better understand your problem. Going through the documentation one more time to find the right bit to copy into your post might be enough to find the bit you mis-read previously. Or distilling your code down to something you can share might be enough to reveal your bug. But actually, this works just as well if you're explaining the problem to the invisible rabbit who sits on your shoulder. Maybe write the bug report, but then press "cancel" instead of "submit"? Secondly, remember that even if Apple fixed bugs as quickly as possible, it would literally be years before those fixes were in the hands of all your customers. So unless you're working on a project that's got very long timescales, fixes don't help. What you need is work-arounds. Bug reports are unlikely to deliver those. The main beneficiaries of your bug reports, therefore, are other developers who try to use the same feature in a few years time. And they may be your competitors. This is a real issue: I have an app that dates from 2009, and it is full of code to work around bugs and missing features in ancient iOS versions. My competitors, whose apps are much newer, don't need any of those work-arounds and should have much cleaner and easier to maintain code as a result.
Replies
Boosts
Views
Activity
Feb ’23
Reply to Can a WKWebView somehow display SF Symbols?
OK, here's what I've got. In my help.html: <p>To show more options, press the More <img src="symbol:ellipsis.circle"/> button.</p> In my help screen's view controller, I have something like symbol_handler = [[SymbolURLHandler alloc] init]; auto config = [[WKWebViewConfiguration alloc] init]; [config setURLSchemeHandler: symbol_handler forURLScheme: @"symbol"]; webview = [[WKWebView alloc] initWithFrame: self.bounds configuration: config]; SymbolURLHandler is: // SymbolURLHandler.hh: #import <WebKit/Webkit.h> @interface SymbolURLHandler: NSObject<WKURLSchemeHandler> { }; @end // SymbolURLHandler.mm: #import "SymbolURLHandler.hh" #import <UIKit/UIImage.h> #import <UIKit/UIImageSymbolConfiguration.h> @implementation SymbolURLHandler -(void) webView: (WKWebView*) webView          startURLSchemeTask: (id<WKURLSchemeTask>) urlSchemeTask {   auto req = urlSchemeTask.request;   auto url = req.URL;   auto name = [url.absoluteString substringFromIndex: 7];  // 7 == strlen("symbol:");   UIImageConfiguration* image_configuration =     [UIImageSymbolConfiguration configurationWithPointSize: 16  // ???                                                     weight: UIImageSymbolWeightLight                                                      scale: UIImageSymbolScaleMedium];   UIImage* uiimg = [UIImage systemImageNamed: name                            withConfiguration: image_configuration];   if (!uiimg) {     auto error = [NSError errorWithDomain: NSURLErrorDomain                                      code: NSURLErrorFileDoesNotExist                                  userInfo: nil];     [urlSchemeTask didFailWithError: error];     return;   }      auto data = [[NSMutableData alloc] init];      auto dest = CGImageDestinationCreateWithData((CFMutableDataRef)data, (CFStringRef)@"public.png", 1, NULL);   CGImageDestinationAddImage(dest, uiimg.CGImage, NULL);   CGImageDestinationFinalize(dest);   CFRelease(dest);   auto resp = [[NSURLResponse alloc] initWithURL: req.URL                                         MIMEType: @"image/png"                            expectedContentLength: data.length                                 textEncodingName: nil];      [urlSchemeTask didReceiveResponse: resp];   [urlSchemeTask didReceiveData: data];   [urlSchemeTask didFinish]; } -(void) webView: (WKWebView*) webView         stopURLSchemeTask: (id<WKURLSchemeTask>) urlSchemeTask { } @end And it works! There are clearly a few things missing: The webview doesn't tell the symbol handler what the current font size, colour etc. is. The symbol handler doesn't tell the webview the symbol's baseline or padding metrics. The image is shown with scale 1, not at "retina" resolution. I'm not sure if I should use dispatch_async() to make multiple invocations run concurrently, or whether WebKit does that for me. I'm not sure if I should be caching my PNGs, or whether WebKit does that for me, or maybe I need to include something in the response telling it that they are cacheable. Any thoughts about those or other improvements would be gratefully received!
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to OpenGL on future iPhones and Macs?
I was told to do opengl since I'm new to the api graphics programming, and it was said MANY times to do opengl if your completely new. Not by us in your previous thread. Who exactly has suggested that to you? Is it something that you've read on an old website, maybe? Right now, I think most people would tell you that you must learn most of the APIs (Metal, Vulkan, and DirectX, and maybe WebGL) to create a portable application - unless you use a higher-level system like Unity. As I wrote previously, I think in another year or two WebGPU will be the "start here" API for portable 3D - and not only for web apps, thanks to native webgpu.h. I hesitate to say that WebGPU is what you should learn today - because it's much less mature than the alternatives, and learning materials are thin on the ground. And I could be wrong about its rosy future!
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to SF Symbols interpolation error
Do file a bug asking for a more detailed error message when it fails to interpolate. I had the same issue, and had to look at the SVG. By tediously comparing the code for the strokes I could eventually work out where the problems were. What SVG editor are you using?
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’23