Apple Silicon

RSS for tag

Build apps, libraries, frameworks, plug-ins, and other executable code that run natively on Apple silicon.

Posts under Apple Silicon tag

200 Posts

Post

Replies

Boosts

Views

Activity

Mouse hover events cause warnings in the console when running an iOS Audio Unit on an M1 Mac
Hi, When debugging an iOS AUv3 extension in GarageBand (or in other host apps) on Mac OS Monterey running on an M1 Mac, there is a large number of warnings that read: WARNING: SPI usage of '-[UINSWindow uiWindows]' is being shimmed. This will break in the future. Please file a radar requesting API for what you are trying to do. I noticed that immediately after such a warning, the view's hitTest is called with a UIHoverEvent, and indeed moving the mouse results in more log spam. Although the very first occurrence of the warning may have a different root cause. Using a symbolic breakpoint wasn't helpful in revealing further information. Note that I'm launching the AUv3 extension in the "Designed for iPad" mode. Project language is Objective-C. I was able to reproduce the issue with even an empty project, adding nothing beyond Xcode's built-in appex template for iOS Audio Units. The issue doesn't seem to happen with the Apple sample code "CreatingCustomAudioEffects", which is a swift project. I also compared and matched storyboard settings between that project and my own, but to no avail. Any pointers would be highly appreciated. Thanks.
5
0
2.2k
Mar ’23
macOS: Audio Workgroup threads not running on P-Cores
We have noticed that in our application that creates worker threads for audio processing, these threads (time-constrained priority) in some cases do not run on the P-Cores (on Apple Silicon Macs). It was my understanding that once we use audio workgroups, the scheduler will always schedule our threads on the P-Cores. This works okay as long as the CoreAudio buffer size used is 256 samples or less (@ 48K). But if the buffer size is 512 or above, the threads are run on E-Cores (checked using System Trace). Is this expected behavior? Can I find any documentation for this (short of analyzing the scheduler source in kernel)? Thanks. Devendra.
1
0
1.1k
Mar ’23
Rosetta 2 automated installer problem
Hi, It appears that the automated triggering of Rosetta 2 installer is only done when a user directly clicks on an Intel only binary on silicon hardware. I have an app that is itself a universal binary but which loads an intel only plugin. This does not cause the built in Rosetta 2 installer to launch. I can detect that the app is running on arm64 and I can detect that Rosetta is not yet installed but I cannot programatically install it. It would be nice to have one of the following: The ability to require Rosetta in the app's plist for a universal binary. A system call to initiate installation. For the automated installer to work however a binary is run. The first seems like the cleanest solution. Without one of these, or some other fix, Rosetta 2 installation is incoherent. For now the only way I can work round this issue is very ugly: include a second minimal x86_64 only app with my app as a no op installer for Rosetta, then when my app runs if I detect that Rosetta is missing on silicon, throw up an alert to ask the user to run the bundled minimal app and exit. This is less than ideal. Can you suggest a better way to work round this issue? or Can you add one of the above solutions as a feature request? Thanks Paul
11
0
2.5k
Mar ’23
iOS app on Apple Silicon Mac: how are app data files protected?
While submitting a new app, I noticed I could choose to make the app available on Apple Silicon Mac. Since user can access the file system on the Mac, I wonder how are app's data files are protected? Are they also in sandbox and can't be accessed through file system by macOS user? Because my laptop runs on Intel CPU, I can't experiment it myself. I googled and found this page: https://developer.apple.com/documentation/xcode/configuring-the-macos-app-sandbox/, but the app sandbox seems to be mainly about protecting macOS from the iOS app, not the vice versa? Does anyone knows the details? Thanks.
4
1
1.7k
Feb ’23
(Old) Code written on older Xcode vs M1 Xcode... issues/differences?
Sorry for the awkward title, I'm incredibly green regarding iOS development and even just Macs in general. I have code for a working (and published) app that was written quite a while ago and I'm wondering if it should just compile without issues on M1 Xcode or if there would inherently be tweaks that need to be done, dependency issues, etc? I ask because it doesn't of course compile, but being green, I'm just unsure if my first issue is because I'm using an M1 MBP with Xcode 14 and there would be a ton of settings I need to tweak (such as Swift versions etc) or if the project's config files should "handle" telling Xcode how it should be compiled? I have, seemingly, downloaded all of the dependencies in the pod but it does complain, specifically, about a TrueTime dependency not being available but again I'm just unsure if there are some changes that need to be made for a project that wasn't written with M1 in mind or not.
1
0
611
Feb ’23
Unable to build libzmq for aarch64-apple-ios-sim on M1
This is related to - https://github.com/zeromq/libzmq/issues/4508 Issue description How to build libzmq for aarch64-apple-ios-sim (IOS Simulator on M1)? Minimal test code / Steps to reproduce the issue Run ios build ./builds/ios/build_ios.sh output: which generates libs and include packages for all platforms except aarch64-apple-ios-sim Using aarm64/libzmq.a package to build my rust project. I get the following error export LIBZMQ_LIB_DIR=/<path_to>/libzmq/builds/ios/libzmq_build/arm64/lib export LIBZMQ_INCLUDE_DIR=/<path_to>/libzmq/builds/ios/libzmq_build/arm64/include # Build project cargo build -r --target=aarch64-apple-ios-sim Error output: . . .building for iOS Simulator, but linking in object file built for iOS . . . see full Error here... "-Wl,-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk" "-L" "/Users/srinivad/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios-sim/lib" "-o" "/Users/srinivad/code/personal/aries_vcx/target/aarch64-apple-ios-sim/release/deps/libindy_vdr-5aa23635579223af.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs" = note: ld: in /Users/srinivad/code/personal/libzmq/builds/ios/libzmq_build/arm64/lib/libzmq.a(libzmq_la-address.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/srinivad/code/personal/libzmq/builds/ios/libzmq_build/arm64/lib/libzmq.a' clang: error: linker command failed with exit code 1 (use -v to see invocation) Any idea how to generate these packages for aarch64-apple-ios-sim architecture? Thank you!
0
0
959
Feb ’23
Reading EDID data on Apple M1 devices
Is there any way to read EDID data in new Apple M1 devices since the below code snippet does not work in M1 machines however it works in Intel based Mac. io_object_t object = -1;       io_iterator_t iterator;     CFMutableDictionaryRef matching = IOServiceMatching("IODisplayConnect");     kern_return_t kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, matching, &amp;amp;iterator);       if (KERN_SUCCESS == kernResult &amp;amp;&amp;amp; iterator != 0) {           object = IOIteratorNext(iterator);           while (object != 0) {               CFDictionaryRef dict = IODisplayCreateInfoDictionary(object, kIODisplayOnlyPreferredName);       /*        process data here        */               object = IOIteratorNext(iterator);     }     IOObjectRelease(iterator);   } Also tried replacing "IODisplayConnect" by "IODPDevice" but still get an empty iterator.
5
0
5.6k
Feb ’23
Apple Silicon - Could not find module *** for target 'x86_64-apple-ios-simulator'
Hello, I recently got a Mac with the Apple Silicon chip and I wanted to build an xCode iOS project but I have some issues: The project contains Pods and Swift Packages. At the begining I was not able to run the application at all and always got the following error: Could not find module '***' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator After some research, I found that many people have solved this problem by changing the property "Exclude Architectures" on the Build Settings (both for the main project and the pods) to "Any iOS simulator SDK - arm64". After doing this, I was able to run the app on a physical device and on the mac target (designed for iPad) but the simulators and SwiftUI Preview still doesn't work. Do you have any solution for this problem ? Thank you by advance !
4
0
10k
Feb ’23
16GB memory limit for iPad apps running on Apple Silicon Macs
I seem to be hitting a 16GB memory limit for my iPadOS app running under macOS on Apple Silicon. I can't find this limit documented or discussed anywhere else, so I'm posting here in the hopes of getting confirmation that it's official (as opposed to coincidental) and seeing if there's a way to lift or remove this limit. Background I have an iOS / iPadOS app that uses concurrency to solve puzzles. I have a Torture Test Puzzle that I use to stress-test the app. The Torture Test Puzzle results in millions of NSBlockOperations on a NSOperationQueue with a concurrency limit of ProcessInfo.processInfo.activeProcessorCount - 1 The app also uses Swift "copy on write" semantics to give each operation its own variation of the game model struct, so there are corresponding Swift.***Storage objects as well. Each of these objects is small (272 bytes for the block operations) but collectively, they add up to several GB. During a successful run, the peak memory usage of the app exceeds 50GB, as measured by Instruments and macOS Activity Monitor. When running the iPad app on the Apple Silicon Mac, it receives a memory warning (AppDelegate.applicationDidReceiveMemoryWarning) when usage hits 16GB. The app normally halts the solver and displays an error when that happens, but if I disable the watchdog, it crashes just as it would on a real iPad. Where it works and doesn't The app does not run out of memory when I build for Mac Catalyst or the Xcode Simulator: Hardware  Xcode Simulator   Mac Catalyst   "Designed for iPad"  2018 Mac mini, Core i3, 64GB RAM   ✓   ✓   (n/a)  2023 MacBook Pro, M2, 96GB RAM   ✓   ✓   ❌ Note: the choice of simulator is irrelevant. Even an iPod touch simulator runs to completion. What does the kernel say? In both the Catalyst and Simulator scenarios, os_proc_available_memory() reports 0 which I assume means "no limit." Whereas, under "Designed for iPad" it reports 17164220800 i.e. 16GB. So I assume this is a deliberate limit… I just see no documentation around it. What I've tried Increased Memory Limit I've tried adding the com.apple.developer.kernel.increased-memory-limit entitlement to the app. No change. — I've verified that the entitlement shows up in Xcode under Signing & Capabilities. — I've verified that the entitlement shows up in my developer account under Certificates, Identifiers & Profiles. — I've tried Quinn's trick of adding the additional Private VPN entitlement to the Mac build just to make sure Xcode picks it up. Extended Virtual Addressing I've tried adding the com.apple.developer.kernel.extended-virtual-addressing entitlement to the app. Made it worse. The app now runs out of memory at ~3.2GB. Note I don't see a forum tag specifically for questions related to "Designed for iPad apps running on Apple Silicon Macs," but please educate me if I missed one.
2
1
3.2k
Feb ’23
How can I use Superpages on an M1 Mac?
I have a number of performance-intensive tasks that I need to run regularly, such as compiling and linking large programs, and I'd like to see if superpages are of help here. I've had great long-term success with low-level changes to other aspects of the programs, such as the malloc default zone, and would like to see if changing the page size can provide similarly fruitful results. There is some evidence that that may be the case (https://easyperf.net/blog/2022/09/01/Utilizing-Huge-Pages-For-Code#option2-remap-the-code-section-at-runtime and https://xmrig.com/docs/miner/hugepages). However, when I try, mmap(NULL, 2 * 1024 * 1024, PROT_READ, MAP_ANON | MAP_PRIVATE, VM_FLAGS_SUPERPAGE_SIZE_2MB, 0) for example, it always fails. Is there any way to use superpages?
3
0
2.7k
Feb ’23
Cannot use XLA accelerator Tensorflow in M1 silicon
I'm trying to use XLA in TensorFlow using jit_compile=True, currently. However, the error looks like it cannot. First of all, I tried simple code as below, import tensorflow as tf @tf.function(jit_compile=True) def operation(a, b): return a * b And, I got an error as below, (base) ***@MacBook-Pro folder % /Users/***/miniforge3/envs/testtf/bin/python /Users/***/workplace/research/folder/subfolder/test/test_jit_compile.py Metal device set to: Apple M1 Pro systemMemory: 32.00 GB maxCacheSize: 10.67 GB 2023-01-11 12:45:18.794439: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:306] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support. 2023-01-11 12:45:18.794689: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:272] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -&gt; physical PluggableDevice (device: 0, name: METAL, pci bus id: &lt;undefined&gt;) 2023-01-11 12:45:18.808796: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at xla_ops.cc:418 : NOT_FOUND: could not find registered platform with id: 0x10c7ba7e0 Traceback (most recent call last): File "/Users/***/workplace/research/folder/subfolder/test/test_jit_compile.py", line 25, in &lt;module&gt; print(operation(3, 4)) File "/Users/***/miniforge3/envs/testtf/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/Users/***/miniforge3/envs/testtf/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 52, in quick_execute tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, tensorflow.python.framework.errors_impl.NotFoundError: could not find registered platform with id: 0x10c7ba7e0 [Op:__inference_operation_5] This seems like XLA did not register. Would you guide how to use jit_compile=True in this environment? I attached my environment as below also. Package Version ----------------------- --------- absl-py 1.3.0 astunparse 1.6.3 cachetools 5.2.1 certifi 2022.12.7 charset-normalizer 2.1.1 flatbuffers 23.1.4 gast 0.4.0 google-auth 2.16.0 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 grpcio 1.42.0 h5py 3.6.0 idna 3.4 importlib-metadata 6.0.0 keras 2.11.0 libclang 15.0.6.1 Markdown 3.4.1 MarkupSafe 2.1.1 numpy 1.22.3 oauthlib 3.2.2 opt-einsum 3.3.0 packaging 23.0 pip 22.3.1 protobuf 3.19.6 pyasn1 0.4.8 pyasn1-modules 0.2.8 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 setuptools 65.6.3 six 1.16.0 tensorboard 2.11.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow-estimator 2.11.0 tensorflow-macos 2.11.0 tensorflow-metal 0.7.0 termcolor 2.2.0 typing_extensions 4.4.0 urllib3 1.26.13 Werkzeug 2.2.2 wheel 0.37.1 wrapt 1.14.1 zipp 3.11.0 Thanks.
3
0
2.8k
Jan ’23
Core audio for apple silicon
I just saw my activity monitor and noticed that there was something named core audio with intel architecture in my apple silicon mac which came pre loaded. Analysis of sampling com.apple.audio.Core-Audio-Driver-Service (pid 11196) every 1 millisecond Process: com.apple.audio.Core-Audio-Driver-Service [11196] Path: /System/Library/Frameworks/CoreAudio.framework/Versions/A/XPCServices/com.apple.audio.Core-Audio-Driver-Service.xpc/Contents/MacOS/com.apple.audio.Core-Audio-Driver-Service Load Address: 0x10023d000 Identifier: com.apple.audio.Core-Audio-Driver-Service Version: 1.0 (1) Code Type: X86-64 (translated) Platform: macOS Parent Process: launchd [1] Date/Time: 2021-03-31 01:30:39.233 +0530 Launch Time: 2021-03-31 01:20:44.850 +0530 OS Version: macOS 11.2.3 (20D91) Report Version: 7 Analysis Tool: /usr/bin/sample I wish I could get an answer for this why it is still in intel architecture and is not yet ported to apple silicon yet.
2
1
2.2k
Jan ’23
rvictl not found on Ventura M2 chip
Hi, I have tried everything from this https://developer.apple.com/forums/thread/685536 I already did this: https://support.apple.com/guide/mac-help/macos-recovery-a-mac-apple-silicon-mchl82829c17/11.0/mac/11.0#mchl9b13cbdc But this last instruction: And after you bootup, you have to again go to system---&gt;security&amp;preferences and there will be an "allow" button you have to click there which will again make you reboot. I cannot find it in the new settings window. I do not know what else to do to have rvictl in my computer. Any help please: FYI: I have xcode 14.1 installed
2
0
1.4k
Jan ’23
Unable to preview SwiftUI targeting framework
Hi, Using an Apple silicon mac, I am unable to preview the SwiftUI targeting the framework in a project with EXCLUDED_ARCHS[sdk=iphonesimulator*] set to arm64. Sample project The following log seems to indicate that the x86_64 binary was built according to the build settings, but what was actually needed was the arm64 binary. I would like to know if anyone knows how to solve this problem. Thanks. PotentialCrashError: Update failed XCPreviewAgent may have crashed. Check ~/Library/Logs/DiagnosticReports for any crash logs from your application. ================================== |  RemoteHumanReadableError |   |  LoadingError: failed to load library at path "/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents": Optional(dlopen(/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents, 0x0000): tried: '/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (errno=2), '/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIComponents.framework/UIComponents' (errno=2)) |   |  ================================== |   |  |  MessageSendFailure: Message send failure for <ServiceMessage 3: update>
0
0
919
Jan ’23
Problem with azure pipeline in xcode 14.2 failed fastlane when archive
Hello guys, I have the next problem with azure when the pipeline run fastlane failed the archive in the end to execution. In the local in machine computer intel run the pipeline very well, but in computer M1 the pipeline not worked and the pipeline with run virtual machine not worked my environment with fastlane Ruby 3.1.0 Fastlane 2.211.0 added to the project the next solution with xcode 14 post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) flipper_post_install(installer) # XCode 14 fix installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['SUPPORTED_PLATFORMS'] = 'iphoneos iphonesimulator' config.build_settings['SUPPORTS_MACCATALYST'] = 'NO' config.build_settings['SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD'] = 'NO' end end end end installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings["DEVELOPMENT_TEAM"] = "developer code" end any idea what is the problem? help me please God bless you I attach the log of pipeline
0
0
1.6k
Jan ’23
Crash in Accelerate framework when using Cholesky factorization
Hi. We are moving from MKL to Accelerate in order to accommodate the transition to apple silicon. However, we are occasionally getting crashes inside the Accelerate framework when factoring sparse matrices with the Cholesky decomposition. In the following link you can find an Xcode project with a minimal reproducible example: https://drive.google.com/file/d/1rHmJZbA5yc4-68Z1-vm7g3IvIPRgbN_c/view?usp=share_link I also pasted the code below. First, we load a sparse matrix from the hard drive. Then we factor it. When factoring the matrix with LDLT, everything works fine. When factoring it with Cholesky decomposition, the SparseFactor sometimes returns -3, sometimes it returns -1, and sometimes it crashes. The code below tries the factoring 100 times and always crashes. The matrix is positive definite, I checked it in another tool. It's smallest (algebraically) eigenvalue is at around 23000. Other matrices, such as the one in the 'good' file attached in the link above, doesn't cause crashes. Can someone please shed light onto what's causing the crash? What exactly in this matrix causes the crash, and is this a known issue in the Accelerate framework? #include <iostream> #include <fstream> #include <vector> #include <libgen.h> #include <Accelerate/Accelerate.h> int main(int argc, const char * argv[]) {          std::string filename = __FILE__;     std::string folder = dirname(const_cast<char*>(filename.c_str()));;     std::vector<std::string> files = {         folder  + "/m_good.bin",         folder  + "/m_bad.bin"     };               int GOOD = 0;     int BAD = 1;     std::string datafilename = files[BAD];     bool cholesky = true;          std::ifstream file(datafilename, std::ios::binary);     if (!file.is_open())     {         std::cout << " can't find file: " << datafilename  << "\n";         return 1;     }              SparseMatrix_Double _A;      // Read the data into a buffer      file.read((char*)&_A, sizeof(_A));          std::vector<double> _values;     auto size = _values.size();     file.read((char*)&size, sizeof(size));          _values.resize(size);     file.read((char*)&_values[0], size * sizeof(double));          std::vector<long> _column_starts;     file.read((char*)&size, sizeof(size));     _column_starts.resize(size);     file.read((char*)&_column_starts[0], size * sizeof(long));          std::vector<int> _row_indices;     file.read((char*)&size, sizeof(size));     _row_indices.resize(size);     file.read((char*)&_row_indices[0], size * sizeof(int));     file.close();     _A.data      = const_cast<double*>(&_values[0]);     _A.structure.columnStarts = &_column_starts[0];     _A.structure.rowIndices   = &_row_indices[0];          for (int i = 0; i < 100; i++)     {         std::cout << "\nRun: " << i << " ";         auto _LLT = SparseFactor(cholesky ? SparseFactorizationCholesky : SparseFactorizationLDLT, _A);                  std::cout << _LLT.status;         SparseCleanup(_LLT);                  if (_LLT.status != SparseStatusOK)         {             std::cout << " Failed!!";         }         std::cout << std::endl;          // Close the file     }          return 0; }
0
1
1.2k
Jan ’23
Pointer Authentication and dispatch_queue_t
We got a crash in some code, I had managed to miss this topic entirely somehow. This says: Pointer authentication can also expose latent bugs in existing code. In C++, it’s incorrect to call a virtual method using a declaration that differs from its definition. In practice, such calls typically succeed in arm64, but trigger a pointer authentication failure in arm64e. You might encounter this bug when using OS_OBJECT types like dispatch_queue_t and xpc_connection_t. You can’t pass instances of these types from C++ code to an Objective-C++ function (or vice versa) because they’re defined differently in Objective-C++ to support automatic reference counting (ARC). and, yes, we have both C++ and ObjC++ code, and a class does have a dispatch_queue_t member, and it does get passed around (although I don't think anything other than ObjC++ code touches the member), but... the documentation there says "you can't d this" but has absolutely no information on what you are supposed to do instead. Again, I've managed to miss this completely, and my network searching ability is pretty awful, so I assume I simply couldn't find documentation on it? (And I can't stream video very well where I am right now.)
6
0
1.4k
Dec ’22
Is it possible to build a macCatalyst app and distribute it on Intel only Macs?
I've build a few iOS apps, they are all distributes on iPhone, iPad and macOS Silicon as iPad apps I would like to distribute those apps on Mac Intel computers too, I'm able to build a version using macCatalyst, would it be possible to distribute this macCatalyst on Mac Intel only system, avoiding to presente int on the App Store for Mac Silicon computers? (on those I would that user download the iPad version and not the macCatalyst one) Mac Intel version should be compatible from macOS 10 thank you for your suggestion Antonio Ferraioli
2
0
1.8k
Dec ’22
Mouse hover events cause warnings in the console when running an iOS Audio Unit on an M1 Mac
Hi, When debugging an iOS AUv3 extension in GarageBand (or in other host apps) on Mac OS Monterey running on an M1 Mac, there is a large number of warnings that read: WARNING: SPI usage of '-[UINSWindow uiWindows]' is being shimmed. This will break in the future. Please file a radar requesting API for what you are trying to do. I noticed that immediately after such a warning, the view's hitTest is called with a UIHoverEvent, and indeed moving the mouse results in more log spam. Although the very first occurrence of the warning may have a different root cause. Using a symbolic breakpoint wasn't helpful in revealing further information. Note that I'm launching the AUv3 extension in the "Designed for iPad" mode. Project language is Objective-C. I was able to reproduce the issue with even an empty project, adding nothing beyond Xcode's built-in appex template for iOS Audio Units. The issue doesn't seem to happen with the Apple sample code "CreatingCustomAudioEffects", which is a swift project. I also compared and matched storyboard settings between that project and my own, but to no avail. Any pointers would be highly appreciated. Thanks.
Replies
5
Boosts
0
Views
2.2k
Activity
Mar ’23
macOS: Audio Workgroup threads not running on P-Cores
We have noticed that in our application that creates worker threads for audio processing, these threads (time-constrained priority) in some cases do not run on the P-Cores (on Apple Silicon Macs). It was my understanding that once we use audio workgroups, the scheduler will always schedule our threads on the P-Cores. This works okay as long as the CoreAudio buffer size used is 256 samples or less (@ 48K). But if the buffer size is 512 or above, the threads are run on E-Cores (checked using System Trace). Is this expected behavior? Can I find any documentation for this (short of analyzing the scheduler source in kernel)? Thanks. Devendra.
Replies
1
Boosts
0
Views
1.1k
Activity
Mar ’23
Rosetta 2 automated installer problem
Hi, It appears that the automated triggering of Rosetta 2 installer is only done when a user directly clicks on an Intel only binary on silicon hardware. I have an app that is itself a universal binary but which loads an intel only plugin. This does not cause the built in Rosetta 2 installer to launch. I can detect that the app is running on arm64 and I can detect that Rosetta is not yet installed but I cannot programatically install it. It would be nice to have one of the following: The ability to require Rosetta in the app's plist for a universal binary. A system call to initiate installation. For the automated installer to work however a binary is run. The first seems like the cleanest solution. Without one of these, or some other fix, Rosetta 2 installation is incoherent. For now the only way I can work round this issue is very ugly: include a second minimal x86_64 only app with my app as a no op installer for Rosetta, then when my app runs if I detect that Rosetta is missing on silicon, throw up an alert to ask the user to run the bundled minimal app and exit. This is less than ideal. Can you suggest a better way to work round this issue? or Can you add one of the above solutions as a feature request? Thanks Paul
Replies
11
Boosts
0
Views
2.5k
Activity
Mar ’23
iOS app on Apple Silicon Mac: how are app data files protected?
While submitting a new app, I noticed I could choose to make the app available on Apple Silicon Mac. Since user can access the file system on the Mac, I wonder how are app's data files are protected? Are they also in sandbox and can't be accessed through file system by macOS user? Because my laptop runs on Intel CPU, I can't experiment it myself. I googled and found this page: https://developer.apple.com/documentation/xcode/configuring-the-macos-app-sandbox/, but the app sandbox seems to be mainly about protecting macOS from the iOS app, not the vice versa? Does anyone knows the details? Thanks.
Replies
4
Boosts
1
Views
1.7k
Activity
Feb ’23
(Old) Code written on older Xcode vs M1 Xcode... issues/differences?
Sorry for the awkward title, I'm incredibly green regarding iOS development and even just Macs in general. I have code for a working (and published) app that was written quite a while ago and I'm wondering if it should just compile without issues on M1 Xcode or if there would inherently be tweaks that need to be done, dependency issues, etc? I ask because it doesn't of course compile, but being green, I'm just unsure if my first issue is because I'm using an M1 MBP with Xcode 14 and there would be a ton of settings I need to tweak (such as Swift versions etc) or if the project's config files should "handle" telling Xcode how it should be compiled? I have, seemingly, downloaded all of the dependencies in the pod but it does complain, specifically, about a TrueTime dependency not being available but again I'm just unsure if there are some changes that need to be made for a project that wasn't written with M1 in mind or not.
Replies
1
Boosts
0
Views
611
Activity
Feb ’23
Unable to build libzmq for aarch64-apple-ios-sim on M1
This is related to - https://github.com/zeromq/libzmq/issues/4508 Issue description How to build libzmq for aarch64-apple-ios-sim (IOS Simulator on M1)? Minimal test code / Steps to reproduce the issue Run ios build ./builds/ios/build_ios.sh output: which generates libs and include packages for all platforms except aarch64-apple-ios-sim Using aarm64/libzmq.a package to build my rust project. I get the following error export LIBZMQ_LIB_DIR=/<path_to>/libzmq/builds/ios/libzmq_build/arm64/lib export LIBZMQ_INCLUDE_DIR=/<path_to>/libzmq/builds/ios/libzmq_build/arm64/include # Build project cargo build -r --target=aarch64-apple-ios-sim Error output: . . .building for iOS Simulator, but linking in object file built for iOS . . . see full Error here... "-Wl,-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk" "-L" "/Users/srinivad/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios-sim/lib" "-o" "/Users/srinivad/code/personal/aries_vcx/target/aarch64-apple-ios-sim/release/deps/libindy_vdr-5aa23635579223af.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs" = note: ld: in /Users/srinivad/code/personal/libzmq/builds/ios/libzmq_build/arm64/lib/libzmq.a(libzmq_la-address.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/srinivad/code/personal/libzmq/builds/ios/libzmq_build/arm64/lib/libzmq.a' clang: error: linker command failed with exit code 1 (use -v to see invocation) Any idea how to generate these packages for aarch64-apple-ios-sim architecture? Thank you!
Replies
0
Boosts
0
Views
959
Activity
Feb ’23
Reading EDID data on Apple M1 devices
Is there any way to read EDID data in new Apple M1 devices since the below code snippet does not work in M1 machines however it works in Intel based Mac. io_object_t object = -1;       io_iterator_t iterator;     CFMutableDictionaryRef matching = IOServiceMatching("IODisplayConnect");     kern_return_t kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, matching, &amp;amp;iterator);       if (KERN_SUCCESS == kernResult &amp;amp;&amp;amp; iterator != 0) {           object = IOIteratorNext(iterator);           while (object != 0) {               CFDictionaryRef dict = IODisplayCreateInfoDictionary(object, kIODisplayOnlyPreferredName);       /*        process data here        */               object = IOIteratorNext(iterator);     }     IOObjectRelease(iterator);   } Also tried replacing "IODisplayConnect" by "IODPDevice" but still get an empty iterator.
Replies
5
Boosts
0
Views
5.6k
Activity
Feb ’23
Apple Silicon - Could not find module *** for target 'x86_64-apple-ios-simulator'
Hello, I recently got a Mac with the Apple Silicon chip and I wanted to build an xCode iOS project but I have some issues: The project contains Pods and Swift Packages. At the begining I was not able to run the application at all and always got the following error: Could not find module '***' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator After some research, I found that many people have solved this problem by changing the property "Exclude Architectures" on the Build Settings (both for the main project and the pods) to "Any iOS simulator SDK - arm64". After doing this, I was able to run the app on a physical device and on the mac target (designed for iPad) but the simulators and SwiftUI Preview still doesn't work. Do you have any solution for this problem ? Thank you by advance !
Replies
4
Boosts
0
Views
10k
Activity
Feb ’23
16GB memory limit for iPad apps running on Apple Silicon Macs
I seem to be hitting a 16GB memory limit for my iPadOS app running under macOS on Apple Silicon. I can't find this limit documented or discussed anywhere else, so I'm posting here in the hopes of getting confirmation that it's official (as opposed to coincidental) and seeing if there's a way to lift or remove this limit. Background I have an iOS / iPadOS app that uses concurrency to solve puzzles. I have a Torture Test Puzzle that I use to stress-test the app. The Torture Test Puzzle results in millions of NSBlockOperations on a NSOperationQueue with a concurrency limit of ProcessInfo.processInfo.activeProcessorCount - 1 The app also uses Swift "copy on write" semantics to give each operation its own variation of the game model struct, so there are corresponding Swift.***Storage objects as well. Each of these objects is small (272 bytes for the block operations) but collectively, they add up to several GB. During a successful run, the peak memory usage of the app exceeds 50GB, as measured by Instruments and macOS Activity Monitor. When running the iPad app on the Apple Silicon Mac, it receives a memory warning (AppDelegate.applicationDidReceiveMemoryWarning) when usage hits 16GB. The app normally halts the solver and displays an error when that happens, but if I disable the watchdog, it crashes just as it would on a real iPad. Where it works and doesn't The app does not run out of memory when I build for Mac Catalyst or the Xcode Simulator: Hardware  Xcode Simulator   Mac Catalyst   "Designed for iPad"  2018 Mac mini, Core i3, 64GB RAM   ✓   ✓   (n/a)  2023 MacBook Pro, M2, 96GB RAM   ✓   ✓   ❌ Note: the choice of simulator is irrelevant. Even an iPod touch simulator runs to completion. What does the kernel say? In both the Catalyst and Simulator scenarios, os_proc_available_memory() reports 0 which I assume means "no limit." Whereas, under "Designed for iPad" it reports 17164220800 i.e. 16GB. So I assume this is a deliberate limit… I just see no documentation around it. What I've tried Increased Memory Limit I've tried adding the com.apple.developer.kernel.increased-memory-limit entitlement to the app. No change. — I've verified that the entitlement shows up in Xcode under Signing & Capabilities. — I've verified that the entitlement shows up in my developer account under Certificates, Identifiers & Profiles. — I've tried Quinn's trick of adding the additional Private VPN entitlement to the Mac build just to make sure Xcode picks it up. Extended Virtual Addressing I've tried adding the com.apple.developer.kernel.extended-virtual-addressing entitlement to the app. Made it worse. The app now runs out of memory at ~3.2GB. Note I don't see a forum tag specifically for questions related to "Designed for iPad apps running on Apple Silicon Macs," but please educate me if I missed one.
Replies
2
Boosts
1
Views
3.2k
Activity
Feb ’23
How can I use Superpages on an M1 Mac?
I have a number of performance-intensive tasks that I need to run regularly, such as compiling and linking large programs, and I'd like to see if superpages are of help here. I've had great long-term success with low-level changes to other aspects of the programs, such as the malloc default zone, and would like to see if changing the page size can provide similarly fruitful results. There is some evidence that that may be the case (https://easyperf.net/blog/2022/09/01/Utilizing-Huge-Pages-For-Code#option2-remap-the-code-section-at-runtime and https://xmrig.com/docs/miner/hugepages). However, when I try, mmap(NULL, 2 * 1024 * 1024, PROT_READ, MAP_ANON | MAP_PRIVATE, VM_FLAGS_SUPERPAGE_SIZE_2MB, 0) for example, it always fails. Is there any way to use superpages?
Replies
3
Boosts
0
Views
2.7k
Activity
Feb ’23
Cannot use XLA accelerator Tensorflow in M1 silicon
I'm trying to use XLA in TensorFlow using jit_compile=True, currently. However, the error looks like it cannot. First of all, I tried simple code as below, import tensorflow as tf @tf.function(jit_compile=True) def operation(a, b): return a * b And, I got an error as below, (base) ***@MacBook-Pro folder % /Users/***/miniforge3/envs/testtf/bin/python /Users/***/workplace/research/folder/subfolder/test/test_jit_compile.py Metal device set to: Apple M1 Pro systemMemory: 32.00 GB maxCacheSize: 10.67 GB 2023-01-11 12:45:18.794439: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:306] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support. 2023-01-11 12:45:18.794689: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:272] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -&gt; physical PluggableDevice (device: 0, name: METAL, pci bus id: &lt;undefined&gt;) 2023-01-11 12:45:18.808796: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at xla_ops.cc:418 : NOT_FOUND: could not find registered platform with id: 0x10c7ba7e0 Traceback (most recent call last): File "/Users/***/workplace/research/folder/subfolder/test/test_jit_compile.py", line 25, in &lt;module&gt; print(operation(3, 4)) File "/Users/***/miniforge3/envs/testtf/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/Users/***/miniforge3/envs/testtf/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 52, in quick_execute tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, tensorflow.python.framework.errors_impl.NotFoundError: could not find registered platform with id: 0x10c7ba7e0 [Op:__inference_operation_5] This seems like XLA did not register. Would you guide how to use jit_compile=True in this environment? I attached my environment as below also. Package Version ----------------------- --------- absl-py 1.3.0 astunparse 1.6.3 cachetools 5.2.1 certifi 2022.12.7 charset-normalizer 2.1.1 flatbuffers 23.1.4 gast 0.4.0 google-auth 2.16.0 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 grpcio 1.42.0 h5py 3.6.0 idna 3.4 importlib-metadata 6.0.0 keras 2.11.0 libclang 15.0.6.1 Markdown 3.4.1 MarkupSafe 2.1.1 numpy 1.22.3 oauthlib 3.2.2 opt-einsum 3.3.0 packaging 23.0 pip 22.3.1 protobuf 3.19.6 pyasn1 0.4.8 pyasn1-modules 0.2.8 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 setuptools 65.6.3 six 1.16.0 tensorboard 2.11.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow-estimator 2.11.0 tensorflow-macos 2.11.0 tensorflow-metal 0.7.0 termcolor 2.2.0 typing_extensions 4.4.0 urllib3 1.26.13 Werkzeug 2.2.2 wheel 0.37.1 wrapt 1.14.1 zipp 3.11.0 Thanks.
Replies
3
Boosts
0
Views
2.8k
Activity
Jan ’23
Core audio for apple silicon
I just saw my activity monitor and noticed that there was something named core audio with intel architecture in my apple silicon mac which came pre loaded. Analysis of sampling com.apple.audio.Core-Audio-Driver-Service (pid 11196) every 1 millisecond Process: com.apple.audio.Core-Audio-Driver-Service [11196] Path: /System/Library/Frameworks/CoreAudio.framework/Versions/A/XPCServices/com.apple.audio.Core-Audio-Driver-Service.xpc/Contents/MacOS/com.apple.audio.Core-Audio-Driver-Service Load Address: 0x10023d000 Identifier: com.apple.audio.Core-Audio-Driver-Service Version: 1.0 (1) Code Type: X86-64 (translated) Platform: macOS Parent Process: launchd [1] Date/Time: 2021-03-31 01:30:39.233 +0530 Launch Time: 2021-03-31 01:20:44.850 +0530 OS Version: macOS 11.2.3 (20D91) Report Version: 7 Analysis Tool: /usr/bin/sample I wish I could get an answer for this why it is still in intel architecture and is not yet ported to apple silicon yet.
Replies
2
Boosts
1
Views
2.2k
Activity
Jan ’23
rvictl not found on Ventura M2 chip
Hi, I have tried everything from this https://developer.apple.com/forums/thread/685536 I already did this: https://support.apple.com/guide/mac-help/macos-recovery-a-mac-apple-silicon-mchl82829c17/11.0/mac/11.0#mchl9b13cbdc But this last instruction: And after you bootup, you have to again go to system---&gt;security&amp;preferences and there will be an "allow" button you have to click there which will again make you reboot. I cannot find it in the new settings window. I do not know what else to do to have rvictl in my computer. Any help please: FYI: I have xcode 14.1 installed
Replies
2
Boosts
0
Views
1.4k
Activity
Jan ’23
Unable to preview SwiftUI targeting framework
Hi, Using an Apple silicon mac, I am unable to preview the SwiftUI targeting the framework in a project with EXCLUDED_ARCHS[sdk=iphonesimulator*] set to arm64. Sample project The following log seems to indicate that the x86_64 binary was built according to the build settings, but what was actually needed was the arm64 binary. I would like to know if anyone knows how to solve this problem. Thanks. PotentialCrashError: Update failed XCPreviewAgent may have crashed. Check ~/Library/Logs/DiagnosticReports for any crash logs from your application. ================================== |  RemoteHumanReadableError |   |  LoadingError: failed to load library at path "/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents": Optional(dlopen(/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents, 0x0000): tried: '/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (errno=2), '/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIComponents.framework/UIComponents' (errno=2)) |   |  ================================== |   |  |  MessageSendFailure: Message send failure for <ServiceMessage 3: update>
Replies
0
Boosts
0
Views
919
Activity
Jan ’23
App crash on simulator (M1 / React native)
Hello! I have an app that was developed on intel mac using react-native, when developing on M1, the app "quits unexpectedly" on simulator but works fine if I plug my device. Any idea? Problem Details and System Configuration
Replies
2
Boosts
0
Views
1.8k
Activity
Jan ’23
Problem with azure pipeline in xcode 14.2 failed fastlane when archive
Hello guys, I have the next problem with azure when the pipeline run fastlane failed the archive in the end to execution. In the local in machine computer intel run the pipeline very well, but in computer M1 the pipeline not worked and the pipeline with run virtual machine not worked my environment with fastlane Ruby 3.1.0 Fastlane 2.211.0 added to the project the next solution with xcode 14 post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) flipper_post_install(installer) # XCode 14 fix installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['SUPPORTED_PLATFORMS'] = 'iphoneos iphonesimulator' config.build_settings['SUPPORTS_MACCATALYST'] = 'NO' config.build_settings['SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD'] = 'NO' end end end end installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings["DEVELOPMENT_TEAM"] = "developer code" end any idea what is the problem? help me please God bless you I attach the log of pipeline
Replies
0
Boosts
0
Views
1.6k
Activity
Jan ’23
Crash in Accelerate framework when using Cholesky factorization
Hi. We are moving from MKL to Accelerate in order to accommodate the transition to apple silicon. However, we are occasionally getting crashes inside the Accelerate framework when factoring sparse matrices with the Cholesky decomposition. In the following link you can find an Xcode project with a minimal reproducible example: https://drive.google.com/file/d/1rHmJZbA5yc4-68Z1-vm7g3IvIPRgbN_c/view?usp=share_link I also pasted the code below. First, we load a sparse matrix from the hard drive. Then we factor it. When factoring the matrix with LDLT, everything works fine. When factoring it with Cholesky decomposition, the SparseFactor sometimes returns -3, sometimes it returns -1, and sometimes it crashes. The code below tries the factoring 100 times and always crashes. The matrix is positive definite, I checked it in another tool. It's smallest (algebraically) eigenvalue is at around 23000. Other matrices, such as the one in the 'good' file attached in the link above, doesn't cause crashes. Can someone please shed light onto what's causing the crash? What exactly in this matrix causes the crash, and is this a known issue in the Accelerate framework? #include <iostream> #include <fstream> #include <vector> #include <libgen.h> #include <Accelerate/Accelerate.h> int main(int argc, const char * argv[]) {          std::string filename = __FILE__;     std::string folder = dirname(const_cast<char*>(filename.c_str()));;     std::vector<std::string> files = {         folder  + "/m_good.bin",         folder  + "/m_bad.bin"     };               int GOOD = 0;     int BAD = 1;     std::string datafilename = files[BAD];     bool cholesky = true;          std::ifstream file(datafilename, std::ios::binary);     if (!file.is_open())     {         std::cout << " can't find file: " << datafilename  << "\n";         return 1;     }              SparseMatrix_Double _A;      // Read the data into a buffer      file.read((char*)&_A, sizeof(_A));          std::vector<double> _values;     auto size = _values.size();     file.read((char*)&size, sizeof(size));          _values.resize(size);     file.read((char*)&_values[0], size * sizeof(double));          std::vector<long> _column_starts;     file.read((char*)&size, sizeof(size));     _column_starts.resize(size);     file.read((char*)&_column_starts[0], size * sizeof(long));          std::vector<int> _row_indices;     file.read((char*)&size, sizeof(size));     _row_indices.resize(size);     file.read((char*)&_row_indices[0], size * sizeof(int));     file.close();     _A.data      = const_cast<double*>(&_values[0]);     _A.structure.columnStarts = &_column_starts[0];     _A.structure.rowIndices   = &_row_indices[0];          for (int i = 0; i < 100; i++)     {         std::cout << "\nRun: " << i << " ";         auto _LLT = SparseFactor(cholesky ? SparseFactorizationCholesky : SparseFactorizationLDLT, _A);                  std::cout << _LLT.status;         SparseCleanup(_LLT);                  if (_LLT.status != SparseStatusOK)         {             std::cout << " Failed!!";         }         std::cout << std::endl;          // Close the file     }          return 0; }
Replies
0
Boosts
1
Views
1.2k
Activity
Jan ’23
Pointer Authentication and dispatch_queue_t
We got a crash in some code, I had managed to miss this topic entirely somehow. This says: Pointer authentication can also expose latent bugs in existing code. In C++, it’s incorrect to call a virtual method using a declaration that differs from its definition. In practice, such calls typically succeed in arm64, but trigger a pointer authentication failure in arm64e. You might encounter this bug when using OS_OBJECT types like dispatch_queue_t and xpc_connection_t. You can’t pass instances of these types from C++ code to an Objective-C++ function (or vice versa) because they’re defined differently in Objective-C++ to support automatic reference counting (ARC). and, yes, we have both C++ and ObjC++ code, and a class does have a dispatch_queue_t member, and it does get passed around (although I don't think anything other than ObjC++ code touches the member), but... the documentation there says "you can't d this" but has absolutely no information on what you are supposed to do instead. Again, I've managed to miss this completely, and my network searching ability is pretty awful, so I assume I simply couldn't find documentation on it? (And I can't stream video very well where I am right now.)
Replies
6
Boosts
0
Views
1.4k
Activity
Dec ’22
Is it possible to build a macCatalyst app and distribute it on Intel only Macs?
I've build a few iOS apps, they are all distributes on iPhone, iPad and macOS Silicon as iPad apps I would like to distribute those apps on Mac Intel computers too, I'm able to build a version using macCatalyst, would it be possible to distribute this macCatalyst on Mac Intel only system, avoiding to presente int on the App Store for Mac Silicon computers? (on those I would that user download the iPad version and not the macCatalyst one) Mac Intel version should be compatible from macOS 10 thank you for your suggestion Antonio Ferraioli
Replies
2
Boosts
0
Views
1.8k
Activity
Dec ’22