Does the new encrypted fields work with CloudKit JS? I have checked the API for CloudKit JS, and under CloudKit.Record there is no mentioning of encrypted fields. It feels like this API has not been updated for a while. Does this mean that if I use field-level encryption, I will not be able to use CloudKit JS?
Post
Replies
Boosts
Views
Activity
It appears that on an Apple Silicon Macs, we cannot do unit tests for Swift Packages using Mac Catalyst.
Steps to produce:
0. Get an Apple Silicon Mac. Go to an empty folder, create a new Swift Package using swift package init.
Open the created Package.swift, select the running destination to be My Mac (Mac Catalyst).
Run the tests.
I was getting the following error:
code signature in [generated test path] not valid for use in process using Library Validation: Trying to load an unsigned library.
I did not get this issue on my Intel Mac. On Apple Silicon Macs, set the destination to an iOS simulator or a “pure” Mac destination also works.
How to bypass this issue, or is this a bug from Xcode? I am running the latest Xcode 12.3.
I found that compared with TextKit 1, NSTextLayoutManager does not provide any opportunity to customize line rectangles. In particular, I cannot do much about the frame of a NSTextLayoutFragment. I am curious about the proper approach to:
limit the width and horizontal offset of a paragraph;
add spacing below and above a paragraph;
enclose a paragraph along an arbitrary path.
For the first question, I noticed that in the sample app, when layout comments, BubbleLayoutFragment does not change the positions of any characters. While it did override renderingSurfaceBounds, it merely expands the bounds, without moving its text contents. And there seems to be no way to do so.
For the second question, I noticed that paragraphSpacing and paragraphSpacingBefore set on the paragraph style seems to have no effect. According to the video, all layout fragments are stacked like a list. Therefore, this is an intended feature, right?
Right now, my solutions to the first two questions are:
If I want to control the horizontal position of a paragraph, I could simply set headIndent and trailIndent on the paragraph style.
If I want to add spacing above or below a paragraph, I can add empty lines and set minimalLineHeight for the newline character.
Are those the recommended ways to achieve such effect?
Personally, I am not very interested in the third feature, enclosing a paragraph along an arbitrary path. However, I am indeed curious about how to add paragraph-level attachment, such as an block image/custom view between paragraphs. I think what I could do is:
add an empty new line and set its height to leave enough space for the custom view;
configure a CALayer or even a view and put it where the new line should be;
If I want to layout characters within a strange shape, I could compute the shape's height based on the width, using TextKit 1, and then insert the new line as in step 1.
Is this the intended way to approach such situation?