Scripting

RSS for tag

Scripting allows you to automate complex, repetitive, and time-consuming tasks by writing scripts that interact with apps, processes, and the operating system.

Posts under Scripting tag

95 Posts

Post

Replies

Boosts

Views

Activity

Applying OpenGL Shader to Screen or Window
Hi! I'm looking to create a system utility to apply an openGL shader (or Metal?) to the window that the user is focused on (or the screen), ideally with a keyboard shortcut. From what I can tell, applying OpenGL shaders or pixel level modifications to the whole screens at a time is possible (e.g. BlackLight by Michel Fortin). Any pointers to this kind of thing would be great. Combining Automator workflows with some system-level code seems like it would do the trick but I'm not sure where to start. Update: It looks like CGColorSpace might be helpful for applying color transforms to windows. Perhaps there's a way to make a swift app similar to Rectangle that could modify these CoreGraphics elements instead of the coordinates / transform ones? Thanks for the help, Jack
0
0
2.1k
Apr ’22
write LDAP configuration using OpenDirectory framework in swift
i'm tying to create a custom LDAP configuration in a swift script, something similar to this without using python: https://github.com/Yohan460/Programmatic-OD-Python-Binding my script fails at the custom call - not sure if the issue is my data types or that the functions used in the python example don't exactly translate. any help is appreciated, thanks in advance! p.s - i'm a total swift n00b #!/usr/bin/swift import Foundation import OpenDirectory let fileName = "ldap.plist" let configData = try String(contentsOfFile: fileName) let config = Data(configData.utf8) let odSesh = ODSession.default() let configNode = try! ODNode(session: odSesh,type: ODNodeType(kODNodeTypeConfigure)) let outNode = try! configNode.customCall(99991, send: config)
2
0
1.9k
Mar ’22
macOS - shells scripts manually runs but not when automated
Trying to automated running this shell script and getting the results. So I have a shell script: backup.sh -- finds latest backup time machine backup date, creates a file on the desktop called bkDate.txt then added the date into the file. #!/bin/sh enabled=`/usr/bin/defaults read /Library/Preferences/com.apple.TimeMachine AutoBackup` if [ "$enabled" == "1" ];then lastBackupTimestamp=`date -j -f "%a %b %d %T %Z %Y" "$(/usr/libexec/PlistBuddy -c "Print Destinations:0:SnapshotDates" /Library/Preferences/com.apple.TimeMachine.plist | tail -n 2 | head -n 1 | awk '{$1=$1};1')" "+%Y-%m-%d %H:%M:%S"` echo "$lastBackupTimestamp" else echo "<result>Disabled</result>" fi echo "$lastBackupTimestamp" > ~/Desktop/bkDate.txt If I run it manually through sh ~/Desktop/backup.sh it works if I use automator (shell or AppleScript) or crontab. It produces the file but the contents is empty. Trying to figure out why it's not letting me automate it and how would can I automate the file and output?
1
0
806
Jan ’22
Send message based on mute/unmute change?
Trying to figure out if this is even possible- here's what I'd love to be able to do: Start script Send message "X" via TCP/UDP OR HTTP OR OSC if system audio input is muted, send message "Y" if unmuted. Continue to watch and send a new message when the mic is muted or unmuted until the script stopped. Not sure if this is even possible- any suggestions on proper nomenclature to start my research would be most appreciated!
3
0
1.3k
Jan ’22
Change the title of the prompt for asking administrative privileges
Until Big Sur I was asking the administrative privileges using the command /usr/bin/osascript -e 'do shell script "ls" with prompt "Installer is trying to setup" with administrator privileges' which gives me this dialog box Now the same command in mac os monetery is giving me the prompt with the title as "osascript". How can I replace the osascript title with my app name. Thanks in advance
2
0
1.8k
Dec ’21
Big Sur - AppleScript thru Java - Not authorized to send Apple events to [app] (-1743)
I have a Java program that I run in Eclipse which executes AppleScript for certain tasks. It works fine in Mojave, but in Big Sur, the AppleScripts fail with the error "AppleScript Not authorized to send Apple events to [app] (-1743)" In Mojave, the user is prompted (one time on the first run) with "'Eclipse.app' wants access to control '[app being controlled by Applescript]'" Once this prompt is approved, then Eclipse is added in the System Preferences under Security & Privacy -> Privacy -> Automation and a checkbox is included and activate for each of the applications that the AppleScript manipulates (Finder and iTunes or Music app depending on OS version), and thereafter,  my Java program can run its AppleScripts. In Big Sur, the prompts never appear and the AppleScript immediately errors out. Furthermore, I see no way to manually add approvals under System Preferences -> Security & Privacy -> Privacy -> Automation and there is no way I can find for how I can approve this automation on my own Mac. How do I invoke AppleScript on Big Sur from other languages such as Java? Please note that the Java program constructs AppleScript content at run time dependent on data, so the scripts are not fixed.  The Java code to run a script goes like this....   String script = <Some expression to form the content of the script depending on data>; String[] myargs = { "osascript", "-e", script}; try {     Process process = runtime.exec(myargs);     process.waitFor(); // Wait for the script to complete.     if (process.exitValue() == 0) { // Success       //On Mojave, execution takes this path and //Applescript works, after the one time user //approval.         System.out.println("success");     } else { // Fail         //On Big Sur, executions takes this path and //outputs         //35:57: execution error: Not authorized to send //Apple events to Finder. (-1743)         InputStream is = process.getErrorStream();       final BufferedReader reader = new BufferedReader(new InputStreamReader(is));         String line = null;         while ((line = reader.readLine()) != null) {             System.out.println(line);         }         reader.close();     } } catch (Exception exc) {     System.out.println(exc.getMessage());    } Thanks in advance for any help!
2
0
1.3k
Nov ’21
Shell Script | AWK | Variable inside FOR-Loop
Hi! I am new to OSX Shell Script and am trying to work my way into it. I don't get the expected outcome with the following snippet of my script code and I have no idea, why. I read most of the Apple Shell Script Pimer and googled a lot about it, but to no avail. I want to check the current username against some given usernames and set the value of a variable depending on the outcome. I used awk inside the shell script to get this done, but for some reason the for loop inside the awk part seems to change the value of the current username with every loop. This is the code: #!/bin/zsh awk -v u=$USER 'BEGIN {        print "Username outside loop is " u;       count[0] = "Anton";       count[1] = "Bert";       count[2] = "Carl";                                 for ( c_num in count ) {             print "Username inside loop is " u;             print "Compare to "count[c_num];                                                 if (u = count[c_num]) {                   test_var = "X";             } else {                   test_var = "Y";             }             print test_var;       } }' And this is what I get after I run it in terminal: Username outside loop is Zac Username inside loop is Zac Compare to Carl X Username inside loop is Carl Compare to Anton X Username inside loop is Anton Compare to Bert X I don't see why 'u' is changed every loop. I'm thankful for every help / advice! Markus
4
0
1.6k
Oct ’21
Is there a way to mimic a user login through terminal?
Script Example: sudo dscl . -create /Users/ITAdmin sudo dscl . -create /Users/ITAdmin UserShell /bin/bash sudo dscl . -create /Users/ITAdmin RealName ITAdmin sudo dscl . -create /Users/ITAdmin UniqueID 502 sudo dscl . -create /Users/ITAdmin PrimaryGroupID 20 sudo dscl . -create /Users/ITAdmin NFSHomeDirectory /Local/Users/ITAdmin sudo dscl . -create /Users/ITAdmin NFSHomeDirectory /Users/[ITuser] sudo dscl . -passwd /Users/ITAdmin [password] sudo dscl . -append /Groups/admin GroupMembership ITAdmin When using this locally or remotely, it works except the Home folder does not create or show up in the UI. After further testing, it does show up after an initial first time login. With our remote workforce and the secondary reasons for needing this script, we're trying to find a way to mimic a user login to add into our actual other script so that the home folder is created without actual end user interaction (won't be possible.) Or are there any other alternative ways to script a new admin user account? (Or a better place to ask this?) Thanks in advanced!
2
0
1.3k
Oct ’21
Why am I unable to remotely remove admin rights from original M1 mac admin user account?
For an IT department initiative, we have to remotely remove admin rights from a subset of M1 Macbook Air users. Their computers were set up manually with one original admin user account. After much research and testing, the admin rights removal portion of our scripting is working except for the original admin user account. A few niche online resources indicated this might possibly be due to M1's having a new type of user account called an owner. I also read that any secondary accounts after the initial one should have access to the OIK and OIC so we're confused why admin rights aren't getting removed from that original user when it works on other secondary accounts in multiple ways of testing. Any ideas or context surrounding this elusive new owner type of account, why the working script won't remove admin rights from that account but will for others, or if there's some missing info in order to accomplish this goal? We ideally would like to add an IT managed admin user and remove admin from the original user (current MDM does not support his inherently so we're getting creative.)
0
0
802
Oct ’21
xctrace failure: "Failed to attach to target process" "Error retrieving leak information"
I am attempting to record memory leak information from the terminal in 2 different ways: launch automated test through 'xcodebuild', run xctrace -record, attaching to the PID of the test (I look for it Activity Monitor). Launch my app in the simulator and run xctrace, attaching to the PID of my app. in both cases I get the following failures: [ERROR] Run issues detected (trace is still ready to be viewed): dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib, 10): no suitable image found.  Did find: /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib: mach-o, but not built for platform iOS-sim dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib, 10): no suitable image found.  Did find: /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib: mach-o, but not built for platform iOS-sim Error retrieving leak information. An error occurred trying to capture Leaks data. Error retrieving leak information. what are these .dylibs? and how do I rebuild them for iOS-sim?
1
0
1.3k
Aug ’21
JavaScript for Automation (JXA) Anyone?
I can't seem to find any more-or-less "official" place to discuss JavaScript for Automation (JXA). I've managed to develop some level of skill at JXA, although I have a long way to go.What I want to know is, is there some place I can go to both contribute my knowledge, and get some answers?Here's one example of a situation where I have no idea where to go to for answers:Let's say I have an object that I want to turn into a plist XML string. I use code like this:function serializeObjectToXmlPlist(obj) { var data = $.NSPropertyListSerialization .dataWithPropertyListFormatOptionsError( $(obj), $.NSPropertyListXMLFormat_v1_0, 0, null); var nsString = $.NSString.alloc .initWithDataEncoding(data, $.NSUTF8StringEncoding); return $(nsString).js; }The problem with this code is that if there are any nodes of type "data" (which contain base64-encoded strings), their content does not get serialized to the XML string.Where do I go to find answers to questions like this?Thanks.
2
0
1.6k
Aug ’21
Dynamic CSV to Google Sheet
I have been searching the Internet for a solution to automatically update a Google sheet doc with a dynamic CSV file hosted in Google drive. I have come across some paid solutions but nothing that works for the do-it-yourself users. Linking a CVS file to a google sheet doc using the =IMPORTDATA(“”) works but does not update the google sheet when the CVS file changes. I am unsure if hosting the CSV file on Google drive creates issues when synching to a Google docs sheet.  Also, I try the Google script editor but was not able to make the Google sheet update automatically after setting up the update CVS function and trigger. Has anyone found a way to automatically update a Google sheet with a dynamic CVS file? Is this a simple or complicated process?
0
0
687
Jul ’21
python codes hang with python 3.9.6 compiled with Xcode 13b3
Hi there since I installed Xcode 13 b3, codes running under python 3.9.6 hang at various stages: I have no error messages just that python resources jump to >100% of CPU. This happens either loading a module (e.g. from astropy.modeling import models - but from astropy.constants.si import c its fine) or creating a reasonably sized array with numpy.arange(). I reinstalled Xcode 12.5.1 with its CLT and the code loads and creates what is needed. My vague idea is that the memory resources are badly handled using Xcode 13+CLTs (ahh everything worked fine with Xcode 13 b1) with Xcode 13 I have been using: Big Sur 11.5, or Monterey 12.0b3 . so the machine seems not to be an issue. any ideas?
1
0
837
Jul ’21
Replace app container for Xcode UI Tests
What I'd like to do is seed our app some data for some of my UITests. One appoach that I'm entertaining is to seed the data by replacing the app container with my own container (*.xcappdata). I can do this presently, when debugging my iOS app, by setting it 'Application Data' under 'Options' in the scheme editor. Is there a way to replace the app container in a similar fasion when running UITests?
1
0
2k
Jul ’21
Applying OpenGL Shader to Screen or Window
Hi! I'm looking to create a system utility to apply an openGL shader (or Metal?) to the window that the user is focused on (or the screen), ideally with a keyboard shortcut. From what I can tell, applying OpenGL shaders or pixel level modifications to the whole screens at a time is possible (e.g. BlackLight by Michel Fortin). Any pointers to this kind of thing would be great. Combining Automator workflows with some system-level code seems like it would do the trick but I'm not sure where to start. Update: It looks like CGColorSpace might be helpful for applying color transforms to windows. Perhaps there's a way to make a swift app similar to Rectangle that could modify these CoreGraphics elements instead of the coordinates / transform ones? Thanks for the help, Jack
Replies
0
Boosts
0
Views
2.1k
Activity
Apr ’22
write LDAP configuration using OpenDirectory framework in swift
i'm tying to create a custom LDAP configuration in a swift script, something similar to this without using python: https://github.com/Yohan460/Programmatic-OD-Python-Binding my script fails at the custom call - not sure if the issue is my data types or that the functions used in the python example don't exactly translate. any help is appreciated, thanks in advance! p.s - i'm a total swift n00b #!/usr/bin/swift import Foundation import OpenDirectory let fileName = "ldap.plist" let configData = try String(contentsOfFile: fileName) let config = Data(configData.utf8) let odSesh = ODSession.default() let configNode = try! ODNode(session: odSesh,type: ODNodeType(kODNodeTypeConfigure)) let outNode = try! configNode.customCall(99991, send: config)
Replies
2
Boosts
0
Views
1.9k
Activity
Mar ’22
Running scripts in terminal on Big Sur
Anyone had issues with running scripts on Big Sur? I get a command not found error and I’m guessing its a toggle or a command or a back age that needs to be added to enable it or its blocked by default for security reasons?
Replies
6
Boosts
0
Views
4.6k
Activity
Feb ’22
macOS - shells scripts manually runs but not when automated
Trying to automated running this shell script and getting the results. So I have a shell script: backup.sh -- finds latest backup time machine backup date, creates a file on the desktop called bkDate.txt then added the date into the file. #!/bin/sh enabled=`/usr/bin/defaults read /Library/Preferences/com.apple.TimeMachine AutoBackup` if [ "$enabled" == "1" ];then lastBackupTimestamp=`date -j -f "%a %b %d %T %Z %Y" "$(/usr/libexec/PlistBuddy -c "Print Destinations:0:SnapshotDates" /Library/Preferences/com.apple.TimeMachine.plist | tail -n 2 | head -n 1 | awk '{$1=$1};1')" "+%Y-%m-%d %H:%M:%S"` echo "$lastBackupTimestamp" else echo "<result>Disabled</result>" fi echo "$lastBackupTimestamp" > ~/Desktop/bkDate.txt If I run it manually through sh ~/Desktop/backup.sh it works if I use automator (shell or AppleScript) or crontab. It produces the file but the contents is empty. Trying to figure out why it's not letting me automate it and how would can I automate the file and output?
Replies
1
Boosts
0
Views
806
Activity
Jan ’22
Send message based on mute/unmute change?
Trying to figure out if this is even possible- here's what I'd love to be able to do: Start script Send message "X" via TCP/UDP OR HTTP OR OSC if system audio input is muted, send message "Y" if unmuted. Continue to watch and send a new message when the mic is muted or unmuted until the script stopped. Not sure if this is even possible- any suggestions on proper nomenclature to start my research would be most appreciated!
Replies
3
Boosts
0
Views
1.3k
Activity
Jan ’22
Change the title of the prompt for asking administrative privileges
Until Big Sur I was asking the administrative privileges using the command /usr/bin/osascript -e 'do shell script "ls" with prompt "Installer is trying to setup" with administrator privileges' which gives me this dialog box Now the same command in mac os monetery is giving me the prompt with the title as "osascript". How can I replace the osascript title with my app name. Thanks in advance
Replies
2
Boosts
0
Views
1.8k
Activity
Dec ’21
Big Sur - AppleScript thru Java - Not authorized to send Apple events to [app] (-1743)
I have a Java program that I run in Eclipse which executes AppleScript for certain tasks. It works fine in Mojave, but in Big Sur, the AppleScripts fail with the error "AppleScript Not authorized to send Apple events to [app] (-1743)" In Mojave, the user is prompted (one time on the first run) with "'Eclipse.app' wants access to control '[app being controlled by Applescript]'" Once this prompt is approved, then Eclipse is added in the System Preferences under Security & Privacy -> Privacy -> Automation and a checkbox is included and activate for each of the applications that the AppleScript manipulates (Finder and iTunes or Music app depending on OS version), and thereafter,  my Java program can run its AppleScripts. In Big Sur, the prompts never appear and the AppleScript immediately errors out. Furthermore, I see no way to manually add approvals under System Preferences -> Security & Privacy -> Privacy -> Automation and there is no way I can find for how I can approve this automation on my own Mac. How do I invoke AppleScript on Big Sur from other languages such as Java? Please note that the Java program constructs AppleScript content at run time dependent on data, so the scripts are not fixed.  The Java code to run a script goes like this....   String script = <Some expression to form the content of the script depending on data>; String[] myargs = { "osascript", "-e", script}; try {     Process process = runtime.exec(myargs);     process.waitFor(); // Wait for the script to complete.     if (process.exitValue() == 0) { // Success       //On Mojave, execution takes this path and //Applescript works, after the one time user //approval.         System.out.println("success");     } else { // Fail         //On Big Sur, executions takes this path and //outputs         //35:57: execution error: Not authorized to send //Apple events to Finder. (-1743)         InputStream is = process.getErrorStream();       final BufferedReader reader = new BufferedReader(new InputStreamReader(is));         String line = null;         while ((line = reader.readLine()) != null) {             System.out.println(line);         }         reader.close();     } } catch (Exception exc) {     System.out.println(exc.getMessage());    } Thanks in advance for any help!
Replies
2
Boosts
0
Views
1.3k
Activity
Nov ’21
Shell Script | AWK | Variable inside FOR-Loop
Hi! I am new to OSX Shell Script and am trying to work my way into it. I don't get the expected outcome with the following snippet of my script code and I have no idea, why. I read most of the Apple Shell Script Pimer and googled a lot about it, but to no avail. I want to check the current username against some given usernames and set the value of a variable depending on the outcome. I used awk inside the shell script to get this done, but for some reason the for loop inside the awk part seems to change the value of the current username with every loop. This is the code: #!/bin/zsh awk -v u=$USER 'BEGIN {        print "Username outside loop is " u;       count[0] = "Anton";       count[1] = "Bert";       count[2] = "Carl";                                 for ( c_num in count ) {             print "Username inside loop is " u;             print "Compare to "count[c_num];                                                 if (u = count[c_num]) {                   test_var = "X";             } else {                   test_var = "Y";             }             print test_var;       } }' And this is what I get after I run it in terminal: Username outside loop is Zac Username inside loop is Zac Compare to Carl X Username inside loop is Carl Compare to Anton X Username inside loop is Anton Compare to Bert X I don't see why 'u' is changed every loop. I'm thankful for every help / advice! Markus
Replies
4
Boosts
0
Views
1.6k
Activity
Oct ’21
Is there a way to mimic a user login through terminal?
Script Example: sudo dscl . -create /Users/ITAdmin sudo dscl . -create /Users/ITAdmin UserShell /bin/bash sudo dscl . -create /Users/ITAdmin RealName ITAdmin sudo dscl . -create /Users/ITAdmin UniqueID 502 sudo dscl . -create /Users/ITAdmin PrimaryGroupID 20 sudo dscl . -create /Users/ITAdmin NFSHomeDirectory /Local/Users/ITAdmin sudo dscl . -create /Users/ITAdmin NFSHomeDirectory /Users/[ITuser] sudo dscl . -passwd /Users/ITAdmin [password] sudo dscl . -append /Groups/admin GroupMembership ITAdmin When using this locally or remotely, it works except the Home folder does not create or show up in the UI. After further testing, it does show up after an initial first time login. With our remote workforce and the secondary reasons for needing this script, we're trying to find a way to mimic a user login to add into our actual other script so that the home folder is created without actual end user interaction (won't be possible.) Or are there any other alternative ways to script a new admin user account? (Or a better place to ask this?) Thanks in advanced!
Replies
2
Boosts
0
Views
1.3k
Activity
Oct ’21
Why am I unable to remotely remove admin rights from original M1 mac admin user account?
For an IT department initiative, we have to remotely remove admin rights from a subset of M1 Macbook Air users. Their computers were set up manually with one original admin user account. After much research and testing, the admin rights removal portion of our scripting is working except for the original admin user account. A few niche online resources indicated this might possibly be due to M1's having a new type of user account called an owner. I also read that any secondary accounts after the initial one should have access to the OIK and OIC so we're confused why admin rights aren't getting removed from that original user when it works on other secondary accounts in multiple ways of testing. Any ideas or context surrounding this elusive new owner type of account, why the working script won't remove admin rights from that account but will for others, or if there's some missing info in order to accomplish this goal? We ideally would like to add an IT managed admin user and remove admin from the original user (current MDM does not support his inherently so we're getting creative.)
Replies
0
Boosts
0
Views
802
Activity
Oct ’21
xctrace failure: "Failed to attach to target process" "Error retrieving leak information"
I am attempting to record memory leak information from the terminal in 2 different ways: launch automated test through 'xcodebuild', run xctrace -record, attaching to the PID of the test (I look for it Activity Monitor). Launch my app in the simulator and run xctrace, attaching to the PID of my app. in both cases I get the following failures: [ERROR] Run issues detected (trace is still ready to be viewed): dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib, 10): no suitable image found.  Did find: /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib: mach-o, but not built for platform iOS-sim dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib, 10): no suitable image found.  Did find: /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib: mach-o, but not built for platform iOS-sim Error retrieving leak information. An error occurred trying to capture Leaks data. Error retrieving leak information. what are these .dylibs? and how do I rebuild them for iOS-sim?
Replies
1
Boosts
0
Views
1.3k
Activity
Aug ’21
JavaScript for Automation (JXA) Anyone?
I can't seem to find any more-or-less "official" place to discuss JavaScript for Automation (JXA). I've managed to develop some level of skill at JXA, although I have a long way to go.What I want to know is, is there some place I can go to both contribute my knowledge, and get some answers?Here's one example of a situation where I have no idea where to go to for answers:Let's say I have an object that I want to turn into a plist XML string. I use code like this:function serializeObjectToXmlPlist(obj) { var data = $.NSPropertyListSerialization .dataWithPropertyListFormatOptionsError( $(obj), $.NSPropertyListXMLFormat_v1_0, 0, null); var nsString = $.NSString.alloc .initWithDataEncoding(data, $.NSUTF8StringEncoding); return $(nsString).js; }The problem with this code is that if there are any nodes of type "data" (which contain base64-encoded strings), their content does not get serialized to the XML string.Where do I go to find answers to questions like this?Thanks.
Replies
2
Boosts
0
Views
1.6k
Activity
Aug ’21
Dynamic CSV to Google Sheet
I have been searching the Internet for a solution to automatically update a Google sheet doc with a dynamic CSV file hosted in Google drive. I have come across some paid solutions but nothing that works for the do-it-yourself users. Linking a CVS file to a google sheet doc using the =IMPORTDATA(“”) works but does not update the google sheet when the CVS file changes. I am unsure if hosting the CSV file on Google drive creates issues when synching to a Google docs sheet.  Also, I try the Google script editor but was not able to make the Google sheet update automatically after setting up the update CVS function and trigger. Has anyone found a way to automatically update a Google sheet with a dynamic CVS file? Is this a simple or complicated process?
Replies
0
Boosts
0
Views
687
Activity
Jul ’21
python codes hang with python 3.9.6 compiled with Xcode 13b3
Hi there since I installed Xcode 13 b3, codes running under python 3.9.6 hang at various stages: I have no error messages just that python resources jump to >100% of CPU. This happens either loading a module (e.g. from astropy.modeling import models - but from astropy.constants.si import c its fine) or creating a reasonably sized array with numpy.arange(). I reinstalled Xcode 12.5.1 with its CLT and the code loads and creates what is needed. My vague idea is that the memory resources are badly handled using Xcode 13+CLTs (ahh everything worked fine with Xcode 13 b1) with Xcode 13 I have been using: Big Sur 11.5, or Monterey 12.0b3 . so the machine seems not to be an issue. any ideas?
Replies
1
Boosts
0
Views
837
Activity
Jul ’21
Replace app container for Xcode UI Tests
What I'd like to do is seed our app some data for some of my UITests. One appoach that I'm entertaining is to seed the data by replacing the app container with my own container (*.xcappdata). I can do this presently, when debugging my iOS app, by setting it 'Application Data' under 'Options' in the scheme editor. Is there a way to replace the app container in a similar fasion when running UITests?
Replies
1
Boosts
0
Views
2k
Activity
Jul ’21