I would like to execute a certain process only when an iPhone screen sharer is using the App switcher during screen sharing.
Is there a way to get the status of the App switcher during screen sharing with ReplayKit?
And if so, what iOS API or method should I use?
This code can be compiled as command line tool for macOS.
import Foundation
@main
struct App {
static var counter = 0
static func main() async throws {
print("Thread: \(Thread.current)")
let task1 = Task { @MainActor () -> Void in
print("Task1 before await Task.yield(): \(Thread.current)")
await Task.yield()
print("Task1 before await increaseCounter(): \(Thread.current)")
await increaseCounter()
print("Task1 after await increaseCounter(): \(Thread.current)")
}
let task2 = Task { @MainActor () -> Void in
print("Task2 before await Task.yield(): \(Thread.current)")
await Task.yield()
print("Task2 before await decreaseCounter(): \(Thread.current)")
await decreaseCounter()
print("Task2 after await decreaseCounter(): \(Thread.current)")
}
_ = await (task1.value, task2.value)
print("Final counter value: \(counter)")
}
static func increaseCounter() async {
for i in 0..<999 {
counter += 1
print("up step \(i), counter: \(counter), thread: \(Thread.current)")
await Task.yield()
}
}
static func decreaseCounter() async {
for i in 0..<999 {
counter -= 1
print("down step \(i), counter: \(counter), thread: \(Thread.current)")
await Task.yield()
}
}
}
My understanding is:
static func main() async throws inherits MainActor async context, and should always run on the main thread (and it really seems that it does so)
Task is initialized by the initializer, so it inherits the actor async context, so I would expect that will run on the main thread. Correct?
Moreover, the closure for Task is annotated by @MainActor, so I would even more expect it will run on the main thread.
I would expect that static func main() async throws inherits MainActor async context and will prevent data races, so the final counter value will always be zero. But it is not.
Both task1 and task2 really start running on the main thread, however the async functions increaseCounter() and decreaseCounter() run on other threads than the main thread, so the Task does not prevent data races, while I would expect it.
When I annotate increaseCounter() and decreaseCounter() by @MainActor then it works correctly, but this is what I do not want to do, I would expect that Task will do that.
Can anyone explain, why this works as it does, please?
We have been trying to understand why the Mac OS Terminal, when invoked with open, does not pass along the environment variables.
How to reproduce?
Create a new file /tmp/example.sh
#!/bin/sh
echo "SAMPLE_ENV='$SAMPLE_ENV'"
SAMPLE_ENV=123 open -a Terminal /tmp/example.command
Only prints: SAMPLE_ENV=''
Even when using
SAMPLE_ENV=123 open --env SAMPLE_ENV=1234 -a Terminal /tmp/example.sh
it will only print SAMPLE_ENV=''
We know for sure that this was working several years ago. Why was the feature removed or is this a bug?
Any workaround?
Is there a workaround on how to launch a script in a new Terminal Window while passing the environment variables correctly?
Related
https://stackoverflow.com/questions/69768133/react-native-envs-are-undefined-in-metro-bundlers-config-file-when-bundling/73036234
I am seeking for this User Interface(UI) effect --> "Spotlight" a specific IBOutlet (Please see attached Image2.png below) for a week!
Explain the "Spotlight" effect : I wish to create is effect similar to NSAlert or beginSheet effect which user cannot click or access the entire window/view until user trigger a button and it back to normal. The whole window/view will becoming darken or gray EXCEPT a specific button I allow my user to interact with.
Yet, I found that there is no any trick to create such effect neither in XIB file nor objective-c code.
This is urgent for me. Eagerly waiting for your reply. Much Appreciated.
(Image 1.png)
(Image 2.png)
I am aiming to achieve a callback when an animation of offset change is finished. So, I found a workaround online which uses the AnimatableModifier to check when the animatableData equals the target value.
But it turns out AnimatableModifier is now deprecated. And I cannot find an alternative to it.
I am aware that GeometryEffect will work for this case of offset change, where you could use ProjectionTransform to do the trick. But I am more concerned about the official recommendation to "use Animatable directly".
Seriously, the only tutorial about the Animatable protocol I can find online is examples of using the Shape struct which implicitly implements the Animatable protocol.
And the following code I improvised with the Animatable protocol doesn't even do the "animating".
Thanks for your kind reading, and maybe oncoming answers!
iOS 16 Beta 3 introduces the "Shared Photo Library". PhotoKit however currently lacks any functionality to import photos/videos into the "Shared Photo Library"
It would be welcome, if PHAssetCreationRequest could be extended with e.g. a property "destination" that defaults to the personal library, but can also be set to the shared library.
Scenarios:
3rd party camera apps that should be able to import into the "Shared Library"
Any type of family orientated apps that should be able to import into the "Shared Library"
Filled this also as FB10577456
Hi ,
I'm experiencing a weird crash on macOS 13 Beta3 when the app starts and I don't know what's causing it.
I build this app in Xcode 14 Beta3 successfully and it can work normally in macOS <= 12.5
The Translated Report said that "Exception Type: EXC_CRASH (SIGKILL (Code Signature Invalid)) " & "Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed" , I've tried so much to solve this problem but nothing worked.
Is there anyone who can give me any suggestions or ideas to where I dig further?
Thanks in advance for any suggestions.
Attachments below are the log detail.
Translated Report
codesign -d -vvv --entitlements - application.app
I have a simple ios app written in Swift, that I executed lots of times. Suddenly I started to get: "Failed to finalize LSBundleWrapper mutator instance for ".
I deleted the derived data and did "clean folder" but in vain.
I run it on "My Mac" but it also happens on simulators.
I have M1 mini-mac, macOS Monterey and XCode 13.4.1
Please advise how to solve it
Hi,
Greetings for the day,
We would like to update you that we have started facing one strange problem in macOS Monterey 12.4(M1&Intel) where our system extension is not getting activated, we are getting below error:
OSSystemExtensionErrorCodeSignatureInvalid = 8
However I would like to update you that same build is working in other Mac system without any error.
We have checked the code sign and notarisation of our system extension container app and found its code signed and notarised too.
/Applications/*.app: accepted
source=Notarized Developer ID
we would request to please help us to know why its getting triggered and how we can resolve it.
Thanks & Regards,
Mohmad Vasim
Hi, i can't get through to support. The call back won't accept my mobile phone as it's registered to a personal account. I've tried my internet phone number, but the call back keeps failing, presumably because there's an extra step with my RingCentral internet number where i have to press 1 to accept the call. I've tried to use the email form, but this does not send my message, i get a small blue circle spinning. I've tried to use Safari and Chrome with the same result. I can't find a number to call anywhere or a direct email. I understand that i could register a different number, bu tthis is not a long-term solution. Are there any other options so i can complete my enrolment?!
I have made an application in Xamarin, and I can build the application and create the ipa file from my provisioning profile. The provisioning profile is specifically for an Ad Hoc deployment to the particular debug phone I am using, but when I try to upload the IPA file, the iPhone displays that it was "Unable to install" due to the integrity being unverifiable.
What could cause the deployment to fail like that?
The new MusicLibraryRequest<Playlist>() is great to get all the user's playlists but I have not found a way to exclude a specific type of playlist. For example; I wish to only get playlists that the user owns and can add content to (so this would exclude Smart and Curated playlists)
I did find the Playlist.Kind enum, but I can't seem to apply this to the request, and it doesn't seem to have an option for smart playlists.
So in short:
Is there any way I can exclude Smart- and Curated Playlists from a MusicLibraryRequest
Hi,
I am facing this error in Xcode 14 beta 3 version. The command:
xcodebuild CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -workspace abc.xcworkspace -configuration Debug -sdk macosx -derivedDataPath abcd/efgh -scheme cliName build-for-testing ARCHS=x86_64
The error doesn't occur on 13.3. Feel free to ask for more info that can be of help.
Thank you.
Hi!
Now with Monterey, you can configure an aggregate device with 7.1.4 output and play Dolby Atmos in the same format.
But my Apple Music is only delivering 5.1.
Can I play Apple Music in 7.1.4 ??
I have an 11.1 playback system configured properly through 'Audio Midi Setup' and testing each speaker works as expected. However, I can't find a single app that will connect with more than 5.1 channels.
'Music' plays back Atmos content in 5.1, 'TV' plays back in 5.1, the Finder and Safari both play back in 5.1.
Is this a bug or feature ?
Why have a 7.1.4 core audio device if no apps can use it ?
FYI: the AppleTV will play back the same content in 7.1.4...
Trying to access value using NSUbiquitousKeyValueStore.default.object(forKey:) locking the main thread on iOS 16 beta 3, iPhone 11 Pro.
Is that known issue or something that only happens to me? :)
Hello all,
We are currently developing an app for digital city tours.
It runs on iOS and Android devices and allows users to purchase city tours. The user does this on their own, so it's not an appointment/ticket booking.
However, the tours are to be carried out on all devices on which the user is logged in with his account. In addition, the user should be able to purchase the tour for multiple devices (e.g. the whole family) and then receive a code that is scanned on the other devices.
The unlocked content is text, image and video material and possibly an augmented reality experience in some places.
The question for us now is: Do we fall into the categories "3.1.3(a) Reader Apps" and "3.1.3(b) Multiplatform Services" or do we have to use in-app purchases?
Thank you very much and best regards
Sascha
Issue:
When installing a non VPP app store app in iOS device through MDM, the error - "This Apple ID cannot be used to make purchases" is displayed in the device. But the InstallApplication command response from the device doesn't show any error in it. The response just shows the status as "Installing" and the "ManagedApplicationList" command response shows the device shows the app in "Installing" state. It will be helpful on MDM side if the InstallApplication or ManagedApplicationList command response shows an error. Is it possible?
InstallApplication response:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CommandUUID</key>
<string>InstallApplication;Collection=xxxx</string>
<key>Identifier</key>
<string>com.zuletteran.scannerfree</string>
<key>State</key>
<string>Prompting</string>
<key>Status</key>
<string>Acknowledged</string>
<key>UDID</key>
<string>xxxx</string>
</dict>
</plist>
ManagedApplicationList response:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CommandUUID</key>
<string>ManagedApplicationList</string>
<key>ManagedApplicationList</key>
<dict>
<key>com.zuletteran.scannerfree</key>
<dict>
<key>ExternalVersionIdentifier</key>
<integer>0</integer>
<key>HasConfiguration</key>
<false/>
<key>HasFeedback</key>
<false/>
<key>IsValidated</key>
<false/>
<key>ManagementFlags</key>
<integer>5</integer>
<key>Status</key>
<string>Installing</string>
</dict>
</dict>
<key>Status</key>
<string>Acknowledged</string>
<key>UDID</key>
<string>xxxx</string>
</dict>
</plist>