Overview

Post

Replies

Boosts

Views

Activity

SwiftUI navigate to another view from a popup
when I click on a mapview pin, a PopupView comes up with some text and a button. I want to be able to navigate to another DetailsView by clicking on the button display in the popup, the button is embedded inside NavigationLink. But clicking on the button nothing happens. How to navigate from button click? struct MyMapView: View { @State var position: MapCameraPosition = .automatic @State var showCallout: Bool = false @State var selected: PinAnnotation? @Binding var locationPins: [PinAnnotation] @State private var toggler = false var body: some View { Map(position: $position) { ForEach(locationPins, id: \.self) { result in Annotation(result.title!, coordinate: result.coordinate) { ZStack { Image(systemName: "mappin.circle.fill") .resizable() .scaledToFit() .frame(width: 30, height: 30) .onTapGesture { selected = result toggler.toggle() } .foregroundStyle(.white, .purple) if selected == result && toggler { PopupView(pin: selected) } else { EmptyView() } } } } } } struct PopupView: View { @State var pin: PinAnnotation? @State private var select: Int? = 0 var body: some View { VStack (alignment: .leading) { HStack { if let val = pin { Text(val.text) .font(.system(size: 12, weight: .light, design: .default)) NavigationLink(destination: DetailsView(), label: { Button(action: {select = 1}){ Image(systemName: "play.circle") } .scaledToFit() .frame(width: 50, height: 50) .background(Color.blue) .foregroundColor(.white) .clipShape(Circle()) }) } else { Text("no data") } } // .fixedSize() } .scaledToFit() .foregroundStyle(.purple) .frame(maxWidth: .infinity) .background(Color.white) .cornerRadius(10) .shadow(radius: 5) .offset(x: 0, y: -45) } } struct DetailsView: View { @Environment(\.presentationMode) var presentation var body: some View { Group { Button("Back") { self.presentation.wrappedValue.dismiss() } } } } }
1
0
39
13h
App Store Connect API - Daily App Analytics
Hello, I am trying for a few days to get daily reports for a specific app_id but it seems the process is not working. I manage to get a list of my apps, then of my current reports, but when I try to request a https://api.appstoreconnect.apple.com/v1/analyticsReportInstances/{id} from the report list I am returning above I get a 404. I was wondering if you have any actual guide on how to get daily reports updated from the api for a specific type (downloads or installs for example)?
0
0
29
13h
xcode16 beta not support iAd
May I ask how to adapt to devices using ADClient under iOS 14.3? xcode version: 16.0 beta (16A5171c) error message:Use of undeclared identifier 'ADClient' if (@available(iOS 14.3, *)) { NSError *error = nil; NSString *token = [AAAttribution attributionTokenWithError:&error]; } else { if ([[ADClient sharedClient] respondsToSelector:@selector(requestAttributionDetailsWithBlock:)]) { [[ADClient sharedClient] requestAttributionDetailsWithBlock:^(NSDictionary<NSString *, NSObject *> * _Nullable attributionDetails, NSError * _Nullable error) { }]; } }
0
0
36
13h
xcode16 beta not support iAd
May I ask how to adapt to devices using ADClient under iOS 14.3? xcode version: 16.0 beta (16A5171c) error message:Use of undeclared identifier 'ADClient' if (@available(iOS 14.3, *)) { NSError *error = nil; NSString *token = [AAAttribution attributionTokenWithError:&error]; } else { if ([[ADClient sharedClient] respondsToSelector:@selector(requestAttributionDetailsWithBlock:)]) { [[ADClient sharedClient] requestAttributionDetailsWithBlock:^(NSDictionary<NSString *, NSObject *> * _Nullable attributionDetails, NSError * _Nullable error) { }]; } }
0
0
32
13h
Can't select new build
I cannot select my newly uploaded build in app store connect for review. The UI to select a different build is just gone. I have reached out to apple and they said they are aware and fixing it but its been a week since and nothing has changed. I uploaded a build to be reviewed to app store connect, and it got rejected due to an issue with connecting to my server. I discovered the issue was that my server was using http rather than https and apple doesn't allow this. I including things in my info.plist to allow the http connection, and I think this could be what triggered this app store connect issue, but I think xCode would have told me there was info.plist issue with my build while trying to upload it so I don't know. I have since migrated my app to https and uploaded a new build and I still can't select it to be reviewed. Anyone else have any similar issues?
0
0
36
14h
xcrun notarytool store-credentials -> HTTP status code: 401. Invalid credentials error
Hi, I am getting following error from following command, although I am 100% sure that I am entering the right credentials: Command: xcrun notarytool store-credentials "MY_PROFILE" --apple-id “***” --team-id "yyy" --password "zzz" Error: Error: HTTP status code: 401. Invalid credentials. Username or password is incorrect. Use the app-specific password generated at appleid.apple.com. Ensure that all authentication arguments are correct. ***->https://appleid.apple.com/account/manage/email and phone number -> apple id email (email address used for developer account) yyy->https://developer.apple.com/account#MembershipDetailsCard/Team ID -> 10 digit nummer zzz->https://appleid.apple.com/account/manage/App-Specific Passwords created and used I just copy pasted every single item from the defined locations above. I would appreciate for an answer. Best Regards
2
0
38
14h
How disable ~/Applications/asr auto creation
It's quite annoying (maybe it's only my personal interests). Some apps or the macOS system always create ~/Applications/asr directory and create some txt files in it. asr20240708_1638030_0.txt {"type":"asr","wp_version":"","easr_version":"e792c1d2b4b5055e56fb902dfefdb483802041cc_Thu_Dec_30_17:18:43_2021_+0800","spil_version":"","wpe_version":"","vad_version":"9db42b766a4bc4e853bfa3fd2f846bf931d6c05f_Wed_Mar_24_15:56:16_2021_+0800","header_type":0} It there any way to disable this 'useful' feature?
0
0
30
15h
5.5" Display Images wont submit
Hello everyone! Any tips would be helpful. I am trying to submit my App for review in the app store, and when I try to subimit screenshots of my app to the App Store 5.5" Display, I get a dimension error. I even tried getting screenshots of all types of iPhones that fit those dimensions from my Simulator on XCode. These would be iPhone 8 Plus iPhone 7 Plus iPhone 6s Plus. When I take screenshots on the simulator move them to the site, they won't accept them. Any suggestions?
4
0
60
15h
Endpoint Security entitlement for internal distribution
My company is developing internal security software to deploy exclusively on corporate Mac endpoints. We are using the Endpoint Security framework, which requires the restricted com.apple.developer.endpoint-security.client entitlement. We were granted development access to this entitlement, but we have been denied distribution access. It's not practical to use ad-hoc provisioning for distributing the app internally to our users. Unfortunately the brief denial message did not provide any advice for a path forward. If my company signed up for the Apple Developer Enterprise Program (https://developer.apple.com/programs/enterprise/), is it possible to grant the Endpoint Security entitlement for internal enterprise distribution? Otherwise, we appear to be stuck and unable to use Endpoint Security for our internal applications.
0
0
50
15h
Is there any script that can detect Apple Submission to TestFlight errors early? like: ".framework contains disallowed nested bundles"
Some of the errors like ".framework contains disallowed nested bundles" we find out at later stage when uploading builds to TestFlight. It will be great if we can have similar script that apple uses or some custom script to verify it during the build time. So before I reinvent the wheel is there any script I can use at build time to detect this issue?
0
0
50
15h
Conntent Filter network extension is not working with Sequoia Intel macOS
Hi, I had a Content Filter network extension. It is successfully working until Sonoma. I try to install and activate same network extension on Sequoia beta Intel Mac. But even I haven't got any user consent to activate and allow it. I haven't found any entry in Network settings. Do we need to make any changes in Sequoia MacOs to make it work? Thank you.
2
0
47
15h
Drawing rectangles on Layer upon object detection
Hey, I am natively an ML Engineer so not really well versed in swift. I am currently trying to use a model of mine in a swift app. The model detects knives and has an input size of 640x640. i have set up AV capture and that works well I can just see the camera on my screen. I have also set up the coreML model and it also works and detects the objects. so what doesnt work is the way I draw boxes around the object. e.g. the objects box params are Raw model output: x=342.25, y=293.0, w=105.375, h=150.5 when Im in the middle of the screen. seems ok for me, I want to draw a box now with these params. But the CGRect object is really weird to me, firstly the x value is the y value in the box (i notice this because when I move the object up and down , the x val will change but not the y val). then if I just switch the values, the drawn box will move ok in the y direction but mirrored in the x direction. what things need to be considered/changed here, is it something about the layer setup? See my implementation here: func setupLayers() { previewLayer = AVCaptureVideoPreviewLayer(session: session) previewLayer.videoGravity = AVLayerVideoGravity.resizeAspectFill rootLayer = previewView.layer previewLayer.frame = rootLayer.bounds rootLayer.addSublayer(previewLayer) inferenceTimeBounds = CGRect(x: rootLayer.frame.midX-75, y: rootLayer.frame.maxY-70, width: 150, height: 17) inferenceTimeLayer = createRectLayer(inferenceTimeBounds, [1,1,1,1]) inferenceTimeLayer.cornerRadius = 7 rootLayer.addSublayer(inferenceTimeLayer) detectionLayer = CALayer() detectionLayer.frame = rootLayer.bounds detectionLayer.position = CGPoint(x: rootLayer.bounds.midX, y: rootLayer.bounds.midY) rootLayer.addSublayer(detectionLayer) }
0
0
33
16h
Open iOS Weather App
I am using WeatherKit to display relevant weather information to the User in my App. I also thought it would be helpful to show any time-sensitive WeatherAlert. I would like to direct the User directly into the system Weather app to get more details/information. weather://open ... works... Is this a faux-pas? Is there a approved/proper way of doing this? I know WeatherAlert.detailsURL exists but I figured it may be useful for the User to see all details related to weather right from the source.
0
0
45
16h
Get Video Thumbnail Image Asynchronously
public func getVideoThumbnailImage(url: URL) -> Image { let urlAsset = AVURLAsset(url: url, options: nil) let assetImageGenerator = AVAssetImageGenerator(asset: urlAsset) assetImageGenerator.appliesPreferredTrackTransform = true assetImageGenerator.apertureMode = .encodedPixels let cmTime = CMTime(seconds: 1, preferredTimescale: 60) var thumbnailCGImage: CGImage? var errorOccurred = false let semaphore = DispatchSemaphore(value: 0) assetImageGenerator.generateCGImageAsynchronously(for: cmTime) { generatedImage, timeGenerated, error in if error == nil { if let cgVideoImage = generatedImage { thumbnailCGImage = cgVideoImage } else { errorOccurred = true } } else { errorOccurred = true } semaphore.signal() return } _ = semaphore.wait(timeout: .now() + 30) if errorOccurred { return Image("ImageUnavailable") } if let thumbnailImage = thumbnailCGImage { let uiImage = UIImage(cgImage: thumbnailImage) return Image(uiImage: uiImage) } return Image("ImageUnavailable") } I am using Xcode 16 beta 2 for iOS 18 with SwiftUI. My code above works instantly and correctly; however, Xcode produces the purple warning: "Thread running at User-interactive quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class. Investigate ways to avoid priority inversions" How can I change the code to avoid the purple warning?
2
0
45
16h