I'm maintaining a very old Obj-c app using the very useful FSCopyObjectAsync
and FSMoveObjectAsync APIs to make async copy with progress info
(including the throughput)
Now I must drop compatibility with 10.9 and I
would to replace these APIs (consider they are no longer available with
Swift), but Apple deprecated them without a replacement, any hints?
I found the C API copyfile, it doesn't return the throughput and the fixed read buffer size (65k) is ridicolous because copy is very slow compared to FSCopyObjectAsync.
I would avoid to fork copyfile...
Do you know some other more Apple-like API similar to FSCopyObjectAsync?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
We have a valid DUNS number for our organization, now a subsidiary developed an app and they want to publish it using their apple developer account (unrelated to ours) but they can't because we own the main DUNS.
We must share the DUNS with them? Is it enough? Is it the correct behaviour?
The subsidiary must have access to our account to publish the app? (We don't want)
I need to read the tags assigned to a file, if I use the code shown below on cli tools projects everything works fine, the identical code executed from sandboxed apps returns only the first element
NSDictionary<NSURLResourceKey, id>* dict = [[NSURL fileURLWithPath:@"absolute_file_path"] resourceValuesForKeys:@[NSURLTagNamesKey] error:nil];
NSLog(@"Result %@", dict);
The same with swift, running the code from playground the result is correct, running it from swift sandboxed app only the first element is returned
Is this a bug?
My sandboxed app contains a command line tool (CLT) also sandboxed.
The command line tool sends an Apple Event to the app but this works only if the CLT entitlements contains
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>com.my-app-bundle-id</string>
</array>
The CLT and bundle ids are identical, the team id is identical, too
I can't find where the error is hidden, may you help me?
The app is distributed via the Mac App Store
I show below the plist and entitlements
App entitlement
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>$(TeamIdentifierPrefix)com.appgroup.myapp</string>
</array>
<key>com.apple.security.files.bookmarks.app-scope</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
App plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>myapp</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>myext</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>my</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/octet-stream</string>
</array>
<key>CFBundleTypeName</key>
<string>myapp</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSTypeIsPackage</key>
<false/>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>NSDocumentClass</key>
<string>VDDocument</string>
<key>NSPersistentStoreTypeKey</key>
<string>Binary</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleHelpBookFolder</key>
<string>myappHelp</string>
<key>CFBundleHelpBookName</key>
<string>com.myapp.help</string>
<key>CFBundleIconFile</key>
<string>my.icns</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.0</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>2010, myapp.com</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>
</plist>
Command line tool plist
<?xml version="1.0" encoding="UTF-8"?>
		<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
		<plist version="1.0">
				<dict>
						<key>CFBundleDevelopmentRegion</key>
						<string>English</string>
						<key>CFBundleIdentifier</key>
						<string>com.myapp.myclt</string>
						<key>CFBundleInfoDictionaryVersion</key>
						<string>6.0</string>
						<key>CFBundleName</key>
						<string>codesign</string>
						<key>CFBundleVersion</key>
						<string>1.2</string>
						<key>NSAppleEventsUsageDescription</key>
						<string>Please give my command line tool access to my app</string>
				</dict>
		</plist>
Command line tool entitlement
		<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
		<key>com.apple.security.app-sandbox</key>
		<true/>
		<key>com.apple.security.application-groups</key>
		<array>
				<string>$(TeamIdentifierPrefix)com.appgroup.myapp</string>
		</array>
		<key>com.apple.security.automation.apple-events</key>
		<true/>
		<key>com.apple.security.temporary-exception.apple-events</key>
		<array>
				<string>com.myapp</string>
		</array>
</dict>
</plist>