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

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

NSUserDefaults + iPhone Transfer Issues
Hi! I was wondering if anyone else encountered similar issues and what the solution ended up being. We're encountering weird sign-in issues on our iOS version of our app. It seems like an uninstall and reinstall solves it, but the issue seems to only impact users who underwent the transfer process from one iOS device to another. What I am curious about: What is copied over from one device to another in this process? Is there a way outside of owning multiple test devices to replicate this flow? Our current suspicion is that NSUserDefaults is not being cleared by our app on first start, and that stale data is copied over during this transfer process, breaking the sign-in until a re-install wipes everything properly. Does it seem like we're on the right track with this assumption, or completely out to lunch?
2
0
75
Apr ’25
Interpreting crash log assertionFailure
Hello, I am experiencing crash on TopShelf and I checked all the crashlogs, but I don't know how to interpret it. I see only addresses in the trace logs, so it's really hard to understand what's going on. Is there a way how to symbolicate frames 5 - 17? Does anybody have an idea, what can be wrong? Thanks in advance. 0 libswiftCore.dylib 0x000000019bd33a88 _assertionFailure(_:_:file:line:flags:) + 264 (AssertCommon.swift:147) 1 TopShelf 0x00000001048b998c 0x1045ac000 + 3201420 2 TopShelf 0x0000000104cc04a8 0x1045ac000 + 7423144 3 libdispatch.dylib 0x000000019ab89294 _dispatch_client_callout + 20 (object.m:576) 4 libdispatch.dylib 0x000000019ab8aae0 _dispatch_once_callout + 32 (once.c:52) 5 TopShelf 0x00000001048f4098 0x1045ac000 + 3440792 6 TopShelf 0x00000001048f4930 0x1045ac000 + 3442992 7 TopShelf 0x00000001048cc8bc 0x1045ac000 + 3279036 8 TopShelf 0x00000001045b5a61 0x1045ac000 + 39521 9 TopShelf 0x0000000104ca8841 0x1045ac000 + 7325761 10 TopShelf 0x00000001049e5cc5 0x1045ac000 + 4431045 11 TopShelf 0x0000000104cc0dfd 0x1045ac000 + 7425533 12 TopShelf 0x00000001045b4b95 0x1045ac000 + 35733 13 TopShelf 0x00000001045b4e81 0x1045ac000 + 36481 14 TopShelf 0x00000001045b50e5 0x1045ac000 + 37093 15 TopShelf 0x00000001045b5a61 0x1045ac000 + 39521 16 TopShelf 0x00000001045b54b5 0x1045ac000 + 38069 17 TopShelf 0x00000001045b50e5 0x1045ac000 + 37093 18 libswift_Concurrency.dylib 0x000000019c30aedd completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:497)
5
0
111
Apr ’25
Discrepancies in MetricKit and Xcode Organizer Data
We recently integrated MetricKit into our app; however, the 90th percentile data does not seem to match the data in Xcode Organizer. The values reported by MetricKit appear to be higher. Additionally, it looks like data for previous app versions is not being updated in Organizer as adoption of the latest version increases. Has anyone else experienced this issue? Could there be a delay in data updates for older versions in Organizer? Are there any known limitations or best practices for ensuring consistency between MetricKit and Xcode Organizer data? Any guidance would be greatly appreciated.
1
2
118
Apr ’25
Workbench Ad Tester not returning preview URLs
Apologies if this isn't tagged right but dev tools and services seemed the most appropriate since this is related to the workbench Ad Tester tool. I'm seeing a behavior where the preview link is not being generated. Specifically, I am seeing a POST request to the following URL consistently fail: https://iadworkbench.apple.com/adtester/api/v1/ads/previewLink?orgId=1127861 Variations/scenarios I have tried so far: All possible ad format choices on all possible devices All options for the placement type Both third party and uploaded creative sources Uploaded creative sources appear to be failing to upload as well A simple div with a "hello world" content fails as a third party creative source Multiple apple accounts I created a new account specifically to test if my primary apple ID was experiencing issues with this Multiple browsers I have tried multiple versions of Chrome/Firefox/Safari I tested with and without browser extensions to determine whether an extension was interfering or not Clearing session/local storage along with cookies I also created new profiles in browsers to verify that I was getting a fresh browser environment In all of these cases, the API request to generate a preview link is consistently failing with a 500 error code. It's worth noting that the web preview option works, but this isn't a truly accurate test environment and can't be solely relied on when testing ad content. I don't know exactly when this started happening as I have not used it in the last couple of weeks but I have used the workbench ad tester extensively in the past the same way I have been trying with my current test without issue. That coupled with the fact that the request for the preview link consistently fails in all of the test scenarios I've outlined above leads me to believe there is a problem with the API that is responsible for generating the preview links.
0
0
90
Apr ’25
PDF opening from iOS Unity app in landscape mode instead of portrait
In our Unity App for iOS build, when we opened the PDF from the app, it is automatically opening in landspace mode instead of portrait. In the android and windows apps, we are able to open in the portrait mode. We tried to make the changes in the project settings but it did not change. Any way in which we can acheive this would be helpful for us.
0
0
48
Apr ’25
Command line compilation problem, standard includes not found
This example fails to compile on Sequoia 15.4 with Xcode 16.3 and the command line tools installed; jacquesmenu@macstudio:C++Tests > cat pcount_test.cpp // clang++ -std=c++17 -o IntWrapperTest IntWrapperTest.cpp #include // std::string #include // std::cout #include // std::ostringstream int main1 (int argc, char* argv[]) { std::string theString = "Prière d'éviter"; std::cout << theString << ", size(): " << theString.size () << std::endl; std::stringstream oss; oss << theString << std::endl; std::cout << oss.str () << ", pcount(): " << oss.pcount () << std::endl; } //_______________________________________________________________________________ // position in output stream #include // std::ofstream int main () { std::ofstream outfile; outfile.open ("test.txt"); outfile.write ("This is an apple",16); long pos = outfile.tellp(); outfile.seekp (pos-7); outfile.write (" sam",4); outfile.close(); return 0; } jacquesmenu@macstudio:C++Tests > clang++ pcount_test.cpp pcount_test.cpp:3:10: fatal error: 'string' file not found 3 | #include // std::string | ^~~~~~~~ 1 error generated. The same occurs with iostrem if it is the first include mentioned. Compiling in Xcode itself does not this problem, though. This include is to be found here: jacquesmenu@macstudio:C++Tests > xcode-select -p /Applications/Xcode.app/Contents/Developer jacquesmenu@macstudio:C++Tests > ls -sal /Applications/Xcode.app/Contents/Developer/**/string | grep MacOSX 72 -rw-r--r-- 10 root wheel 203802 Mar 8 06:17 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string
3
0
112
Apr ’25
Unexpected performance penalty attributed to first Swift Testing test
I have a Swift package with a test suite that contains some tests implemented with Swift Testing. Locally, they run quickly, but when I run them on Semaphore CI (https://semaphore.io), the first Swift Testing test to execute incurs a performance penalty. I'm running the tests with xcodebuild on iOS Simulator: xcodebuild test \ -scheme "Scheme" \ -workspace Workspace.xcworkspace \ -destination "platform=iOS Simulator,name=iPhone 16,OS=18.2" The scheme is configured to use a test plan that has parallelization disabled. Here's an excerpt from the output showing what I'm seeing: Test Suite 'All tests' started at 2025-04-03 07:47:37.328. ◇ Test run started. ↳ Testing Library Version: 102 (arm64-apple-ios13.0-simulator) ◇ Iteration 1 started. ◇ Suite <redacted> started. ◇ Test foo() started. ✔ Test foo() passed after 23.063 seconds. When foo() is not the first test it runs in under 100 ms. The reason that I have parallelization disabled is that I was initially seeing all of the tests in this suite incur a performance hit. But now it's clear that there must be some startup cost. Things I'm wondering: What is this startup penalty? Why don't I encounter it locally? Why is it attributed to the first test? (this seems like a bug) My wild guesses around 1 so far have been… maybe some simulator clone is booting. I've tried to rule that out by disabling parallelization, but maybe there's still something there. maybe swift testing is getting loaded lazily and there's some kind of dynamic linking cost Thoughts on 2… maybe there's some one-time penalty when using swift testing that I've already incurred locally but that has not yet been incurred in the CI image Guidance welcome! x-posted: FB17102970 (Unexpected performance penalty attributed to first Swift Testing test) https://forums.swift.org/t/first-swifttesting-test-always-slow/79066
1
0
108
Apr ’25
Not seeing any recent crash reports although there should be some
For my app Find Any File, of which both releases and TestFlight betas were released many times, the TestFlight page tells me that several users have submitted crash reports. And I'm sure the same is true for the MAS releases: (Yes, this shows quite recent ones, but I've seen similar supposed crash report submits in this list before.) However, the actual "Crashes" listing on the appstoreconnect sites hasn't show any new crash reports for many months now: (This is the entirety of crash reports I can get listed, even when removing all filters.) Something appears to be stuck, on Apple's end. The same issue is with Xcode's Organanizer window, for "Crashes": It also used to list only the same very old reports and nothing since May 2024. And just now, when I retried this in Xcode, I'm shown a weird error message I never saw before: Error Downloading Crashes List An error occurred… Access Restricted with adam id: 1207815783 And yes, I'm logged in just fine, under Prefs / Accounts. How am I going to get this investigated? I had already sent an email about this to the Review team, who didn't react to it at all. DTS is only for Code level support, which this isn't. Any help?
5
0
685
Apr ’25
When I build binutils, I get a compile error.
When building binutils (2.4.4) on Mac OS Sequoia (15.4), a compilation error occurs. In file included from ../../zlib/gzguts.h:21: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:61: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '(' 318:7: error: expected identifier or '(' 318 | FILE | FILE fdofdopen(int, cpen(int, const char onst char ) __DARWI) __DARWIN_ALIN_ALIAS_STARTIAS_STARTING(__MAC_NG(__MAC_10_6, __I10_6, __IPHONE_2_0PHONE_2_0, __DARWI, __DARWIN_ALN_ALIAS(fIAS(fdopen)); dopen)); | ^ | ^ ../../zlib/zutil.h:147:33: note: expanded from macro 'fdopen' 147 | # ../../zlib/zutil.h:147:33: note: expanded from macro 'fdopen' 147 | # define define fdopefdopen(fd,moden(fd,mode) NULL /) NULL / No f No fdopen() *dopen() */ | ^ / | error.txt In 1311 Line.
1
0
434
Apr ’25
Unable to open mach-O at path
Hi, there's this point at which a beginner needs to beg for help. Unable to open mach-O at path: /Library/Caches/com.apple.xbs/Binaries/RenderBox/install/Root/System/Library/PrivateFrameworks/RenderBox.framework/default.metallib Error:2 I get this everytime I select a month and year on a custom date picker, I believe because I try to force the ".generateChartData()" for the chart to update. I guess the problem might be that the ".onAppear" and ".onChange" are conflicting with each other? } .onChange(of: showDatePicker) { viewModel.startDate = selectedDate viewModel.generateChartData() } } .onAppear { viewModel.generateChartData() }
1
0
138
Apr ’25
Issue with Latest Commands Lines Tools 16.3 Update
After the Update of Latest Command Line Tools 16.3 I am facing issue to compile C++ programs. Like it is giving some kind of library error in the MACOSX15.sdk file and this is the error. In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/machine/_structs.h:35, from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/arm/_mcontext.h:36, from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/_mcontext.h:34, from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/signal.h:146, from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:109, from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdlib.h:70, from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdlib.h:58, from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/cstdlib:79, from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/stdlib.h:36, from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/assert.h:44, from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/cassert:44, from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/aarch64-apple-darwin24/bits/stdc++.h:33, from 1.cpp:1: /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:627:35: error: expected primary-expression before 'unsigned' 627 | } __attribute__((aligned(_Alignof(unsigned int)))); | ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:627:26: error: '_Alignof' was not declared in this scope 627 | } __attribute__((aligned(_Alignof(unsigned int)))); | ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:633:35: error: expected primary-expression before 'unsigned' 633 | } __attribute__((aligned(_Alignof(unsigned int)))); | ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:633:26: error: '_Alignof' was not declared in this scope 633 | } __attribute__((aligned(_Alignof(unsigned int)))); | ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:639:35: error: expected primary-expression before 'unsigned' 639 | } __attribute__((aligned(_Alignof(unsigned int)))); | ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:639:26: error: '_Alignof' was not declared in this scope 639 | } __attribute__((aligned(_Alignof(unsigned int)))); | ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:645:35: error: expected primary-expression before 'unsigned' 645 | } __attribute__((aligned(_Alignof(unsigned int)))); | ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:645:26: error: '_Alignof' was not declared in this scope 645 | } __attribute__((aligned(_Alignof(unsigned int)))); But after downgrading the version to 16.2 it works fine. I can't understand that it's their any issue with Command Line Tools 16.3??
6
1
383
Apr ’25
App crashing on startup
I am a developer working on an iOS enterprise application. When I deployed the release version to my device, it crashes upon startup. It works fine in debug mode on my device. The app is an upgraded version of Xamarin Form to .NET MAUI. I have attached a crash report. I would appreciate any help/insights on how to resolve. --John
2
0
111
Apr ’25
Could you please add a feedback/question feature for the Apple Developer Documentation?
Routinely I'll have additional questions when browsing the Apple Developer Documentation. Would be really convenient if we could just submit that feedback from the documentation webpage itself, Apple could have the data, and potentially down the line address it; but at least you'd have the data. For example, I'm looking at the documentation for AttributedString: https://developer.apple.com/documentation/foundation/attributedstringprotocol/index(_:offsetbycharacters:) Now, I would like to know what would happen if the distance brought the position past the end, what would be returned. Because it's non-optional which I imagine would imply nil would be returned if the parameters were invalid. But it doesn't say. I run into these small missing behavioral details with some regularity and imagine others do as well. It would be really great if we could just submit that discrepancy and perhaps see some numbers on the page of the total number of discrepancies submitted or something so we can see that it's not just us and have some peace of mind that based on the amount of feedback submitted there's a higher chance that this discrepancy will be addressed in the future.
2
0
85
Apr ’25
Security warning while installing .pkg file in mac OS desktop
We have a macOS application packaged as a .pkg file. To notarize it, we first code-sign individual library folders and the .app bundle using the following command: codesign --force --deep --sign "Developer ID Application: &amp;lt;Our Account Name&amp;gt;, LLC (Team ID)" "Our_product.app" Code Sign result for .app file: Our_prodcut.app: valid on disk Our_product.app: satisfies its Designated Requirement We are using packages tool to create .pkg file with code signed .app file. Steps followed once .pkg file is ready: 1. Product Sign: productsign -sign "Developer ID Installer: &amp;lt;Our Account Name&amp;gt;" output.pkg signed-output.pkg 2. Submit for notorization: `xcrun notarytool submit signed-outout.pkg --keychain-profile "notarytool-password" --wait Received following output: Current status: Accepted................................. Processing complete id: 2d5c450f-5b22-4b4d-9579-ef21c0356548 status: Accepted Transferred Notarization log: xcrun notarytool log 10169892-b28c-407c-b348-edab0b34ef34 --keychain-profile "notarytool-password" Desktop/developer_log_6.json We have observed log with "Accepted" status with issues as "null". 3. Stapler: stapler staple signed-output.pkg stapler validate signed-output.pkg Processing: signed-output.pkg The validate action worked! 4. Checking status of .pkg file: Command: spctl --assess --verbose=4 signed-output.pkg Output: signed-output.pkg: rejected source=no usable signaturess Warning During Installation: While installing the .pkg file, a security warning appears as follows. Please help us to resolve this.
13
0
225
Apr ’25
I made a browser plugin to do something Apple should've done themselves.
This browser extension is a doc reading enhancer for the Apple Developer website. It supports i18n translation, hover link previews, and bilingual display. Currently, it supports four languages: ja-JP, ko-KR, zh-CN, and zh-TW. It works with Swift/SwiftUI/Foundation modules now, and it's expected to support Swift Test, Swift Charts, UIKit, Swift Playground, and XCode modules by the end of this month. For more info, check out: https://appledocs.dev. You can also visit https://appledocs.dev/progress to see translation progress and vote. Note: It's only works on Chrome、Edge(In review)、Firefox(In review) Screenshot:
1
0
120
Apr ’25
What's the idea behind the changes in the Objective-C flavor of the Foundation documentation?
I just noticed that when you check the online documentation for Foundation using the delicious Objective-C flavor, some values are no more the expected ones: https://developer.apple.com/documentation/foundation/filemanager/copyitem(at:to:)?language=objc#return-value true if the item was copied successfully or the file manager’s delegate stopped the operation deliberately. Returns false if an error occurred. Considering that a BOOL used to be YES or NO for the last quarter of a century, I have the following question: [Q] What is the idea behind the disturbing changes of the Objective-C documentation?
5
0
156
Apr ’25
Unable to Enable “Media Services (MusicKit, ShazamKit)” When Creating a Key
I am trying to integrate Apple Music API using MusicKit and need to generate a Developer Token. However, when I try to create a new key from the Certificates, Identifiers &amp; Profiles section, the “Media Services (MusicKit, ShazamKit, Apple Music Feed)” option is grayed out. We are getting the error 'there are no identifiers available that can be associated with the key.' Although we did checkmark 'musickit' in app services. I have already: Enrolled in the paid Apple Developer Program Created a valid App ID under Identifiers Logged in as the Account Holder Tried multiple browsers and devices Despite this, the option remains disabled. Could you please enable this or let me know what further steps I need to take? Thank you!
0
0
155
Apr ’25