We are experiencing a crash when selecting text in a PDF and moving the cursor over a QR code. This happens when the QR code at the end of the PDF file with no text following it. [Only on iOS 18]
Steps to Reproduce:
Clone the repository:
git clone https://github.com/aliakhtar49/ios18-pdf-crash/tree/main
cd ios18-pdf-crash
Run the application to load the provided PDF
Select some text and move the cursor over the QR code several times
Observe the crash. You can see the gif in the repo
Expected Behavior: The application should not crash
Actual Behavior: The application crashes:
Environment:
iOS version: 18.0
Device: iPhone 15 Pro, iPhone 12 Pro Max
Additional Context:
This issue occurs when the QR code is at the end of the PDF file with no text following it
StackTrace
`thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x19f3e6ec0)
* frame #0: 0x000000019f3e6ec0 CoreGraphics`void PageLayout::ConvertTextRangesToStringRanges<std::__1::span<CFRange, 18446744073709551615ul>, std::__1::back_insert_iterator<std::__1::vector<CFRange, std::__1::allocator<CFRange>>>>(std::__1::span<CFRange, 18446744073709551615ul>&&, std::__1::back_insert_iterator<std::__1::vector<CFRange, std::__1::allocator<CFRange>>>&&) const + 664
frame #1: 0x000000019f424c5c CoreGraphics`CGPDFPageLayoutGetStringRangeIndexNearestPoint + 100
frame #2: 0x000000022b4c096c PDFKit`-[PDFPage characterIndexNearestPoint:] + 128
frame #3: 0x000000022b450950 PDFKit`-[PDFTextInputView _closestPositionToPoint:withinRange:] + 420
frame #4: 0x00000001a0bd02f0 UIKitCore`-[UITextSelectionInteraction _hasTextAlternativesAtLocation:] + 120
frame #5: 0x00000001a03e3834 UIKitCore`-[_UIRemoteKeyboardsEventObserver _hasTextAlternativesForTouch:] + 256
frame #6: 0x000000019fa4e0f8 UIKitCore`-[_UIRemoteKeyboardsEventObserver _endTrackingForTouch:] + 212
frame #7: 0x000000019fa4ca38 UIKitCore`-[_UIRemoteKeyboardsEventObserver _trackTouch:] + 132
frame #8: 0x000000019fa4c94c UIKitCore`-[_UIRemoteKeyboardsEventObserver peekApplicationEvent:] + 220
frame #9: 0x000000019fa4c304 UIKitCore`-[_UIRemoteKeyboards peekApplicationEvent:] + 84
frame #10: 0x000000019fa35dc4 UIKitCore`__dispatchPreprocessedEventFromEventQueue + 4180
frame #11: 0x000000019fa3ef7c UIKitCore`__processEventQueue + 5696
frame #12: 0x000000019f936df4 UIKitCore`updateCycleEntry + 160
frame #13: 0x000000019f934d28 UIKitCore`_UIUpdateSequenceRun + 84
frame #14: 0x000000019f934978 UIKitCore`schedulerStepScheduledMainSection + 172
frame #15: 0x000000019f93580c UIKitCore`runloopSourceCallback + 92
frame #16: 0x000000019d126f9c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
frame #17: 0x000000019d126f30 CoreFoundation`__CFRunLoopDoSource0 + 176
frame #18: 0x000000019d124a08 CoreFoundation`__CFRunLoopDoSources0 + 244
frame #19: 0x000000019d123c14 CoreFoundation`__CFRunLoopRun + 856
frame #20: 0x000000019d123424 CoreFoundation`CFRunLoopRunSpecific + 608
frame #21: 0x00000001e93211c4 GraphicsServices`GSEventRunModal + 164
frame #22: 0x000000019fc6a130 UIKitCore`-[UIApplication _run] + 816
frame #23: 0x000000019fd1855c UIKitCore`UIApplicationMain + 340
frame #24: 0x0000000105e77c38 MyApp.debug.dylib`main at HSAppDelegate.swift:19:20
frame #25: 0x00000001c3058a74 dyld`start + 2724`
Post
Replies
Boosts
Views
Activity
In our project setup we have Main App and our code base is divided into Module using Framework, Recently in one of our framework we write some code using swift async-await API. After that
We got this error while uploading to TestFlight
Invalid Bundle. The bundle at 'Foo.framework' contains disallowed file 'Frameworks'. With error code STATE_ERROR.VALIDATION_ERROR.90206 for id 6822222-72fc-4820-0000-b1f8411d4f04
From stackoverflow we resolved issue by doing following things previously it was YES and working fine
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
Now our build Successfully uploaded to TestFlight and in apple review we got this comment from apple team and they rejected app
We are integrating iOS 16 recurring payments in our app, everything works fine but we have a few questions
Question 1
let recurringPaymentRequest = PKRecurringPaymentRequest(
paymentDescription: "Pro Membership",
regularBilling: regularBilling,
managementURL: url
)
we assume managementURL is supposed to come in the user's wallet where he/she can tap to change the recurring payment option to our backend, but in the wallet, the transaction appears without this URL and have no indication that it is a recurring payment, Can someone guide what we missed
Question 2
For apps that only have apple pay on mobile, managementURL can open the app as a deep link from the Wallet app and the user can update or delete the payment method for the automatic reload payment from the app directly,
Question 3
For cancellation, the recurring payment app should have some UI where the user can tap which hit our backend and remove the apple pay merchant token from our system and apply cancellation business logic, no apple API involves in the cancellation of recurring payment
An existing framework library workspace compiles without error when targeting iOS device architecture, but when targeting Simulator I receive the following error:
Code Block
ld: in /Users/macbook/Documents/Projects/iOS/HungerStation/Code/customer-app-ios/Pods/mopub-ios-sdk/MoPubSDK/Viewability/MOAT/MPUBMoatMobileAppKit.framework/MPUBMoatMobileAppKit(MPUBMoatAnalytics.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
As per this https://developer.apple.com/forums/thread/655316
Changing build setting "Build Active Architecture Only" from No to Yes doesn't solve this problem
Has anyone else seen this?