I've got a custom run script build phase in my Xcode iOS project, however I want it to run before the items in the Target Dependencies section get built. So I added a Pre-Actions phase to the target's build scheme and pasted the contents there. However, during a build, there's no way to see if the stuff in the pre action is successful or not. It's possible to put echo statements into a run script build phase which is useful to print values such as file paths etc. but these don't work when part of a scheme pre action. Also if I deliberately put garbage into the scheme pre action, then I can see Xcode is still running the pre action, but as its full of garbage it should fail, but Xcode doesn't report any errors anywhere. So, is there any way to see and confirm if a scheme pre-action was successful or not, or to output logging statements from it to verify values its using are as expected?
Search results for
file uri scheme
78,726 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
You can specify arguments by editing the scheme. Product > Scheme > Edit Scheme. You want the Run action. There's an Arguments tab.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I've wasted weeks searching for true reason why I randomly fail to get email information. Following are the conclusions I came up after long suffering: You do not define scope and response_mode in the login uri(url which you would link to the button click event), you will get email in the id_token as JWT only once and this cannot be reverted unless you change the uri and add scope and response_mode first and delete the app you once signed in with 'Sign in with apple' in the appleid.apple.com manage page consequently. If you do not specify scope and response_mode, this will let you use GET method to redirect(or return) to your frontend and it will enable easy login feature just like other major service providers. However, you cannot use email(true email or anonymous email all together) to authorize your users later and your only option is to use sub values in the id_token. You define scope and reponse_mode in the login uri, you will get email in the id_token everytime. You can use th
Topic:
App & System Services
SubTopic:
General
Tags:
I think, Sequoia doesn't recognize the GPX-Files. If you add this file into your project scheme manually, it works. Just put the file name into the file: .xcsheme: and it will work. The .gpx musst be in your Xcode project, of course. If you don't know at which place in the .xcsceme file it hast to be put, you can put in Xcode some standard location (for example Honolulu), exit Xcode and replace Honolulu- sequence with the sequence above in the .xcscheme file. Best DM
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
One possible workaround is to write the data into a file and then load the file URL but sometimes this is not a viable solution (e.g. client requirement that no data should be written unencrypted in the file system).Workaround without writing files on disk1. Use a custom scheme handlerWKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init]; id schemeHandler = ... [configuration setURLSchemeHandler:schemeHandler forURLScheme:@someCustomScheme]; WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration];2. Load the data with that custom scheme:[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL urlWithString:@someCustomScheme://name.rtf]]];3. In the scheme handler, provide the data in the protocol method:- (void)webView:(WKWebView *)webView startURLSchemeTask:(id)urlSchemeTask { NSData *data = ... NSURLResponse *workaroundResponse = [[NSURLResponse alloc] initWithURL:[NSURL urlWithSt
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Description of Problem We are exporting strings for localization using the command line tool xcodebuild -exportLocalizations. However, Xcode does not respect the scheme or configuration that we specify. It always builds the Debug configuration. This results in extraneous or incorrect strings being exported, e.g. strings from SwiftUI previews. Note: Exporting strings from within the Xcode IDE respects the selected scheme and configuration. However, exporting from the command line does not. Our real app’s Xcode project cannot export strings from within the Xcode IDE at all, as Xcode always attempts to build our iOS project using the macOS SDK, which obviously fails. So we must use the command line export. Also, a command line export is required for CI/CD pipelines. Sample Code ContentView.swift import SwiftUI struct ContentView: View { var body: some View { VStack { Text(Always) #if DEBUG Text(Debug-Explicit) Text(Debug-Implicit) #else Text(Release-Explicit) Text(Release-Implicit) #endif } .pa
Hi, I am running Xcode Beta Version 15.0 beta 3 (15A5195k) With my test Apps I am now getting the error Failed to Build the Scheme when trying to use the Canvas. The Apps all compile and run both in the Simulator and on an external device such as my iPhone, Error details below.. Any ideas would be helpful. Thanks.. Craig. == DATE: Friday, 7 July 2023 at 9:13:45 pm Australian Eastern Standard Time 2023-07-07T11:13:45Z == PREVIEW UPDATE ERROR: SchemeBuildError: Failed to build the scheme ”Ham Net” linker command failed with exit code 1 (use -v to see invocation) Link Ham Net (arm64): ld: Undefined symbols: unsafeMutableAddressor of self #1 : Ham_Net.HamNetItems in Ham_Net.HamNetItems.myFavourite.init : Swift.Bool, referenced from: Ham_Net.HamNetItems.myFavourite.init : Swift.Bool in AddNetView.o unsafeMutableAddressor of self #1 : Ham_Net.HamNetItems in Ham_Net.HamNetItems.netFrequency.init : Swift.String, referenced from: Ham_Net.HamNetItems.netFrequency.init : Swift.String in AddNetView.o un
It's not a file URL; it's a regular URL. You're using the wrong NSURL constructor. And the string you have there is not a valid URL. It is missing the slashes. URLs start with scheme colon slash slash...
Topic:
UI Frameworks
SubTopic:
UIKit
Tags:
This is the exact diagnostic given by Xcode. I am building a Single View App project. I didn't use an external library. I am doing some demo, but this error occurs.failed to raise open file limit----------------------------------------SchemeBuildError: Failed to build the scheme Memorizefailed to raise open file limitBuild system information:error: failed to raise open file limit--------------------------------------Solved. Just a system setting issue
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Thank you for reply. I already performed the below actions and got Bad CPU type... result. I changed Build Active Architecture Only setting to No for both Debug and Release. And I run the Product/Scheme/Edit Scheme... menu and changed everything from Debug to Release. The compiled file was created in the Release folder, and I notarize it on M3 Machine. After then I manually copied this file to the Intel machine and run it. Notarize Steps are as Follows and it successfully done. ditto -c -k --keepParent $APP_NAME $APP_ZIP xcrun notarytool submit ./$APP_ZIP --wait --keychain-profile $AC_KEYCHAIN xcrun stapler staple $APP_NAME
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I'd also like to do this in an app. The app I'm building uses Spotify's API, so I need users to go to Safari to sign in to Spotify and authorise my app to access their data, then be redirected to my app via a redirect URI callback.
Topic:
App & System Services
SubTopic:
General
Tags:
You can use ContactsContract.Contacts which has a column CUSTOM_RINGTONE (which is a read/write column!) for this purpose. Uri contactUri; ContentValues values = new ContentValues(); values.put(ContactsContract.Contacts.CUSTOM_RINGTONE, newRingtoneUri.toString()); context.getContentResolver().update(contactUri, values, where, args);
Topic:
App & System Services
SubTopic:
General
Tags:
I am using xcworkspace, and every projects that I have the same issue while trying to open manage schemes You can find the crash report from text attachment below Crash report - https://developer.apple.com/forums/content/attachment/692b4adc-f5da-4f86-9066-7791814ac1eb
Hi, Sorry to hear you are having trouble getting the color scheme to apply to the Widget previews. Worth filing a bug with a simple sample project. As a workaround could you try using Xcode 14's preview variants support?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
So I have 2 schemes: prod and staging. And both have their own Debug and Release configuration settings (one of which is the bundle ID, eg. prod-Release: com.mycomp.myApp, prod-Debug: com.myComp.myApp.debug, staging-Release: com.myComp.myApp.staging.debug, staging-Debug: com.myComp.myApp.staging.debug). Now, there is a framework that is bound to each bundle ID. The framework is not from a So I need 4 instances of the same framework for each bundle ID. I tried separating the frameworks into folders and just link them whenever I need to run the appropriate scheme. Basically like so: {PROJECT_ROOT}FrameworksMyFrameworkprod-DebugMyFramework.xcframework {PROJECT_ROOT}FrameworksMyFrameworkprod-ReleaseMyFramework.xcframework {PROJECT_ROOT}FrameworksMyFrameworkstaging-DebugMyFramework.xcframework {PROJECT_ROOT}FrameworksMyFrameworkstaging-ReleaseMyFramework.xcframework I've added a Run script to create the link before Compile Sources step like so: cd ${SRCROOT}/zDefend if [ ${CONFIGURATION} = prod-D