Posts

Post not yet marked as solved
3 Replies
1.4k Views
I'm just starting out with Xcode Cloud and trying to get a simple example running. I've got a basic 'Hello World' project with a couple of unit tests that I'm building for iPhone, iPad and Mac Catalyst. Running unit tests locally works fine on both iOS and Mac. My Xcode Cloud workflow has an action for iOS unit tests and Mac unit tests. The iOS tests run fine but the test bundle for Mac fails to load with this message: HelloWorldOCL (5739) encountered an error (Failed to load the test bundle. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundle.xcresult. (Underlying Error: The bundle “HelloWorldOCLTests” couldn’t be loaded. The bundle couldn’t be loaded. Try reinstalling the bundle. dlopen(/Volumes/workspace/TestProducts/Debug-maccatalyst/HelloWorldOCL.app/Contents/PlugIns/HelloWorldOCLTests.xctest/Contents/MacOS/HelloWorldOCLTests, 0x0109): tried: '/Volumes/workspace/TestProducts/Debug-maccatalyst/HelloWorldOCLTests' (no such file), '/System/iOSSupport/Volumes/workspace/TestProducts/Debug-maccatalyst/HelloWorldOCL.app/Contents/PlugIns/HelloWorldOCLTests.xctest/Contents/MacOS/HelloWorldOCLTests' (no such file), '/Volumes/workspace/TestProducts/Debug-maccatalyst/HelloWorldOCL.app/Contents/PlugIns/HelloWorldOCLTests.xctest/Contents/MacOS/HelloWorldOCLTests' (code signature in <9E48F794-E3BB-38B4-BFE5-3C5932331003> '/Volumes/workspace/TestProducts/Debug-maccatalyst/HelloWorldOCL.app/Contents/PlugIns/HelloWorldOCLTests.xctest/Contents/MacOS/HelloWorldOCLTests' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/usr/lib/HelloWorldOCLTests' (no such file))) The project setup is pretty basic. Code signing is set to automatic with the team specified. It all works locally, so I'm not quite sure how to proceed. Any suggestions welcome. Thanks!
Posted
by jaylyerly.
Last updated
.
Post not yet marked as solved
2 Replies
1.5k Views
I'm trying to debug a memory leak in my app. This is a UIKit app running on a Mac via Catalyst. When I use the Allocations template in Instruments, it fails to start. If I choose Profile from Xcode, the app just bounces in the dock and never starts. Eventually it seems to time out. I can use another template with the app such as Time Profiler and I can use Allocations with a little dummy app, but the when I use Allocations with my production app, I just get silent failure. I tried running from the command line as well with xctrace. Running with time profile tempalte works: xcrun xctrace record --template 'Time Profiler' --launch --  /.../App.app Running another app with the Allocations template works: xcrun xctrace record --template 'Allocations' --launch -- /.../DummyApp.app But when I use Allocations with my app, xctrace exits immediately dumping what appears to be an empty trace. xcrun xctrace record --template 'Allocations' --launch --  /.../App.app Profiling the app on a physical iPad works as well. Unfortunately, it doesn't exihibit the memory leak, so that's no help. Is there somewhere I can look for errors? Right now it fails silently and I'm not sure how to debug this. This is all with the Xcode 12.4 suite.
Posted
by jaylyerly.
Last updated
.
Post not yet marked as solved
5 Replies
1.8k Views
I'm running Xcode 12 beta 6 on a DTK machine and just upgraded to Big Sur beta 6 released today. When I build and run my Catalyst app for Mac, it fails with The operation couldn’t be completed. (OSStatus error -10670.) In the detail panel, I get Details The operation couldn’t be completed. (OSStatus error -10670.) Domain: NSOSStatusErrorDomain Code: -10670 User Info: { &#9;&#9;"_LSFunction" = "_LSOpenStuffCallLocal"; &#9;&#9;"_LSLine" = 3664; }- System Information macOS Version 11.0 (Build 20A5364e) Xcode 12.0 (17210.1) I've tried a number of things -- rebooting, reinstalling the command line tools, making sure xcode-select points to the right place. I'm stumped. The app runs as expected under the simulator. This change occurred this afternoon with the install of Big Sur beta 6 upgrading from beta 5. Any pointers appreciated! thanks, jay
Posted
by jaylyerly.
Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
All the docs say that @main generates a main() method for SwiftUI, replacing the need for a main.swift. I can't find a reference for what is actually generated. I'd like to override the initial bootstrapping of the app during unit testing for code coverage purposes. The way we've done this in the past uses UIApplicationMain to dynamically control the app delegate in main.swift. I've looked through the headers, but the App class just has a declaration for main() but the implementation is not available. How can I do something similar with SwiftUI. Is there an analogous call to UIApplicationMain?
Posted
by jaylyerly.
Last updated
.
Post not yet marked as solved
0 Replies
486 Views
We have an app that is currently in the store using a monthly/yearly subscription model. This is a niche app for professionals in a certain field and we'd like to provide bulk pricing to larger companies. From our researc, it sounds like a custome B2B app is the way to go. But since B2B apps don't support subscriptions, what is the best way to time limit access? When the license period is over, can you revoke access to the app? Will revoking access disable installed apps or will it just prevent future installs?
Posted
by jaylyerly.
Last updated
.