Thank you. So, as I understand:
1) we developers are obliged to codesign the bundle.
2) the codesign don't let us add our protection (as an additional checksum file).
3) the codesign can be easily violated (as I have seen my own macOS app and even the Apple apps, codesigned and notarised, cracked on some web torrent web sites).
As you know, is a way to make my macOS app hacker-proof ?
Post
Replies
Boosts
Views
Activity
Thank You Etresoft!
In the meantime it's exactly what I have done. I don't know how much this will make the hackers' life harder, but at least it's a deterrent. I have also told the ptrace to deny any attach. I hope everything will work. Thank you again.
Incidentally I have discovered your answer by chance. Is a way to get an email or notification when someone replies here?
Thank you Etresoft. I have to say that, after I added to my objective-c code a check on the code signatures (as you suggested here above), at present time, one month after I released my macOS app, nobody cracked it yet. Usually the crack was available in 24 hours… So it seems to work well! This is what I like!
I have just discovered the cause of the trouble. If I added a soundtrack to the movie, the 4444ProRes codec unexpectedly turned into an H.264 codec. So, I have just replaced
[[AVAssetExportSession alloc] initWithAsset:videoAudioComposition presetName:AVAssetExportPresetHighestQuality];
with
[[AVAssetExportSession alloc] initWithAsset:videoAudioComposition presetName:AVAssetExportPresetAppleProRes4444LPCM];
and now it works well. I can quite get a movie with 4444 ProRes codec and the audio tracks.
The only point I miss now is that the AVAssetExportPresetAppleProRes4444LPCM is available on macOS 10.15+.
Which preset could I use on macOS 10.13 ?
Me too. I had the same trouble. As janhalousek suggested, I deleted the current tab and now I can properly resize the Project Navigator. I hope this trouble will not occur again.
I have added
[matrixGroup setTranslatesAutoresizingMaskIntoConstraints:NO];
[matrixGroup addConstraint:[NSLayoutConstraint constraintWithItem:matrixGroup
attribute:NSLayoutAttributeWidth
relatedBy:NSLayoutRelationEqual
toItem:matrixGroup
attribute:NSLayoutAttributeHeight
multiplier:2.0
constant:0.0]];
and now the gap between the two buttonsCells has gone. Well.
Anyway, when I display the toolbar with the icons only (without text), these NSMatrix(s) within the NSToolbarItem(s) look higher than the simple NSButtons within the NSToolbarItem(s).
Why do the NSButton and NSMatrix behave differently when within the NSToolbarItem?
Incidentally, the tooltips associated to each NSMatrix's buttonCell don't show up.
I know NSMatrix has been deprecated, so, which object should I use to toggle between two buttons on the toolbar? I tried segments but they look smaller and flat.
Yes, me too I have the same trouble.
Xcode 12.4 on BigSur doesn't let us configure the Inspector status (open/close) within each TAB.
Actually I can just set the Inspector open/close for all the TABs. And this is annoying especially when I have a TAB open on a XIB file and I need the Inspector open, then I have another TAB open on a code.m file and I need the Inspector closed.
So now I spend a lot of time at opening and closing the Inspector every time I go from a code.m file to a XIB file and viceversa.
I hope Apple address this issue on the next release.
Should I file a bug/request/suggestion to Apple?
Thank you Claude. In the window.contentView subclass I set
(void)awakeFromNib
{
self.window.titlebarAppearsTransparent = true;
}
(void)drawRect:(NSRect)rect
{
[self.window.backgroundColor set];
NSRectFill(rect);
}
but the titlebar has still a lighter color than the background color. By chance I discovered that if I set
(void)awakeFromNib
{
self.window.titlebarAppearsTransparent = true;
self.window.backgroundColor = [NSColor controlBackgroundColor];
/* I even tried the color [NSColor windowBackgroundColor] but the titleBar has still a lighter color. */
}
(void)drawRect:(NSRect)rect
{
[self.window.backgroundColor set];
NSRectFill(rect);
}
It works well for both light and dark mode on my macOS Big Sur 11.2. Will this work well on any macOS version? Even on Mojave and Catalina?
If I set any background color, it always work, no matter the color I choose, the background color is always equal to the background titlebar color. e.g. self.window.backgroundColor = anyColor;
Anyway, actually I simply turn ON the NSWindow "Transparent Title Bar" check-box on IB. I use no code at all.
So when the window is active I get a window background color equal to the background title bar RGB color as 40,40,40 on dark mode and 246,246,246 on light mode.
I noticed that the other windows as e.g. the System Preferences window, when active, have these RGB colours: 54,54,54 on dark mode and 252,252,252 on light mode. So, the color is indeed different. Unique (titlebar/back) but different than on the other windows.
I have noticed that if I turn off the shadow, that square dark border disappears.
drawer.hasShadow = NO;
So now the goal is to get both the shadow and a rounded corner window, without the square border.
I solved the trouble by using a performSelector with a small delay to setup the maskedCorners for the first time.
With this solution I don't see that dark square-window-border close to the maskedCorners.
(void)applicationDidFinishLaunching:(NSNotification*)aNotification
{
drawer.hasShadow = YES;
[drawer setOpaque:NO];
[drawer setBackgroundColor:[NSColor clearColor]];
[drawer setStyleMask:NSWindowStyleMaskBorderless | NSWindowStyleMaskFullSizeContentView];
drawer.contentView.wantsLayer = YES;
drawer.contentView.layer.frame = drawer.contentView.frame;
drawer.contentView.layer.masksToBounds = YES;
drawer.contentView.layer.cornerRadius = 10.0;
drawer.contentView.layer.backgroundColor = [NSColor clearColor].CGColor;
[mainWindow addChildWindow:drawer ordered:NSWindowBelow];
[drawer performSelector:@selector(SetMaskedCorners) withObject:nil afterDelay:0.1];
// instead of [drawer SetMaskedCorners];
}
// On the drawer class I do
(void)SetMaskedCorners
{
if(self.mSide == kSideRight){
self.contentView.layer.maskedCorners = kCALayerMaxXMinYCorner | kCALayerMaxXMaxYCorner;
}
else{
self.contentView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMinXMaxYCorner;
}
[self.contentView setNeedsLayout:YES];
}
Me too I have got this error message. So I went to the Apple Store Connect and I discovered that I had to apply the new agreements. So I did. Then I re-submitted my app to the notarisation process and it worked like a charm. Solved.
The trouble is even worse when you draw in 3D. A rectangle (instead of a line) could even look as a flat invisible short line if the camera is almost aligned to the line and a little farther than the end point of the rectangle. We should draw a tiny cylinder to solve the trouble, which means so many triangles. Think about a simple grid 20 x 20 lines with 32 triangles each. That is 12800 triangles. Also, the point is a squared rectangle only. If you need of a circle you have to draw it.
You can disable that log with:
1 - From Xcode menu open: Product > Scheme > Edit Scheme
2 - On your Environment Variables set OS_ACTIVITY_MODE = disable