Post not yet marked as solved
Hi
I reviewed this post:
How to change navigation title color in swiftUI
This seems to work fine if the intention is to apply the title color across an application. I would like to apply a different text title color selectively depending on the View being shown. And in some instances revert back to the color depending on the light and dark themes.
Same result occurs using a viewmodifier or simply using onAppear and onDisappear with the title color is applied to all views. And if you do modify it in onDisappear, when you navigate back to another view which changes the color onAppear it has the same color as the previous view.
The only way I've found this to work is using UIViewControllerRepresentable and handling the viewWillAppear and viewWillDisappear something like this:
NavigationBarView(
viewWillAppear: { nav in
nav.navigationBar.largeTitleTextAttributes = [.foregroundColor: UIColor.white]
},
viewWillDisappear: { nav in
nav.navigationBar.largeTitleTextAttributes = nil
}
)
Has anyone been successful in getting a different title text color to apply to different views using a modifier or onAppear and onDisappear?
Appreciate any guidance.
Post not yet marked as solved
I use the following push notification payload.
{
"aps": {
"sound": {
"name": "default",
"volume": 0
}
},
"type": "refresh"
}
When the iPhone received this, it sounds even though "volume" is set to "0".
Is this iOS bug?
I tested iOS17 and 16. This occurred both.
Is there any way to set no sound when iPhone received a specific push notification like "type": "refresh".
Post not yet marked as solved
Hi,
I'm planning iOS app uses covers following functions:
write excel file(.xlsx)
read excel file (.xlsx) and show it on the table
I've been looking for library that can cover these so far, but I couldn't.
if someone recommends me any library, I'd be very appreciated.
thanks,
c00012
Post not yet marked as solved
I tried to ask for code support but I haven't received any reply. After a month I contacted last week developer support to credit back the TSI incident. They are radio silent and didn't even reply.
What can I do?
Post not yet marked as solved
Using Xcode 15.4 beta and VisionPro running visionOS 1.2. When attempting to run the app on device from Xcode getting the following error:
The developer disk image could not be mounted on this device.
Domain: com.apple.dt.CoreDeviceError
Code: 12040
Failure Reason: Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.)
User Info: {
DDIPath = "/Users/<userNameHidden>/Library/Developer/DeveloperDiskImages/xrOS_DDI.dmg";
DVTErrorCreationDateKey = "2024-04-17 02:59:41 +0000";
DeviceIdentifier = "A8F7D57D-4567-400C-BFFA-88880980908";
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
NSURL = "file:///Users/<userNameHidden>/Library/Developer/DeveloperDiskImages/xrOS_DDI.dmg";
Options = {
MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/4584678-8568-4567-5754-4567767/";
UseCredentials = 0;
};
"com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI;
}
Any advice would be appreciated
Post not yet marked as solved
Hello.
I've tried a dozen times to upload my app, each time getting a response that the app was rejected due to 4.1 copycats.
The most recent response:
Guideline 4.1 - Design - Copycats.
This app or its metadata appears to be misrepresenting itself as another popular app or game already available on the App Store, from a developer's website or distribution source, or from a third-party platform.
On my requests to clarify what exactly was identified as copycats, no specifics were given to me. Because of this I conclude that it is not about some stock images or sound assets, but that it is specifically about my application (name and icon).
I am the solo developer of the app and it has been available for 5 years on Google Play. No other platforms have my app on them, only Google Play. Since Apple has not provided me with specifics about what they need as proof of rights to the app, I have screen recorded my personal Google Play Developer Console account, which proves that I have all the necessary rights to manage my app on Google Play.
To this I received the following response:
Guideline 4.1 - Design - Copycats
This app or its metadata appears to be misrepresenting itself as another popular app or game already available on the App Store, from a developer's website or distribution source, or from a third-party platform.
Apps should be unique and should not attempt to deceive users into thinking they are downloading something they are not.
We did not receive sufficient documentation.
Please help me understand what documentation they are talking about if I am a solo developer with every right to my own app. Do they want me to register a company and register the naming rights to my app?
Post not yet marked as solved
Some users of our app get a black screen when playing mp4 files on their phones. The users are all running iOS 17.3.1 and cannot catch the error message when playing a black screen.
The user can play the video normally after restarting the mobile phone. However, we want to solve this problem from the code.
We use two Avplayers to complete the sequential playback of multiple videos.
override init(frame: CGRect) {
super.init(frame: frame)
layer.addSublayer(videoPlayerA)
layer.addSublayer(videoPlayerB)
}
lazy var layers = [videoPlayerA, videoPlayerB]
lazy var videoPlayerA: AVPlayerLayer = {
let avPlayerLayer = AVPlayerLayer(player: AVPlayer())
avPlayerLayer.contentsScale = UIScreen.main.scale
avPlayerLayer.videoGravity = .resizeAspectFill
return avPlayerLayer
}()
lazy var videoPlayerB: AVPlayerLayer = {
let avPlayerLayer = AVPlayerLayer(player: AVPlayer())
avPlayerLayer.contentsScale = UIScreen.main.scale
avPlayerLayer.videoGravity = .resizeAspectFill
return avPlayerLayer
}()
func play() {
if let path = paths[safe: currentIndex] {
currentVideoPath = path
currentPlayer = AVPlayer(playerItem: AVPlayerItem(url: URL(fileURLWithPath: path)))
layers.first?.player?.pause()
layer.insertSublayer(layers.first ?? AVPlayerLayer(), below: layers.last)
layers.swapAt(0, 1)
layers.first?.player = currentPlayer
layers.first?.player?.play()
SHPlayerGlobalStatus.sharedInstance.isLocalPlayerPlaying = true
try? AVAudioSession.sharedInstance().setCategory(.playback)
try? AVAudioSession.sharedInstance().setActive(true)
}
Post not yet marked as solved
Hi,
I am tying to build the app with increased-memory-limit for vision OS, but I got error while asset validation
Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on visionOS. Specifically, key 'com.apple.developer.kernel.increased-memory-limit' in '[AppName]' is not supported. (ID: 34399486-5b8c-4737-a446-6722fa1f6d98)
how should I fix this error
Thanks,
Max
Post not yet marked as solved
hello
i recently got a NSMallocException crash which is Out of memory. We suggest restarting the application. If you have an unsaved document, create a backup copy in Finder, then try to save.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x199e72b28 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x191cc2f78 objc_exception_throw + 60 (objc-exception.mm:356)
2 CoreFoundation 0x199f3eb60 _CFRaiseMemoryException + 44 (NSException.m:969)
3 CoreFoundation 0x199f3d5f4 __CFStringHandleOutOfMemory + 36 (CFString.c:1049)
4 CoreFoundation 0x199da92d4 __CFStringChangeSizeMultiple + 2356 (CFString.c:1123)
5 CoreFoundation 0x199da6a84 __CFStringCheckAndReplace + 364 (CFString.c:6140)
6 CoreFoundation 0x199dcfb08 -[__NSCFString replaceCharactersInRange:withString:] + 40 (CFObject.m:605)
7 Foundation 0x198c7b3a0 -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] + 176 (NSAttributedString.m:1210)
8 Foundation 0x198c7afd8 -[NSConcreteMutableAttributedString initWithString:attributes:] + 156 (NSAttributedString.m:1031)
9 UIKitCore 0x19c0c0ef0 -[NSAttributedString _ui_synthesizeAttributedSubstringFromRange:usingDefaultAttributes:] + 104 (UILabel.m:162)
10 UIKitCore 0x19c0c050c -[UILabel _synthesizedAttributedTextForContent:] + 604 (UILabel.m:1161)
11 UIKitCore 0x19c0c020c -[UILabel _synthesizedAttributedText] + 68 (UILabel.m:1200)
12 UIKitCore 0x19c0bfef4 _UIComputedSizeForLabel + 784 (UILabel.m:1931)
13 UIKitCore 0x19c0bf738 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 448 (UILabel.m:2117)
14 UIKitCore 0x19c0bf488 -[UILabel _intrinsicSizeWithinSize:] + 440 (UILabel.m:3690)
15 UIKitCore 0x19c0a091c -[UILabel intrinsicContentSize] + 276 (UILabel.m:3739)
16 UIKitCore 0x19c09e5d4 -[UIView _generateContentSizeConstraints] + 52 (NSLayoutConstraint_UIKitAdditions.m:2321)
17 UIKitCore 0x19c09e3c4 -[UIView _updateContentSizeConstraints] + 280 (NSLayoutConstraint_UIKitAdditions.m:2269)
18 UIKitCore 0x19c09e278 -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 88 (NSLayoutConstraint_UIKitAdditions.m:4719)
19 UIKitCore 0x19c0a0d78 -[UILabel _updateSystemConstraints] + 52 (UILabel.m:2193)
20 UIKitCore 0x19c09e13c -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 348 (NSLayoutConstraint_UIKitAdditions.m:4429)
21 UIKitCore 0x19c09ded4 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 776 (NSLayoutConstraint_UIKitAdditions.m:4526)
22 UIKitCore 0x19c09dde4 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 536 (NSLayoutConstraint_UIKitAdditions.m:4507)
23 CoreAutoLayout 0x1bae104a8 -[NSISEngine withBehaviors:performModifications:] + 84 (NSISEngine.m:1995)
24 UIKitCore 0x19c09dbac __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 124 (NSLayoutConstraint_UIKitAdditions.m:4572)
25 UIKitCore 0x19c04a834 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 112 (NSLayoutConstraint_UIKitAdditions.m:4241)
26 UIKitCore 0x19c1577b8 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 172 (NSLayoutConstraint_UIKitAdditions.m:4571)
27 UIKitCore 0x19c195684 -[UIWindow(UIConstraintBasedLayout) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 88 (NSLayoutConstraint_UIKitAdditions.m:672)
28 UIKitCore 0x19c03664c -[UIView _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 388 (NSLayoutConstraint_UIKitAdditions.m:4847)
29 UIKitCore 0x19c0361e0 -[UIView _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 324 (UIView.m:14180)
30 UIKitCore 0x19c0369d4 -[UIView(Hierarchy) layoutSubviews] + 192 (UIView.m:14256)
31 UIKitCore 0x19c0350f8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1528 (UIView.m:20041)
32 QuartzCore 0x19b45fe30 CA::Layer::layout_if_needed(CA::Transaction*) + 504 (CALayer.mm:10816)
33 QuartzCore 0x19b45f9b4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 148 (CALayer.mm:2598)
34 QuartzCore 0x19b465bb4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464 (CAContextInternal.mm:2760)
35 QuartzCore 0x19b45f1bc CA::Transaction::commit() + 648 (CATransactionInternal.mm:432)
36 QuartzCore 0x19b45ee64 CA::Transaction::flush_as_runloop_observer(bool) + 88 (CATransactionInternal.mm:942)
37 UIKitCore 0x19c0ad260 _UIApplicationFlushCATransaction + 52 (UIApplication.m:3160)
38 UIKitCore 0x19c0acd78 _UIUpdateSequenceRun + 84 (_UIUpdateSequence.mm:119)
39 UIKitCore 0x19c0ac468 schedulerStepScheduledMainSection + 144 (_UIUpdateScheduler.m:1037)
40 UIKitCore 0x19c0ac524 runloopSourceCallback + 92 (_UIUpdateScheduler.m:1186)
41 CoreFoundation 0x199dbd62c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
42 CoreFoundation 0x199dbc8a8 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
43 CoreFoundation 0x199dbb058 __CFRunLoopDoSources0 + 244 (CFRunLoop.c:2038)
44 CoreFoundation 0x199db9d88 __CFRunLoopRun + 828 (CFRunLoop.c:2955)
45 CoreFoundation 0x199db9968 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
46 GraphicsServices 0x1de0af4e0 GSEventRunModal + 164 (GSEvent.c:2196)
47 UIKitCore 0x19c22cedc -[UIApplication _run] + 888 (UIApplication.m:3692)
48 UIKitCore 0x19c22c518 UIApplicationMain + 340 (UIApplication.m:5282)
49 Falo 0x10115df50 main + 88 (main.m:11)
50 dyld 0x1bd2dad84 start + 2240 (dyldMain.cpp:1298)
is anyone know how and why it happend?
Post not yet marked as solved
It seems that the first time I open my app after the phone is restarted, the app does not properly access UserDefaults.
When my app is launched, I pull relevant user settings / preferences from UserDefaults. I recently noticed (after some users reached out about issues) that the first time the app is opened after a restart, the app appears as though all user settings / preferences have been erased.
If the app is force quit and reopened, the user data seems to come back normally. If the user takes action in the app before force quitting, though, UserDefaults will be written to with these new, empty values (essentially erasing what used to be in UserDefaults).
This makes it seem as though right after the phone is restarted, the app is unable to pull data from UserDefaults for some reason. Has anyone else seen this issue?
It could also be due to the lifecycle of my app and how I access UserDefaults, so if others don't have this issue it would be great to hear how you handle this.
Post not yet marked as solved
My app always crash when I trying to assign an enum to a value of[String: Any] only on iOS14.6, tested on iOS15, iOS16, iOS17, never saw this issue.
The function would pass an ConnectState enum and a serial number string to a userInfo of notification, received class may perform some UI updates when connect state changed.
func post(state: ConnectState, serial: Int) {
var userInfo: [String: Any] = [:]
userInfo["state"] = state
userInfo["serial"] = serial
print(userInfo)
NotificationCenter.default.post(name: NSNotification.Name("PostName"), object: nil, userInfo: userInfo)
}
@objc enum ConnectState: UInt8 {
case connected = 0x00
case disConnected = 0x01
var description: String {
switch self {
case .connected:
return "connected"
case .disConnected:
return "disConnected"
}
}
}
Classes received this notification, may perform some task based on connect state changed.
class AClass {
init() {
NotificationCenter.default.addObserver(self, selector: #selector(handleNotification(_:)), name: NSNotification.Name("PostName"), object: nil)
}
@objc func handleNotification(_ notification :Notification) {
let state = notification.userInfo?["state"] as! ConnectState
print("AClass handleNotification: \(state.description)")
}
}
let a = AClass()
post(state: .disConnected, serial: 123456)
post(state: .connected, serial: 123456)
//["serial": 123456, "state": __lldb_expr_3.ConnectState]
//AClass handleNotification: disConnected
//["serial": 123456, "state": __lldb_expr_3.ConnectState]
//AClass handleNotification: connected
The crashes always happened in the line that assigning the ConnectState enum to dictionary [String: Any] value, both connect state and serialNumber are not nil or optional.
I'm not sure why would this related to a allocate issue, is my code wrong?
AppName(645,0x16f61f000) malloc: can't allocate region
:*** mach_vm_map(size=1152921504606863360, flags: 100) failed (error code=3)
AppName(645,0x16f61f000) malloc: *** set a breakpoint in malloc_error_break to debug
```Since we only have one iOS14.6 device, it will be a challenge to test on other same iOS version device, nor test on simulator.
Post not yet marked as solved
Within Xcode when initializing the client via code below, do I insert this code in my app declaration Swift file or can it be just another Swift file included in my app? Thanks!
let client = Graph.Client(
shopDomain: "your-shop-name.myshopify.com",
apiKey: "your-storefront-access-token",
locale: Locale(identifier: "en_US")
)
Post not yet marked as solved
iOS17 using swiftData & CloudKit.
compiles correctly, then throws error "App installation failed: Unable To Install "
Please try again later. Failed to load Info.plist from bundle at path
...
/.../simulatorlocation/.app/Frameworks/SwiftData.framework/Info.plist: No such file or directory.
same error occurs on physical device 15Pro running iOS17.5
how do I fix this?
here is the error:
Please try again later. Failed to load Info.plist from bundle at path /Users//Library/Developer/CoreSimulator/Devices/996C811C-EE2D-47AE-881A-D1D2FA830BCC/data/Library/Caches/com.apple.mobile.installd.staging/temp.kkR2I8/extracted/Payload/.app/Frameworks/SwiftData.framework; Extra info about "/Users//Library/Developer/CoreSimulator/Devices/996C811C-EE2D-47AE-881A-D1D2FA830BCC/data/Library/Caches/com.apple.mobile.installd.staging/temp.kkR2I8/extracted/Payload/.app/Frameworks/SwiftData.framework/Info.plist": Couldn't stat /Users//Library/Developer/CoreSimulator/Devices/996C811C-EE2D-47AE-881A-D1D2FA830BCC/data/Library/Caches/com.apple.mobile.installd.staging/temp.kkR2I8/extracted/Payload/.app/Frameworks/SwiftData.framework/Info.plist:
No such file or directory
Post not yet marked as solved
Hello,
I recently ran a virus/malware scan on my dev machine using ClamAV, this was run via macOS Terminal using the 'clamscan' function.
Everything came back okay except a keylogger in the ProVideo Framework for physical iOS Test Devices. Please see below for 'clamscan' output:
/Users/username/Library/Developer/Xcode/iOS DeviceSupport/iPad8,11 17.4 (21E219)/Symbols/System/Library/PrivateFrameworks/ProVideo.framework/ProVideo: Unix.Keylogger.Macos-10023932-0 FOUND
My understanding is that '/Library/Developer/Xcode/iOS DeviceSupport/' is where Xcode keeps the files related to physical test devices that are required for debug. There were 3 Instances of this keylogger, all of which corresponded to physical devices I own and iOS Versions that I have installed / were installed.
Can anyone verify if 'Unix.Keylogger.Macos-10023932-0' is a valid file that ClamAV is incorrectly detecting as malicious?
If it is a valid debug file provided by Apple, it seems strange that it's located in the ProVideo Framework. I couldn't find any documentation online about this so any information would be appreciated.
At this stage I have deleted the contents of '/Library/Developer/Xcode/iOS DeviceSupport/', my understanding is that these symbols are only transferred to the system when I test software via Xcode on a physical device and will not reproduce until I do that again. To me it's unclear if perhaps this keylogger is present on my iOS Device and is being transferred to the Mac via Xcode? Or somehow it is just appearing in this folder?
Thanks!
Post not yet marked as solved
What I mean is an AirTag-type device that doesn't make noise so thieves can't detect it, but shoots you a text or alert if your car moves more than five feet after you have activated it. No one uses my car but me, so I know that if I get an alert that my car is moving, it's either being stolen or towed.
Thanks!
A few days ago I was able to build to my apple watch which is paired to my iphone.
I upgraded to the current release of IOS which is 17.4.1. I also updated my apple watch to 10.4. Once I completed these updates I had issue where the watch was running 10.4, but when I. viewed the apple watch using manage run destinations. It still said 10.1
I unplugged the iphone from mac a few times, restarted XCode but still could not use the apple watch to build a 10.4 build to it.
I did my basic research and read that you also you might need to reboot the mac. After some time i decided to break the trust with my mac and apple watch, then since that time I have not been able to view it in the device list.
Next steps taken, was to unpair the apple watch from my I phone and repair.
Next on the Iphone I cleared trusted devices.
Then I attached my iphone to the mac, and retrusted my iphone and apple watch.
I also have the mac up to the newest version Sonoma 14.4.1
Xcode can see my IPhone, but not the watch
xcrun devicectl list devices
shows
Devices:
Name Hostname Identifier State Model
Barry's IPhone 14 Pro Barrys-IPhone-14-Pro.coredevice.local xxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxA209B connected iPhone 14 Pro (iPhone15,2)
Manage Run Destinations shows my IPhone details but still does not show any paired devices.
I have made sure that the watch is in Developer Mode
I have Associated Domains Developement enabled
WidgetKit Developer Mode is disabled
What would be my next steps in resolving this issue?
Thanks
Post not yet marked as solved
I'm trying to figure out how to debug this issue. I have a fairly simple program that I built using the Hello World sample code as reference. Here is my code:
import SwiftUI
@main
struct Core_USDZ_ViewerApp: App {
var body: some Scene {
// Main Menu scene
//
WindowGroup (id: "main-menu"){
CoreUsdzMenu()
}
// Scene that takes data as an input
// for volumetric viewing
//
WindowGroup (for: URL.self) { $content in
CoreUsdzVolume(url: content)
} defaultValue: {
URL(string: "https://developer.apple.com/augmented-reality/quick-look/models/pancakes/pancakes.usdz")!
}
.windowStyle(.volumetric)
.defaultSize(width: 0.2, height: 0.3, depth: 0.3, in: .meters)
// Full surround scene
/*
ImmersiveSpace {
// put our immersive view here
} */
}
}
In the simulator, this launches the main menu scene, but when installed on the Vision Pro using TestFlight it skips the main menu and goes straight to the second WindowGroup. Since the data isn't populated, it uses the defaultValue and just shows pancakes.
I'm having trouble logging and debugging this issue, as I don't have access to the hardware myself. I have to push the code to TestFlight and wait for a coworker to test it.
Does anyone have ideas of why this could be happening? Any help is appreciated. Logging and debugging tips especially. I'm used to just putting log messages in my code to debug, but maybe there are some breakpoint techniques I should be using here or something.
Oh, also, here is my CoreUsdzMenu script:
import SwiftUI
import RealityKit
import UniformTypeIdentifiers
struct CoreUsdzMenu: View {
@Environment(\.openWindow) private var openWindow
@Environment(\.dismissWindow) private var dismissWindow
@State var entity: Entity? = nil
@State var showFilePicker: Bool = false
init() {
NSLog("In CoreUsdzMenu")
}
var body: some View {
VStack{
Text("Core USDZ Viewer v1.1")
.font(.title)
.frame(width: 500.0, height: 100.0)
/* usdz list
HStack(spacing: 100.0) {
Spacer()
// Load the UsdzList view into the window!
UsdzList()
Spacer()
}*/
/* button test for window
Button {
openWindow(value: usdzData[1].url)
} label: {
Text("open test window")
}*/
// A view for displaying the loaded asset.
/*
RealityView(
make: { content in
// Add a placeholder entity to parent the entity to.
//
let placeholderEntity = Entity()
placeholderEntity.name = "$__placeholder"
if let loadedEntity = self.entity {
placeholderEntity.addChild(loadedEntity)
}
content.add(placeholderEntity)
},
update: { content in
guard let placeholderEntity = content.entities.first(where: {
$0.name == "$__placeholder"
}) else {
preconditionFailure("Unable to find placeholder entity")
}
// If there is a loaded entity, remove the old child,
// and add the new one.
//
if let loadedEntity = self.entity {
placeholderEntity.children.removeAll()
placeholderEntity.addChild(loadedEntity)
}
}
)*/
// A button that displays a file picker for loading a USDZ.
//
Button(
action: {
showFilePicker = true
},
label: {
Text("Load USDZ")
}
)
.padding()
}
// can import usdz and realityFile UTT types
.fileImporter(isPresented: $showFilePicker, allowedContentTypes: [.usdz, .realityFile]) { result in
// Get the URL of the USDZ picked by the user.
// Guarded for errors.
//
guard let url = try? result.get() else {
print("Unable to get URL")
return
}
NSLog("In CoreUsdzMenu")
// add new .usdz to our data list
// for later!~
// use Observables n stuff
//usdzData.addUsdz(url)
// This task is just an asynchronous block of code. Not linked
// to the RealityView explicitly; the update parameter of the
// RealityView function responds when this task updates the entity.
//
Task {
// As the app is sandboxed, permission needs to be
// requested to access the file, as it's outside of
// the sandbox.
//
if url.startAccessingSecurityScopedResource() {
defer {
url.stopAccessingSecurityScopedResource()
}
// Load the USDZ asynchronously.
// On load, triggers RealityView's update.
//
//self.entity = try await Entity(contentsOf: url)
// Try using the Volumetric Window to display the
// content:
//
openWindow(value: url)
}
}
}
}
}
Thank you for reading!
Post not yet marked as solved
Need help as the the option to "make a version unavailable for download" is broken.
1- Go to the app store and select your app
2- On the left menu scroll down and click on "pricing and availability"
3- Scroll to the bottom to "Edit your last-compatible version for iOS apps" and
expand the section
4- Click on the app versions
5- On the new pop-up window un-check the boxes for the versions you need to remove and click done. HERE IT IS BROKEN.
Post not yet marked as solved
Hello. See the code below.
struct ContentView: View {
var body: some View {
TabView {
VehicleTab()
.tabItem({ Label("Vehicles", systemImage: "car.fill")})
.modelContainer(for: Vehicle.self)
TransactionsTab()
.tabItem { Label("Transactions", systemImage: "dollarsign") }
.modelContainer(for: Transaction.self)
}
}
}
Using the .modelContainer() in this way seems to be causing some issue. I was under the assumption that this would just create a container for each view. I get the error below in this configuration. If I comment out either one of the .modelContainer() modifiers, it works fine.
Query encountered an error: Error Domain=NSCocoaErrorDomain Code=256 "The file “default.store” couldn’t be opened."
Are you not able to do what I'm doing? Is there a way to have two separate containers?
Post not yet marked as solved
I have reach limit of associations and want to add a new device.
Anytime I want to add a new device I get this error message "Your development team has reached the maximum number of registered iPhone devices."
I have disabled some of the devices BUT I can't remove them completely. Hence, I still reach the limit of devices. As per as the Apple message saying: "Note: If you remove a registered device from your account, it will continue to count against your device limit. At the start of your new membership year, Account Holders and Admins will be presented with the option to remove listed devices and restore the available device count."
I can't wait until the start of the new membership year.
How can I remove and add more devices please wihtout having to wait until new membership year?
Thank you