Search results for

file uri scheme

79,854 results found

Post

Replies

Boosts

Views

Activity

Reply to Xcode Cloud: How to trigger testing for packages?
I use a workaround: Create a new Xcode project, in the same git repo as your-swift-package, without adding any source code files. Add your-swift-package as a local package to your Xcode project (File-> Add Packages) Add your-swift-package as a dependency to the Xcode project's target (In the Xcode project select the target and add framework as usual) Add the test target of your-swift-package to the test scheme of the project (Open the scheme editor in the Xcode project, in test-phase, info tab, add the test target of your-swift-package to the enabled tests using the '+' button Configure the Xcode project to build in Xcode Cloud I hope that Apple will soon support building stand alone swift packages, so we do not need this additional workaround.
Apr ’23
Reply to Xcode 12 "Build input file cannot be found" $DERIVED_FILES_DIR
It appears that the build system under Xcode 12 and higher is now validating that any files referenced in the Other Linker Flags (probably other build settings as well before actually building the target. The workaround to the problem is to force the file into existence before the target itself starts to build by touch-ing it prior to the build. The the existing project build phase script can still be used to populate the file before the build gets to the linking stage, the file just has to exist on disk. The Pre-action scripts in build schemes don't really work well for our situation, as we have several schemes that include the build targets. The best solution I've found is to move the generated plist file to a project relative location (instead of in $DERIVEDFILESDIR which is target specific). I then added an Aggregate build target to the actual target's project and made it a dependency of the original build target. This dependency gets built BE
Jan ’21
Reply to xcodeproj and Swift package localization
Thanks, I filed feedback: https://feedbackassistant.apple.com/feedback/7763715 With regards to the recommendation to use xcodebuild. I am aware that I can use xcodebuild to build even platform-specific, e.g. xcodebuild -scheme SomePackage -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' build but I was under the impression that Xcode project might still be required in certain situations?!? For example testing may lead to error like the following xcodebuild: error: Scheme SomePackage is not currently configured for the test action. which I don't encounter when building with -project SomePackage.xcodeproj option
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’20
How to clone/copy scheme to another account?
I'm developing an app which is using CloudKit Private db.So, now it's time to move the sources and all related data to the owner's accound.This means, that i have to create the same records types, etc... using another account. There is a better way than just creating each fields from the scratch?Or can i do some saves/loads or so?Or even can i programmatically create the record types. Thanks in advance.
0
0
474
Apr ’17
Edit Scheme button do not appear..
Hi ! ^ ^ Usually upper left side of Xcode, there is run and stop button, right ? (just like ▶︎ ■ )and right side of that usually target and simulator select box... right ?It is disapeared when I develop static library ....Where is that gone ? (I use Xcode 6.4 .. from 7.0 no problem)Thanks 😀
0
0
101
Nov ’15
Reply to Custom url with notarized package installer
I have an app which basically download a file, and when it finish it sends a callback to the first applet url = URL(string: mainapp://downloaded-finished?now=true) NSWorkspace.shared.open(url!) NSApp.terminate(nil)At this point the alert popups stating that there is no app which is able to open that url scheme
Topic: Code Signing SubTopic: General Tags:
Nov ’19
Reply to Dark mode toggle override - how to revert to system control?
Update: It’s better to use preferredColorScheme(), otherwise you need to style the status bar and some swiftui view’s don’t style properly with colorScheme(). So, my strategy is to cache the current device color scheme on load (by reading the .colorScheme environment variable) and basically revert the color scheme to that when the end user wants to go back to ‘auto’ mode. However, it seems that you ultimately need to pass nil to preferredColorScheme() to react to system color scheme changes (this isn’t documented), so you can kick off a background task to set this to nil after you revert to the cached original color scheme. The only edge case where this doesn’t set the correct color scheme is if the system color scheme changes after your app launched.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’20
Reply to How to expose bash script errors?
I resolved this issue by moving my pre-action and post-action bash scripts in the Build step of my scheme to scripts in the Build Phase. I added the following pre-action script in the Build step of each configuration.# TEST corresponds to the current Xcode scheme (Test). environmentFile=${PROJECT_DIR}/BuildProcess/CurrentEnvironment.txt echo TEST > $environmentFileI check my CurrentEnvironment.txt file to determine which configuration is active from the Build Phase scripts. I don't know how else to determine the active configuration from a Build Phase Run Script. If anyone knows of a better way, please respond.
Feb ’16
Reply to I could not see my text file at my files
You'll have to specify the path to the file. When you are running in the Xcode debugger, you may be able to specify that in the scheme settings somewhere. Normally these kinds of simple apps are designed to be compiled and run from the command line. In this case watch.txt would be located in the current working directory of wherever your Terminal shell happened to be using at that time.
Dec ’24
Failed to build the scheme on Preview canvas
I am developing a multi-platform app. Added a package that imports UIKit to the project under development. Changed Allow any platform to iOS in the framework settings of the project. In the source using the library, #if os(iOS) is applied to iOS only. The project compiles without errors on iOS and macOS and runs normally. It works normally in the preview canvas of iOS. The preview canvas on macOS throws a UIKit error in the library. With just a few lines of code you can check this error. [Package] import UIKit <-------- public struct MyLibrary { public private(set) var text = Hello, World! public init() { } } [Project] import SwiftUI #if os(iOS) <--------------- import MyLibrary #endif struct ContentView: View { var body: some View { VStack { Image(systemName: globe) .imageScale(.large) .foregroundColor(.accentColor) Text(Hello, world!) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
0
0
1.6k
Jul ’22