Posts

Post not yet marked as solved
2 Replies
2k Views
Env: any iOS 15.0+ devices. I installed the thirtd-party keyboard app like Gboard, Naver SmartBoard, SwiftKey etc. And, I added the keyboard app from Settings -> General -> Keyboard -> Keyboards -> add new keyboard... However, the third-party keyboard is not shown in safari, finder, but shown in Notes app or the other apps. I remove the third-party keyboard app from Settings -> ... -> Keyboards and if I add it repeatedly, it is shown. I think this is a bug of iOS 15. I don't have expreience in iOS 13, iOS 14.
Posted Last updated
.
Post not yet marked as solved
0 Replies
327 Views
Using iOS keyboard extension, I want to move the caret to first of strings in textfield. So, I try to get the string before cursor, and move cursor. The offset is the text length, like below. The textfield's text in safari(apple.com search field) is "abcd". But, the return value is " abcd" including space character at first. So, the cursor does not move because the length(length 5) is exceeded the real text length(length 4). This is definitely appeared independently of iOS versions. guard let text = textDocumentProxy.documentContextBeforeInput else {       return     }           print("text(\(text)) = \(text.count)")           textDocumentProxy.adjustTextPosition(byCharacterOffset: -text.count)
Posted Last updated
.
Post not yet marked as solved
1 Replies
980 Views
I can load normal images without authorization of accessing photo library using PHPicker: public.image types. The Apple proRaw(adobe raw image type: DNG format) can be used in iPhone 12 series. So, I captured with RAW image and I want to load the DNG file from my app. But I can't load the image using PHPicker. My codes below. PHPickerConfiguration *configuration = [[PHPickerConfiguration alloc] init]; configuration.filter = [PHPickerFilter anyFilterMatchingSubfilters:@[[PHPickerFilter imagesFilter], [PHPickerFilter livePhotosFilter]]]; PHPickerViewController *pickerController = [[PHPickerViewController alloc] initWithConfiguration:configuration]; pickerController.delegate = self; [pickerController setModalPresentationStyle:UIModalPresentationCustom]; [pickerController setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; [viewController presentViewController:pickerController animated:YES completion:nil]; (void)picker:(PHPickerViewController *)picker didFinishPicking:(NSArray<PHPickerResult *> *)results API_AVAILABLE(ios(14)) { &#9;&#9;[picker dismissViewControllerAnimated:YES completion:nil]; &#9;&#9; &#9;&#9;PHPickerResult *result = [results firstObject]; &#9;&#9; &#9;&#9;if ([result.itemProvider canLoadObjectOfClass:[UIImage class]]) { &#9;&#9;&#9;&#9;[result.itemProvider loadObjectOfClass:[NSObject class] completionHandler:^(__kindof id<NSItemProviderReading>&#9;_Nullable object, NSError * _Nullable error) { &#9;&#9;&#9;&#9;&#9;&#9;if ([object isKindOfClass:[UIImage class]]) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;UIImage *image = object; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;}]; &#9;&#9;} In line 15, returned NO. Surely, If authorized with below PHPickerConfiguration instance, can load the RAW images. [[PHPickerConfiguration alloc] initWithPhotoLibrary:[PHPhotoLibrary sharedPhotoLibrary]]; But, the one of the advantages using PHPicker is that does not need to authorize for accessing photo library. I just need full-sized image for the RAW image. I want to load the RAW images(ex: to UIImage) without authorization.
Posted Last updated
.
Post not yet marked as solved
1 Replies
413 Views
In iOS14, I checked, if (UIPasteboard.generalPasteboard.hasStrings == YES) { NSArray *stringsFromPasteboard = UIPasteboard.generalPasteboard.strings; } but stringsFromPasteboard is an empty array though if-statement is YES. For example, all is fine immediately after I copy some string from Safari. In 20 minuetes, I retried to above code but, the issue is triggered. Then, if I just touch the text field, paste button is popped up. And if I touch the paste, nothing pasted. I want to check whether or not UIPasteboard has strings. If has, wanna get the strings.
Posted Last updated
.