wix / applesimulatorutils Goto Github PK
View Code? Open in Web Editor NEWA collection of command-line utils for Apple simulators.
License: Other
A collection of command-line utils for Apple simulators.
License: Other
There are valid test cases where users want to test their app flow when a permission is not set. Adding an unset
mode to permissions will spare the need to reset content and settings in this case.
We are trying to install applesimutils on a new developer's machine and receive this error:
==> Installing applesimutils from wix/brew
Error: Your Xcode (9.4.1) is too outdated.
Please update to Xcode 10.1 (or delete it).
Xcode can be updated from the App Store.
Because of React Native limitations we can't yet upgrade to XCode 10, and are stuck on XCode 9, so we need to install an older version of applesimutils.
We can't figure out how to install 0.5.23
as homebrew doesn't provide a canonical way to achieve this, and messing around with the https://github.com/wix/homebrew-brew repository with the usual wisdom isn't working:
Is there a right way to install an older version of this tool?
XCode 9.4.1
macOS 10.14.1
homebrew 1.8.6
Description
Ran the install commands brew tap wix/brew
, which worked, and then brew install applesimutils
which failed.
If you are describing an issue with brew install
:
brew doctor
and fixed all issues^
/usr/local/Homebrew/Library/Taps/wix/homebrew-brew/applesimutils.rb:23: syntax error, unexpected >>, expecting keyword_end
Detox Instruments 1.10.10255
^
/usr/local/Homebrew/Library/Taps/wix/homebrew-brew/applesimutils.rb:23: unexpected fraction part after numeric literal
Detox Instruments 1.10.10255`
Environment
Additional Context
Logs:
https://gist.github.com/RockinRonE/a8eccf647874d7508706e1dd0d773767
Description
AppleSimUtils Touch/FaceID support is missing the ability to toggle the OS level permissions, in the same way that camera, location, etc need OS level permissions.
Steps to Reproduce
react-native-touch-id
) - code here:LAContext *context = [[LAContext alloc] init];
NSError *error;
// Check to see if we have a passcode fallback
NSNumber *passcodeFallback = [NSNumber numberWithBool:true];
if (RCTNilIfNull([options objectForKey:@"passcodeFallback"]) != nil) {
passcodeFallback = [RCTConvert NSNumber:options[@"passcodeFallback"]];
}
if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
// No error found, proceed
callback(@[[NSNull null], [self getBiometryType:context]]);
} else if ([passcodeFallback boolValue] && [context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&error]) {
// No error
callback(@[[NSNull null], [self getBiometryType:context]]);
}
// Device does not support FaceID / TouchID / Pin OR there was an error!
else {
if (error) {
NSString *errorReason = [self getErrorReason:error];
NSLog(@"Authentication failed: %@", errorReason);
callback(@[RCTMakeError(errorReason, nil, nil), [self getBiometryType:context]]);
return;
}
callback(@[RCTMakeError(@"RCTTouchIDNotSupported", nil, nil)]);
return;
}
Expected Behavior
It would be ideal with we could set the permissions at the command line level, in the same way we set permissions for camera, location, etc.
The command generates an error when using the location=always permission. If the simulator is open, it does restartSB.
applesimutils --simulator B5267D22-FFEB-48B9-BA63-C86755D7B3AD --bundle "com.mybundle" --setPermissions "notifications=YES, location=always"
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
The operation couldn’t be completed. No such file or directory
No such file or directory
Description
Im sure this is more of an implementation discrepancy but hopefully someone can offer some help.
The utility correctly issues the 'NO' command when the prompt shows. however the application under test try to give the user the ability to 'Try Again'. or 'cancel' via an on screen alert.
Im trying to test this max retry of the 'Try Again' button, but at current I can't because as soon as the 'faceid=NO' command is sent, it dismisses me all the way back to the login screen of my app.
is there a way It can be configured to be softer ?
Starting in iOS 13, just touching the CBCentralManager will trigger a permission dialog for Bluetooth. This tool has been vital to bypassing system dialogs in unit testing. It makes sense for this library to support this if possible.
Description
applesimutils can not find any simulators.
xcrun simctl list devices
shows:
-- iOS 10.2 --
iPhone 5s 10.2 (A86D0F25-0A31-4E26-B843-662BB715A758) (Shutdown)
iPhone 6 (B0F904AB-F0E0-4680-B611-7CD405592AD5) (Shutdown)
iPhone 6 Plus (7967BA29-3033-4376-96F5-2AFCD7892633) (Shutdown)
iPhone 6s (0A64B869-DEDA-42B8-9F9E-3B8A35044934) (Shutdown)
iPhone 6s Plus (109F57EA-6324-4BC9-9A02-ED088B76CDD3) (Shutdown)
iPhone 7 (AB44F116-3689-4980-9E74-59B0593CBD83) (Shutdown)
iPhone 7 Plus (1A90FA5C-CACC-402E-B39C-966442FBE222) (Shutdown)
iPhone SE (C5C9A0ED-09E7-4EA3-94C6-66F3ACBB4896) (Shutdown)
iPad Air (46AD7657-0C43-4889-8400-552EE8BB3F2E) (Shutdown)
iPad Air 2 (590A88CF-5D49-4A24-839D-15A4A9A67FC2) (Shutdown)
iPad Pro (9.7 inch) (8AF24C0E-7FCB-4096-A504-C399EEAC8CA8) (Shutdown)
iPad Pro (12.9 inch) (598A5895-DE76-4CD0-99C9-3D57CE137947) (Shutdown)
-- iOS 10.3 --
iPhone 5s 10.3.1 (09C758DE-3599-4370-AC28-23F3DB3C315B) (Shutdown)
-- iOS 12.0 --
-- iOS 12.1 --
iPhone 5s 12.1 (EB6D0DD8-B0CD-4B8B-B80A-E313296CAF99) (Shutdown)
iPhone X (C4FB86B6-17AC-45D7-99EB-70B91FA7E1F8) (Shutdown)
iPhone Xs Max (5460DF9C-E3D6-4EA8-ADC1-783683E34CC2) (Shutdown)
....
And more
but
applesimutils --list
shows nothing:
[
]
Steps to Reproduce
run applesimutils --list
Device, macOS and Xcode Versions
macOS: 10.14.4, Xcode: 10.1 (10.2 also installed) Some time ago i upgrade Xcode from 10.1 to 10.2 (after that reinstall 10.1)
Description
Conflict at /usr/local/Homebrew/Library/Taps/wix/homebrew-brew/applesimutils.rb
Steps to Reproduce
Steps to reproduce the behavior:
brew install applesimutils
Expected Behavior
install applesimutils
Screenshots
Environment
Additional Context
Add any other context about the problem here.
applesimutils insets same records into TCC.db on iOS simulator 12.x.
applesimutils --byOS "12.0" --byName "iPhone SE" --bundle "com.wix.Tst" --setPermissions "photos=YES, notifications=YES, reminders=YES,location=inuse"
select * from access where service == "kTCCServicePhotos" AND client == "com.wix.Tst"
"kTCCServicePhotos" "com.wix.Tst" "0" "1" "1" "1538470605"
"kTCCServicePhotos" "com.wix.Tst" "0" "1" "1" "1538470614"
"kTCCServicePhotos" "com.wix.Tst" "0" "1" "1" "1538470624"
It is not correct behaviour because should be one record for "kTCCServicePhotos".
If a user prohibited access to photos, a record with allowed = 0
also will present, and OS will not allow access to photos to the application.
Xcode 10.0
Mac OS 10.13.6 (17G65)
Sorry for the very limited details, and sorry for using this place for asking question of how to use the tool.
My question is how I can launch simulator with microphone enable? and by that avoid the message of: “Xcode.app” would like to access the microphone.
Thanks
Following #3, it may be useful to be able to specify the simulator name instead of the explicit ID.
Description
I've just encountered that when using applesimutils --byName 'iPad Pro (12.9-inch) (2nd generation)'... that the script hangs and does not finish (neither success nor failure).
issue only happen to me on CI (circle ci) and does not recunsruct on local machine, note that i've entered CI machine on ssh and verified that the device by name exist.
when switching to applesimutils --byId issue does not recunstruct
Environment
I went through all the "Installation fails on xcode10" issues and tried everything. But still, brew install applesimutils
fails for me
brew config
prints:HOMEBREW_VERSION: 2.0.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: 649d1427f5fe41323c436608f5c21513f8f34f71
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1b5d46a020154a382832ccd5732d5eb81d169d4c
Core tap last commit: 42 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_LOGS: /Users/martinlitvaj/Library/Logs/Homebrew
CPU: dodeca-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1001
Git: 2.20.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_121
macOS: 10.14.4-x86_64
CLT: 10.2.0.0.1.1552586384
Xcode: 10.2
CLT headers: 10.2.0.0.1.1552586384
I have proper Xcode utils set in Xcode preferencies
Macbook Pro; MacOS 10.14.4; Xcode 10.2 (10E125);
==> Installing applesimutils from wix/brew
==> Downloading https://raw.githubusercontent.com/wix/homebrew-brew/master/AppleSimulatorUtils-0.6.4.tar.gz
Already downloaded: /Users/martinlitvaj/Library/Caches/Homebrew/downloads/06653380f000a4b0be4d3e5b2874aba7392780ed408792b89f6467479a14e913--AppleSimulatorUtils-0.6.4.tar.gz
==> ./buildForBrew.sh /usr/local/Cellar/applesimutils/0.6.4
Last 15 lines from /Users/martinlitvaj/Library/Logs/Homebrew/applesimutils/01.buildForBrew.sh:
export LANG=en_US.US-ASCII
clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/tmp/applesimutils-20190327-56923-826nip/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/tmp/applesimutils-20190327-56923-826nip/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.11 -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -iquote /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-generated-files.hmap -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-own-target-headers.hmap -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-all-target-headers.hmap -iquote /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-project-headers.hmap -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Products/Release/include -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources-normal/x86_64 -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources/x86_64 -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources -F/tmp/applesimutils-20190327-56923-826nip/build/Build/Products/Release -MMD -MT dependencies -MF /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetLocationPermission.d --serialize-diagnostics /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetLocationPermission.dia -c /tmp/applesimutils-20190327-56923-826nip/applesimutils/applesimutils/SetLocationPermission.m -o /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetLocationPermission.o
CompileC /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBCommandLineParser.o /tmp/applesimutils-20190327-56923-826nip/ObjCCLIInfra/GBCli/GBCli/src/GBCommandLineParser.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: applesimutils)
cd /tmp/applesimutils-20190327-56923-826nip/applesimutils
export LANG=en_US.US-ASCII
clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/tmp/applesimutils-20190327-56923-826nip/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/tmp/applesimutils-20190327-56923-826nip/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.11 -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -iquote /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-generated-files.hmap -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-own-target-headers.hmap -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-all-target-headers.hmap -iquote /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-project-headers.hmap -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Products/Release/include -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources-normal/x86_64 -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources/x86_64 -I/tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources -F/tmp/applesimutils-20190327-56923-826nip/build/Build/Products/Release -MMD -MT dependencies -MF /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBCommandLineParser.d --serialize-diagnostics /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBCommandLineParser.dia -c /tmp/applesimutils-20190327-56923-826nip/ObjCCLIInfra/GBCli/GBCli/src/GBCommandLineParser.m -o /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBCommandLineParser.o
** BUILD FAILED **
The following build commands failed:
CompileC /tmp/applesimutils-20190327-56923-826nip/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/LNLog.o /tmp/applesimutils-20190327-56923-826nip/ObjCCLIInfra/LNLog.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
cp: build/Build/Products/Release/applesimutils: No such file or directory
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/wix/homebrew-brew/issues
Sometimes, on a CI service, detox / AppleSimulatorUtils is a bit flaky, and I had
Error: BulletinBoard property list not found.
(on bitrise). It seems that this error has already been reported on detox repo wix/Detox#452 (comment) and wix/Detox#452 (comment)
With the help of some screenshots, it appears that this error tell us that the simulator / app is not ready yet, when we try to launch the app.
In fact, it seems that detox timeout / resolves await device.launchApp even if the simulator is not up & ready.
Also, I think it's worth to mention, but before I used to run :
await detox.init(config, {launchApp: true});
//and is my test something like
await device.launchApp({
permissions: { notifications: 'YES', calendar: 'YES' }
});
but in this case I generaly got the native iOS modale requesting if I accept or not the notification. But no timeout error. So I change to not launch the app on init() and it now seems to work correctly (after a few hours in production, no fail yet).
I don't know how I can change the default timeout for detox.launchApp(), but after a few tests, here is my current workaround is to try/catch the launchApp() and relaunchApp() after a long sleep.
before(async () => {
await detox.init(config, { launchApp: false });
try {
await device.launchApp({ permissions: { notifications: 'YES', calendar: 'YES' } });
} catch (e) {
console.log('It will certainly throw an exception, but lets sleep for 60000ms', e);
await sleep(60000);
await device.launchApp({ permissions: { notifications: 'YES', calendar: 'YES' } });
console.log('hey, sleep is over. Crossed fingers');
}
})
after(async () => {
await deviceUtils.takeScreenshot('after_test');
await detox.cleanup();
})
Output :
(node:8531) DeprecationWarning: "--compilers" will be removed in a future version of Mocha; see https://git.io/vdcSr for more info
detox-server info 11:15:20: server listening on localhost:49353...
detox info 1: Searching for device matching iPhone 7...
detox info 5: Booting device 9CB16873-88A3-4D3C-AC24-67C27AC818B3
detox info 7: Uninstalling io.getknow...
detox info 7: io.getknow uninstalled
detox info 8: Installing /Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/getknow.app...
detox info 8: /Users/vagrant/git/ios/build/Build/Products/Release-iphonesimulator/getknow.app installed
detox info 9: Trying to set permissions...
It will certainly throw an exception, but lets sleep for 60000ms { ChildProcessError: Command failed: applesimutils --simulator 9CB16873-88A3-4D3C-AC24-67C27AC818B3 --bundle io.getknow --setPermissions notifications=YES,calendar=YES
Error: BulletinBoard property list not found.
`applesimutils --simulator 9CB16873-88A3-4D3C-AC24-67C27AC818B3 --bundle io.getknow --setPermissions notifications=YES,calendar=YES` (exited with error code 253)
at callback (/Users/vagrant/git/node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (child_process.js:282:5)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
name: 'ChildProcessError',
code: 253,
childProcess:
{ ChildProcess: { [Function: ChildProcess] super_: [Object] },
fork: [Function],
_forkChild: [Function],
exec: [Function],
execFile: [Function],
spawn: [Function],
spawnSync: [Function: spawnSync],
execFileSync: [Function: execFileSync],
execSync: [Function: execSync] },
stdout: 'A collection of utils for Apple simulators.\n\nUsage:\n applesimutils --byId <simulator identifier> --bundle <bundle identifier> --setPermissions "<permission1>, <permission2>, ..."\n applesimutils --byName <simulator name> --byOS <simulator OS version> --bundle <bundle identifier> --setPermissions "<permission1>, <permission2>, ..."\n applesimutils --simulator <simulator name/identifier> --restartSB\n applesimutils --list [--byName <simulator name>] [--byOS <simulator OS version>] [--byType <simulator OS version>] [--maxResults <int>]\n\nOptions:\n --byId Filters simulators by identifier\n --byName Filters simulators by name\n --byType Filters simulators by device type\n --byOS Filters simulators by operating system\n --list Lists available simulators\n --setPermissions Sets the specified permissions and restarts SpringBoard for the changes to take effect\n --clearKeychain Clears the simulator\'s keychain\n --restartSB Restarts SpringBoard\n --bundle The app bundle identifier\n --maxResults Limits the number of results returned from --list\n --version, -v Prints version\n --help, -h Prints usage\n\nAvailable Permissions:\n calendar=YES|NO|unset\n camera=YES|NO|unset\n contacts=YES|NO|unset\n health=YES|NO|unset\n homekit=YES|NO|unset\n location=always|inuse|never|unset\n medialibrary=YES|NO|unset\n microphone=YES|NO|unset\n motion=YES|NO|unset\n notifications=YES|NO|unset\n photos=YES|NO|unset\n reminders=YES|NO|unset\n siri=YES|NO|unset\n speech=YES|NO|unset\n\n\nFor more features, open an issue at https://github.com/wix/AppleSimulatorUtils\nPull-requests are always welcome!\n',
stderr: 'Error: BulletinBoard property list not found.\n\n' }
detox info 10: Trying to set permissions...
detox info 10: Permissions are set
detox info 11: Launching io.getknow...
detox info 11: io.getknow launched. The stdout and stderr logs were recreated, you can watch them with:
tail -F $HOME/Library/Developer/CoreSimulator/Devices/9CB16873-88A3-4D3C-AC24-67C27AC818B3/data/tmp/detox.last_launch_app_log.{out,err}
hey, sleep is over. Crossed fingers
Login
• 📸 init.png
✓ should have login button (3746ms)
✓ should show connexion screen after tap (607ms)
✓ should show home screen after login (11239ms)
macOS : 10.12 (Sierra)
I have been having trouble using Detox (I've been seeing problems with starting and restarting the app and also setting permissions, as has been discussed elsewhere and that I will take up in the relevant places). This led me to testing applesimutils directly just as a sanity check. However, I had problems starting a new simulator as per these instructions
applesimutils --simulator "SIMTWO" --restartSB
Device: tried iPhone 7 and 8 simulators with 10.3 and 11.2 to no avail.
macOS: Sierra 10.12.6 (16G1036)
Xcode: 9.2
Is your feature request related to a problem? Please describe.
I have a unit test to test notifications, I need this to be able to turn on simulator notification permissions. My current scenario is iOS native App but not RN.
Describe the solution you'd like
Able to run it before running test automatically, to be integrated into Xcode or swift code?
Describe alternatives you've considered
N/A
Additional context
N/A
Is there any way to clear the keychain? I used to do this
await device.deviceDriver._fbsimctl._execFbsimctlCommand({
args: `${device._deviceId} clear_keychain`,
});
in older versions of Detox and since Detox is now using this library I wanted to know if there is a way to clear the keychain?
If you make an app that has keychain password integration, some alert dialogs appear that ask you if you want to save the password in your keychain. -- Is there a permissions flag that will bypass this dialog?
We would try to get detox to dismiss the dialog, but it can't find it in the hierarchy. :(
There is a lot of boilerplate code here that can be useful for other CLI utils. Let’s create an ‘Infra’ repo where all CLI tools can use and build upon.
For example: logging facility, a unified argument parser and usage builder, shared dependencies, etc.
When run locally on a clean simulator (app not installed) the command does not set the permissions for notifications.
applesimutils --simulator "iPhone 7" --bundle "my.bundle.id" --setPermissions "notifications=YES"
Am I missing something?
Looks like there is an installation bug on a system with XCode 10:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap wix/brew
brew install wix/brew/applesimutils
.Installation should succeed.
Installation fails with the following console log output:
xcode-10:AppleSimulatorUtils-0.5.22 vm$ brew install wix/wix/applesimutils
==> Tapping wix/wix
Cloning into '/usr/local/Homebrew/Library/Taps/wix/homebrew-wix'...
Username for 'https://github.com': ^C
xcode-10:AppleSimulatorUtils-0.5.22 vm$ brew install wix/brew/applesimutils
==> Installing applesimutils from wix/brew
==> Downloading https://raw.githubusercontent.com/wix/homebrew-brew/master/AppleSimulatorUtils-0.5.22.tar.gz
Already downloaded: /Users/vm/Library/Caches/Homebrew/downloads/06e6f30fe470a30bbc085aae5cbb1ce72c357f2558990a8564ca9ec9628bd145--AppleSimulatorUtils-0.5.22.tar.gz
==> ./buildForBrew.sh /usr/local/Cellar/applesimutils/0.5.22
Last 15 lines from /Users/vm/Library/Logs/Homebrew/applesimutils/01.buildForBrew.sh:
4 errors generated.
14 errors generated.
In file included from /tmp/applesimutils-20180924-15918-jgf9ff/applesimutils/applesimutils/SetNotificationsPermission.m:9:
/tmp/applesimutils-20180924-15918-jgf9ff/applesimutils/applesimutils/SetNotificationsPermission.h:9:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
15 errors generated.
** BUILD FAILED **
The following build commands failed:
CompileC /tmp/applesimutils-20180924-15918-jgf9ff/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetNotificationsPermission.o /tmp/applesimutils-20180924-15918-jgf9ff/applesimutils/applesimutils/SetNotificationsPermission.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
cp: build/Build/Products/Release/applesimutils: No such file or directory
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/wix/homebrew-brew/issues
My observation is that adding -UseNewBuildSystem=NO
to xcodebuild
command in the script resolves the issue, however.
Description
Unable to install applesimutils on a system running Xcode 9.4.
It results in an error:
==> Installing applesimutils from wix/brew
applesimutils: A full installation of Xcode.app 10.0 is required to compile
this software. Installing just the Command Line Tools is not sufficient.
The error started occurring today, it is probably related to the release of version 0.6.5
If you are describing an issue with brew install
:
brew doctor
and fixed all issuesSteps to Reproduce
Steps to reproduce the behavior:
On bitrise, run image Xcode 9.4.x on macOS 10.13 (High SIerra)
and try installing applesimutils.
Try to install applesimutils on mac with Xcode 9.4 only.
Expected Behavior
We'd like to be able to install applesimutils (our bitrise test suite is broken currently because of this issue) on a system with Xcode 9.4. If the latest package has a change that is not backwards-compatibile, I think it would be good if there was an option to install the previous version of the package.
However, I don't think it's possible to access 0.6.4 in any way at this point?
Environment
Could you add a permission of speech recognition? As I know, we can use kTCCServiceSpeechRecognition
for speech recognition.
We're using healthkit in our app and attempting to run e2e tests in Detox. When providing health as an argument for launchApp()
it does not set the permission for allowing access to "Steps" and "Mindful Minutes", so the permission sheet still shows which times out any other tests.
The way i've been setting the permissions is as follows (to ensure it's set on initial launch)
beforeAll(async () => {
await detox.init(config, { launchApp: false });
await device.launchApp({
permissions: {
notifications: "YES",
health: "YES"
}
});
});
It's definitely running this code as the notification permissions are being set correctly, and the app does appear on Settings > Privacy > Health on the simulator. It shows "Steps" and "Mindful Minutes" as being un-toggled though.
When I try to run
applesimutils --list
it just hangs.
This is with the newest version 0.5.19.
But when I run the command with sudo
sudo applesimutils --list
it works. So it seems to be some kind of permission issue?
applesimutils --list
MacOS High Sierra Version 10.13.2 (17C205)
Xcode Version 9.2 (9C40b)
When I try to run
applesimutils --list --byType iPhone XR" --byOS "12.1"
it just hangs.
But when I run
applesimutils --list --byOS "12.1"
applesimutils --list
works too.
I am using the version 0.6.4
.
applesimutils --list --byType iPhone XR"
macOS High Sierra 10.13.6 (17G5019)
Xcode 10.1 (10B61)
Description
Running applesimutils --list
is not returning a list of available simulators as expected.
Running xcrun simctl list devices
returns a full list of available devices that should be found.
applesimutils --list
[
]
xcrun simctl list devices
== Devices ==
-- iOS 10.2 --
iOS 10 Device (887E2288-59E0-43EF-AB5D-C6C759739452) (Shutdown)
-- iOS 12.2 --
iPhone SE (35ECF1A7-005D-426A-A0D5-6F0A365C92F5) (Shutdown)
iPhone X (99AA3344-59C2-4214-A612-F17381A06AF7) (Shutdown)
iPhone Xs Max (4D05EA4E-11F5-4FCB-8B25-9F280B743DB2) (Shutdown)
iPad Air 2 (7D82D4ED-606E-4B4C-83C8-22B1FBC0CA65) (Shutdown)
iPad Pro (11-inch) (DB1F8D5F-7F04-40AF-943B-DE32C8BE303F) (Shutdown)
iPadTestDevice (88FB61A2-9807-40D4-BB42-E8258970EFB1) (Shutdown)
-- tvOS 12.2 --
Apple TV 4K (38884A89-F573-4382-BEC8-663B910F1863) (Shutdown)
-- watchOS 5.2 --
Apple Watch Series 2 - 38mm (BA61EADE-C7C1-441E-B2C5-1F8E322F10CE) (Shutdown)
Apple Watch Series 2 - 42mm (7777B94E-BB97-433C-91C3-7EDF9F4A5818) (Shutdown)
Apple Watch Series 3 - 38mm (09BB2B06-38D1-4960-A5CE-F6AED3A355E8) (Shutdown)
Apple Watch Series 3 - 42mm (3048BA2E-BDBD-474A-9F81-8F2C431D2497) (Shutdown)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-13-0 --
iPhone 8 (979F01E2-05CA-46E5-86BA-3AFFB361D86A) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 Plus (C24C424C-9563-466C-B031-1A56DB438A07) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs (D338FF86-A7A9-48BC-8AB2-5091EC48FA3E) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs Max (992D0848-961E-4110-A1B1-994AA1C24386) (Shutdown) (unavailable, runtime profile not found)
iPhone Xʀ (CF17A29D-3A16-4E2C-8016-72A065AE42AF) (Shutdown) (unavailable, runtime profile not found)
iPad Pro (9.7-inch) (9BB77090-9E62-4EAE-9789-E9FBBCD8B0EB) (Shutdown) (unavailable, runtime profile not found)
iPad Pro (11-inch) (7490EBED-74AB-4E46-9B3F-61A8566663A7) (Shutdown) (unavailable, runtime profile not found)
iPad Pro (12.9-inch) (3rd generation) (CDE08C47-DE72-4254-B556-C0605BEB5402) (Shutdown) (unavailable, runtime profile not found)
iPad Air (3rd generation) (057F3AEA-A579-40E1-8752-8D0B93DBC512) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.tvOS-13-0 --
Apple TV (0C4B643F-462E-41B1-809D-75C67C021C16) (Shutdown) (unavailable, runtime profile not found)
Apple TV 4K (3328165F-C9C7-43E3-B691-1AA6E0D6348D) (Shutdown) (unavailable, runtime profile not found)
Apple TV 4K (at 1080p) (D2AA75C4-0AB5-487F-8AFA-C31E4D666E4B) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-6-0 --
Apple Watch Series 2 - 38mm (74733A41-7197-4D6F-8FAC-97F8242172F1) (Shutdown) (unavailable, runtime profile not found)
Apple Watch Series 2 - 42mm (B36F8F0D-2B47-4156-BAC1-9883BAEFA10B) (Shutdown) (unavailable, runtime profile not found)
Apple Watch Series 3 - 38mm (AD07B3C7-2236-4024-8E8D-431B66EDDFA8) (Shutdown) (unavailable, runtime profile not found)
Apple Watch Series 3 - 42mm (382B8DF2-2A63-437B-9271-4C73AB0C22D9) (Shutdown) (unavailable, runtime profile not found)
Apple Watch Series 4 - 40mm (DBCD9524-999B-4019-8C96-E9410F3C589A) (Shutdown) (unavailable, runtime profile not found)
Apple Watch Series 4 - 44mm (DE683917-1E3E-4163-8078-451E5C9A9C7A) (Shutdown) (unavailable, runtime profile not found)
Environment
Additional Context
I have untapped and retapped per the pinned issue with 0.6.6. I uninstalled and reinstalled to get on the latest. I'm not sure what might be holding it back from seeing the list of simulators. My local scripts aren't working due to no simulators being found.
It would be massively handy to spoof or mock a mail account in the simulator to avoid getting the system alert for No Mail Accounts. Testing logic around sending email from the app is near impossible.
All iOS Simulators and Xcode versions that I've worked with going back to at least Xcode 7.
AppleSimulatorUtils fails on CI with "Error: Unknown permission pass error" error. I'm using Jenkins.
Here's the command I use:
$ applesimutils --simulator "iPhone 7, OS=11.0" --bundle my.bundle.id --setPermissions "location=inuse, notifications=YES"
Although when I login to the build node through SSH this command works perfectly.
macOS version: 10.12.6
Xcode version: 9.0.1
Simulator: iPhone 7, OS=11.0
UPD: I've just tried it on GitLab CI, got the same error.
UPD 2: If notifications=YES
permission is removed from the command, it works.
Description
My local builds are no longer setting the Notification permission for iOS 13.1 devices. I haven't updated anything in my project recently. It may be related to a recent update as I recently upgraded from 0.7.4 to 0.7.6.
The issue seems isolated to runtime 13.1. The same suite of tests and commands works perfectly on iOS 12.2.
Steps to Reproduce
I'm running my test suite with a device I create specific for the test run. Using iOS 13.1 runtime. Once the device is created, I boot the device and wait 30 sec. Then run applesimutils on the new device setting notifications, location, and contacts.
applesimutils --byName "iOS13TestDevice" --bundle "simpleinout" --setPermissions "notifications=YES, location=always, contacts=YES" || sleep 30
Expected Behavior
All previous versions would set this permission and the system prompts would never show during the test run.
Environment
Verify that iOS 11 is fully supported.
First issue:
/System/Library/LaunchDaemons/com.apple.locationd.plist doesn’t exist
xcenv is a tool that lets you define Xcode version on a project/directory/shell basis.
It's especially useful on CI because it's possible to have different branches using different Xcode versions to build.
As far as I can see, AppleSimulatorUtils uses full path to xcrun
binary, thus missing xcenv shims. I'm not sure what the best way is to address it, although using just xcrun
instead of the full path should work for both cases.
I'd be happy to implement it myself if you're okay with that and could give me some pointers.
EDIT: wording.
Installation fails when running install command on CircleCI
brew install applesimutils --HEAD
#!/bin/bash -eo pipefail
brew install applesimutils --HEAD
^D��^D��==> Installing applesimutils from wix/brew
==> Cloning https://github.com/wix/AppleSimulatorUtils.git
Cloning into '/Users/distiller/Library/Caches/Homebrew/applesimutils--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
Submodule 'ObjCCLIInfra' (https://github.com/wix/ObjCCLIInfra.git) registered for path 'ObjCCLIInfra'
Submodule 'homebrew-brew' (https://github.com/wix/homebrew-brew) registered for path 'homebrew-brew'
Cloning into '/Users/distiller/Library/Caches/Homebrew/applesimutils--git/ObjCCLIInfra'...
Cloning into '/Users/distiller/Library/Caches/Homebrew/applesimutils--git/homebrew-brew'...
Submodule path 'ObjCCLIInfra': checked out '613c2074cf655cf2058da23fdab31166296b4ab9'
Submodule 'GBCli' (https://github.com/tomaz/GBCli.git) registered for path 'ObjCCLIInfra/GBCli'
Cloning into '/Users/distiller/Library/Caches/Homebrew/applesimutils--git/ObjCCLIInfra/GBCli'...
Submodule path 'ObjCCLIInfra/GBCli': checked out '542831c6d47b74b2df5229c6850e69a7d147a54b'
Submodule path 'homebrew-brew': checked out 'f9d879cf891d07ccb2e923c1870a3efd2d798b0f'
/Users/distiller/Library/Caches/Homebrew/applesimutils--git/ObjCCLIInfra
/Users/distiller/Library/Caches/Homebrew/applesimutils--git/ObjCCLIInfra/GBCli
/Users/distiller/Library/Caches/Homebrew/applesimutils--git/homebrew-brew
==> ./buildForBrew.sh /usr/local/Cellar/applesimutils/HEAD-90855d1
Last 15 lines from /Users/distiller/Library/Logs/Homebrew/applesimutils/01.buildForBrew.sh:
~~~~~~~^
15 errors generated.
CompileC /tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetNotificationsPermission.o /tmp/applesimutils-20180925-3451-1ryippo/applesimutils/applesimutils/SetNotificationsPermission.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: applesimutils)
cd /tmp/applesimutils-20180925-3451-1ryippo/applesimutils
export LANG=en_US.US-ASCII
clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/tmp/applesimutils-20180925-3451-1ryippo/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/tmp/applesimutils-20180925-3451-1ryippo/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode-10.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.11 -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -iquote /tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-generated-files.hmap -I/tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-own-target-headers.hmap -I/tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-all-target-headers.hmap -iquote /tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-project-headers.hmap -I/tmp/applesimutils-20180925-3451-1ryippo/build/Build/Products/Release/include -I/tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources/x86_64 -I/tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources -F/tmp/applesimutils-20180925-3451-1ryippo/build/Build/Products/Release -MMD -MT dependencies -MF /tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetNotificationsPermission.d --serialize-diagnostics /tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetNotificationsPermission.dia -c /tmp/applesimutils-20180925-3451-1ryippo/applesimutils/applesimutils/SetNotificationsPermission.m -o /tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetNotificationsPermission.o
** BUILD FAILED **
The following build commands failed:
CompileC /tmp/applesimutils-20180925-3451-1ryippo/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetServicePermission.o /tmp/applesimutils-20180925-3451-1ryippo/applesimutils/applesimutils/SetServicePermission.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
cp: build/Build/Products/Release/applesimutils: No such file or directory
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/wix/homebrew-brew/issues
Exited with code 1
In my config, using Xcode 10.0.0 (which is using build 254a instead of 255) and installing the tap and installing.
In all previous runs, these steps work without issue. For some reason it fails on the install. See the output above.
All simulators and builds using Xcode 10.0 (build 254a)
Similar errors related to the CLT being out of sync with Xcode.
Setting location through CLI causes location to stop working
Start the wix detox test app, there is a button that retrieves location.
set the permission
applesimutils --byId <device_id> --bundle com.wix.detox-example --setPermissions "location=always"
Now click on get location in the demo app, it will show "location unavailable". No matter what you set the value to, it will stay in this state.
work around
in simulator settings > set location off and then on by adding a custom location value will fix the problem.
restarting the simulator also fixes the problem.
notes
running the e2e location test in the detox demo works so I am wondering if I am using the CLI wrong?
Xcode 10.1
Build version 10B61
command line tools 10.1 10B61
Wix errors when run in a buddybuild postclone step.
+ applesimutils --simulator 7D33C5C4-B6C6-4E99-B208-21E62A504E7D --bundle com.example --setPermissions calendar=NO,camera=NO,contacts=NO,health=NO,homekit=NO,location=never,medialibrary=NO,microphone=NO,motion=NO,notifications=NO,photos=NO,reminders=NO,siri=NO
159
2017-07-01 06:40:47.962 applesimutils[2026:42204] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
160
*** First throw call stack:
161
(
162
0 CoreFoundation 0x00007fff84f2857b __exceptionPreprocess + 171
163
1 libobjc.A.dylib 0x00007fff9a19a1da objc_exception_throw + 48
164
2 CoreFoundation 0x00007fff84fa5c55 +[NSException raise:format:] + 197
165
3 Foundation 0x00007fff868c4581 +[NSPropertyListSerialization propertyListWithData:options:format:error:] + 67
166
4 applesimutils 0x0000000100185721 +[SetLocationPermission setLocationPermission:forBundleIdentifier:simulatorIdentifier:] + 245
167
5 applesimutils 0x000000010018b750 __performPermissionsPass_block_invoke + 676
168
6 CoreFoundation 0x00007fff84ea5d82 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
169
7 CoreFoundation 0x00007fff84ea5c3f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 239
170
8 applesimutils 0x000000010018a991 main + 3404
171
9 libdyld.dylib 0x00007fff9aa7b235 start + 1
172
10 ??? 0x0000000000000007 0x0 + 7
173
)
174
libc++abi.dylib: terminating with uncaught exception of type NSException
175
./buddybuild_postclone.sh: line 77: 2026 Abort trap: 6 applesimutils --simulator "7D33C5C4-B6C6-4E99-B208-21E62A504E7D" --bundle "com.example" --setPermissions "calendar=NO,camera=NO,contacts=NO,health=NO,homekit=NO,location=never,medialibrary=NO,microphone=NO,motion=NO,notifications=NO,photos=NO,reminders=NO,siri=NO"
Edit buddybuild_postclone.sh:
and run
applesimutils --simulator "7D33C5C4-B6C6-4E99-B208-21E62A504E7D" --bundle "com.example" --setPermissions "calendar=NO,camera=NO,contacts=NO,health=NO,homekit=NO,location=never,medialibrary=NO,microphone=NO,motion=NO,notifications=NO,photos=NO,reminders=NO,siri=NO"
I want to know if there is a way to test TouchID, currently i'm using Detox as e2e framwork, and i have touchID logic in my app. It would be nice simulate success and failure and interactions with system alerts binding to the process.
Need to investigate where those are saved in and what process is responsible for their management. They are not in TCC.
Hi, I am unclear on what this project does based on the readme page.
I saw it mentioned permissions
Available Permissions:
calendar=YES|NO|unset
camera=YES|NO|unset
contacts=YES|NO|unset
faceid=YES|NO|unset
health=YES|NO|unset (iOS 12.0 and above)
homekit=YES|NO|unset
location=always|inuse|never|unset
medialibrary=YES|NO|unset
microphone=YES|NO|unset
motion=YES|NO|unset
notifications=YES|NO|unset
photos=YES|NO|unset
reminders=YES|NO|unset
siri=YES|NO|unset
speech=YES|NO|unset
Does this mean it has the ability to disable permissions for an app?
Maybe a more user friendly readme will help some like me. thanks.
Description
Upon upgrading to Xcode 11.1 we started seeing an error when trying to access the Keychain from e2e on our app, the native API throws the following error:
errSecNotAvailable = -25291 /* No Keychain is available. */
After some investigation we found that the issue arises after clearing the keychain using applesimutils:
await device.deviceDriver.applesimutils._execAppleSimUtils({
args: `--simulator "${device._deviceId}" --clearKeychain`,
});
We need to reboot the simulator for it to work again.
Steps to Reproduce
https://github.com/santiagofm/detoxKeychainIssue
Taking a look at the directory referenced in ClearKeychain.m, we see all files being removed but not fully re-created until we reboot the simulator.
Environment
Hi there :/
Installation for applesimutils via
brew tap wix/brew
brew install applesimutils
doesn't work out and ends up with an ** BUILD FAILED **
A further important extract from the error log could be probably this:
~~~~~~~~^
1 error generated.
4 errors generated.
14 errors generated.
In file included from /tmp/applesimutils-20180927-25733-dvclhe/applesimutils/applesimutils/SetNotificationsPermission.m:9:
/tmp/applesimutils-20180927-25733-dvclhe/applesimutils/applesimutils/SetNotificationsPermission.h:9:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
15 errors generated.
...
Just try to install appleSimulatorUtils via homebrew.
The following build commands failed:
CompileC /tmp/applesimutils-20180927-25733-dvclhe/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/SetNotificationsPermission.o /tmp/applesimutils-20180927-25733-dvclhe/applesimutils/applesimutils/SetNotificationsPermission.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
cp: build/Build/Products/Release/applesimutils: No such file or directory
HOMEBREW_VERSION: 1.7.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: f239b7a62790cfb4f33bda9aab7597d43f1b1e3b
Last commit: 6 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a8b53d6a39a4ed56b3b39776c675abf4e6f9eebd
Core tap last commit: 40 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/rudi/Library/Caches/Homebrew
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_171, 1.8.0_101
macOS: 10.13.6-x86_64
CLT: 9.4.0.0.1.1526532315
Xcode: 10.0
XQuartz: 2.7.7 => /opt/X11
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.13
HOMEBREW_GIT: git
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/bin:/bin:/usr/sbin:/sbin
The whole error log can be found here. Any hints or help appreciated, thanks in advance :)
I'm simply trying to install applesimutils by brew tap wix/brew && brew install applesimutils
but i'm getting this error:
Installing applesimutils from wix/brew
==> Downloading https://raw.githubusercontent.com/wix/homebrew-brew/master/AppleSimulatorUtils-0.6.4.tar.gz
Already downloaded: /Users/Francesco/Library/Caches/Homebrew/downloads/06653380f000a4b0be4d3e5b2874aba7392780ed408792b89f6467479a14e913--AppleSimulatorUtils-0.6.4.tar.gz
==> ./buildForBrew.sh /usr/local/Cellar/applesimutils/0.6.4
Last 15 lines from /Users/Francesco/Library/Logs/Homebrew/applesimutils/01.buildForBrew.sh:
export LANG=en_US.US-ASCII
clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/tmp/applesimutils-20190315-22456-kqzhdh/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/tmp/applesimutils-20190315-22456-kqzhdh/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.11 -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -iquote /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-generated-files.hmap -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-own-target-headers.hmap -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-all-target-headers.hmap -iquote /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-project-headers.hmap -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Products/Release/include -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources/x86_64 -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources -F/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Products/Release -MMD -MT dependencies -MF /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBOptionsHelper.d --serialize-diagnostics /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBOptionsHelper.dia -c /tmp/applesimutils-20190315-22456-kqzhdh/ObjCCLIInfra/GBCli/GBCli/src/GBOptionsHelper.m -o /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBOptionsHelper.o
CompileC /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBSettings.o /tmp/applesimutils-20190315-22456-kqzhdh/ObjCCLIInfra/GBCli/GBCli/src/GBSettings.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: applesimutils)
cd /tmp/applesimutils-20190315-22456-kqzhdh/applesimutils
export LANG=en_US.US-ASCII
clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/tmp/applesimutils-20190315-22456-kqzhdh/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/tmp/applesimutils-20190315-22456-kqzhdh/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.11 -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -iquote /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-generated-files.hmap -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-own-target-headers.hmap -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-all-target-headers.hmap -iquote /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/applesimutils-project-headers.hmap -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Products/Release/include -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources/x86_64 -I/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/DerivedSources -F/tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Products/Release -MMD -MT dependencies -MF /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBSettings.d --serialize-diagnostics /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBSettings.dia -c /tmp/applesimutils-20190315-22456-kqzhdh/ObjCCLIInfra/GBCli/GBCli/src/GBSettings.m -o /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/GBSettings.o
** BUILD FAILED **
The following build commands failed:
CompileC /tmp/applesimutils-20190315-22456-kqzhdh/build/Build/Intermediates.noindex/applesimutils.build/Release/applesimutils.build/Objects-normal/x86_64/LNLog.o /tmp/applesimutils-20190315-22456-kqzhdh/ObjCCLIInfra/LNLog.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
cp: build/Build/Products/Release/applesimutils: No such file or directory
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/wix/homebrew-brew/issues
This is my brew config
:
HOMEBREW_VERSION: 2.0.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: 0f07fe5c5cdfdf0f424bba7b879faa38aedc8ee4
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: d1e245f561591bb7dd5772fb6ebaac04c920c731
Core tap last commit: 4 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.LSKKxi6ey2/org.macosforge.xquartz:0
HOMEBREW_LOGS: /Users/Francesco/Library/Logs/Homebrew
CPU: dodeca-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 10.0 build 1000
Git: 2.5.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 9.0.4, 1.8.0_192, 1.8.0_181, 1.8.0_92, 1.7.0_17
macOS: 10.14.3-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1
XQuartz: 2.7.7 => /opt/X11
// wd example let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.clear();
the clear() does not work. the textfield didn't get cleared.
appium: 1.9.1
wd: 1.11.0
xcode: 10
Works find before but it can not find simulators after upgrade Xcode from 8.3.3, either by name or by simulator id.
run applesimutils --simulator "iPhone 6, OS = 10.3" --bundle "com.ancientmd.dingtcm.test" --setPermissions "notifications=YES, location=always, camera=YES"
newest macOS and Xcode
Some of the data presented in xcrun simctl list --json
seems to be missing in applesimutils --list
Let's add device type to the returned json , and support filtering by device type when listing devices.
applesimutils version 0.5.22
My app is in react native and running a test using the iOS simulator to automate the login screen
however whenever I launch my app in the iOS simulator, there is a push notifications popup
In my test code, I use this command but it still didn't disappear
describe('Login Test', () => {
// beforeAll(async () => await driver.init(config));
afterAll(async () => await driver.quit());
beforeAll(async () => {
await driver.init(config, {launchApp: false});
await driver.launchApp({
permissions: {notifications: 'YES'}
});
});
react-native-cli: 2.0.1
react-native: 0.55.4
macOS: 10.3.16
Xcode: 10 , Legacy Build System in Project Setting
iPad (5th generation)
PlatformVersion: 10.3
Current HEAD fails to build.
Checkout HEAD (21.09.17) from github.
xcodebuild clean build -project applesimutils/applesimutils.xcodeproj -scheme applesimutils -configuration Release -derivedDataPath ./build
...
=== CLEAN TARGET applesimutils OF PROJECT applesimutils WITH CONFIGURATION Release ===
Check dependencies
[BCEROR]Code Signing Error: Ad Hoc code signing is not allowed with SDK 'macOS 10.13'
Clean.Remove clean
...
** CLEAN SUCCEEDED **
=== BUILD TARGET applesimutils OF PROJECT applesimutils WITH CONFIGURATION Release ===
Check dependencies
Code Signing Error: Ad Hoc code signing is not allowed with SDK 'macOS 10.13'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
macOS 10.12.6, XCode 9.0 (9A235)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.