Xcode 15 creates a binary that causes a crash on iOS 12 when I use C++ std::stable_sort.
The following code works on iOS 17 but causes a crash on iOS 12.
I remember that the earlier Xcode had no problem.
It is no problem when I change "std::stable_sort" to "std::sort".
FB13430187
//
// Tests.cpp
//
#include <tuple>
#include <vector>
#include <algorithm>
#include <iostream>
extern "C" {
void execute_tests(void)
{
using T = std::tuple<size_t, uint64_t *>;
std::vector<T> vector = { {7, nullptr}, {4, nullptr}, {9, nullptr} };
std::stable_sort(vector.begin(), vector.end(), [](const T& a, const T& b){
return std::get<0>(a) < std::get<0>(b);
});
for (const T& item : vector) {
std::cout << std::get<0>(item) << std::endl;
}
}
}
Post
Replies
Boosts
Views
Activity
According to upcoming privacy manifest document, NSUserDefaults is only allowed for a use for the app itself.
It is serious for developers who makes App Extensions.
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
CA92.1
Declare this reason to access user defaults to read and write information that is only accessible to the app itself.
This reason does not permit reading information that was written by other apps or the system, or writing information that can be accessed by other apps.
Developers, please submit a request to add the permission of App Group.
https://developer.apple.com/contact/request/privacy-manifest-reason/
Sender name is incorrect if the name is like "テスト 太郎" and the address book doesn't have the mail address.
The bug exists for a long time (at least from iOS 12 or older). It is not resolved in iOS/iPadOS 17 RC.
Expected: It shows "テスト 太郎".
Actually: It shows "太郎テスト".
I made some feedback but they are still ignored.
FB6102121
FB8890556
FB8927408
I found a glitch on my app on iOS/iPadOS 16.1. The directory to open files is not saved. I filed this on Feedback Assistant but Apple says that it is a specified behavior.
Isn't it a bug?
//
// ViewController.m
//
#import "ViewController.h"
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
@interface ViewController () <UIDocumentPickerDelegate>
@end
@implementation ViewController
{
NSURL *directoryURL;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls
{
directoryURL = [[urls firstObject] URLByDeletingLastPathComponent];
}
- (IBAction)trigger:(id)sender
{
UIDocumentPickerViewController *picker = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:@[UTTypeData] asCopy:NO];
picker.directoryURL = directoryURL;
[self presentViewController:picker animated:YES completion:nil];
}
@end
To reproduce the issue.
Tap the button and select a file on another directory.
Tap the button again.
The directory should be the selected one but is the default one.