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

Post

Replies

Boosts

Views

Activity

Using resources with Swift Testing
Hey guys. I’m working on a project where I’m using the SwiftTesting framework instead of XCTest to run my unit tests. I have a file (test.png) located in my test resources folder: PackageName > Tests > PackageNameTests > Resources > test.png I’m trying to access this file in my tests, but I’m running into issues when trying to load it dynamically. Here’s what I’ve tried so far: Using Bundle.module.path(forResource:ofType:): This approach didn’t work, as Bundle.module seems to be unsupported or returns nil in Swift Testing. Using #file Macro for Relative Paths: I tried constructing a path based on #file and navigating to the resources directory, but it also didn’t yield the correct path. Has anyone successfully loaded test resources in the Swift Testing framework? Is there a recommended way to access resource files in Swift Testing, especially for projects where Bundle.module isn’t available? I've gone through the Apple Docs for Swift Testing, but I can't seem to find anything that answers my question. Thanks in advance guys!
1
0
89
1w
Ionic Cordova onesignal Asset validation failed iOS upload issue
What happened? facing issue to upload on ios TestFlight xcode version 16 macOS 15.0 xcrun bitcode_strip -r platforms/ios/YourApp/Plugins/YourFramework.framework/YourFramework -o platforms/ios/YourApp/Plugins/YourFramework.framework/YourFramework already tried bitcode_strip command but also that didn't work. The following issues occurred while distributing your application. Asset validation failed Invalid Executable. The executable '***** Syndrome.app/Frameworks/OneSignal.framework/ OneSignal' contains bitcode. (ID: fda6a528-a835-4b16-8252-893d8d16acbd) Steps to reproduce? create build , upload it on testflight and you'll get error OneSignal Cordova SDK version Release 3.3.1 Which platform(s) are affected? iOS
0
0
95
1w
Multiple dynamic libraries in a package under SPM
We are currently building an app in Swift, reusing an internal C++ backend used in other platforms ( Linux/Windows/Mac ). Current state of the project: App W - ( Swift App ) Package X - Swift Package Y.xcframework - Binary Target (ios-arm64 and ios-arm64-simulator) Z.framework Z - (C++ Backend as a library) Dynamic Library Headers - Library header files Frameworks (Folder) - Required .dylib’s for Z ( libA.dylib (Dependency of Z) [ 58 of them ] libB.dylib (Runtime dependency of python) [ 123 of them ] data - Supporting binary files for Z conf - Supporting configuration files, both text and binary. for Z python - Supporting .py scripts C.py D.py Z.framework ( C++ ) contains 182 Dynamic Libraries. Goal: Validate the app for distribution with the Apple Store validation tool. Learning when trying to solve the problem: A framework can contain only one dynamic library (e.g. .dylib ) A framework cannot have nested frameworks within a Frameworks folder Certain file types within a framework are not treated as resource files (e.g. .py files) Possible solutions Allow to have nested Frameworks in Z.framework. It’s currently not allowed Link 182 dynamic libraries into the project via SPM Problem: Some of the libraries need to dynamically loaded at runtime (related to the python runtime) Making the libraries static adds significantly technical challenges to the Z.framework. Other questions: What’s the best way to achieve this
1
0
137
2w
Not able to generate API key
After clicking the button I get an error message "An error occurred during generation. Reload this page to try again.", I tryed several times with same result. I saw in network tab the the request got 403 with error: { "errors" : [ { "id" : "a838db66-5e18-4dc8-8bb2-fc5903b41912", "status" : "403", "code" : "FORBIDDEN_ERROR.PLA_NOT_VALID", "title" : "Operation is forbidden because of PLA status.", "detail" : "" } ] } Anyone can tell me what is PLA status? Thank you
1
0
97
2w
Device UDID duplicated 6 times in Enterprise Account Devices list
Sometime since July 2024 the list of devices in our Enterprise Account is showing the same device and UDID 6 times. Looking at the DATE REGISTERED field it is apparent that each instance of the device represents the 'old' device that should have been 'deleted' when the annual device reset was actioned. The date registered field shows dates with 2019, 2020, 2021, and so till 2024 (most recent). I have 'disabled' two of the entries to see what happens, and those instances were disabled as expected without impacting the other instances. However, when attempting a re-enable of them, an error throws saying that they cant be enabled because that UDID already exists - obviously the other instances. For now, I have left 4 active duplicates in place, and the 2 disabled ones as they are, and plan to deal with this again - if it re-occurs in 2025. It does not seem to have impacted provisioing profiles - so will leave well enough alone. I am sure if I disable all of them, I will not be able to re-enabled any of them. Is this a know issue? Is this the best strategy? - ie, wait till device reset next year and hope issue is resolved. This post had similar issue, in 2023, but no response Forum Post 733264
0
0
163
2w
Simulator package issues
Hi! My simulator will not build because there is essentially a package conflict. I am adding Firebase to a Flutter application. Simulator built before trying to add firebase but now I'm getting errors telling me a package can't be found even though it's installed Output Package Loading (Xcode): Missing package product 'FirebaseCore' .../ios/Runner.xcodeproj I added target 'Runner' do use_frameworks! use_modular_headers! pod 'FirebaseDatabase' pod 'FirebaseAnalytics' pod 'FirebaseMessaging' pod 'FirebaseCore' pod 'FirebaseFunctions' pod 'FirebaseAppCheck' pod 'FirebaseFirestore' pod 'FirebaseStorage' pod 'FirebaseDynamicLinks' pod 'FirebaseAuth' flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths end end and ran pod install with no errors. Opening the runnner.xcworkspace shows all of the named packages under "Frameworks, Libraries, and Embedded Content' I've tried manually adding through Xcode those packages but then get a conflict error, so I am out of ideas as to how to fix this. It appears to be something new with the latest MacOS update as I've seen another person with the same problem that started after he updated... I've also cleaned, re-installed, re-booted a few times because My Android emulator builds fine Any help would be appreciated! Thanks!
2
0
211
3w
App Size Increased by 30MB After Adding Push Notification Extension in React Native App
Hello everyone, I've recently added a push notification extension to my React Native app to track specific notification events. The extension itself is quite lightweight, with minimal code – just enough to handle and log some event data. However, I've noticed that the overall app size has increased by around 30MB since adding this extension, which seems unusually high given the simplicity of the code. I inspected the extension's executable file, and it's showing up as 29MB, which doesn’t align with the amount of code I added. I’m wondering if this is expected behavior or if there’s something I can do to reduce the extension's size. Has anyone else encountered a similar issue or found ways to optimize extension sizes? Any guidance on reducing the size of my app post-extension would be greatly appreciated! Thank you in advance for your help!
0
0
63
2w
Code Signing -- errSecInternalComponent, unable to build self-signed root for signer "Developer ID Application..."
I am a developer on a project at work. I recently got a new laptop; however, since then I have been unable to build/deploy our application. I received a copy of the Developer ID Application certificate and Developer ID Installer certificate from a fellow developer. Note, everything works on their machine with these certificates. I have gone through the steps documented here https://developer.apple.com/forums/thread/712005 When I run security find-identity -p codesigning, I have two certificates that show up. one for my User and one for the Developer ID Application that my colleague gave me. Both show up as matching and valid identities. When I try to codesign "MyTrue", as documented in the link above, using "Apple Development" works; however, the "Developer ID Application" identity does not. I get a errSecInternalComponent error. ahenderson@ahendersonmacbook [17:29:23] [~/Downloads] -> % codesign -s "Apple Development" -f MyTrue -vvv MyTrue: replacing existing signature MyTrue: signed Mach-O universal (x86_64 arm64e) [MyTrue] ahenderson@ahendersonmacbook [17:30:48] [~/Downloads] -> % codesign -s "Developer ID Application" -f MyTrue -vvv MyTrue: replacing existing signature Warning: unable to build chain to self-signed root for signer "Developer ID Application: SRS Pharmacy Systems, Inc. ([REDACTED])" MyTrue: errSecInternalComponent I have downloaded all of the intermediate certificates from the apple PKI and have them installed under my keychain in login. Having spent days on this, I am at the end of my rope. Laptop Specs: M3 Pro 36GB Ram MacOS Sequoia 15.1 It is worth noting that my colleagues laptop is not running Sequoia. Not sure if that makes any difference or not. It is also worth noting, that I can run the codesign manually with the Developer ID Application using sudo (I know I shouldn't do this, but I just wanted to see if that made any difference).
3
0
223
2w
watchOS App crashes only in Production/TestFlight
Hello, Our watchOS App users on Apple Watch3 are experiencing crashes. PROBLEM only happens in production/testflight apps. app crashes immediately on launch if I build the app in Apple Watch3 device from a local machine, the app runs fine. app runs fine on an Apple Watch3 simulator What could possibly cause crashes only on Production/TestFlight while working fine on local builds? Any advice about what I could do to narrow down the cause would be greatly appreciated. THINGS I'VE TRIED Tried disabling Dead Code Stripping option in the Build Settings without any success. ENVIRONMENT Apple Watch 3, most of them on watchOS 8.8.1(19U512) our App is in SwiftUI our App's minimum supported OS version is watchOS 8.0 Thank you.
1
0
121
2w
Android Emulator "System UI Isn't Responding" Error on macOS Monterey
Hello everyone, I’m experiencing an issue with the Android Emulator in Android Studio (version Ladybug) on my Mac running macOS Monterey (12.7). The emulator frequently displays the message “System UI isn’t responding” and then crashes. I've tried a few troubleshooting steps, including: Restarting Android Studio and the emulator. wipe data on AVD. tried to change the emulator performance from automatic to hardware but this option isn't available to me. Despite these efforts, the problem persists. Has anyone else encountered this issue? Any suggestions or solutions would be greatly appreciated!
2
0
191
2w
EASession return nil on iOS18
On iOS 18.x when try to create EASession we get nil, but on iOS 17.x everything works. We have app which use USB cable for connecting external accessories. Scenario is when we have fresh instal, connecting with accessory work fine, EASession is created, streams are opened. When we unplug USB, we close streams, remove any reference to session and accessory, remove accessory delegate. When plug it again, creating EASession is returning nil. Only after restarting iPhone, we can create new EASession with appropriate protocol and accessory. Every next attempt without reseting iPhone is failing. Logs from accessory is following: 00:05:51.811000 : onUSBDeviceFound(pDevice=0xffc818)) iPhone USB device already in the device list w/id=1 -> update status now[21;1H 00:05:51.830000 : setConnectionStatus(status=connected) [devId=1] state updated -> forward[21;1H Capabilities indicate HostMode possibility => role switch is triggered 00:05:52.848000 : updateDIPODeviceConnections() iPhoneUSB w/caps=5 (=CarPlay or HostMode), deviceTag=2 in Device mode -> request role switch[21;1H Role switch seems to be successful 00:05:54.914000 : setSwitching('stable') changed[21;1H 00:05:54.915000 : updateDIPODeviceConnections() iPhoneUSB w/caps=2, id=1, deviceTag=2 and native transport -> request app launch and call connectUSB[21;1H 00:05:54.967000 : ConnectiAP2(05ac:12a8, s/n='00008101000160921E90801E', writeFD='/dev/ffs/ep3', readFD='/dev/ffs/ep4', hostMode){3}[21;1H Native transport should become available but does not (the following line is not present for failed case. Taken from successful case) 00:05:24.983000 : OnDBusPropChanged_NativeTransport(): deviceId=2, started=1, iAP2iOSAppIdentifier=1, sinkEndpoint=3, sourceEndpoint=4, TransactionID=1 EAP Start event not received (trace line from success try) 00:05:25.057000 : EAPSessionStart(ctx=0x74e0b800){2} called[21;1H Is there any braking change on iOS 18 considering EASession? Also what is strange is that it works on fresh instal/restart iPhone, but not working on second attempt?
8
7
381
Oct ’24
Simulate Background Fetch Not Working on Real Device, Works on Simulator
Hello Apple Support, I’m facing an issue with Background Fetch in my React Native project. When I click on Simulate Background Fetch in Xcode, everything works as expected on the iOS Simulator—background tasks run smoothly, and data is fetched without issues. However, on a real device, the app goes to the background but doesn’t execute any of the scheduled background tasks, and it also remains in the background without terminating. Here’s some additional context: React Native Project: I’m using React Native to develop this app, and the background tasks involve: Getting User Location: Fetching the user’s location in the background. API Calls: Calling an API to fetch necessary information based on the user’s location. Scheduling Notifications and Alarms: Scheduling notifications and alarms based on the API response data. Simulator vs. Real Device: In the iOS Simulator, all these background tasks trigger and function correctly when I simulate Background Fetch. On the real device, however, none of these tasks are triggered when I try to simulate Background Fetch. The app only moves to the background without performing any tasks or getting terminated. Device and Configuration Details: iOS Version: 17 Device Model: Iphone xs, Iphone 11, iphone 7 Background Modes: Background Fetch is enabled in Capabilities, and I’ve set the fetch interval to the minimum for testing. I’ve verified that all configurations are correctly set, and I’ve tried restarting the device and Xcode, but the issue persists. Is there something specific about Background Fetch that could prevent it from functioning as expected on physical devices? Any guidance on troubleshooting or additional steps would be highly appreciated. Thank you!
1
0
128
3w
Simulator in Low Data Mode
Hi, I have logged into an iCloud account on an iOS device simulator on my Mac to sync photos in order to test my app. The photos app is telling me syncing is paused as the device is in low power mode, but as this is a simulator, there's no network seatings to change this and I can't find out why it's in this mode or how to get it out. I've done exactly the same thing for years with no issues, but for some reason it's happening now. Has anyone else experienced the same? The simulator device is an iPhone 13 Pro Max running 15.5 however I've tested on other device and experienced the same issue. Many thanks, Dan
1
2
1.1k
Sep ’22
There was a problem with HCA TCL029 companion 2.4.3 in iOS 18.1
Hi all. I'm developing a homekit accessory, and I'm currently doing mfi certification. The developed product is smart door lock and supports homekey. Use below tools iPhone 13 , XR , 11 HomeKit Certification Assistant 6.4.0 HomeKit Accessory Tester 9.3.0 HomeKit Companion 2.4.3 I recently updated my iPhone 11 to iOS 18.1 and if I proceed with TCL0029 of HCA, there is a problem. Companion has no response to "SELECT step-up AID". (Unified Access Air Protocol Specification R1.1.pdf) The companion outputs the following message. "Step-up Encountered Error" There is no problem with iOS 17.x. Products that have already been certified are experiencing the same symptoms. There is no problem with using homekey in real life, only problem with companion.
0
0
136
3w