Post

Replies

Boosts

Views

Activity

Reply to Checking DMG notarization. Rejected, but works fine
It is beyond baffling that there is no simple explanation of the steps that are required. Every explanation in the Apple documentation and in online explanations are fragmented and disjointed and appear to always omit some critical step. Like "notary tool doesn't require a signed DMG" - well OK but does Gatekeeper not require a signed DMG? Why does the Apple example of customising the Xcode archive process make no mention of Stapling anything - not in the document nor in the sample script ? Why is that - is stapling something that is optional - if it is not optional why is it not included in the sample script ? Similarly the sample script doesn't code sign the DMG file - why not ? Surely the sample script should produce a DMG file that is ready for distribution ? Hopefully I am just missing something simple here.
Topic: Code Signing SubTopic: Notarization Tags:
Mar ’25
Reply to xcodebuild linking error fille cannot be open()ed, errno=2
OK this line of code seems to have tripped Xcode up resulting in the above errors DebugLog("No planogram fixtures for \(level.store.code).\(\(level.store.number))") Note that the typo wrapping the 'level.store.number' twice - coupled with the fact that number is not a property on store seems to have been enough to confuse the compiler as no compiler error was being shown. Not sure why that code error suddenly started showing up now which allowed me to fix it. Seems the error above is indicating that some source file has failed to build so start by tracking down the file and look for the code error the compiler hasn't been displaying an error for.
Oct ’24
Reply to Create PDF file with Spot Colors
Further investigation seems to indicate that the Apple Core Graphics API does not natively support the Separation color space (as defined by Adobe) but it does support DeviceN color spaces - or Color Models. DeviceN color spaces support Spot colors so this seems like an option for us to use. However it is still unclear how one would create such a DeviceN color space. [% Define the color space to be DeviceN /DeviceN [/Ruby /Emerald /Sapphire /Turquoise /Amethyst /Citrine] /DeviceRGB {%define new values and clip to 1.0 6 -1 roll 1 index add 2 index add 6 -1 roll 2 index add 4 index add 6 3 roll add add 4 -1 roll pop 3 -1 roll dup 1 gt {pop 1} if 3 -1 roll dup 1 gt {pop 1} if 3 -1 roll dup 1 gt {pop 1} if } ] setcolorspace I did find this pseudo code for C# which seems to shed some light on it. > Spot color can be represented in PDF using 'Separation' or 'DeviceN' > color spaces. > > A separation color space can be treated similarly to grayscale color > space. For details on separation color space, please refer to section > 4.5.5 'Special Color Spaces' in PDF Reference Manual > (http://www.pdftron.com/downloads/PDFReference16.pdf). > > The following C# pseudocode can be used to create a separation color > space based on a PostScript function: > > static ColorSpace CreateSpotColorSpace(PDFDoc doc) > { > Obj sep_cs = doc.CreateIndirectArray(); > > sep_cs.PushBackName("Separation"); > sep_cs.PushBackName("LogoGreen"); // The name of the colorant > sep_cs.PushBackName("DeviceCMYK"); // Alternate color space > > // Create tint function (using PostScript calculator function). > // Tint function is used to transform a tint value into color > // component values in the alternate color space. > string ps_funct = "{ dup 0.84 mul exch 0.00 exch dup 0.44 mul exch > 0.21 mul }"; > Obj tint_funct = doc.CreateIndirectStream(new > System.Text.UTF8Encoding().GetBytes(ps_funct)); > tint_funct.PutNumber("FunctionType", 4); > > Obj tint_domain = tint_funct.PutArray("Domain"); > tint_domain.PushBackNumber(0); // Gray > tint_domain.PushBackNumber(1); > > Obj tint_range = tint_funct.PutArray("Range"); > tint_range.PushBackNumber(0); // C > tint_range.PushBackNumber(1); > tint_range.PushBackNumber(0); // M > tint_range.PushBackNumber(1); > tint_range.PushBackNumber(0); // Y > tint_range.PushBackNumber(1); > tint_range.PushBackNumber(0); // K > tint_range.PushBackNumber(1); > > sep_cs.PushBack(tint_funct); > return new ColorSpace(sep_cs); > > } So how would one define such a DeviceN color space using the Core Graphics API ? I am assuming that one should be able to define this using a CFPropertyList and then use the CGColorSpace(propertyListPlist: CFPropertyList) API to do so. Any help would be appreciated.
Dec ’23
Reply to Apps directory not appearing in iCloud Drive in Finder
Here is a tip - and I struggled forever. create app iCloud containers something like this com.company.app.dev01 com.company.app.dev02 com.company.app.devxx com.company.app.prod If you create the container with the wrong settings than it seems that is it ! You can't get it to show up no matter what you do except create a new one, hence the naming conventions above. Be sure to set the access as Public in info.plist BEFORE you run the app the first time !! Also make sure all the identifiers match up in the app entitlements and on the target Signing & Capabilities page and in the apps info.plist.
Dec ’21
Reply to macOS multiple document app, multiple CoreData stores
Not sure I understand how this works. DocumentGroup provides the ability to browse/create/select a file but how do you create a new core data file or save one where there have been edits made. I don't see how you set the path to the actual file that is created/selected in DocumentGroup. Perhaps I am misunderstanding something but don't you need to create the sqlite or binary core data file at the URL obtained/created by DocumentGroup ? Otherwise doesn't NSPersistentContainer just store the core data files in the apps default location. I am assuming use of DocumentGroup means you can create the core data file on anywhere on iCloud Drive. var body: some Scene {         DocumentGroup(newDocument: { Document() }) { config in             ContentView()             // injecting persistent controller into the document view                 .environment(\.managedObjectContext, config.document.persistenceController.container                                 .viewContext)         }     }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to How can I get CALayer to render sublayers correctly when generating PDF ?
This is what I ended up doing - should this really be necessary ? class ZOrderDrawingLayer: CALayer {     override func render(in ctx: CGContext) {         if let layers:[CALayer] = self.sublayers {             let orderedLayers = layers.sorted(by: {                 $0.zPosition $1.zPosition             })             for v in orderedLayers {                 ctx.saveGState()                 let w = v.bounds.width/2                 let ww = w*w                 let h = v.bounds.height/2                 let hh = h*h                 let c = sqrt(ww + hh)                 let theta = asin(h/c)                   let angle = atan2(v.transform.m12, v.transform.m11)                 let x = c * cos(theta+angle)                 let y = c * sin(theta+angle)                 ctx.translateBy(x: v.position.x-x, y: v.position.y-y)                 ctx.rotate(by: angle)                 v.render(in: ctx)                 ctx.restoreGState()             }         }     } }
Topic: Graphics & Games SubTopic: General Tags:
May ’21
Reply to CoreML regression between macOS 26.0.1 and macOS 26.1 Beta causing scrambled tensor outputs
Have you tested on 26.2 to see if that fixes it ?
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Checking DMG notarization. Rejected, but works fine
It is beyond baffling that there is no simple explanation of the steps that are required. Every explanation in the Apple documentation and in online explanations are fragmented and disjointed and appear to always omit some critical step. Like "notary tool doesn't require a signed DMG" - well OK but does Gatekeeper not require a signed DMG? Why does the Apple example of customising the Xcode archive process make no mention of Stapling anything - not in the document nor in the sample script ? Why is that - is stapling something that is optional - if it is not optional why is it not included in the sample script ? Similarly the sample script doesn't code sign the DMG file - why not ? Surely the sample script should produce a DMG file that is ready for distribution ? Hopefully I am just missing something simple here.
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Xcode 16 & Package load failure
I used the Clear History from the SPM screen and then closed the SPM panel and reopened it and suddenly it was working again !
Replies
Boosts
Views
Activity
Feb ’25
Reply to xcodebuild linking error fille cannot be open()ed, errno=2
OK this line of code seems to have tripped Xcode up resulting in the above errors DebugLog("No planogram fixtures for \(level.store.code).\(\(level.store.number))") Note that the typo wrapping the 'level.store.number' twice - coupled with the fact that number is not a property on store seems to have been enough to confuse the compiler as no compiler error was being shown. Not sure why that code error suddenly started showing up now which allowed me to fix it. Seems the error above is indicating that some source file has failed to build so start by tracking down the file and look for the code error the compiler hasn't been displaying an error for.
Replies
Boosts
Views
Activity
Oct ’24
Reply to xcodebuild linking error fille cannot be open()ed, errno=2
Any resolution of this ? I have just hit this problem after using Xcode 16 for a few days to build a project. Suddenly this morning I started getting this same error about missing files from the linker.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Create PDF file with Spot Colors
Further investigation seems to indicate that the Apple Core Graphics API does not natively support the Separation color space (as defined by Adobe) but it does support DeviceN color spaces - or Color Models. DeviceN color spaces support Spot colors so this seems like an option for us to use. However it is still unclear how one would create such a DeviceN color space. [% Define the color space to be DeviceN /DeviceN [/Ruby /Emerald /Sapphire /Turquoise /Amethyst /Citrine] /DeviceRGB {%define new values and clip to 1.0 6 -1 roll 1 index add 2 index add 6 -1 roll 2 index add 4 index add 6 3 roll add add 4 -1 roll pop 3 -1 roll dup 1 gt {pop 1} if 3 -1 roll dup 1 gt {pop 1} if 3 -1 roll dup 1 gt {pop 1} if } ] setcolorspace I did find this pseudo code for C# which seems to shed some light on it. > Spot color can be represented in PDF using 'Separation' or 'DeviceN' > color spaces. > > A separation color space can be treated similarly to grayscale color > space. For details on separation color space, please refer to section > 4.5.5 'Special Color Spaces' in PDF Reference Manual > (http://www.pdftron.com/downloads/PDFReference16.pdf). > > The following C# pseudocode can be used to create a separation color > space based on a PostScript function: > > static ColorSpace CreateSpotColorSpace(PDFDoc doc) > { > Obj sep_cs = doc.CreateIndirectArray(); > > sep_cs.PushBackName("Separation"); > sep_cs.PushBackName("LogoGreen"); // The name of the colorant > sep_cs.PushBackName("DeviceCMYK"); // Alternate color space > > // Create tint function (using PostScript calculator function). > // Tint function is used to transform a tint value into color > // component values in the alternate color space. > string ps_funct = "{ dup 0.84 mul exch 0.00 exch dup 0.44 mul exch > 0.21 mul }"; > Obj tint_funct = doc.CreateIndirectStream(new > System.Text.UTF8Encoding().GetBytes(ps_funct)); > tint_funct.PutNumber("FunctionType", 4); > > Obj tint_domain = tint_funct.PutArray("Domain"); > tint_domain.PushBackNumber(0); // Gray > tint_domain.PushBackNumber(1); > > Obj tint_range = tint_funct.PutArray("Range"); > tint_range.PushBackNumber(0); // C > tint_range.PushBackNumber(1); > tint_range.PushBackNumber(0); // M > tint_range.PushBackNumber(1); > tint_range.PushBackNumber(0); // Y > tint_range.PushBackNumber(1); > tint_range.PushBackNumber(0); // K > tint_range.PushBackNumber(1); > > sep_cs.PushBack(tint_funct); > return new ColorSpace(sep_cs); > > } So how would one define such a DeviceN color space using the Core Graphics API ? I am assuming that one should be able to define this using a CFPropertyList and then use the CGColorSpace(propertyListPlist: CFPropertyList) API to do so. Any help would be appreciated.
Replies
Boosts
Views
Activity
Dec ’23
Reply to XCode 13 is super slow, build time is 10~20 times longer than Xcode 12
Yes I am not seeing any incremental builds with 13.2, always seems to do full recompiles now. I don't think 13.1 was this bad! What a nuisance.
Replies
Boosts
Views
Activity
Dec ’21
Reply to Apps directory not appearing in iCloud Drive in Finder
Here is a tip - and I struggled forever. create app iCloud containers something like this com.company.app.dev01 com.company.app.dev02 com.company.app.devxx com.company.app.prod If you create the container with the wrong settings than it seems that is it ! You can't get it to show up no matter what you do except create a new one, hence the naming conventions above. Be sure to set the access as Public in info.plist BEFORE you run the app the first time !! Also make sure all the identifiers match up in the app entitlements and on the target Signing & Capabilities page and in the apps info.plist.
Replies
Boosts
Views
Activity
Dec ’21
Reply to UIManagedDocument and CoreData
You want a File Wrapper - see article linked https://www.swiftdevjournal.com/using-file-wrappers-in-a-swiftui-app/
Replies
Boosts
Views
Activity
Dec ’21
Reply to macOS multiple document app, multiple CoreData stores
I see, yes I am familiar with the Core Data API to set the filename and path but I can't see any way to use that in conjunction with DocumentGroup and/or FileDocument/ReferenceFileDocument such that you can create/open the sqlite files in iCloud Drive or in the local app sandbox.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to macOS multiple document app, multiple CoreData stores
Not sure I understand how this works. DocumentGroup provides the ability to browse/create/select a file but how do you create a new core data file or save one where there have been edits made. I don't see how you set the path to the actual file that is created/selected in DocumentGroup. Perhaps I am misunderstanding something but don't you need to create the sqlite or binary core data file at the URL obtained/created by DocumentGroup ? Otherwise doesn't NSPersistentContainer just store the core data files in the apps default location. I am assuming use of DocumentGroup means you can create the core data file on anywhere on iCloud Drive. var body: some Scene {         DocumentGroup(newDocument: { Document() }) { config in             ContentView()             // injecting persistent controller into the document view                 .environment(\.managedObjectContext, config.document.persistenceController.container                                 .viewContext)         }     }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to macOS multiple document app, multiple CoreData stores
Hi, did you ever manage to get this to work ? If so could you provide more details on how you link the core data file to the ReferenceFileDocument. What do you do about the following ReferenceFileDocument protocol functions: typealias SnapShot func snapshot(...) func fileWrapper(snapshot:...)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to How can I get CALayer to render sublayers correctly when generating PDF ?
Here is a sample app that illustrates the problem. For some reason the editor complains about the URL below so please remove the space after the https to download the test app https ://duncangroenewald.com/files/SampleApps/CALAyerRendering.zip
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to How can I get CALayer to render sublayers correctly when generating PDF ?
This is what I ended up doing - should this really be necessary ? class ZOrderDrawingLayer: CALayer {     override func render(in ctx: CGContext) {         if let layers:[CALayer] = self.sublayers {             let orderedLayers = layers.sorted(by: {                 $0.zPosition $1.zPosition             })             for v in orderedLayers {                 ctx.saveGState()                 let w = v.bounds.width/2                 let ww = w*w                 let h = v.bounds.height/2                 let hh = h*h                 let c = sqrt(ww + hh)                 let theta = asin(h/c)                   let angle = atan2(v.transform.m12, v.transform.m11)                 let x = c * cos(theta+angle)                 let y = c * sin(theta+angle)                 ctx.translateBy(x: v.position.x-x, y: v.position.y-y)                 ctx.rotate(by: angle)                 v.render(in: ctx)                 ctx.restoreGState()             }         }     } }
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to How can I extract the data from the output image of CIAreaHistogramFilter
Thanks @FrankSchlegel - I will try it out.
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’21