Post

Replies

Boosts

Views

Activity

Mac Catalyst app won't launch in Xcode
I'm building an app for deployment on iPhone, iPad and Mac Catalyst. I am using Automatic Code Signing. Project build without a single warning of any kind... Debugging and running the app on both iPhone and iPad is working fine both in the simulators as well as on various test devices. I have now turned to debugging on my Mac (M1Pro-MBP). I have run Clean many times....When I set the run destination to My Mac Catalyst and run I immediately see a dialog stating: "The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error." There is button to reveal details. Those details are shown below. At the moment I am under the impression that this must be a relatively straightforward configuration issue which I have overlooked.... The app does contain an action and if I build and run only the action with Mac Catalyst as the destination it runs fine.. I only hit the error when I try to run the container app with embedded action with my Mac as the run destination.... Can anyone shed any light on this matter? All thoughts appreciated! Steve Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. User Info: { DVTErrorCreationDateKey = "2023-07-19 14:36:14 +0000"; DVTRadarComponentKey = 968756; IDERunOperationFailingWorker = IDELaunchServicesLauncher; } -- The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed. -- Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153 -- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "MacBookPro18,3"; "device_osBuild" = "13.4.1 (22F82)"; "device_platform" = "com.apple.platform.macosx"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 172; "operation_errorCode" = 20; "operation_errorDomain" = IDELaunchErrorDomain; "operation_errorWorker" = IDELaunchServicesLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.macosx"; "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" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 8192; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "macosx13.3"; "sdk_osVersion" = "13.3"; "sdk_variant" = iosmac; } -- System Information macOS Version 13.4.1 (c) (Build 22F770820d) Xcode 14.3.1 (21815) (Build 14E300c) Timestamp: 2023-07-19T08:36:14-06:00
4
0
1.9k
Jul ’23
Strange behavior and log entries for Mac Catalyst Action
I have a text based action for iPhone and Mac Catalyst I am developing in Xcode 14.3.1 on macOS 13.4.1. I have the container app, an action and an AppGroup defined. I have confirmed that I can read the necessary shared defaults when the action launches. At this point the UI for the action is a simple textview in which I hope to display a modified version of the text passed to the action in the NSExtensionItems. I am not using a simulator. I am running the action directly using Xcode. What is happening is that the ActionViewController viewDidLoad runs but no visible window opens. In the console I see this as the action launches: 2023-07-05 18:27:23.692277-0700 XYZ[4634:279295] [ViewBridge] ViewBridge attempted to look up a hosted window with identifier 8E816BD5-67D3-402D-ADEB-AC59EDFA1F3B, but it was never registered. 2023-07-05 18:27:23.692408-0700 XYZ[4634:279295] [WindowHosting] UIScene property of UINSSceneViewController was accessed before it was set. .... The last line above is repeated 12 times.... Any helpful ideas would be deeply appreciated! Steve
2
1
1.4k
Jan ’25
Mac App Store Sandbox Test -> App is Damaged..
macOS 10.15.6 - Xcode 11.7 This app has been in App Store for over a year. The code in question here has been working and tested. It no longer functions as before... Attempting to test a brand new install using a sandbox account on a Mac. Receipt validation is run in main.m with: ...             return NSApplicationMain(argc, (const char **)argv);         } } @catch (NSException *e) {         exit(173);     } Delete the appropriate folder in ~/../Containers Clean - Build - Run When Run the exception is trapped and the prompt for sandbox credentials is shown. Upon completion of the credentials I receive the 'app is damaged and cannot be opened...' I have logged out, I have rebooted, I have tried with a different sandbox account - all to no avail. Any thoughts would be deeply appreciated! Thanks for your time! Steve
11
0
3.2k
May ’22
In-App Purchase Question
Folks; Running on a Developer Transition Kit - (A12Z) macOS 11.2  - Xcode 12.3 I have built a free to download Mac App which has a variety of in-app purchases; some are auto-renewing subscriptions, some are non-consumable. (all of these in-app purchases have been approved by Apple) I am experiencing difficulty testing in the sandbox. I have logged out of my user account in the Mac App Store. I have removed the existing Container folder from user’s Library folder. I have created a brand new testing account in App Store Connect. I have done a clean and build in Xcode. When I then run the app I am prompted to ‘Sign in to use this application on this computer’. (“AppName” was purchased using the App Store on another computer….) I enter the new AppleID I just set up in App Store Connect and then I am prompted for a password. After I supply the password the app crashes: Application Specific Information: dyld: launch, loading dependent libraries Dyld Error Message:   dyld: Using shared cache: 775BB65E-F213-3A39-ACF0-7343BCDE1E6C Library not loaded: @executable_path/../Frameworks/……..   Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/AppName-hcuqdwzeykfjvqfdldsnjiocbxtj/Build/Products/Debug/AppName.app/Contents/MacOS/AppName   Reason: image not found If I immediately re-run the application at this point I get a successful launch.... As part of my app’s normal launch I process the receipt. During this successful re-launch the receipt is found and is correctly processed. It correctly determines that no in-app purchases have yet been made. In the app code I successfully perform an SKProductRequest (I receive the correct information back). Based on this SKProductRequest success I then attempt to make an in-app purchase which uses the product information from the SKProductRequest I am prompted to ‘Sign in to the App Store’ (If you have an Apple ID, sign in with it here.  [Environment: Sandbox])  Buttons: Cancel  & Buy - there is a textfield to enter an Apple ID (the pre-filled in Apple ID is NOT the Apple ID I submitted during the initial launch…. When I click the ‘Buy’ I am prompted for the password.   When I supply the password I then prompted with a different dialog window ‘Sign In to the App Store’ (If you have an Apple ID, sign in with it here.  [Environment: Sandbox])  Buttons: Cancel  & Buy - no textfield to enter an Apple ID If I click the ‘Buy’ button, the dialog window disappears for a second or two and then re-appears After the 4th such 'Buy' click I see an error logged by SKPaymentQueue: <SKPaymentQueue: 0x600001a13b80>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception"  UserInfo={NSUnderlyingError=0x600001612700 {Error Domain=AMSErrorDomain Code=306 "Reached max retry count"  UserInfo={NSLocalizedDescription=Reached max retry count, NSLocalizedFailureReason=Task reached max retry count (3 / 3);}},  NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception} Can anyone provide some clarity as to what I am doing wrong? Any thoughts appreciated!! Steve
1
1
1.4k
Sep ’22
a problem when subclassing CNContact using swift
Hello There; Using macOS 12.5 & Xcode 13.4 I am trying to subclass CNContact and bumping into an issue that I do not understand! class MyContact: CNContact { var newVariable :String = "" ... } I have loaded contactArray:[CNContact] now as I iterate over this array I would like to typecast the instance of CNContact to an instance of MyContact. for thisContact in contactArray { if let myK:MyContact = thisContact as? MyContact { //do something } } program flow simply never proceeds into the if let statement... if I try to force this issue: let myK:MyContact = thisContact as! MyContact I get the error: Could not cast value of type 'CNContact' (0x2057a35b8) to 'XYZ.MyContact' (0x102484490). Please help me accomplish my goal - what am I not understanding here? All help appreciated! Steve
1
1
905
Aug ’22
macOS & NSUserDefaults
Folks;When I run an archived copy of my mac application on a test dev machine (not my main dev box) I see errors in the Console log that trouble me...1) I see this error immediately before any of my code executes!error 16:14:25.839821 -0700 [MYAPPNAME] Couldn't read values in CFPrefsPlistSource&lt;0x6000000ed280&gt; (Domain: [MYAPPBUNDLEID], User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access, detaching from cfprefsdI open my standard defaults (a .plist) in -awakeFromNib like so: NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; [ud registerDefaults:[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"WhodoMacOSDefaults" ofType:@"plist"]]]; [ud setObject:launch_Date forKey:kKudosLaunchDate];This activity throws 2 of these errors in the console:error 16:14:26.429881 -0700 [MYAPPNAME] attempt to set &lt;private&gt; for key in &lt;private&gt; in non-persistent preferences domain CFPrefsPlistSource&lt;0x6000000ed280&gt; (Domain: [MYAPPBUNDLEID], User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes)Then subsequently every 'set' for NSUserDefaults throw another of these into the console log...Nothing fancy going on in this app: no app groups, no iCloud, no hardened runtime...I don't see a 'user-preference-read' option in the standard entitlement document. Am I missing some basic conguration setting?Is this all just a by-product of running a 'development' archive?Any thoughts appreciated!Steve
Topic: UI Frameworks SubTopic: AppKit Tags:
6
0
9.3k
Mar ’22