PDFTron React Native iOS version 16 not showing added annotations

Product: PDFTron React Native for iOS

Product Version: 3.0.3-13

Please give a brief summary of your issue: Added annotations show up on iOS 15 but not on iOS 16
(Think of this as an email subject)

Please describe your issue and provide steps to reproduce it: We followed the guide on adding a custom API method to the react native library in order to search pdf text and add annotations on certain text regex. This worked for us in development, but are not able to have this feature work for all devices. Half of our team is able to see this feature, but half are not. We discovered those who can see this feature are on iOS 15, while those who cannot are on iOS16.

We are trying to launch this product soon, and this is our main hurdle as most of our users will be on iOS 16.
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible: pdftron-react-native/App.js at master · teamairship/pdftron-react-native · GitHub

Hi there, could you please provide the custom (native) code you’ve written to add annotations to the page?

- (void)addAnnotation:(NSString * _Nonnull)type fieldName:(NSString * _Nonnull)fieldName pageNumber:(int)pageNumber x1:(double)x1 y1:(double)y1 x2:(double)x2 y2:(double)y2;
    PTPDFViewCtrl *pdfViewCtrl = self.currentDocumentViewController.pdfViewCtrl;
    if (!pdfViewCtrl) {
    PTPDFDoc *doc = [pdfViewCtrl GetDoc];
    PTPage* page = [[doc GetPageIterator: pageNumber] Current];
    PTObj* annots = [page GetAnnots];

    if (!annots) {
        annots = [doc CreateIndirectArray];  
        [[page GetSDFObj] Put: @"Annots" obj:annots];
    if ([type isEqualToString:@"Text"]) {
        PTField *text_field = [doc FieldCreateWithString: fieldName type: e_pttext field_value: @"" def_field_value: @""];
        PTTextWidget *text = [PTTextWidget CreateWithField: doc pos: [[PTPDFRect alloc] initWithX1:x1 y1:y1 x2:x2 y2:y2] field: text_field];
        [text SetUniqueIDWithString:fieldName];
        [text RefreshAppearance];
        [annots PushBack:text];

    if ([type isEqualToString: @"Sign"]) {
        PTDigitalSignatureField *sig_field = [doc CreateDigitalSignatureField: fieldName];
        PTSignatureWidget *signature = [PTSignatureWidget CreateWithDigitalSignatureField: doc pos: [[PTPDFRect alloc] initWithX1:x1 y1:y1 x2:x2 y2:y2] field: sig_field];
        [signature SetUniqueIDWithString:fieldName];
        [signature RefreshAppearance];
        [annots PushBack: signature];

    [pdfViewCtrl Update:YES];

Thank you for providing your code snippet, please refer to our annotation samples and let us know if you have any questions about the APIs: