|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
Yup. When the target you’re building has enough of its own header files to affect compilation speed, it becomes useful to precompile them.
There are also a lot of C and C++ headers in the OS (and in
Yup. When the target you’re building has enough of its own header files to affect compilation speed, it becomes useful to precompile them.
There are also a lot of C and C++ headers in the OS (and in
|
By
Jens Alfke
·
#367
·
|
|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
Except of course that the tradition of *pure C* programming has assimilated this as standard programming technique: the compilation of one package is modified by pre-inserting macro definitions that
Except of course that the tradition of *pure C* programming has assimilated this as standard programming technique: the compilation of one package is modified by pre-inserting macro definitions that
|
By
Quincey Morris
·
#366
·
|
|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
I want faster builds. We all want faster builds. The question is whether precompiling text-substituted inclusions is the best we can do with a modern development system.
The answer was yes when
I want faster builds. We all want faster builds. The question is whether precompiling text-substituted inclusions is the best we can do with a modern development system.
The answer was yes when
|
By
Fritz Anderson
·
#365
·
|
|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
Exactly. I’ve never heard anyone say they should no longer be used. Why wouldn’t you want faster builds?
Steve via iPad
Exactly. I’ve never heard anyone say they should no longer be used. Why wouldn’t you want faster builds?
Steve via iPad
|
By
Steve Mills
·
#364
·
|
|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
Wait, what? I never got the memo on this.
I put constants in the headers for the classes/APIs they are used with. If you look at Cocoa headers you can see Apple does the same thing.
Also, this is a
Wait, what? I never got the memo on this.
I put constants in the headers for the classes/APIs they are used with. If you look at Cocoa headers you can see Apple does the same thing.
Also, this is a
|
By
Jens Alfke
·
#363
·
|
|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
Alex Zavatone:
Pre-compiled headers are now considered to be a bad idea, yes, but although traditionally the *prefix* header was usually pre-compiled it doesn't have to be. So what I use in some of
Alex Zavatone:
Pre-compiled headers are now considered to be a bad idea, yes, but although traditionally the *prefix* header was usually pre-compiled it doesn't have to be. So what I use in some of
|
By
Bernie Maier
·
#362
·
|
|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
Thanks Steve. That’s one option I’ve been considering. It’s a balance between knowing where to look for everything and properly scoping some constant to the one place where I use it. If
Thanks Steve. That’s one option I’ve been considering. It’s a balance between knowing where to look for everything and properly scoping some constant to the one place where I use it. If
|
By
Alex Zavatone
·
#361
·
|
|
Re: Objective-C: What is the current preferred method of declaring constants without a .pch?
I use constants a lot, but I put their declarations and definitions into the "owner" class files. For example if one object sources notifications and others consume them.
Foo.h
extern NSString*
I use constants a lot, but I put their declarations and definitions into the "owner" class files. For example if one object sources notifications and others consume them.
Foo.h
extern NSString*
|
By
Steve Christensen <punster@...>
·
#360
·
|
|
Objective-C: What is the current preferred method of declaring constants without a .pch?
I’ve read the Apple docs and looked around and can’t find definitive sources on what the preferred method is and how to do it.
Do we use modules? If so, how?
I understand that a .pch is now a
I’ve read the Apple docs and looked around and can’t find definitive sources on what the preferred method is and how to do it.
Do we use modules? If so, how?
I understand that a .pch is now a
|
By
Alex Zavatone
·
#359
·
|
|
Re: Sandboxed WkWebView
The reason that I took all this trouble with sandboxing is:
In iOS 11 this shows a cat:
htmlString = <h1>Cat</h1><img alt=“Cat” src=“cat.gif” />
[wkWebView loadHTMLString: htmlString
The reason that I took all this trouble with sandboxing is:
In iOS 11 this shows a cat:
htmlString = <h1>Cat</h1><img alt=“Cat” src=“cat.gif” />
[wkWebView loadHTMLString: htmlString
|
By
Gerriet M. Denkmann
·
#358
·
|
|
Re: Sandboxed WkWebView
It sounds like the framework is being too eager to check for this entitlement. It’s definitely worth filing a bug report with Apple!
—Jens
It sounds like the framework is being too eager to check for this entitlement. It’s definitely worth filing a bug report with Apple!
—Jens
|
By
Jens Alfke
·
#357
·
|
|
Re: Sandboxed WkWebView
I just tried this:
App Sandbox
Network
[checked] Outgoing Connections (Client)
and now it seems to work.
Excellent idea!
I would never have guessed that an app which does not use any outgoing
I just tried this:
App Sandbox
Network
[checked] Outgoing Connections (Client)
and now it seems to work.
Excellent idea!
I would never have guessed that an app which does not use any outgoing
|
By
Gerriet M. Denkmann
·
#356
·
|
|
Re: Sandboxed WkWebView
Regarding:
fehler 10:19:55.449646 -0400 sandboxd Sandbox: SandboxedWebView(4372) deny mach-lookup com.apple.nsurlstorage-cache
I added in: SandboxedWebView.enttitlements the following
Regarding:
fehler 10:19:55.449646 -0400 sandboxd Sandbox: SandboxedWebView(4372) deny mach-lookup com.apple.nsurlstorage-cache
I added in: SandboxedWebView.enttitlements the following
|
By
Gerriet M. Denkmann
·
#355
·
|
|
Re: Sandboxed WkWebView
That one by itself didn’t change the symptoms of the issue.
However, upon clicking on random buttons on the Entitlements screen, it seems that `com.apple.security.network.client` does make the
That one by itself didn’t change the symptoms of the issue.
However, upon clicking on random buttons on the Entitlements screen, it seems that `com.apple.security.network.client` does make the
|
By
Andrew Keller
·
#354
·
|
|
Re: Sandboxed WkWebView
I believe URL access requires com.apple.security.files.bookmarks.app-scope entitlement in a sandboxed app.
Marc
I believe URL access requires com.apple.security.files.bookmarks.app-scope entitlement in a sandboxed app.
Marc
|
By
Marco S Hyman
·
#353
·
|
|
Re: Sandboxed WkWebView
Yup. This doesn’t even require messing with symlinks; it’s a supported option in the GUI:
- Open Users & Groups system pref
- Unlock
- Ctrl/right-click a user in the list
- Select “Advanced
Yup. This doesn’t even require messing with symlinks; it’s a supported option in the GUI:
- Open Users & Groups system pref
- Unlock
- Ctrl/right-click a user in the list
- Select “Advanced
|
By
Jens Alfke
·
#352
·
|
|
Re: Sandboxed WkWebView
Now I’m curious.
I created the test application as described, and I get the same results (macOS 10.13, Xcode 9). I also see these entries in the system log while the app is sandboxed:
"deny
Now I’m curious.
I created the test application as described, and I get the same results (macOS 10.13, Xcode 9). I also see these entries in the system log while the app is sandboxed:
"deny
|
By
Andrew Keller
·
#351
·
|
|
Re: Sandboxed WkWebView
My Test app is really simple, just one window (with WKWebView), one framework (WebKit.framework) and one method:
#import "AppDelegate.h"
@import WebKit;
@interface AppDelegate ()
@property (weak)
My Test app is really simple, just one window (with WKWebView), one framework (WebKit.framework) and one method:
#import "AppDelegate.h"
@import WebKit;
@interface AppDelegate ()
@property (weak)
|
By
Gerriet M. Denkmann
·
#350
·
|
|
Re: Sandboxed WkWebView
I don’t know if this has anything to do with your issue.
One difference between a sandboxed and non-sandboxed app is that the “home directory” in a sandboxed app is inside the application
I don’t know if this has anything to do with your issue.
One difference between a sandboxed and non-sandboxed app is that the “home directory” in a sandboxed app is inside the application
|
By
Marco S Hyman
·
#349
·
|
|
Re: Sandboxed WkWebView
Some further notes:
NSString *porcupine = @"เม่น";
NSData *utf8Data = [ porcupine dataUsingEncoding: NSUTF8StringEncoding ];
NSString *badPorcupine = [ [ NSString alloc ] initWithData:
Some further notes:
NSString *porcupine = @"เม่น";
NSData *utf8Data = [ porcupine dataUsingEncoding: NSUTF8StringEncoding ];
NSString *badPorcupine = [ [ NSString alloc ] initWithData:
|
By
Gerriet M. Denkmann
·
#348
·
|