Dive into the vast array of tools and services available to developers.

Post

Replies

Boosts

Views

Activity

How to determine the cause of an out of memory crash
Hello, We have an app built with a hybrid framework called NativeScript, and deployed on iPad devices. Since the update to iOS 17.4, we're experiencing crashes that seem to be caused by an out of memory problem. I was able to retrieve crashes reports in .ips format that seem to confirm the out of memory hypothesis, but by lack of experience and knowledge in iOS environment, I couldn't find the origin of the problem yet. One of the most difficult point is that we haven't been able yet to reproduce the bug at home, even with the concerned tablets. Our app crashes randomly on customer's sites, this is manifested by the app getting frozen, with graphic artifacts in the form of vertical gray stripes onto the whole screen. For now, the remedy is to reboot the tablet remotely. I've tried to launch the app on a problematic tablet in profiling mode with Xcode, with the Leaks tools from Instruments, but even after navigating in the whole app, I can't see any suspicious growth in memory usage. Is there someone here that can help me to read the .ips file to understand and isolate the cause of the problem ? Thanking you by advance. P.S : I formatted ips file in valid JSON format
1
0
27
2d
Can't access Individual apple developer account fully
I have an apple developer account, but can't access its Certificates, Identifiers & Profiles section, and when I try to open it it gives following error Unable to find a team with the given Team ID "######"to which you belong. Please contact Apple Developer Program Support. https://developer.apple.com/support I am concerned whether we can access it in an individual account or we have to make the purchase I need this to be able to run my apps on real device instead of simulator cause it keeps telling that certificate not valid.
0
0
29
2d
Rosetta 2 in MacOS VM
I'm running a MacOS15 beta 3 VM on a MacOS15 beta 3 Host (M2 Pro Mac Mini) using the Apple Virtualization Framework (via https://github.com/s-u/macosvm). For building my app inside the VM I need Rosetta 2, since flutter still uses some Intel binaries. But when I want to install Rosetta 2 I'm always getting the message, that installing Rosetta 2 is not allowed on this system. Digging in the log files I found a message from the installer, that the system is not supported. Searching online I just find a method for using Rosetta 2 inside Linux VM's using the Virtualization Framework. Am I missing something or is it not possible to use Rosetta 2 with MacOS guests?
2
0
103
3d
Simulator crash Exception Type: EXC_CRASH (SIGKILL) WatchDog: 0x8BADF00D
Hello, My app often crashes when I use simulators. I would like some help with reading the crash report that is generated. Especially with the part below Thread 0 Crashed. Based on other posts I understand that the 0x8BADF00D in the crash report is a WatchDog crash that basically says that WatchDog terminated the app because the main thread was blocked for a significant time. Many processes can block the main thread so it's hard to find out what it is in our specific case. Can someone help me reading through the crash report? Short_crash_report.txt Background information The application is Xamarin Native and I use Rider as an IDE. When I use Visual Studio, the simulators run just fine. No crash occurs while using my app on a device. The crash happens on multiple simulators with different OS versions. I already deleted XCode cache, erased content and settings of several simulators and deleted iOS DeviceSupport files.
0
0
98
5d
Detecting Frida
Hi, I am writing in to check if there is a way to detect Frida. As we have a Mobile App Penetration Test (MAPT), and the tester uses Frida as the tool for the penetration test. We have implemented these codes to detect Frida and Objection: static bool isInjected0(){ NSArray *suspiciousLibraries = [NSArray arrayWithObjects:@"FridaGadget", @"frida", @"cynject", @"libcycript", nil]; int count = _dyld_image_count();//Get the number of loaded images if (count> 0) { for (int i = 0; i <count; i++) { //Traverse all image_names. Determine whether there are DynamicLibraries const char * dyld = _dyld_get_image_name(i); if (strstr(dyld, "DynamicLibraries")) { return YES; } for (NSString *suspiciousLibrary in suspiciousLibraries) { if ([[NSString stringWithUTF8String: dyld] rangeOfString:suspiciousLibrary].location != NSNotFound) { return YES; } } } } return NO; } We also added these codes to detect the default ports than Frida is using @interface FridaDetector : NSObject + (BOOL)detectFridaPort; + (BOOL)isPortOpen:(in_port_t)port; @end @implementation FridaDetector + (BOOL)detectFridaPort { in_port_t port = 27042; return [self isPortOpen:port]; } + (BOOL)isPortOpen:(in_port_t)port { int socketFileDescriptor = socket(AF_INET, SOCK_STREAM, 0); if (socketFileDescriptor == -1) { NSLog(@"Failed to create socket"); return NO; } struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_len = sizeof(addr); addr.sin_family = AF_INET; addr.sin_port = htons(port); // Ensuring the port is in network byte order addr.sin_addr.s_addr = inet_addr("127.0.0.1"); struct sockaddr bind_addr; memcpy(&bind_addr, &addr, sizeof(addr)); BOOL result = NO; if (bind(socketFileDescriptor, (struct sockaddr*)&bind_addr, sizeof(addr)) == -1) { NSLog(@"Failed to bind socket, port might be open"); result = YES; } else if (listen(socketFileDescriptor, SOMAXCONN) == -1) { NSLog(@"Failed to listen on socket, port might be open"); result = YES; } close(socketFileDescriptor); return result; } @end We are able to detect Frida on a normal device, but I believe the tester did some workaround to prevent us from detecting the Frida present on their device. Is there a better way to detect Frida and Objection?
0
0
97
6d
screenshot for iPhone home screen
When having my iPhone connected to my Mac via USB cable, how can I take a screenshot of the home screen from a swiftUI app? I tried using libimobiledevice (idevicescreenshot) but that requires install the developer disk image. When looking for it, it turns that my Xcode (version 15.4) only provides that kind of images up to iOS 16.4. I have looked everywhere on this site, but couldn't fine the required image or otherwise, how to take the screenshot I need. Thanks!
1
0
137
1w
What app provides system alerts in VisionOS? iOS and iPadOS has springboard app, but VisionOS doesn't
I want to automate tests for my iOS app and start writing UITests. Sometimes system alerts appear, and my tests have to simulate button tapping. In iOS and iPadOS these alerts are available via the system Springboard application: let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") let cancelButton = springboard.alerts.buttons["Cancel"].firstMatch if cancelButton.exists { cancelButton.tap() // <-- cancel button taps, and test continue working } But when I launch my test in the Vision Pro simulator, the springboard is not available: let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") print(springboard.exists) // <-- "false" will be printed, springboard does not exist It means that I can't automate button tapping in system alerts. So, my question is: How can I access system alerts in VisionOS and tap buttons by UITests?
1
0
181
1w
Can't turn on Developer Mode on iPhone 12 mini
Hi, I am developing an iOS application using React Native on the Expo platform with EAS. I have followed all of the Expo documentation for setting up my development environment, but in order to create a development build to test my app on my iPhone 12 mini, it says that I need to enable Developer Mode on my device. The issue I'm running into is that when I go to Settings > Privacy & Security, here is no Developer Mode option as expected. I ensured that my device is registered in the Apple Developer portal, and I tried restarting my device multiple times to no avail. I also tried searching the developer forums for a solution, but the only solution I saw was to hook my device up to XCode which isn't an option since I'm developing my app on Windows using EAS. Note that I'm running iOS 17.5.1 on my iPhone 12 mini. Please let me know if there's anything I can do or anything I'm missing to enable Developer Mode on my device.
2
0
183
1w
How to depend on a non-macOS external package in macros
Hello everyone, I am trying to create a macro that depends on an external package to abstract some of the packages logic. The point is that the dependency does not support macOS which results in a build failure when trying to build the macro. Since macOS 10.15 is required for creating macros, any thing can be done to get it to work? Here is a sample to what I'm trying to do import PackageDescription import CompilerPluginSupport let package = Package( name: "Stringify", platforms: [ .macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .macCatalyst(.v13) ], products: [ .library( name: "Stringify", targets: ["Stringify"] ), .executable( name: "StringifyClient", targets: ["StringifyClient"] ), ], dependencies: [ .package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"), .package(url: "https://github.com/MyDependency", from: "1.0.0"), ], targets: [ .target( name: "Stringify", dependencies: ["StringifyMacros"] ), .executableTarget( name: "StringifyClient", dependencies: ["Stringify"] ), .macro( name: "StringifyMacros", dependencies: [ .product(name: "SwiftSyntaxMacros", package: "swift-syntax"), .product(name: "SwiftCompilerPlugin", package: "swift-syntax"), .product(name: "MyDependency", package: "MyDependency"), ], swiftSettings: [ .define("IOS_ONLY") ] ), ], swiftLanguageVersions: [.v5] )
1
0
97
1w
trouble installing truffle for my MacM2 14.5
im having trouble installing truffle. ive tried root/Administrator but then i get this. if anyone has any guidance that would greatly be appreciated. this is what im getting. % npm install -g truffle npm error code EACCES npm error syscall mkdir npm error path /usr/local/lib/node_modules/truffle npm error errno -13 npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/truffle' npm error at async mkdir (node:internal/fs/promises:858:10) npm error at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:624:20 npm error at async Promise.allSettled (index 0) npm error at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11) npm error at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5) npm error at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5) npm error at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5) { npm error errno: -13, npm error code: 'EACCES', npm error syscall: 'mkdir', npm error path: '/usr/local/lib/node_modules/truffle' npm error } npm error npm error The operation was rejected by your operating system. npm error It is likely you do not have the permissions to access this file as the current user npm error npm error If you believe this might be a permissions issue, please double-check the npm error permissions of the file and its containing directories, or try running npm error the command again as root/Administrator. npm error A complete log of this run can be found in: /Users/prestonlofton/.npm/_logs/2024-07-10T00_46_51_500Z-debug-0.log prestonlofton@Prestons-Air ~ % sudo rm -rf /Library/Developer/CommandLineTools Password: Sorry, try again. Password: prestonlofton@Prestons-Air ~ % sudo Xcode-select --install xcode-select: note: install requested for command line developer tools prestonlofton@Prestons-Air ~ % npm install -g truffle 5.0.2 npm error code E404 npm error 404 Not Found - GET https://registry.npmjs.org/5.0.2 - Not found npm error 404 npm error 404 '5.0.2@*' is not in this registry. npm error 404 npm error 404 Note that you can also install from a npm error 404 tarball, folder, http url, or git url. npm error A complete log of this run can be found in: /Users/prestonlofton/.npm/_logs/2024-07-10T00_54_22_459Z-debug-0.log
1
0
126
1w
Is there any script that can detect Apple Submission to TestFlight errors early? like: ".framework contains disallowed nested bundles"
Some of the errors like ".framework contains disallowed nested bundles" we find out at later stage when uploading builds to TestFlight. It will be great if we can have similar script that apple uses or some custom script to verify it during the build time. So before I reinvent the wheel is there any script I can use at build time to detect this issue?
1
0
171
1w
Sandbox: bash(5261) deny(1) Issue in Xcode
I'm a complete newbie to building an App, this project is a GUI that interacts with an LLM AI service, it's mostly html, javascript, python. I have something that works in a web browser, and mostly works in Android Studio, but in Xcode there are numerous issues. It's my understanding this is something to do with permissions. I have asked an AI which suggested various things that haven't worked, such as reinstalling Cocoapods, and disabling SIP. Are you smarter than an AI, or at least better informed? If so, suggestions or advice would be appreciated. Sandbox: bash(5261) deny(1) file-read-data ........./ios/App/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh
1
0
167
1w
installer doesn't put on disk embedded application
Hello! I have an applications which contains another application in Contents/EmbeddedApps/ pkgbuild --root "$rootdir/$APPNAME" --scripts installscripts --install-location "/Applications/$APPNAME" --identifier com.my.id --sign 'Developer ID Installer: *** (YYY)' --version $VERSION "$PACKAGE.pkg" Notarised then. Now when I install the package I don't see embedded application inside Contents/EmbeddedApps/ macOS Version 14.6 Beta (23G5061b) A month ago I was able to install my packges successfully. But now all my old packages are affected. Also I made simple project with just two "Hello World" applications and embed one into another. I create .pkg notarised package and try to install it. Still EmbeddedApps is empty. But the files of embedded application in build/ directory becomes crowned root:wheel. Looks like installer uses my working directory for embedded application instead of /Applications/MyApp.app/Contents/EmbeddedApps/Emb.app
0
0
114
1w
Not able to use devicectl usage to run ui tests
Hello, I have a test bundle in my application and one of the strong request of our project is to run ui tests from command line having just application build. How to run unit tests on .app file that has a test target? What we tried xcrun devicectl device install app --device <device-identifier> <UITestBundle-Runner.app> xcrun devicectl device process launch --device <device-identifier> --start-stopped <com.apptestbundle-Runner.xcrun> It launches and is waiting pid to be attached. In lldb: device select <device-identifier> device process list Seeing process 'UITestBundle-Runner' pid. device process --pid 'pid id' It attaches and I can see 'debugserver' in the pid list, but it does not start testing and I need tests to start and run. Thanks!
0
0
149
1w
VSCode Issue
Issue: I have been using the VSCode for quite sometime. Since today morning, the app is shutting on my machine. I have tried re-installing the app, restarted my laptop, but to no avail. Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread Process: Electron [810] Path: /Volumes/VOLUME/*/Visual Studio Code.app/Contents/MacOS/Electron Identifier: com.microsoft.VSCode Version: 1.91.0 (1.91.0) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Electron [810] User ID: 501 Date/Time: 2024-07-07 15:14:29.236 +0530 OS Version: macOS 11.5.2 (20G95) Report Version: 12 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
2
0
211
2w