Structs are value types, and the SwiftUI gets reinitialized many times throughout its lifecycle. Whenever it gets reinitialized, would the reference that the delegator has of it still work if the View uses @State or @StateObject that hold a persistent reference to the views data?
protocol MyDelegate: AnyObject {
func didDoSomething()
}
class Delegator {
weak var delegate: MyDelegate?
func trigger() {
delegate?.didDoSomething()
}
}
struct ContentView: View, MyDelegate {
private let delegator = Delegator()
@State counter = 1
var body: some View {
VStack {
Text("\(counter)")
Button("Trigger") {
delegator.trigger()
}
}
}
func didDoSomething() {
counter += 1 //would this call update the counter in the view even if the view's instance is copied over to the delegator?
}
}
Overview
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello All,
I am new to apple ecosystem. We have a xcode project whose code is scattered across different repos. We are trying setup CI/CD for this Xcode project to get build so that we could know build issue.
Clone/Update all repos – which I can do via some script
Generate xcode projects from sources synced in step 1. This is where we want your help. How should we approach this? What apple suggest for this ? In this step we don't want to use any third part tool (like CMake) to generate Xcode projects.
Build targets to know build errors – This we can easily do via xcodebuild command line tool.
Please share you input/thought on this. Your input is highly appreciated.
Need iPad Tester to Test App and Take Screenshots-
I am in need of someone to willingly sign up to test my app and send me screenshots of their use from their iPad device. Sample screenshots will be provided for them to replicate.
Thank you.
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
I'm creating an event ticket Apple Wallet Pass and setting a light-coloured background image. When I do this, it automatically sets the foregroundColor to white, even when I explicitly set it to black.
What's strange is that on my Mac, the foregroundColor appears as intended, and I can set it to any color I want, but when I AirDrop the pass to my iPhone, it sets the color to white, regardless of what I set the foregroundColor to.
This means the text becomes completely illegible for my users, with white text on a white background image. If I remove the background image, the foregroundColor works fine.
Is there a way to have a light-colored background image with dark text, or am I forced to have a dark-colored background image?
Here are the colors in my pass.json:
backgroundColor: "rgb(255, 255, 255)"
foregroundColor: "rgb(0, 0, 0)"
labelColor: "rgb(0, 0, 0)"
I've attached what the pass looks like on my Mac and my iPhone.
Hi,
I am trying to update my apps and i couldn't do it, can anyone please help? this is what happened to me.
Once my membership renewed, i couldn't compile my apps due to signing error. here is the error message:
Xcode archive done. 31.7s
Failed to build iOS app
Error (Xcode): Communication with Apple failed: Your team has no devices from
which to generate a provisioning profile. Connect a device to use or manually
add device IDs in Certificates, Identifiers & Profiles.
https://developer.apple.com/account/
/Users/tony/vn246/ios/Runner.xcodeproj
when I go to the portal developer.apple.com/account to create the Provisioning Profile manually then it said there is no device, and when i go into the Devices section then the machine uuid is added and it's there and registered, i had always been compiling with it before the old membership was expired. I tried to remove those and re-added and the error still persisted.
P.S.: I renewed all my certificates (removed old and recreated new)
thank you
I paid for the program a few days ago , how long till I’m approved?
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Share Age Range Permission is set to 'Ask First'.
Application requested for AgeRange via requestAgeRange API.
System presented a consent window where user has to make a choice.
User did not acted.
Application was pushed to background.
Our Application supports PushToTalk Framework and we have successfully joined the channel already.
User tapped on the blue-pill , SystemUI will get presented.
User tapped on the SystemUI, A New Full Screen SystemUI will get presented.
User chosen 'Leave' option and our application left the active channel.
10 User brought the application to foreground and the previous "Share Age Range" system window disappeared.
11. After Step 10, We need to terminate and launch our application in order to get the "Share Age Range" system window.
Is "Share Age Range" system window getting disappear is expected here or a BUG
I am working on a Live Activity widget.
In it, I want some of the elements to open different deeplink URLs.
I have found that assigning multiple widgetURL doesn't work, only one of the URLs gets opened no matter where you tap. I also found that Buttons don't seem to do anything, tapping them actually just open my app as if I just tapped a naked Live Activity.
I have found that really only Link elements work if I want to open different URLs upon tapping different elements.
And Links are cool and fine, but I am seeing that on tap, my elements become tinted... As in, there is a highlighted state, and it makes the elements inside blue.
I have tried to use button style API on a link, but it didn't work.
How can I disable the highlighted state for a Link element in a live activity widget?
Some users cannot repurchase a subscription SKU after it has expired.
Flow:
User previously subscribed.
User canceled and the subscription fully expired.
After weeks, user reinstalls the app and taps the same SKU.
StoreKit does not create a new purchase transaction.
Instead, StoreKit always returns the old expired transaction in updatedTransactions.
Therefore, the user is permanently unable to purchase the SKU again.
We have already tried:
Adding payment observer at app launch
Calling finishTransaction for all transactions
Clearing queue at startup
SKReceiptRefreshRequest
Server-side verifyReceipt
Ensuring subscription is truly expired (not in grace/retry)
Not calling restoreCompletedTransactions
None of these resolved the issue. StoreKit still only sends the old transaction and never generates a new one.
Expected behavior:
A new purchase transaction should be created when user taps the expired subscription SKU.
Actual behavior:
StoreKit repeatedly pushes the old expired transaction, blocking new purchases.
We can provide:
Some users cannot repurchase a subscription SKU after it has expired.
Flow:
User previously subscribed.
User canceled and the subscription fully expired.
After weeks, user reinstalls the app and taps the same SKU.
StoreKit does not create a new purchase transaction.
Instead, StoreKit always returns the old expired transaction in updatedTransactions.
Therefore, the user is permanently unable to purchase the SKU again.
We have already tried:
Adding payment observer at app launch
Calling finishTransaction for all transactions
Clearing queue at startup
SKReceiptRefreshRequest
Server-side verifyReceipt
Ensuring subscription is truly expired (not in grace/retry)
Not calling restoreCompletedTransactions
None of these resolved the issue. StoreKit still only sends the old transaction and never generates a new one.
Expected behavior:
A new purchase transaction should be created when user taps the expired subscription SKU.
Actual behavior:
StoreKit repeatedly pushes the old expired transaction, blocking new purchases.
We can provide:
Affected user’s base64 receipt
verifyReceipt full response
Transaction logs (transactionIdentifier, original_transaction_id, productIdentifier, state)
Please help investigate why StoreKit is not allowing a new subscription purchase.
Affected user’s base64 receipt
verifyReceipt full response
Transaction logs (transactionIdentifier, original_transaction_id, productIdentifier, state)
Please help investigate why StoreKit is not allowing a new subscription purchase.
Topic:
App & System Services
SubTopic:
StoreKit
Validation failed
Missing app icon. Include a large app icon as a 1024 by 1024 pixel PNG for the 'Any Appearance' image well in the asset catalog of apps built for iOS or iPadOS. Without this icon, apps can't be submitted for review. For details, visit: https://developer.apple.com/documentation/xcode/configuring-your-app-icon. (ID: 525f6327-6859-4ae7-977b-7951423127a6)
getting this error while archive and validation then validation failed and got this error
But in my xcode each icon is present and when i build the app then in simulator or a real phone the icon is present but while archive and validation then validation failed also i have tried a lot solution but unable to resolve this.
Is there any interest in this forum for those developing for the spatial web and safari. I can't seem to find any posts that are relevant here.
Hi,
We are operating a service that uses Sign in with Apple for user registration and login.
As part of our security incident response and periodic security improvements, we are planning to rotate the private key used to generate the client secret (JWT) for Sign in with Apple.
I have read the Human Interface Guidelines and the AuthenticationServices documentation, but I could not find a clear description of the behavior and user impact when rotating this private key. I would like to ask the following questions:
Background:
We issue a Sign in with Apple private key (with a Key ID) in our Apple Developer account.
Our server uses this private key to generate the client secret (JWT).
This is used for Sign in with Apple login on our web / mobile app.
We are planning to invalidate the existing private key and switch to a newly issued one.
Questions:
Impact on existing logged-in sessions
Will rotating the private key force already logged-in users (who previously signed in with Apple) to be logged out from our service?
Can the user identifier (such as the "sub" claim) for existing Sign in with Apple users change due to key rotation?
Recommended frequency and best practices
Does Apple recommend rotating this private key only when it is compromised, or on a regular basis?
If there are any official documents or examples that describe how to safely perform key rotation in production, we would appreciate a pointer.
Impact on marketing / analytics
We are using user IDs (linked via Sign in with Apple) for analytics and marketing attribution.
Is there any expected impact on such use cases caused by rotating the private key?
For example, is there any possibility that user identifiers change as a result of key rotation, or anything we should be careful about from a data linkage perspective?
Our goal is to rotate the private key in a secure way without causing service downtime, mass logouts, or loss of account linkage.
If there is already an official document that covers this, please let me know the URL.
Thank you in advance.
I'm working on a SwiftUI application that uses a couple different webviews in a tabview to render some mdx and codemirror editor.
The editor webview, the one that's much more complicated works as expected. Some errors appear in the console due to what I imagine is a race condition that I'll get around to fixing, but it works as expected.
The other webview which just renders a single, local html file to display a dead simple summary absolutely refuses to work. It first appears to work as expected (shows the same 'return type unsupported' error in the console though) on the initial request, but then refuses to process any JS functions for that particular webview. Even the functions themselves are being used between the two webviews, and they work as expected in the other. Even worse, when I copy and paste the generated JS code into the safari dev tools it works as expected, even in the broken webview.
I've spent almost 12 hours on this today so far, and have made zero progress. I've tried commenting out just about the entire website to narrow it down on the JS side without success, and I've done everything I can think of on the swift side.
To be transparent, I'm very new to Swift and SwiftUI, having only picked it up a few weeks ago, but I'm an experienced developer and every obvious solution fails to work.
From what I've gathered, this might have something to do with the first function call failing, despite the fact that it appears to work on the first function call, but then the javascript engine refusing to process additional requests. I'm not sure if that's the cause, but it certainly seems to make sense.
Is there a way to debug this more completely? Like I said, I'm very new to Swift and still missing neovim, so I'm still getting comfortable with the apple ecosystem of devtools, but I can't even figure out how to print out the return type since it fails before I'm able to inspect anything on the safari side
I did notice this error in the console as well, and I'm not quite sure what to make of it:
Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "((target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.rendering AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.networking AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.webcontent))" UserInfo={NSLocalizedFailureReason=((target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.rendering AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.networking AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.webcontent))}>
And as I was digging for that one, I just noticed this:
WebContent[32934] 0x102011208 - [webPageID=306] WebPage::runJavaScriptInFrameInScriptWorld: Request to run JavaScript failed with error SecurityError: The operation is insecure.
What would trigger a security warning for running javascript against a local file?
Any help is greatly appreciated... this is driving me crazy.
My device with Device ID (00008130-001E35840483401C) is stuck in Processing state and cannot be activated. Please refresh or delete it.
Hi,
I have an "Apple Watch Only" app that you can download for free and conduct a 7 day trial. After that, there is an IAP to unlock a lifetime license.
For the life of me I can't find out how the process of redeeming promo codes for the IAP should work. Once generated, people try to redeem them in the AppStore (on their phone), but then they end up in a hanging process saying it's reinstalling the app to redeem the offer. But then nothing happens. Also running "Restore Purchase" within the app to pickup any maybe by now activated license is not working.
Why does it even want to reinstall the (free) app? This doesn't sound right. Does anyone have IAP for a watch-only app and can shed some light on the promo code topic?
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
App Store
In-App Purchase
App Store Server Library
Cybersource production support has clarified issue as below
"On the BAD Case, it seems that the Apple Payload did not contain the "onlinePaymentCryptogram" object within the JSON. The Cryptogram is critical and mandatory.
Since the merchant cannot really control this, and since CYBS is just decrypting the payload and uses it, we cannot comment as to why it was missing.
The merchant would need to reach out to Apple and/or decrypt the payment themselves locally to check if and why this data was not present, for troubleshooting purposes."
Hello,
We have completed the Age Rating confirmation form and submitted it successfully.
Additionally, we increased the app version, rebuilt, and uploaded a new build as recommended.
However, we still received the email stating that “Your app requires additional information”.
Could you please confirm whether any further action is required on our side, or if this is a known issue on App Store Connect?
Thank you.
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
App Store
App Review
App Store Connect
App Store Server Notifications
I had, a long time ago (over 10 years) developed an application that is connected to my UPS (for solar panels).
Until yet it worked very well, and I didnot have to compute more than making updates of XCode. That was all.
But yet I have swiched to the latest value of switch, and it continue to compile, but it does'not work. I am asking to yo in order keeping my app working as previously. As it does not work, which library is replacing Cloudkit.framework ?
and which library is replacing InsPersistantContainer.framework ?
Have a good day
Guy Desbief
I'm using python 3.9.6, tensorflow 2.20.0, tensorflow-metal 1.2.0, and when I try to run
import tensorflow as tf
It gives
Traceback (most recent call last):
File "/Users/haoduoyu/Code/demo.py", line 1, in <module>
import tensorflow as tf
File "/Users/haoduoyu/Code/test/lib/python3.9/site-packages/tensorflow/__init__.py", line 438, in <module>
_ll.load_library(_plugin_dir)
File "/Users/haoduoyu/Code/test/lib/python3.9/site-packages/tensorflow/python/framework/load_library.py", line 151, in load_library
py_tf.TF_LoadLibrary(lib)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/Users/haoduoyu/Code/test/lib/python3.9/site-packages/tensorflow-plugins/libmetal_plugin.dylib, 0x0006): Library not loaded: @rpath/_pywrap_tensorflow_internal.so
Referenced from: <8B62586B-B082-3113-93AB-FD766A9960AE> /Users/haoduoyu/Code/test/lib/python3.9/site-packages/tensorflow-plugins/libmetal_plugin.dylib
Reason: tried: '/Users/haoduoyu/Code/test/lib/python3.9/site-packages/tensorflow-plugins/../_solib_darwin_arm64/_U@local_Uconfig_Utf_S_S_C_Upywrap_Utensorflow_Uinternal___Uexternal_Slocal_Uconfig_Utf/_pywrap_tensorflow_internal.so' (no such file), '/Users/haoduoyu/Code/test/lib/python3.9/site-packages/tensorflow-plugins/../_solib_darwin_arm64/_U@local_Uconfig_Utf_S_S_C_Upywrap_Utensorflow_Uinternal___Uexternal_Slocal_Uconfig_Utf/_pywrap_tensorflow_internal.so' (no such file)
As long as I uninstall tensorflow-metal, nothing goes wrong. How can I fix this problem?
Not sure if this has been reported or not. I have found with several virtualization applications a bug in the running VM counter. After running multiple macOS vms or when shutting down and bringing up one macOS vm multiple times you will get the error that too many vm's are running. Even though all of them are shutdown and the applications closed at the time.
The only solution I have found is to reboot the computer. This started with macOS Tahoe 26 and so far has remained through 26.1. Hopefully reported and fixed in 26.2.
Topic:
Community
SubTopic:
Apple Developers