Post

Replies

Boosts

Views

Activity

Lots of Killed: 9 compilation errors with an M1/Monterey
A couple of days ago I changed laptops from an Intel/Big Sur to a MacBook Pro M1/Monterey. Since then I've encountered endless endless problems building in Xcode (for iOS). The very first attempt at building my project after setting up the laptop was successful, but since then builds just fail randomly without making any code changes. i.e. make a build and its successful, change nothing whatsoever and it fails. Once a build fails it takes an eternity to get it building successfully again, doing a clean, delete derived data, quit/re-launch Xcode doesn't necessarily fix the problem, it might be necessary to do this 3 or 4 times before the build succeeds again. But that build success will only be temporary before it fails again. The failures are different each time, but one thing they seem to have in common is a Killed: 9 message, here's an example Script-00DD1BFF1BD5951E006B06BC.sh: line 5: 22679 Killed: 9         ../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh Command PhaseScriptExecution failed with a nonzero exit code I've had about 6 or 7 different random failures in different places, but they all say Killed: 9 Command PhaseScriptExecution failed with a nonzero exit code. The project used to build fine on the old laptop, its the exact same project/code, the only variable here is the laptop itself and the MacOS. I've been struggling with this for the last 3 days, the problems are just endless. The build failures are random, like I mentioned a build will work fine one time, then just stop for no reason. They could occur at any random moment in any random component of the project or its dependencies. Its utterly impossible to proceed like this, I'm the first in my company out of about 100 employees who are going to upgrade their laptops from Intel to Silicon. I will be telling our IT department we absolutely cannot make that switch as things are just unusable and its impossible to proceed with this combination of laptop|OS|Xcode. I'm on Monterey 12.2.1 | Xcode 13.2.1, but the problem was also present with Monterey 12.0.1|Xcode 13.2.1 Opening Xcode with Rosetta makes no difference to the problems.
7
1
9.7k
Apr ’23
Warnings "The app references non-public selectors" using Xcode 14 to upload to App Store Connect
Using the newly released Xcode 14 to upload an app to App Store Connect results in several warnings saying "The app references non-public selectors in ....." This does not occur when uploading if the archive is built using Xcode 13 Is this a re-emergence of an Apple bug: https://developer.apple.com/forums/thread/127678?answerId=715975022#715975022 Which has the response: "The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble." Apple Developer Tools Engineer
7
2
3.6k
Feb ’23
With Xcode 15 how do you turn off Connect via network for devices?
I have a lot of phones and constantly switch between them, its very very annoying that when a phone is connected via cable, and then swapped out with another one, then Xcode will continue to install/run with the phone that's just been switched out, not the one that's just been connected by cable. This is because Connect via network it turned on and there's no way to turn it off. In previous versions of Xcode you could turn this on/off as you wished, not so with Xcode 15, it decides to turn it on for you and won't let you turn it off because its always disabled.
5
16
3.1k
Sep ’23
Why is Xcode taking forever to install/launch app?
Ever since Xcode 15 and iOS 17 came out development has quite often been a nightmare of waiting and waiting -Xcode displaying endless circles saying preparing the device, connecting to the device, installing the device. But recently to add to this, installation and launching is just taking really forever. I'm currently running Xcode 15.1 and various versions of iOS 17 (I have several phones) and installing the app from Xcode takes about 7 - 10 minutes (compared to the same app installing in seconds with Xcode 14 for example). Then once its finally installed, it then takes further minutes to launch, Xcode often actually displays a dialog saying its taking longer than expected to launch the app, adding the footnote "LLDB is likely reading from device memory to resolve symbols." What could be reasons, and solutions, for the excruciatingly slow installation time, and launch time? I really need to find a solution to this please - making a code change tweak, running, making another, running, making another, running, just isn't possible given the length of time it takes to install and launch each time. The iPhone is connected via physical cable to the Mac, and the Mac and iPhone are both on the same Wifi network. Xcode 15.1 M1 Macbook Pro Sonomo 14.0 iOS 17.2
11
11
7.1k
Jul ’24
Unwanted communication extension is unable to persist data written to defaults
I'm currently using 4 extensions within my app and use a group in combination with UserDefaults.init(suiteName:) to share settings between the extensions and the app. However I've just tried adding an unwanted communications extension and found that data writing to defaults, in the exact same way as the other extensions, isn't saved. At first I noticed data written by the UCE wasn't present when the app tried to read it, so performed an experiment and found that while the extension is running, it can write and read data to user defaults, but the next time the extension runs, all that data has gone. I've tried using the old and now default UserDefaults.synchronize() but it makes no difference. Why is the UC extension different from every other extension? Is it possible to write and persist data from within it? let groupName = "group.com.mycompany.appName" let sharedDefaults = UserDefaults.init(suiteName: groupName) var theValue = sharedDefaults!.value(forKey: "some key") NSLog("\(theValue)") // prints nothing, despite the extension having previously run sharedDefaults!.set("some value", forKey: "some key")) sharedDefaults!.synchronize() theValue = sharedDefaults!.value(forKey: "some key") NSLog("\(theValue)") // prints "some value"
2
1
1.5k
Aug ’22
Why does Xcode 15 Beta not have a 17.0 folder in DeviceSupport?
The Xcode 15 beta does not have a 17.* folder within Developer/Platforms/iPhoneOS.platform/DeviceSupport. How therefore does it build/install/run on a a phone with iOS 17 installed? Is there a different mechanism for device support used from 17 onwards than has historically been the case? I want to build/run using Xcode 14.n with an iOS 17 phone, but without being able to locate the iOS 17 support file am unable to do so. Where is the iOS 17 device support files with Xcode 15? How can I build using Xcode 14 for iOS 17 if its not present in Xcode15 (in order to drag and drop it into Xcode 14)
0
2
913
Jun ’23
How do you file a feature request?
If you go to https://feedbackassistant.apple.com and create a new feedback (for iOS and iPad) item, then these are the types of feedback choices: Incorrect/Unexpected Behavior Application Crash Application Slow/Unresponsive Battery Life Suggestion A suggestion sounds more like something an iPhone user want so suggest as a feature, not how a developer might request an API feature. Is that really what, as a developer, you are supposed to use to make a development feature request?
4
0
3.7k
Jul ’23
Push to talk: how is the push token supposed to be used if its lifetime is ephemeral?
I don't understand how the push tokens are supposed to be used with push to talk given that their lifetime is ephemeral and they become invalid as soon as a channel is left. Suppose there is phone A and phone B, both with a PTT app installed on it. Then on phone A if the user launches the app and, for example, pushes a button to initiate a talk session with user B, then the app on phone A will join a channel and this will result in receivedEphemeralPushToken() getting called. Then if phone A sends that push token to the server, well then what next though? How is the user on phone B going to be informed that the user on phone A wants to talk to them. The server can't send a push to phone B using that token because that's the token for phone A. If the server has a token from phone B stored from previously, then the push isn't going to work because the documentation says the push token's lifetime is empemeral and will end as soon as the channel is left. So that channel for B's push token would have been left hours, or days or even months in the past. Summary: if user A wants to talk to user B, how does user B's app get notified user A want's to talk to them if the push tokens' lifetimes are all ephemeral?
1
1
1.3k
Aug ’22
VPN causes developer cert in keychain to become untrusted
After not happening to me for a few months, this issue has started hitting me again with currently %100 reproducability. If turn on VPN on my Mac then instantly the developer certificates within the keychain become untrusted. But that's not all, if VPN is then turned off the certificates do not revert to their trusted status but remain untrusted. The consequence of this is that if VPN is turned on and then a build is perform, it fails, and the only way to fix things is to delete the cert(s) from they keychain and re-install them. As a remote worker, having this happen several or even dozens of times a day is incredibly annoying and frustrating. This issue has been occurring for literally years, sometimes it occurs very often, others while its quiet for a while, and has spanned multiple versions of Xcode and Mac OS. So whatever the cause is its endemic. It doesn't just affect myself, but all the members in my development team. I'm currently using Xcode 14.1 RC 2 and Monterey but I've seen this issue occur with many versions of Xcode and Mac. (I'm using Cisco AnyConnect Secure Mobility Client). If the VPN is somehow interfering/affecting the connectivity aspect when an attempt is made by Xcode to validate the certificate, then why does it not rectify itself after turning off VPN? This is so so so so annoying. Can somebody please comment on why this happens and if there's a way to prevent it.
5
1
3.3k
Dec ’24
What happened to the WWDC16 session 230: Enhancing VoIP Apps with CallKit video? Its gone
This video is referenced in several places, for example here references it https://developer.apple.com/documentation/callkit/making_and_receiving_voip_calls_with_callkit and Eskimo has referenced it in his posts. But its gone, there are other WWDC16 session videos but not this one (https://developer.apple.com/videos/wwdc2016) Is it available anywhere else? Also how can this code be run/tested for an incoming call (without using the build in simulator i.e. using a real incoming Voip call)? What tool/app etc. could be used to generate a call to the handset to see the code in action when answering a VoIP call?
2
1
1.4k
Mar ’23
Is it possible to catch a memory exception in an extension?
I've got a notification service extension with quite a lot going on, and consequently I've been running out of memory. One thing in particular that is using a lot of memory is UIGraphicsImageRenderer which I'm using to construct an image at run time the size of the device's bounds. Running the extension in Xcode and profiling its memory it appears that using autoreleasepool {} doesn't seem to always release memory instantly, so if you do A and then B, and combined they have too much memory usage for the extension to handle, trying to autorelease A doesn't actually always release the memory before B (unlike if the code is running in the main app rather than an extension). A few questions is there any way of programmatically detecting the memory usage / memory limit within the extension? if the extension goes over the 24Mg limit, is there any way of catching that exception and handling it somehow? is there a way of ensuring/forcing autoreleasepool{} to clear memory before proceeding with further code?
1
1
759
Dec ’22
"Final reminder: Answer the updated age ratings questions." But there are no questions
I received the email from Apple entitled "Final reminder: Answer the updated age ratings questions." However if I login to App Connect, or click on the link in the email to go directly to App Connect, there are no questions. There are 6 tabs/sections in App Connect, flicking through them, there are no questions about age ratings. Even if I could find these questions, if there are no apps actually released to the App Store (and no plans to release any) is answering these questions necessary? The Apple email sounds quite threatening in its tone, hinting at consequences if you don't comply, but I can't comply because no questions in App Connect are being presented.
6
3
284
2h
Where is the download dSYM option in Testflight? Its not in Metadata
If I upload a build to Testflight using Xcode 14 that offers the option to upload the app symbols. Xcode 15 doesn't offer this option, so presumably it does so automatically. However I've got several builds in TF, built with both Xcode 14 and 15 but the option to download dSYMs isn't available in the Metadata section. There defiantly are dSYMs though - they are present in the archive. How can I download them for apps in Testflight and in the AppStore if the option isn't appearing in the Metadata section?
5
4
2.1k
Nov ’23