Dive into the vast array of tools and services available to developers.

Post

Replies

Boosts

Views

Activity

Previewing your app’s interface in Xcode
// // ContentView.swift // HardApp // // Created by Besleaga Alexandru Marian on 14.06.2024. // import SwiftUI struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundColor(.accentColor) Text("Hello, world!") } .padding() } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } // A SwiftUI preview. #Preview { Use of unknown directive '#Preview' // The view to preview. } I'm trying to learn Xcode and got stuck on these error that I receive when trying to apply the macro #Preview, how can declare the directive so I can use it in my own code for the preview it offers ? Kind Regards
1
0
459
Jun ’24
Using MacBook Pro to Program in R
I am trying to learn how to program in R and would like to download a version of the program so that I can use it after my class is over and I lose access to my lab version of R. I went to https://cran.r-project.org/mirrors.html and selected a link in my country and downloaded the arm64.pkg for the most current version, but when I click the installer it tells me that the version cannot be installed on 'this computer'. I have Sonoma 14.5, so I believe it should be able to download. I have the RStudio downloaded as well so I have something to view once I can get the R program up and running. Does anyone know how to get the R program installed on a mac running on Sonoma 14.5?
1
0
382
Jun ’24
Continuity for Development Use
Continuity is a very useful feature across Apple devices. Recently, I’d like to integrate continuity into my app by invoking sketch from the app. I couldn’t find an API for this, nor can I can find the program invoked when I right click on finder and try to add a drawing from my iPad. My two questions are: Is the feature officially supported for development use? In general, is it possible to trace what programs are called when I invoke a feature through the MacOS GUI?
0
0
385
Jun ’24
WidgetKit Simulator is missing in first Sequoia beta?
I updated to Sequoia beta 1 and seem to have lost the macOS widgetkit simulator. is this expected? My other mac running sonoma still has the simulator located at: /System/Library/CoreServices/WidgetKit Simulator.app trying to launch my widgets from Xcode 16 beta on my mac running sequoia results in this error: Couldn't find LSBundleProxy for provided bundle identifier: com.apple.widgetkit.simulator Domain: com.apple.dt.deviceservices.error Code: 3 User Info: { DVTErrorCreationDateKey = "2024-06-18 07:51:54 +0000"; IDERunOperationFailingWorker = IDELaunchServicesLauncher; } -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00008112-0006250411FB401E"; "device_model" = "Mac14,2"; "device_osBuild" = "15.0 (24A5264n)"; "device_platform" = "com.apple.platform.macosx"; "device_thinningType" = "Mac14,2"; "dvt_coredevice_version" = "397.3.5.1"; "dvt_coresimulator_version" = 980; "dvt_mobiledevice_version" = "1757.0.0.101.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 1; "operation_errorCode" = 3; "operation_errorDomain" = "com.apple.dt.deviceservices.error"; "operation_errorWorker" = IDELaunchServicesLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 1; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 1; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.macosx"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 2; "param_runnable_appExtensionHostRunMode" = 1; "param_runnable_productType" = "com.apple.product-type.app-extension"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "macosx15.0"; "sdk_osVersion" = "15.0"; "sdk_variant" = macos; } -- System Information macOS Version 15.0 (Build 24A5264n) Xcode 16.0 (23037.4) (Build 16A5171c) Timestamp: 2024-06-18T19:51:54+12:00
1
0
563
Jun ’24
Unable to Install App from TestFlight After Adding Facebook SDK
After I integrated the Facebook SDK into my app, I encountered an issue where I couldn't install the app after building it. When trying to install the app through TestFlight, I receive the following error message: "No se pudo instalar Plus Argentina. No se pudo instalar el perfil. Reintenta." I've attached a screenshot for reference: Has anyone experienced a similar issue or does anyone have suggestions on how to resolve this?
1
0
576
Jun ’24
CURL command is not working in MAC OS 14.5
CURL command with headers stopped working on the latest mac version. command used to work fine in earlier versions of the Mac OS. Below command returns error - unkown Header curl --request GET ‘URL’ --Header ‘Accept-Language:en’ --Header ‘Content-Type: application/json’ Note: If --Header is given in lower case '--header' is seems to be working in the latest version. Does anyone face this issue and any fix would be really appreciated.
3
0
800
Jun ’24
Apple Software Lookup has an invalid certificate
Hello all, this may not be the right place to get answers for this but not sure where else to put it. Currently we are using the Apple Software lookup service to fetch available iOS updates that can be used to push updates through Declarative Management. This works fine however we have are now running into an issue https://gdmf.apple.com/v2/pmv, does not have a valid SSL certificate, which during the prototyping phase was fine as we turned off SSL cert validation to get the feature to work. Now that we are moving to make this a formal development we need to turn this on, but obviously with the URL having an invalid cert this causes all requests to throw invalid certificate errors (specifically that the root cert isn't trusted, this can also be seen when navigating to the url in a browser. Specifically it returns NET::ERR_CERT_AUTHORITY_INVALID) Is there any chance that the SSL cert for this API can be fixed?
1
0
628
Jun ’24
Sticker Pack App Not Working in Sim
Hello, Im trying to create a sticker pack app. I have all the png in correct sizes however when running a simulation it does not show up. objc[19306]: Class CKDetailsTUConversationCell is implemented in both /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ChatKit.framework/ChatKit (0x7ff84276a840) and /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/Applications/MobileSMS.app/MobileSMS (0x103257b98). One of the two will be used. Which one is undefined. mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] setAllowableTypes_block_invoke:1242: *** CGImageSourceSetAllowableTypes - ignoring unknown: 'public.avci' Received Connection Invalid mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] Synchronous remote object got an error attempting to post setup, reason: Couldn’t communicate with a helper application. [com.apple.MobileSMS:A5499A70-2351-4FAD-809D-DFD28B804635] Error when getting current app configuration for action identifier ConversationListFocusFilterAction, error='Error Domain=DNDErrorDomain Code=1007 "No current action is available. Supply the caller with the default." UserInfo={NSLocalizedDescription=No current action is available. Supply the caller with the default.}' Calling -viewWillAppear: directly on a view controller is not supported, and may result in out-of-order callbacks and other inconsistent behavior. Use the -beginAppearanceTransition:animated: and -endAppearanceTransition APIs on UIViewController to manually drive appearance callbacks instead. Make a symbolic breakpoint at UIViewControllerAlertForAppearanceCallbackMisuse to catch this in the debugger. View controller: <CKSearchViewController: 0x10886a400> XPC error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.coreduetd.knowledge was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.coreduetd.knowledge was invalidated: failed at lookup with error 3 - No such process.} Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site. Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site. Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site. Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site. Duet query failed: Couldn’t communicate with a helper application. Synchronous remote object got an error attempting to post setup, reason: Couldn’t communicate with a helper application. UIColor created with component values far outside the expected range. Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once. Error registering for delegate callbacks. Error: Error Domain=SKStatusSubscriptionErrorDomain Code=-4000 "System iCloud account does not exist or is not statuskit capable" UserInfo={NSDebugDescription=System iCloud account does not exist or is not statuskit capable} Error retrieving subscription for handle. Error: Error Domain=SKStatusSubscriptionErrorDomain Code=-4000 "System iCloud account does not exist or is not statuskit capable" UserInfo={NSDebugDescription=System iCloud account does not exist or is not statuskit capable} handle: <SKHandle: 0x600000005df0; handleString = "+18885551212"> Error fetching subscription service for handle: "+18885551212" Error: Error Domain=SKStatusSubscriptionErrorDomain Code=-4000 "System iCloud account does not exist or is not statuskit capable" UserInfo={NSDebugDescription=System iCloud account does not exist or is not statuskit capable} Checked bag access permission -- allowed? YES {hasMachAccess: YES, hasEntitlements: YES} failed to create XPC connection Unknown invokeXPCSynchronousCallWithBlock error: Error Domain=TransparencyErrorXPC Code=-108 "failed to create XPC connection" UserInfo={NSLocalizedDescription=failed to create XPC connection} API MISUSE: Resuming an NSURLSessionTask with nil URL. Task .<1> finished with error [-1002] Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSUnderlyingError=0x600000c93720 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 "(null)"}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask .<1>" ), NSLocalizedDescription=unsupported URL} Requested keyboard snapshot but UIKeyboard.usesInputSystemUI returned NO. Failed to get pid info for pid 0: Operation not permitted Remote app card controller com.apple.messages.MSMessageExtensionBalloonPlugin:0000000000:com.apple.Stickers.UserGenerated.MessagesExtension timed out during delayed presentation Failed to get pid info for pid 0: Operation not permitted unhandled process MobileSMS
1
0
581
Jun ’24
Issue with State Persistence in Swift Testing @Suite
Hello everyone, I’m encountering an issue with my Swift Testing suite where state changes made in one test method do not persist to another. I am using Swift’s @Suite and @Test annotations to group and serialize my tests, but it seems that the state is not being carried over between the tests. The second function fails with: Expectation failed: (string → nil) != nil Here is my example code: import Testing @Suite(.serialized) struct createCheckTests { var value = 25 var string: String? = nil @Test("Create string") mutating func stringCreation() { #expect(value > 0) string = "Value is: \(value)" } @Test("Check string") func stringCheck() { #expect(string != nil, "The string is nil") print("\(String(describing: string))") } } What is the correct way to approach such a scenario where I want to test two functions that are related, one to generate some value and one to check that generated value against it initial value using Suites to group and isolate them from other tests? Thanks.
2
0
736
Jun ’24
Request for clarification of Developer mode
Hi Guys, I want to support my client for enable the developer mode, But they not accept to connect with any other devices(Mac Xcode) to enable developer mode. They are nearly 10 people to enable developer mode. But I think without mac we can't enable developer mode in some of devices. So I need a clarification with IOS versions. That's only we are excepting to list out which IOS versions don't have developer mode option default. Please list out that IOS versions Like below: default developer mode available IOS 17.4.1 default developer mode not available IOS 17.5.1
2
0
560
Jun ’24
Switch between distributing code as source / as a binary
I'm getting confused reading conflicting information about Swift Packages (for example, many sources say its for distributing source code only, but Apple's documentation says a binary framework can be included in them). What I would like to be able to do is to distribute a project as a binary to external customers (so they cannot see the source code) but distribute it as source code for internal consumption (so when developing a test app that uses the project, source code can be stepped through in the debugger etc.) Is the feasible/easy? Could a package manifest be created that can easily be flipped between creating a package containing source only, and a binary only. Or would it be better to have two separate manifests?
1
0
436
Jun ’24
MBP with MacOS 15 dev beta apache
Hello I'm a computer engineering student who needs to build some apps from time to time, and when I do I need to use services like xampp which runs apache, and after I updated the OS to dev beta, the apache were never able to start again, and here is the error code from log, I'm just posting here in case apple fixed it,I see that the 15 beta 2 that rolled out today has no mention of it, so hope to see it fixed, so I can local host again in my mac with out reinstalling my OS or rollback. cheers
1
0
306
Jun ’24
API naming consistency
Why it is so difficult for Apple dev team to maintain consistent naming of their APIs? The function is called fatalError(_:file:line:) The corresponding Loogger.Level is called critical. Why not fatal? Is Ali Ozer still working at Apple to kick the a*s of new developers? I do not assume that either the function or the log level will be renamed. But I hope someone will take care of details (in the future). P.S. I am developing on NeXTStep since 1990. There were times when APIs were so consistent, one could guess them almost 100% correctly. It will benefit the community if this would be true today as well.
2
0
349
Jun ’24
Any emulator for Mac Silicon?
截至目前,有一些为苹果芯片的 Mac 设计的模拟器,比如 Parallels Desktop 和 VMware Fusion。这些模拟器支持在苹果芯片上的虚拟化,并提供了对 ARM 架构的一些支持。然而,并非所有移动应用程序或游戏都已经适配到苹果芯片上,因此是否有针对移动游戏完全适配到苹果芯片的模拟器?
0
0
450
Jun ’24