Thank you for your helpful reply. The release note states as you indicated.
Post
Replies
Boosts
Views
Activity
Tested with iOS 15.1 (19B74) on iPhone. Works just fine.
Same problem when using simulator. Implemented routines with PDFDocument as well as CGPDFDocumentRef type calls giving the same incorrect results. Here is a subroutine code snippet demonstrating the pdf file appending procedure used in the app. Works on different devices and iOS/iPadOS versions prior to iOS 15 (all beta releases so far).
{
/*
'appDelegate.pdfArray' contains entries of file paths for each pdf input file to be appended to the final output pdf located at 'pdfPathOutput'.
Had all files either pointed to 'NSApplicationSupportDirectory' or 'NSDocumentDirectory'. Outcome is the same.
*/
NSString *pdfPathOutput = [appDelegate getPDFFileName:YES : LABELFILEDS]; NSURL *strURLOut = [[NSURL alloc] initFileURLWithPath:pdfPathOutput];
NSURL *strURLOutInit = [[NSURL alloc] initFileURLWithPath:[appDelegate.pdfArray objectAtIndex:0]];
//Initializes the new PDF with the first pdf from the path Array
PDFDocument *newPdfDocument = [[PDFDocument alloc]initWithURL:strURLOutInit];
// Start append loop with second pdf input file from array
for(NSInteger jj = 1;jj < [appDelegate.pdfArray count];jj++)
{
NSString *source = [appDelegate.pdfArray objectAtIndex:jj];
NSURL *strURL = [[NSURL alloc] initFileURLWithPath:source];
PDFDocument *currentPdfDocument = [[PDFDocument alloc] initWithURL:strURL];
if(currentPdfDocument)
{
for(NSInteger kk = 0; kk < currentPdfDocument.pageCount;kk++)
{
// Insert page at zero-based pageAtIndex kk
[newPdfDocument insertPage:[currentPdfDocument pageAtIndex:kk]atIndex:jj];
}
[currentPdfDocument release];
}
[strURL release];
}
[newPdfDocument writeToURL:strURLOut];
[strURLOut release];
[newPdfDocument release];
[strURLOutInit release];
return pdfPathOutput; //Returns the path of combined pdf result
}
Retested apps under iOS 15 beta 2, and problem still persists. Can anyone at Apple support please look into this and provide some feedback?
Encountered the same issue and eventually solved it by
Defining my unique ServiceType in the PeerToPeer handler (peertrack is fictional, use your own Type)
#define kMCSessionServiceType @“peertrack”
2. Making the following .plist entries:
<key>NSLocalNetworkUsageDescription</key>
<string>Exchange data with nearby devices running the PeerTrack app.</string>
<key>NSBonjourServices</key>
<array>
<string>_peertrack._tcp</string>
</array>
3. Executing the Service Advertiser and Service Browser (pseudo code)
.
.
[MCNearbyServiceAdvertiser alloc] initWithPeer:localPeerID discoveryInfo:nil serviceType:kMCSessionServiceType];
.
.
and
.
.
[[MCNearbyServiceBrowser alloc] initWithPeer:localPeerID serviceType:kMCSessionServiceType];
4. Compiled app with Xcode 12.0 beta and Xcode 11.5.
Successfully tested the code on multiple iPhone, iPad, and simulator devices, running iOS 9.0, iOS 13.5, and iOS 14.0 beta.
NOTE the	leading underscore (_) character in the .plist NSBonjourServices definition entry. Test failed without the leading underscore character, although not included in the kMCSessionServiceType used by MCNearbyServiceAdvertiser and MCNearbyServiceBrowser.
Hope that this is helpful to someone by cutting down on debug time.
Ignore...