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

Post

Replies

Boosts

Views

Activity

FirebaseCore not found
I am new to app development. When setting up forecast, I downloaded the libraries and updated the code in my main app, but when I entered import FirebaseCore, I receive an error that says “No such module 'FirebaseCore'" Dies anyone know why it is not working?
0
0
224
Aug ’24
expo managed tap to pay configuration issue
Hi! I am having a strange issue when I try to build my react native project in an eas managed workflow (including dependencies just in case). The error I get is: Provisioning profile "[profile]" doesn't include the com.apple.developer.proximity-reader.payment.acceptance entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target '[project_name]' from project '[project]') I find this weird because I have enabled the entitlement in my identifier and my provisioning profile reflects this fact. I have set up an entitlements file where I have set up the kv pair for the entitlement. Any help would be much appreciated!
2
2
491
Aug ’24
Swifts Tests crash when run against Mac Catalyst destination
Running Xcode 16b4 on Apple silicon. Create a fresh Swift package, it will be using swift-tools-version: 6.0. Add a Swift Test to the test target with some basic assertion like #expect(true). Run the test against the target My Mac and the test will compile, run and pass. Run the test against the target My Mac (Mac Catalyst) and the test will compile and crash with EXC_BAD_ACCESS. If you create an equivalent XCTest, it will compile, run and pass against both destinations. Has anyone else experienced this? Is this already being tracked? Is this possibly related? https://github.com/swiftlang/swift/pull/75432
1
0
388
Jul ’24
MDM WebContentFilter payload clarification
We have implemented a NEFilterDataProvider in our Network Extension. We want to utilize the WebContentFilter payload within the Device Management Configuration profile to allow the functionality of our content filter. In the Device Management Profile documentation, there are three properties that are related and seems to have some conditions around them: FilterBrowsers, FilterPackets and FilterSockets. It stated that "At least one of FilterBrowsers or FilterSockets needs to be true" for FilterBrowsers, "At least one of FilterPackets or FilterSockets needs to be true" for FilterPackets, and At least one of FilterBrowsers or FilterSockets needs to be true" for FilterSockets. Based on the above conditions, if we only set FilterPackets to true and ignore the other two properties, it would not satisfy the condition for FilterSockets as both FilterBrowsers and FilterSockets are false. However, during testing we found out that this still works and our content filter is filtering traffic as expected. Does this mean only ONE of the THREE properties need to be true? Or should we make changes according to the documentation to have it align with all conditions and requirements? Any clarifications of the properties and their requirements are much appreciated!
1
0
341
Jul ’24
Bluetooth nonfunctional after simulator crash.
I had a simulator crash developing bluetooth IOS app on a Sonoma 14.5 M2 MacBook Air. Since the crash bluetooth on the MacBook Air no longer functions. Systems Settings/Bluetooth Turned on shows: 'My Devices' shows none of the 5+ devices I use 'Nearby Devices' shows constantly searching. A Bluetooth scanner 'LightBlu" by puchthrough run on a iPhone shows no signal from the Mac Air. I tried deleting: /Users/~/Library/Preferences/com.apple.bluetoothuserd.plist and then LightBlue could connect for a little while but the System/Settings never change. What can I do. Should I reinstall the simulator, xCode the system or all the above?
1
0
360
Jul ’24
Parameterized testing with ‘any’ values
Does Swift Testing support using ‘any’ values as parameters like seen here for ‘any ChartDataPoint.Type’ @Test(arguments: [ (expectedBodyFatValues, HKQuantityTypeIdentifier.bodyFatPercentage, HKUnit.percent(), BodyFatPoint.self), (expectedActiveEnergyValues, HKQuantityTypeIdentifier.activeEnergyBurned, HKUnit.kilocalorie(), ActiveCaloriesPoint.self), (expectedBodyMassValues, HKQuantityTypeIdentifier.bodyMass, HKUnit.pound(), BodyMassPoint.self), (expectedBasalEnergyValues, HKQuantityTypeIdentifier.basalEnergyBurned, HKUnit.kilocalorie(), BasalEnergyPoint.self) ]) func healthKitDataReading( expectedData: [Double], identifier: HKQuantityTypeIdentifier, unit: HKUnit, dataChartType: any ChartDataPoint.Type ) async throws {...} Currently I can’t get this code to work, and see the error … Conflicting arguments to generic parameter 'C' ('[([Double], HKQuantityTypeIdentifier, HKUnit, BodyFatPoint.Type)]' vs. '[([Double], HKQuantityTypeIdentifier, HKUnit, ActiveCaloriesPoint.Type)]' vs. '[([Double], HKQuantityTypeIdentifier, HKUnit, BodyMassPoint.Type)]' vs. '[([Double], HKQuantityTypeIdentifier, HKUnit, BasalEnergyPoint.Type)]') Also, I can’t seem to use variables like ‘expectedBodyFatValues’ due to the error Instance member 'expectedBodyFatValues' cannot be used on type 'Health_Mix_Swift_Tests'; did you mean to use a value of this type instead? Only way I’ve found around this is including the entire array of values as the parameter, but it’s very cumbersome.
3
0
445
Jul ’24
UDID for Apple watch series 9
Hi, I am currently trying to install and run a watchOS App I developed in Xcode on an Apple watch series 9. I would like to add the Apple watch as a registered device to a developer account. I need to provide the device name and the device ID or UDID to register the Apple watch. I am not sure how I can get the UDID for the Apple watch. I would appreciate your help with information on how I can get the UDID for the Apple watch and if the watch needs to be registered with a developer account for installing and running a watchOS app from Xcode on the Apple watch. Thank you.
1
1
415
Jul ’24
Using a Brew-installed library on visionOS?
I've been working on a Swift PM wrapper for the libtiff library, which I installed on my Mac via Brew. So far so good. But I just tried adding it to my visionOS project. and it complained that it was trying to link against a library built for macOS: building for 'visionOS-simulator', but linking in dylib (/opt/homebrew/Cellar/libtiff/4.6.0/lib/libtiff.6.dylib) built for 'macOS' I wish Brew would build universal libraries, but it doesn’t, and they have no interest in doing so. What are my options? If I build libtiff from sources, it’s still a bit of a pain to build against a different SDK. libtiff has its own Makefile I’d rather not try to edit. Can I make an xcframework out of it? Can I statically link it into my Swit wrapper library? Do I need to hack together a C build target in my Package and copy the source files over to it?
2
0
446
Jul ’24
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
10
0
435
Jul ’24
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
813
Jul ’24
How to use libssh2 in a SwiftUI app?
I want to use sftp functionality in my SwiftUI app and I have decided to try and do it using plain libssh2 (ie. without an initial wrapper or anything). libssh2 is written in C. What are the steps I need to take in order to start calling the libssh2 C functions in my SwiftUI app?
1
0
340
Jul ’24
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
319
Jul ’24
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
625
Jul ’24
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
498
Jul ’24