Post not yet marked as solved
I have a iPad mini4 with iPadOS 15.8.2.
I try to Install iPadOS 17.5 beta 4. But I can't succeed in installing the program.
I read the documents related to iPadOS 17.5 beta 4 in Apple Developer Program.
According to the instructions, I repeated to install the profile to my mini4 by various ways, but in vain. I made inquiries to Apple Care and Apple Developer Support, but they said they gave me some advices that they could have in their resources. They told me my operations seemed to be correct in order to install the profile related to iPadOS 17.5 beta 4 for the machines with iPadOS 16.3 and earlier. They also basically told me they didn't know why and how on a beta program and to go to Developer Forums and post my problem in Developer Forum.
I have also have M2Macbook Pro, iPad9, SE3. "Beta Updates"s appear in Three System Settings but only "Automatic Updates" appears in mini4. It is sure to enter a Developer Mode on my Apple ID.
How should I do in order to install the profile for iPadOS 17.5 beta 4 ?
Please tell me how.
Post not yet marked as solved
Hello everyone, I'm just getting started with Swift and I'm in a bit of a knot here. Code below:
`if codeSent {
TextField("6 Digit Code", text: $code)
Divider()
Button("Verify") {
print("verify...")
if code.count == 6 {
cloud(fun: "customSmsAuth", cloudData: [
"code": code,
"phoneNumber": phoneNumber
], completion: { resData in
let res = resData["res"] as? Int
if res == 1 {
let customToken = resData["customToken"]
Auth.auth().signIn(withCustomToken: customToken) { user, error in
}
} else {
print("An error occured...")
}
})
} else {
print("invalid code...")
}
}.padding()
}`
`else {
HStack {
Button("+26") {
print("phone code...")
}
TextField("Phone Number", text: $phoneNumber)
}
Divider()
Button("Send Code") {
print("send code...")
if phoneNumber.count == 10 {
cloud(fun: "sendSms", cloudData: ["phoneNumber" : "+26"+phoneNumber], completion: { resData in
let res = resData["res"] as? Int
if res == 1 {
codeSent = true
} else {
print("An error occured...")
}
})
} else {
print("Invalid phone number...")
}
print(phoneNumber)
}.padding()
}`
I'm trying to setup a simple phone based authentication with firebase. Any pointer where I'm going wrong will be appreciated.
Thanks.
Post not yet marked as solved
I added Privacy manifest for my app and submit it to review
and apple reject my app with what comment
ITMS-91054: Invalid API category declaration - The PrivacyInfo.xcprivacy for the “Frameworks/SmartlookAnalytics.framework/SmartlookAnalytics” file contains “Disk Space” as the value for a NSPrivacyAccessedAPIType key, which is invalid. Values for NSPrivacyAccessedAPIType keys in any privacy manifest must be valid API categories. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.
i look at the package manifest and all looks fine (attached image).
Maybe somebody saw that issue - and may tell me how can i fix it.
Post not yet marked as solved
I need to draw an outline of an Emoji glyph bounding box that is drawn in CGContext (macOS 14.4.1). I use NSLayoutManager - (void)drawGlyphsForGlyphRange:(NSRange)glyphsToShow atPoint:(NSPoint)origin; and I can get an emoji glyph bounding box using CoreText CGRect CTFontGetBoundingRectsForGlyphs(CTFontRef font, CTFontOrientation orientation, const CGGlyph *glyphs, CGRect *boundingRects, CFIndex count);. The bounding box is correct until the CGContext to which I draw the string with Emoji is not scaled or rotated. In such a case, an Emoji drawn in context is "sometimes" scaled, so its bounding box is not equal to the bounding box obtained from CoreText. Unfortunately, I can't figure out what the dependencies between glyph size, CGContext rotation, and scale are. I couldn't find any linearity between these variables. For example, an Emoji is drawn correctly at scale 6, rotation 0, when CGContext is rotated by 1 degree, Emoji is downsized by 1 pixel, then back in nominal size when rotation is between 2 and 4 degrees, then downsized for 5 degrees, nominal at 6, etc.
Has anyone solved this?
Post not yet marked as solved
I'm having issues with a Lazyvgrid displaying images after the screen orientation changes ( either from horizontal to portrait, or the reverse )
What happens is the images are not sized correctly. If 2 column , I see 1/3 of column 1 and the image in column 2 takes 2/3 of the screen width. Similar issues with 3 or 6 column layout.
The Lazyvgrid is inside a ScrollView and thats inside a Tabview.
I'v tried to trick an update by changing the column layout, the content mode (fit/fill) of the images, etc. but so far nothing has worked.
Any suggestions ?, anyway to invalidate a lazyvgrid and have swiftui rebuild it ?
Thanks.
Post not yet marked as solved
I just purchased a new M3 chip MacBook Air a little after it came out. I was able to create and deploy an iOS application. However, now that I am trying to create a new project Xcode throws an error upon launch.
Steps to recreate the error (if possible)
Open Xcode
Select create new app
An error is where the preview should be.
At this point I have added no code. It is all boiler plate from Apple.
Post not yet marked as solved
添加以提供审核时报错,但并没有告诉我需要提供哪些信息?(发布上一个版本的时候没有这个问题)
Post not yet marked as solved
I am wanting to create a 3D video game in Xcode for macOS, iOS, iPadOS, tvOS, and visionOS. I have heard that there are a few different ways to go about this such as MetalKit or SceneKit. These libraries seem to have little examples and documentation so I am wondering:
Are they still be developed/supported?
Which platform should I make a game in?
Where are some resources to learn how to use these platforms?
Are there other better platforms that I am just not aware of?
Thanks!
Post not yet marked as solved
Hello. I've been looking all over this forum and stack and done some internet searches but unfortunately have found nothing to assist in fixing an error I'm receiving on my project in Xcode.
Every view shows an error identical to the one shown above, only with that specific file name displayed instead. When I go to fix the error, this is the error detail displayed:
== PREVIEW UPDATE ERROR:
LinkDylibError: Failed to build TabBar.swift
Linking failed: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: search path '/Applications/Xcode.app/Contents/SharedFrameworks-iphonesimulator' not found
ld: unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) in '/Users/brycemchose/Library/Developer/Xcode/DerivedData/Service_Square_App-dnblqgabcrxprhaizjtkcvouyzln/Build/Intermediates.noindex/Previews/iphonesimulator/Service Square App/Products/Debug-iphonesimulator/Service Square.app/Service Square'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note that I can run the app successfully to a simulator or to my iPhone, but cannot see the preview within the Xcode canvas. I've been blindly developing the last two app updates, pushing the changes to the simulator and then tweaking the code based on the simulated version. I can keep doing this for a little while but it is significantly slower and more difficult, especially to fix small bugs and make tiny changes, so I'd really like to see if anyone has an idea for how I can get the preview back to being properly displayed. I'm brand new to this whole thing and have no idea how to fix this issue, so I'd be really grateful if someone with more experience could offer some suggestions! Thanks in advance! :)
Post not yet marked as solved
Hi everyone
I'm new to swiftui and I'm trying to understand the reason that allows swiftui to call a VStack or any other container view without parentheses as in:
struct ContentView: View {
var body: some View {
VStack {
Text("sth");
}
}
}
After looking into the swift docs, it was clear as in any other programming language that instantiating a class/structure is made by calling the entity with its parentheses, an even passing some parameters if possible.
Isn't should be the case for placing view components in the body computer property?
So far my mind keeps telling me that the syntax should follow this convention
struct ContentView: View {
var body: some View {
VStack() {
Text("sth");
}
}
}
At which concept should I look into for further clarifications
All the best.
Post not yet marked as solved
Privacy and Security Settings on Apple Watch requires a screen time passcode, but when I enter the correct passcode, it says its wrong. I need to get into these settings to access developer mode on my watch. If you know how to fix this, please help.
I'm writing a SpriteKit game in Swift that does this familiar dance in my GameScene touchesEnded(...)...
let touch = touches.first!.location(in: self)
let nodes = self.nodes(at: touch)
...but sometimes when the game is running, the nodes collection is empty, even though there are clearly, visibly nodes under the touch. All of the nodes I care about are children of a single SKNode, MapNode, that is one of two children of the GameScene.
After a bunch of debugging, I've noticed that when this problem happens, something is causing calculateAccumulatedFrame() to return a frame that is way, way smaller than the real bounds of MapNode.
When the scene begins, calculateAccumulatedFrame() is perfect, but something that happens later on breaks it. I've tried adding a node to MapNode that is the correct size to 'force' calculateAccumulatedFrame to do the right thing, but this doesn't work.
Is there something obvious I am doing wrong, or some common pitfalls? Is there some way to force calculateAccumulatedFrame to return this correct size?
Post not yet marked as solved
I added debug break point to the first line of MyDeviceActivityMonitor.swift, it never got trigger.
I am able to launch the app, select discouraged and encouraged app.
discouraged apps are getting restricted which is expected. but device activity extension is never called.
I have all the permission and certificate. I created an app group.
import SwiftUI
import FamilyControls
import ManagedSettings
@main
struct GetALifeApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
@StateObject var model = MyModel.shared
@StateObject var store = ManagedSettingsStore()
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(model)
.environmentObject(store)
}
}
}
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
initiateAsyncSetup()
MySchedule.setSchedule()
return true
}
private func initiateAsyncSetup() {
Task {
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .individual)
} catch {
print("Error during asynchronous setup: \(error)")
}
}
}
}
import Foundation
import FamilyControls
import ManagedSettings
private let _MyModel = MyModel()
class MyModel: ObservableObject {
let store = ManagedSettingsStore()
@Published var selectionToDiscourage: FamilyActivitySelection
@Published var selectionToEncourage: FamilyActivitySelection
init() {
selectionToDiscourage = FamilyActivitySelection()
selectionToEncourage = FamilyActivitySelection()
}
class var shared: MyModel {
return _MyModel
}
func setShieldRestrictions() {
let applications = MyModel.shared.selectionToDiscourage
store.shield.applications = applications.applicationTokens.isEmpty ? nil : applications.applicationTokens
store.shield.applicationCategories = applications.categoryTokens.isEmpty
? nil
: ShieldSettings.ActivityCategoryPolicy.specific(applications.categoryTokens)
}
}
import Foundation
import DeviceActivity
extension DeviceActivityName {
static let daily = Self("daily")
}
extension DeviceActivityEvent.Name {
static let encouraged = Self("encouraged")
}
let schedule = DeviceActivitySchedule(
intervalStart: DateComponents(hour: 0, minute: 0),
intervalEnd: DateComponents(hour: 23, minute: 59),
repeats: true
)
class MySchedule {
static public func setSchedule() {
print("Setting schedule...")
print("Hour is: ", Calendar.current.dateComponents([.hour, .minute], from: Date()).hour!)
let events: [DeviceActivityEvent.Name: DeviceActivityEvent] = [
.encouraged: DeviceActivityEvent(
applications: MyModel.shared.selectionToEncourage.applicationTokens,
threshold: DateComponents(second: 2)
)
]
let center = DeviceActivityCenter()
do {
print("Try to start monitoring...")
print(events)
try center.startMonitoring(.daily, during: schedule, events: events)
} catch {
print("Error monitoring schedule: ", error)
}
}
}
import SwiftUI
struct ContentView: View {
@State private var isDiscouragedPresented = false
@State private var isEncouragedPresented = false
@EnvironmentObject var model: MyModel
var body: some View {
VStack {
Button("Select Apps to Discourage") {
isDiscouragedPresented = true
}
.familyActivityPicker(isPresented: $isDiscouragedPresented, selection: $model.selectionToDiscourage)
Button("Select Apps to Encourage") {
isEncouragedPresented = true
}
.familyActivityPicker(isPresented: $isEncouragedPresented, selection: $model.selectionToEncourage)
}
.onChange(of: model.selectionToDiscourage) {
MyModel.shared.setShieldRestrictions()
}
.onChange(of: model.selectionToEncourage) {
MySchedule.setSchedule()
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
.environmentObject(MyModel())
}
}
import Foundation
import DeviceActivity
import ManagedSettings
class MyDeviceActivityMonitor: DeviceActivityMonitor {
let store = ManagedSettingsStore()
override func intervalDidStart(for activity: DeviceActivityName) {
print("intervalDidStart")
super.intervalDidStart(for: activity)
store.shield.applications = nil
print("intervalDidStart")
}
override func intervalDidEnd(for activity: DeviceActivityName) {
super.intervalDidEnd(for: activity)
}
override func eventDidReachThreshold(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) {
super.eventDidReachThreshold(event, activity: activity)
print("used encouraged")
store.shield.applications = nil
}
override func intervalWillStartWarning(for activity: DeviceActivityName) {
super.intervalWillStartWarning(for: activity)
// Handle the warning before the interval starts.
}
override func intervalWillEndWarning(for activity: DeviceActivityName) {
super.intervalWillEndWarning(for: activity)
// Handle the warning before the interval ends.
}
override func eventWillReachThresholdWarning(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) {
super.eventWillReachThresholdWarning(event, activity: activity)
// Handle the warning before the event reaches its threshold.
}
}
Post not yet marked as solved
I already filed feedback FB13777941 for this, but wanted to ask if anyone has the same problem, since I can't find anything on google or SO.
I created a new package in Xcode (15.3) and added this to it:
import SwiftUI
struct Test: View {
var body: some View {
Text("Hello world")
}
}
#Preview {
Test()
}
The package builds, tests can run. Previews don't work.
This is more or less the error I get from the diagnostics button (formatted for readability):
LoadingError: failed to load library at path ”PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/PACKAGE_NAME_63097C4A372B9C87_PackageProduct”: Optional(dlopen(PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/PACKAGE_NAME_63097C4A372B9C87_PackageProduct, 0x0000):
tried:
'PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (no such file),
'PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')),
'/System/Volumes/Preboot/Cryptexes/OSPATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (no such file),
'PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')),
'PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/Versions/A/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (no such file),
'PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/Versions/A/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')),
'/System/Volumes/Preboot/Cryptexes/OSPATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/Versions/A/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (no such file),
'PATH_TO_DERIVED_DATA/Build/Intermediates.noindex/Previews/macos/PACKAGE_NAME/Products/Debug/PackageFrameworks/PACKAGE_NAME_63097C4A372B9C87_PackageProduct.framework/Versions/A/PACKAGE_NAME_63097C4A372B9C87_PackageProduct' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')))
I don't remember ever having this problem. The arm64 vs arm64e makes no sense to me - why would Xcode get that wrong... and only for previews?
I've tried restarting, deleting derived data, the usual rain dances.
Any ideas?
Post not yet marked as solved
I am new to swift. This is my first app. What an i doing wrong.
Device activity monitor extension is never being called.
When i launch the app, I am able to pick the discouraged and encouraged apps.
It immediately restrict the discouraged app which is expected. But the extension is never called.
import SwiftUI
import FamilyControls
import ManagedSettings
@main
struct GetALifeApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
@StateObject var model = MyModel.shared
@StateObject var store = ManagedSettingsStore()
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(model)
.environmentObject(store)
}
}
}
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
initiateAsyncSetup()
return true
}
private func initiateAsyncSetup() {
Task {
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .individual)
MySchedule.setSchedule()
} catch {
print("Error during asynchronous setup: \(error)")
}
}
}
}
import Foundation
import FamilyControls
import ManagedSettings
private let _MyModel = MyModel()
class MyModel: ObservableObject {
let store = ManagedSettingsStore()
@Published var selectionToDiscourage: FamilyActivitySelection
@Published var selectionToEncourage: FamilyActivitySelection
init() {
selectionToDiscourage = FamilyActivitySelection()
selectionToEncourage = FamilyActivitySelection()
}
class var shared: MyModel {
return _MyModel
}
func setShieldRestrictions() {
let applications = MyModel.shared.selectionToDiscourage
store.shield.applications = applications.applicationTokens.isEmpty ? nil : applications.applicationTokens
store.shield.applicationCategories = applications.categoryTokens.isEmpty
? nil
: ShieldSettings.ActivityCategoryPolicy.specific(applications.categoryTokens)
}
}
import Foundation
import DeviceActivity
extension DeviceActivityName {
static let daily = Self("daily")
}
extension DeviceActivityEvent.Name {
static let encouraged = Self("encouraged")
}
let schedule = DeviceActivitySchedule(
intervalStart: DateComponents(hour: 0, minute: 0),
intervalEnd: DateComponents(hour: 23, minute: 59),
repeats: true
)
class MySchedule {
static public func setSchedule() {
print("Setting schedule...")
print("Hour is: ", Calendar.current.dateComponents([.hour, .minute], from: Date()).hour!)
let events: [DeviceActivityEvent.Name: DeviceActivityEvent] = [
.encouraged: DeviceActivityEvent(
applications: MyModel.shared.selectionToEncourage.applicationTokens,
threshold: DateComponents(second: 2)
)
]
let center = DeviceActivityCenter()
do {
print("Try to start monitoring...")
try center.startMonitoring(.daily, during: schedule, events: events)
} catch {
print("Error monitoring schedule: ", error)
}
}
}
import SwiftUI
struct ContentView: View {
@State private var isDiscouragedPresented = false
@State private var isEncouragedPresented = false
@EnvironmentObject var model: MyModel
var body: some View {
VStack {
Button("Select Apps to Discourage") {
isDiscouragedPresented = true
}
.familyActivityPicker(isPresented: $isDiscouragedPresented, selection: $model.selectionToDiscourage)
Button("Select Apps to Encourage") {
isEncouragedPresented = true
}
.familyActivityPicker(isPresented: $isEncouragedPresented, selection: $model.selectionToEncourage)
}
.onChange(of: model.selectionToDiscourage) { newSelection in
MyModel.shared.setShieldRestrictions()
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
.environmentObject(MyModel())
}
}
import Foundation
import DeviceActivity
import ManagedSettings
class MyDeviceActivityMonitor: DeviceActivityMonitor {
let store = ManagedSettingsStore()
override func intervalDidStart(for activity: DeviceActivityName) {
print("intervalDidStart")
super.intervalDidStart(for: activity)
store.shield.applications = nil
print("intervalDidStart")
}
override func intervalDidEnd(for activity: DeviceActivityName) {
super.intervalDidEnd(for: activity)
}
override func eventDidReachThreshold(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) {
super.eventDidReachThreshold(event, activity: activity)
print("used encouraged")
store.shield.applications = nil
}
override func intervalWillStartWarning(for activity: DeviceActivityName) {
super.intervalWillStartWarning(for: activity)
// Handle the warning before the interval starts.
}
override func intervalWillEndWarning(for activity: DeviceActivityName) {
super.intervalWillEndWarning(for: activity)
// Handle the warning before the interval ends.
}
override func eventWillReachThresholdWarning(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) {
super.eventWillReachThresholdWarning(event, activity: activity)
// Handle the warning before the event reaches its threshold.
}
}
Post not yet marked as solved
Dear all,
I have the following two classes:
Stagioni:
import SwiftData
@Model
class Stagione {
@Attribute(.unique) var idStagione: String
var categoriaStagione: String
var miaSquadra: String
@Relationship(deleteRule: .cascade) var rosa: [Rosa]?
@Relationship(deleteRule: .cascade) var squadra: [Squadre]?
@Relationship(deleteRule: .cascade) var partita: [CalendarioPartite]?
init(idStagione: String, categoriaStagione: String, miaSquadra: String) {
self.idStagione = idStagione
self.categoriaStagione = categoriaStagione
self.miaSquadra = miaSquadra
}
}
CalendarioPartite:
import SwiftData
@Model
class CalendarioPartite {
var idGiornata: Int
var dataPartita: Date
var squadraCasa: String
var squadraTrasferta: String
var golCasa: Int
var golTrasferta: Int
var stagione: Stagione?
init(idGiornata: Int, dataPartita: Date, squadraCasa: String, squadraTrasferta: String, golCasa: Int, golTrasferta: Int) {
self.idGiornata = idGiornata
self.dataPartita = dataPartita
self.squadraCasa = squadraCasa
self.squadraTrasferta = squadraTrasferta
self.golCasa = golCasa
self.golTrasferta = golTrasferta
}
}
Now, I'd like to have a query which is showing in a view the list of partite depending on a selection of a specific Stagione.
I've tried with the following query, but I'm getting the following error: "Instance member 'selectedStagione' cannot be used on type 'CalendarioCampionatoView'; did you mean to use a value of this type instead?"
@Query(filter: #Predicate<CalendarioPartite> { $0.stagione == selectedStagione}) private var partite: [CalendarioPartite] = []
What I'm doing wrong?
Thanks,
A.
Post not yet marked as solved
I am guessing this is a NavigationSplitView and the menu is in the sidebar closure. But I'm not quite sure how to reproduce this style of menu. Along with the collapsing breadcrumb for back button. I would have thought this would be out of the box?
Post not yet marked as solved
There seems to be a long running issue with WidgetKit where some users don't see the widget when trying to add to their Home Screen. (even after opening the app for the first time).
I have been able to reproduce myself intermittently, and typically restarting the phone or re-installing the app fixes the problem. However, some of my users have encountered this and end up requesting refunds because they think the app is broken.
Has anybody else experienced this issue?
Would be great to get this bug resolved as it's frustrating for users.
Post not yet marked as solved
He terminado de desarrollar una nueva versión de mi aplicación, la cual incluye notificaciones a través de FireBase Cloud Messaging. A la hora de compilar la aplicación para probar las funcionalidades. Me sale el siguiente error:
El ContentView de mi aplicación es el siguiente.
import SwiftUI
import WebKit
import Firebase
import FirebaseMessaging
class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func application (_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure ()
requestAuthorizationForPushNotification(application: application)
return true
}
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, witchCompletionHandler
completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
completionHandler([.banner, .sound])
}
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler
completionHandler: @escaping () -> Void) {
completionHandler()
}
private func requestAuthorizationForPushNotification(application: UIApplication) {
UNUserNotificationCenter.current().delegate = self
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { _, _ in }
application.registerForRemoteNotifications()
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken
}
struct ContentView: View {
@State private var showWebView = false
private let urlString: String = "https://b-p-s-o-badajoz-beta.flutterflow.app/"
var body: some View {
VStack(spacing: 40) {
WebView(url: URL(string: urlString)!).frame(height: 890.0) .cornerRadius(10)
.shadow(color: .black.opacity(0.3), radius: 20.0, x: 5, y: 5)
}
}
struct WebView: UIViewRepresentable {
var url: URL
func makeUIView(context: Context) -> WKWebView {
return WKWebView()
}
func updateUIView(_ uiView: WKWebView, context: Context) {
let request = URLRequest(url: url)
uiView.load(request)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
}
}
Post not yet marked as solved
In visionOS. mix mode, I place a virtual object on the floor and a chair in front of it, but the chair does not obstruct the virtual object, making the effect unrealistic. How to make chairs and other objects in reality cover virtual objects