Dive into the vast array of tools and services available to developers.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

Embed/Do Not Embed & Mach-O type
My Xcode project has the following configuration: 1 iOS app target 1 Xcode framework target (mach-o-type "Dynamic Library") 5 static libraries Dependencies: All the static libraries are target dependencies of the framework. The framework is the only target dependency of the iOS app. For the iOS app target, within the General tab > Frameworks, Libraries & Embedded content, I've set the framework as "Do not embed" So now I have a dynamic framework which won't be copied to the .app bundle in the build output. As per my understanding, this should result in a runtime error, dyld should not be able to find the framework files as they were not embedded in the final .app bundle. But regardless, my app runs without any errors, using all the methods exposed by the framework. What is the correct understanding here? What exactly does Embed/Do not embed mean (apart from excluding the files from .app bundle) When both settings are specified, is there any priority or precedence of one setting over the other?
3
0
112
3d
Xcode Code coverage shows zero; even after 245 successful tests
I have a project inside the project structure. I have around 300 unit tests in the project. I see that for some of the subprojects, the coverage numbers show up correctly, but for other subprojects and the main project, the coverage number shows zero, even though the tests are running successfully. The log I get is: Aggregation tool emitted warnings: warning: /Users/ABC/Library/Developer/Xcode/DerivedData/projectABC-hfzmkbdgpiswoxfvvnvhrafaiqyb/Build/ProfileData/A8EEC1FB-1699-4C29-A88C-D3DDA226DBC0/0A416494-A393-4319-AA47-502D72084C9C-43351.profraw: raw profile version mismatch: Profile uses raw profile format version = 8; expected version = 10 PLEASE update this tool to the version in the raw profile, or regenerate the raw profile with the expected version. I only have one Xcode (26.0.1) on my machine. I tried cleaning the derived data, the cleaning project, and rerunning the tests, but it hasn't helped. Please help me get the coverage number back. Thank you.
0
0
37
4d
Forbidden request when using API in Codemagic( Unable to find a team with the given Content Provider ID )
Failed to fetch certificates: This request is forbidden for security reasons - Unable to find a team with the given Content Provider ID '72df6041-c291-4d95-b690-2a3b75ff72f6' to which you belong. Please contact Apple Developer Program Support. https://developer.apple.com/support I have already confirmed that: All API keys were generated correctly. All required roles and permissions have been assigned in App Store Connect. To confirm my doubt, I requested api key from a fellow developer, and that worked in CodeMagic without throwing an error. Could you please help me figure out why the given Content Provider ID is not being recognized? Thank you.
3
4
284
6d
What is the unit used for the availableKilobytes property of the target object?
In the online documentation for InstallerJS, it is stated that the unit for the availableKilobytes property of the target field is kilobytes. Isn't it actually bytes because of a bug in the very first release of macOS that supported InstallerJS? [Q] Has there been a fix in the recent years regarding this property that would explain why the documentation says it's kilobytes? Even though at the time of this writing, the unit is still bytes when you call my.target.availableKilobytes I'm using this call to dump the value of this property in install.log: system.log(my.target.availableKilobytes + ''); Ref. https://developer.apple.com/documentation/installer_js/target/1811975-availablekilobytes (FB20448952)
0
0
33
6d
LibGDX/MobiVM App refuses to launch on iOS 26.0.1
Hello, currently I am having trouble releasing an app because it crashes/does not launch on iOS 26.0.1. We have uploaded apps in the past so I tried building one of them with our current toolchain. I use Xcode 16.4, Kotlin version 2.0.0, LibGDX 1.13.1 and robovm/MobiVM 2.3.23. I uploaded the build to TestFlight and tested with physical devices running iOS 18.5 and 26.0.1. It runs fine on 18.5 but refuses to launch on the 26.0.1 device. I cannot retrieve a crash log or .ips file because none is written. When I write a Console log while the app crashes/does not launch I get no hints as to why it does so. Do you maybe have additional ideas as to why it keeps not launching on iOS 26.0.1?
1
0
153
6d
Can't install iOS 26.0 beta through xcodes or xcodebuild
I need to automate updating to latest iOS betas as part of my ci script, but I can't get it to install iOS 26.0 beta for the life of me, using xcodes or xcodebuild. I can see the version listed using xcodes runtimes --include-betas, and I tried sudo xcodes runtimes install "iOS 26.0-beta1", but I would get the error Downloading Runtime iOS 26.0-beta1: 0% Error: ProcessExecutionError()\ I also tried xcodebuild -downloadPlatform iOS -buildVersion 23A5260l, where I found the specific build id on apples dev images website. But I would get the error iOS 23A5260l is not available for download. Specific version download failed, trying downloadPlatform ios latest... And similar error for trying xcodebuild -downloadPlatform iOS -buildVersion 26.0 or other version ids I found online. But this command would work for any other versions and betas listed on the website. I was able to install iOS 26.0 through xcodebuild -downloadPlatform iOS, which automatically installed it for me, but this is unideal for my situation, as I want to control which betas to install instead of just the latest one (like iOS 18.6 beta that just came out). Is anyone else also struggling with these errors? xcodes version 1.6.2 Xcode version 26.0 Beta (installed and selected through xcode)
4
1
215
6d
Importing files to Files.app in iOS 26 Simulator
In previous versions of the simulator, it was possible to import files into the Files app by dragging them from the Finder into the Simulator. It appears that in the iOS 26 Simulator, this opens the file in Safari. I've only tried it with .json files so far. The documentation at https://developer.apple.com/documentation/xcode/sharing-data-with-simulator says that the original behaviour should happen: To add files to Simulator, select one or more files in Finder on your Mac, then click the Share button. Select Simulator from the share destination list. Choose the simulated device from the drop-down list. Simulator opens the Files app, and lets you select where to save the files. I'd love to learn if this is intentional behaviour, and if so, what workarounds there might be. I use this pattern quite a lot, as I have a HealthKit app, and I've built a system that allows me to export workouts as JSON files from a real device, that I can then import into a simulator for testing. Edit: I found a workaround. Make a folder in Files.app, then search for it within ~/Library/Developer/CoreSimulator/Devices. Open the folder in Finder, then add any files you want to be available in the Simulator.
4
5
173
6d
How to implement background notifications with action buttons (Accept/Decline) in iOS Flutter app?
I am developing a Flutter app for food delivery (a multivendor e-commerce restaurant app). In the vendor app (Android), I successfully implemented a background notification that stays active until the vendor responds with either Accept or Decline. This works fine on Android, but I cannot get the same functionality working on iOS. My requirements: Vendor should receive a background notification. The notification should include action buttons (Accept / Decline). It should remain active until the vendor takes action. My questions: Is this possible to implement in iOS with Flutter? If yes, what is the recommended way (e.g., firebase_messaging, flutter_local_notifications, flutter_foreground_task, or native iOS integration)? Are there any iOS restrictions I should consider compared to Android background services? I built this for Android using firebase_messaging + flutter_foreground_task + flutter_local_notifications. On iOS, I tried setting up firebase_messaging and flutter_local_notifications, but I’m unable to keep the notification persistent with Accept/Decline action buttons. I expected similar behavior to Android, but it seems iOS has more restrictions around background services and notification handling. Dependencies I am using (relevant ones): firebase_core: ^3.8.0 firebase_messaging: ^15.1.5 flutter_local_notifications: ^17.2.2 flutter_foreground_task: ^8.17.0 get: ^4.7.2 shared_preferences: ^2.3.2
1
0
162
1w
Automatic Provisioning fails in VisualStudio 2022
Hi there, I am trying to create my first iOS app using Visual Studio (Win 11) and .NET MAUI. I created a developer account and if I want to start the debugger with my local device, VS forces me to Configure Automatic Provisioning. I can select my configured account but the operation fails (see screenshot). I have no idea what is going wrong and I cannot find any setting in the developer account to fix this problem. Can anyone help me out, what is wrong and how to fix, thx!
2
0
61
1w
Flutter: abnormal delay on iOS in position recovery on first opening
Good morning everyone, I am developing a Flutter app for Android and iOS. When I press a button, the app detects the location of the device (obviously with permissions already granted). On Android everything works correctly. On iOS, however, when I press the button for the first time after opening the app, the location is detected after about 30-50 seconds. On the other hand, if I repeat the operation later, the response time is drastically reduced (only a few seconds). I am using the location package (https://pub.dev/packages/location), and the code to get the location is as follows: var currentLocation = await location.getLocation(); Has anyone experienced this problem before or knows how to solve it? Thank you very much! Federico
1
0
173
1w
iOS Build Memory Access Issues Causing Crashes
Our app has an old codebase, originating in 2011, which started out as purely Objective-C (and a little bit of Objective-C++), but a good amount of Swift has been added over time as well. Lots of Objective-C and Swift inter-op, but in general very few 3rd party libraries/frameworks. Like many other codebases of this size and age, we have a good amount of accumulated tech debt. In our case, that mostly comes in the form of using old/deprecated APIs (OpenGL primary amongst them), and also using some ‘tricks’ that allowed us to do highly customized UI popups and the like before they were officially supported by iOS, but unfortunately are still in use to this day (i.e. adding views directly to the UIWindow such that that are ‘on top’ of everything, instead of presenting a VC). Overall though, the app is very powerful and capable, and generally has a relatively low crash rate. About two months ago, we started seeing some new crashes that seemed to be totally unrelated to the code changes that were made at the time. Moreover, if a new branch with a feature or bug fix was merged in, the new crash would either disappear entirely, or move somewhere else. These were not ‘normal’ crashes either - when hooked up to the debugger in Xcode, often times the crashes would happen when calling into system library (e.g. initializing a UIColor object). Some of the steps taken to try and mitigate or eliminate these crashes include: Rolling back merges Often worked, but then most future merges would cause a new and different crash to appear Using the TSan and ASan tools to try and diagnose thread or memory issues TSan reported a couple of issues near launch that have been fixed, and there are others in some areas of the app, but they have been around a long time and don’t appear to correlate with any recent changes, nor did fixing the ones at launch (and throughout testing to try and reproduce crashes) result in elimination of the new crashes ASan does not identify any issues Modifying the code changes in a branch before merging it in In one case where the changes were limited to declaring ‘@objc static var: Bool’ in a Swift class and setting a value to it in a couple of places, simply removing the @objc from the declaration would result in the crash going away. Since the var had to be exposed to Objective-C, it was eventually moved to a pure Objective-C class that already existed and is a singleton (not ideal, but it’s been around a long time and has not yet been refactored) in order to preserve the functionality and the crash was no longer reproducible Removing all 3rd party libraries or frameworks Not a long-term solution, and this mostly worked in that the crashes went away, but it also resulted in removal of long-existing features expected by our users Updating 3rd party libraries and frameworks when possible (there were some very old ones) Updating these did not have any effect on the crashes, except that the crashes moved around in the same way as when merging in a branch, and again, where the crash actually occurred was uncorrelated with the library/framework that was updated Changes to the App’s Build Settings in Xcode Set supported/valid architectures to arm64 exclusively Stripping of all architectures other than arm64 from 3rd party binaries Cleaning up of old/outdated linker flags Removal of other custom build flags that were needed at one point, but are no longer relevant Generally trying to make all the build settings in our (quite old/outdated) app match those of a newly created iOS app Code signing inject base entitlements is set to YES Removal of old/deprecated BitCode flag These changes seemed to help and the codebase was more ‘stable’ (non-crashing) for a while, but as we tried to continue development, the crashes would reappear Getting crash reports off of test devices and analyzing them based on the various documents about crash reports provided by Apple This was helpful and pointed to new things to investigate, but ultimately did not help to identify the root cause of these crashes Throughout all of the above, the crashes would come and go, very reproducibly for a given branch being merged in, but if a subsequent branch is merged in, the crash may go away, or simply move somewhere else - sometimes it would crash in our code that calls other parts of our code, and other times when calling system frameworks (like the UIColor example above). One thing that is consistent though, is that the crash would never happen anywhere near the code that was changed or added by a branch that was merged in. Additional observations when trying to figure out the cause of these crashes: Sometimes the smallest code change would result in a crash happening or not The crash reports generated on-device vary quite a bit in terms of the type and reason for the crash All crashes have an Exception Type of EXC_BAD_ACCESS, but vary between (SIGABRT) (SIGBUS) (SIGKILL) (SIGSEV) The crashing thread is often (but not always) on Thread 0 (main thread), and often the first line in the backtrace would be just ‘???’, sometimes followed by a valid memory address and file, but often times just ‘0x0 ???’ Most crash reports have an exception subtype of KERN_PROTECTION_FAILURE Many also state that the Termination Reason is ‘CODESIGNING 2 Invalid Page’ This in particular was investigated thoroughly, including looking at the Placing Content In A Bundle document but after further changes to ensure that everything is in the right place, the crashes were still observed Another odd thing in most of the crash reports is in the Binary Images section, there is a line that once again is mostly ???s or 000s - specifically ‘0x0 - 0xffffffffffffffff ??? unknown-arch <00000000000000000000000000000000> ???’ The crashes occur on different physical devices, typically the same crash for a given branch, and regardless of iOS version This includes building from different Macs. We did observe some differences between versions of Xcode (crashed similarly when built from an older version of Xcode, but not from a newer one), but we recently had all developers ensure they are running Xcode 16.4 - we also tried Xcode 26, but the crashes were still observed Overall, it seems like there is something very strange going on in terms of how the App binary is constructed such that a small code change somehow affects the binary in such a way that memory is not being accessed correctly, or is not where it is expected to be. This level of what appears to be a build-time issue that manifests in very strange run-time crashes is both confusing and difficult to diagnose. Despite the resources provided by Apple for investigation and diagnosis, we cannot seem to find a root cause for these crashes and eliminate them for good.
5
0
272
1w
Error App Distribution Minimum IOS
I try to distribute my App again, but receive now the error that the Minimum IOS is not supported by Info.plist with Runner. i have latest XCode and the error stays whatever IOS I Set in General and in the building rules. Any one has an idea or had same issue since recent Xcode / project Updates ? thanks so much
1
0
74
1w
iOS Distribution - Users Still Installing the Old Version After Update
I developed an app using Unity and exported it as an iOS project file so that I could package it in Xcode. Now, I’m facing an issue where users who previously installed version 1.0 are still seeing the old version after installing the updated version 2.0. Although the installation process for version 2.0 appears to complete (with the installation animation), the app still opens as version 1.0. I am an individual developer but used enterprise signing for distribution. I’m quite confused and have looked into the issue—some sources mention it might be related to CFBundleVersion, but modifying it didn’t help. I’d really appreciate some help with this. o(╥﹏╥)o
1
0
248
2w
Unable to download the latest EnableBluetoothCentralMatterClientDeveloperMode.mobileconfig certificate."
Hi Team, I’ve tried downloading the EnableBluetoothCentralMatterClientDeveloperMode.mobileconfig certificate from multiple sources, but all the links I found point to expired versions. Could you please help me with the URL to the latest version of this certificate? Here are the links I’ve already tried, but none of them worked: https://project-chip.github.io/connectedhomeip-doc/guides/darwin.html#profile-installation https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/darwin.md Apple Site Looking forward to your support. Thanks, Mantosh Kumar
2
0
135
2w
Spotlight Importer Extension Not Triggered for Custom UTI on macOS
Hi all, I'm trying to add Spotlight support to a macOS app that handles custom virtual machine bundles with the .vpvm extension. I’ve followed the current documentation and used the modern CSImportExtension approach with a Spotlight Importer extension target. Here’s what I’ve done: App Info.plist: Declared com.makeprog.vpvm as a UTI conforming to com.apple.package. Registered it under UTExportedTypeDeclarations and CFBundleDocumentTypes. Spotlight Importer Extension: Added a new macOS target using the Spotlight Import Extension template. Set the NSExtensionPointIdentifier to com.apple.spotlight.import. Used CSSupportedContentTypes = com.makeprog.vpvm. Implemented a minimal update(_ attributes:forFileAt:) method that sets displayName, title, and contentDescription. Other steps: Verified that the .appex is embedded under Contents/PlugIns/. Confirmed it appears in mdimport -e output with correct UTI. Used mdimport -m -d2 -t /path/to/file.vpvm, but I still get: Imported '/path/to/file.vpvm' of type 'com.makeprog.vpvm' with no plugIn. The extension is never invoked. I’ve also tried: Ensuring the .vpvm file is a valid directory bundle. Restarting Spotlight / rebuilding index. Ensuring the app and extension are properly signed. Tried installing the app in test virtual machine Question: Has anyone successfully used CSImportExtension for custom UTIs? Is there something additional I need to do for the extension to be recognized and triggered? Any advice or examples would be greatly appreciated! Thanks in advance.
3
1
178
2w
Assertion failed: (reconstituted == accumulator), function setFixup64, file OutputFile.cpp, line 2975
Xcode 16.2 Flutter version 3.27.1 0 0x1008abee4 __assert_rtn + 160 1 0x1008add9c ld::tool::OutputFile::setFixup64(unsigned char*, unsigned long long, ld::Atom const*) (.cold.3) + 0 2 0x100789640 ld::tool::OutputFile::setFixup64(unsigned char*, unsigned long long, ld::Atom const*) + 656 3 0x100785b78 ld::tool::OutputFile::applyFixUps(ld::Internal&amp;, unsigned long long, ld::Atom const*, unsigned char*) + 4388 4 0x10078be18 ___ZN2ld4tool10OutputFile10writeAtomsERNS_8InternalEPh_block_invoke + 488 5 0x19bc19428 _dispatch_client_callout2 + 20 6 0x19bc2d850 _dispatch_apply_invoke3 + 336 7 0x19bc193e8 _dispatch_client_callout + 20 8 0x19bc1ac68 _dispatch_once_callout + 32 9 0x19bc2c8a4 _dispatch_apply_invoke + 252 10 0x19bc193e8 _dispatch_client_callout + 20 11 0x19bc2b080 _dispatch_root_queue_drain + 864 12 0x19bc2b6b8 _dispatch_worker_thread2 + 156 13 0x19bdc5fd0 _pthread_wqthread + 228 A linker snapshot was created at: /tmp/Test Kopi Kenangan.debug.dylib-2025-02-27-100512.ld-snapshot ld: Assertion failed: (reconstituted == accumulator), function setFixup64, file OutputFile.cpp, line 2975. clang: error: linker command failed with exit code 1 (use -v to see invocation)
5
1
530
2w