440
questions
0
votes
0
answers
9
views
Mystery Bug Fix in Electron v26 and Mac App Store build
I have an Electron app that uses a native add-on to access the Photos library on macOS. This feature didn't work in the MAS (Mac App Store) build when the sandbox is enabled.
Here is what I observed:
...
0
votes
1
answer
28
views
Sandboxed macOS app can't access Photos library
I have an Electron app built for macOS, and it was distributed via 'Developer ID' for years, it worked well and I was able to access the photos in the system Photos library. Surely I already have the '...
1
vote
0
answers
40
views
Launch sandboxed Java app on Mac at login
I have a Java application which must launch at login. This currently works by writing a plist file to ~/Library/LaunchAgents. I want to bring this app into the Mac Appstore and therefore need to apply ...
1
vote
1
answer
261
views
How to access (read-only) files under users selected directory?
SDK:macOS 14.0
Xcode: 15.0
I searched for a lot of answers, but it didn't work for my application. I can't access the contents of the files under the folder.
First of all, I configured permissions in ...
0
votes
3
answers
203
views
How can I test whether I can read or write a directory?
I am writing an app which will be sandboxed when I finish with it. For now it’s not.
The app will copy files from one location to another. Because it’s not currently sandboxed, I can preset the ...
0
votes
0
answers
29
views
My MacOS app behaves differently when using TestFlight as opposed to running it with my development certificate
My sandboxed macOS app requires the user to grant permission under Privacy & Security / Accessibility in order to support extra functionality. If no permission is granted the app can still be used ...
0
votes
0
answers
230
views
When to use stopAccessingSecurityScopedResource in SwiftUI macOS app
My SwiftUI macOS app is successfully using security scoped URLs like so below.
// Start accessing the security-scoped resource
if restoredURL.startAccessingSecurityScopedResource(){
print("...
1
vote
0
answers
65
views
How to overcome entitlement restrictions in framework unit tests in Xcode?
I have a framework I’m building in Xcode (15.2; Swift 5.9).
I have a unit test target for the framework.
When I try to run the tests, any tests that try to access arbitrary directories or files (I ...
0
votes
0
answers
118
views
Allowing serial port access in sandboxed Swift MacOS app
I have an in Swift that uses the ORSSerialPort library to access a serial port (a USB device of our own design). I am now trying to distribute it, but in order to do that on the require the app to be ...
0
votes
0
answers
55
views
C library fopen fails
My macOS swift project incorporates a c library. This library has a function, which requires the path for a file as a string, then internally it opens a file at that path and does its stuff.
However ...
0
votes
0
answers
38
views
Setup Apple Pay in iOS 17 simulator [duplicate]
I'm trying to setup Apple Pay pay as shown in their documentation for sandbox testing. I've created a testing user, and setup its country as US. In the simulator I've setup the region as US as well. ...
0
votes
1
answer
230
views
How to open file QuickLookPreview
I have code below to show file (PDF) preview via .quickLookPreview modifier
Button("Preview...") {
previewURL = documentURL!
}
.disabled(documentURL == nil)
.quickLookPreview($previewURL)
...
1
vote
1
answer
556
views
How to add sandbox account in iOS 16.6?
I have added in-app subscription in App Store Connect and also sandbox user but I am unable to find a setting to add the sandbox account in my iPhone 12 Pro Max (iOS 16.6).
I have added some time ...
1
vote
0
answers
146
views
What changes need to be made for the new local receipt validation requirement using SHA-256?
I have an old app that was built using Objective-C and uses this library for local receipt validation for IAPs.
Recently Apple announced that local receipt validation code must change from SHA1 to ...
1
vote
0
answers
138
views
Mac OS App Sandbox - Can't Write File Without NSOpenPanel or NSSavePanel
I'm working on a Mac OS app and just ran into an interesting situation. As this is a file based app, users can drag and drop files and folders onto the app and they get added to an array and displayed ...
1
vote
0
answers
222
views
Swift InputStream.hasBytesAvailable() returns false when reading a file on the desktop in swift how do I fix this?
I'm creating a Swift finder sync extension that needs to read the file data into an array to send to an api but it won't read it into the array because InputStream.hasBytesAvailable() returns false so ...
2
votes
0
answers
33
views
Xamarin.Mac NSSavePanel() does not show up and returns "-2" when passing the file access security policy in sandbox in Xcode 14.2
This problem did not happen before macOS Ventura(Xcode 14.2), but I think the process of handling the security policy to Sandbox file access has changed significantly since this current version.
I ...
0
votes
0
answers
102
views
Write to installation folder with Java app sandboxed on mac
I made an OS-independent Java application with installers for each OS (I used install4j), and I want to put a Mac installer on the app store. However, that means the app has to be sandboxed and there ...
1
vote
1
answer
790
views
Trouble Testing IAP with Sandbox
I cannot sign in with Sandbox tester ID (the fields are not even displayed in Settings-App Store).
I am running Xcode 14.2 and attempting to test on a developer-signed physical device (iOS 16.1.2). ...
0
votes
2
answers
453
views
OpenAISwift package works for ios not for Mac
I have been following instructions to build a simple SwiftUI GPT-3 client using the OpenAISwift client library. The app works as expected on iOS but when I try to run a macos version I am getting ...
3
votes
2
answers
629
views
How to save security scoped URL for later use macOS
I've made a Finder extension to add a menu to Finder's Context menu for any file. I'd like to access this file when the user selects this custom menu, obviously this file they select could be anywhere ...
1
vote
0
answers
758
views
Use sandbox account as regular account(Apple). How to deal with itunes account creation not allowed app store error?
I created Apple Id account and initially used for testing purchases as a sandbox account. For now, I want this account to use as a regular account. So, I deleted it from the sandbox users list, logged ...
0
votes
1
answer
1k
views
Flutter in_app_purchase iOS Sandbox App Store: cancelled but not expired subscriptions
When I used Sandbox to test Flutter in_app_purchase in iOS, if I cancel a subscription in the Sandbox app store, it shows the subscription is already cancelled (but as the old subscription's ...
1
vote
1
answer
1k
views
Apple AppStore Sandbox renewable subscription purchase not succeeding
The issue is occurring in a setup where target Xcode scheme StoreKit configuration is set to None and on standalone ipa builds. Hence real remote AppStore sandbox is used.
Upon subscription attempt ...
1
vote
1
answer
127
views
Unable to create outbound unix domain socket in Safari Web Extension Native App
I am creating a Safari Web Extension to add some security features to Safari browser. Web Extension has 2 parts, 1st - script code, which loads in browser and 2nd - a separate application/process ...
1
vote
0
answers
123
views
How to enable AppleScript between Parent and Child applications within sandbox for Mac App Store?
I have a parent app that contains a child app in the bundle. The child app uses applescript to trigger some events in the parent app.
Now that I'm preparing for App Store I have sandboxed the apps and ...
1
vote
2
answers
1k
views
macOS sandboxed app, cannot copy file inside desktop folder to temporary directory
I have a native macOS app, Messer, which allows to convert/resize/pad image files. One feature I built into it is auto-converting files in a specific folder.
This feature works well on most folders, ...
2
votes
0
answers
400
views
iOS Provisioning profile doesn't include sandbox entitlements
I'm getting the following error while uploading the iOS build from Xcode:
Profile doesn't include the com.apple.security.app-sandbox and com.apple.security.files.user-selected.read-write entitlements
...
1
vote
0
answers
552
views
Electron app cannot open any web page when sandboxed
I have an application that consists of two parts: Python (the main app, which works as a server) and Electron ("helper" app, which works as a UI).
I plan to submit it to the App Store, so it'...
1
vote
0
answers
81
views
macOS app no longer can compose e-mail via AppleScript if sandboxed
I have a macOS app with hardened runtime (with enabled "AppleEvents") that uses AppleScript to create a preconfigured email addressed to us. Works like a charm.
Since we want to distribute ...
2
votes
2
answers
257
views
Read files from Pasteboard file-url inside macOS sandbox
I would like to show a preview of the file contained in the pasteboard inside my sandboxed app. I'm able to do this using the QuickLookThumbnailing package.
Unfortunately, this requires a read access ...
1
vote
1
answer
2k
views
How to get permission to access all files on MacOS
I developed an app for MacOS, it allows users to manage all files of his computer.
I found the entitlement key:
com.apple.security.files.all
https://developer.apple.com/documentation/bundleresources/...
3
votes
1
answer
439
views
Is it possible for a sandboxed Mac app to write to the global defaults domain?
Is there any way to allow a sandboxed Mac app to read and write keys to the global user defaults domain (NSGlobalDomain/.globalDomain)? Right now, the writes are failing and this error is being logged ...
1
vote
1
answer
2k
views
Ask for the Documents permission in a sandboxed app
I am writing a Mac app in SwiftUI and would like to display a live-updated list of documents and folders with the ability to edit the files.
First, users selects any folder with Open File Dialog and ...
4
votes
1
answer
669
views
How to run AppleScript from C++ in macOS sandbox environment without entitlement violations
I am trying to use AppleScript to control the Apple Photos app from within a QT C++ app that must run in the sandbox environment required for the macOS App Store.
I have tried to run the AppleScript ...
0
votes
1
answer
180
views
electronJS / Detect if foreign app is running (MacOS) (Sandbox) (MAS)
Is it possible to detect in electronJS if are specific Apps are running on MacOS?
I want to check, if the Mail.app is open and its important, that the code works in Mac Apple Store (MAS) in Sandbox ...
1
vote
0
answers
140
views
Retrieve permission for a file from the command line
I am trying to write a command-line tool where I would like to access certain files that the user provides. For example, I want this to be possible:
$ readOrWriteTo /some/path/to/some/file
When in ...
1
vote
1
answer
512
views
Unable to access desktop file from a macOS app
I am not sure what I am doing wrong here. I have a simple snippet of code :
NSError *error = nil;
NSString *string = [NSString stringWithContentsOfFile:@"/Users/myuser/Desktop/test.csv&...
2
votes
1
answer
377
views
Internal sandbox error in a document-based app
I have a sandboxed document-based (NSDocument) app. When saving files, I get weird sandboxing errors:
[scoped] handle 0: sandbox_extension_release error [22: Invalid argument]
[scoped] <...
1
vote
0
answers
203
views
How can I disable automatic creation of sandbox directories without disabling sandboxing in a OS X app?
Sandboxing prevents the app from making unwanted changes to the system or files, so as such, only sandboxed apps may be published to App Store. So on launch, a sandbox container directory is created ...
0
votes
0
answers
55
views
SwiftUI macOS Sandboxed application active read the .ssh/config file
I have Sandboxed application active I need to read the following .ssh/config file.
But I am having the following error:
Ooops! Something went wrong: Error Domain=NSCocoaErrorDomain Code=260
"The ...
1
vote
1
answer
516
views
How to read file line by line with App Sandbox enabled?
I have to read a file line by line, so I made sure I could select a file and then call a function to read it by passing the path.
But I get the following error:
An error took place: Error Domain=...
0
votes
1
answer
143
views
Xamarin.Mac Using security-scoped bookmarks
Microsoft's official documentation says:
https://learn.microsoft.com/en-us/xamarin/mac/app-fundamentals/sandboxing#using-security-scoped-bookmarks
to try to access persistent outside of SandBox, but ...
2
votes
0
answers
770
views
JNA Library is not working sandbox environment macOS
I developed and Java based application to fetch system info. I bundled the Java application into an app using AppBundler. Just double clicking the app works fine in macOS. Now to upload the app in the ...
0
votes
1
answer
513
views
UIDocumentPickerViewController configuration for Mac Catalyst
When using UIDocumentPickerViewController with Mac Catalyst, are additional capabilities, permissions or sandbox configuration required? Have I missed a caveat?
Running the following code on macOS (11....
0
votes
1
answer
208
views
Xamarin.Mac cannot write files when Sandbox is enabled
I'm making a file encryption app, but when I submit it to the App Store, if I don't enable Sandbox, it gets rejected when I upload it with Transporter.app.
So, I added Sandbox to Entitlements.plist as ...
0
votes
1
answer
1k
views
MacOS - Retrieving Sandbox App's Container folder in Swift
From what I have read, this snippet:
FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask) is supposed to return the Application Support directory in the app's container ...
0
votes
0
answers
127
views
When Apple test my macOS app they don't get permission to open a local Webbserver
I have created a macOS app with Electron.
The app runs without any problem if I build it and run it locally.
But when Apple tries to run they encounter a problem that gives them this error.
[2021-06-...
7
votes
1
answer
1k
views
Inter-App Communication for sandboxed swift app on macOS
I'm building a sandboxed macOS app with Swift, which contains a child app inside.
What I want to implement is:
Parent can launch multiple child apps
Parent send different content to each child app to ...
1
vote
0
answers
116
views
WebGL render blank screen in MacOS sandbox
I have an app that runs WebGL to render video for Mac App (Electron). It works fine when running on local build. However it renders blank screen on MacOS app store bulid in Sandbox mode. Checked the ...