Hi,
We're trying to configure an EC2 MacOS to build our mobile application that went through a Ci/Cd (Jenkins) and we're facing an issue that shows something about a 'session expired' when running the xcodebuild command.
We're running this command to generate our build on this machine:
$ xcodebuild -exportArchive -archivePath ModularApp.xcarchive -exportOptionsPlist ./release.plist -exportPath ./ -allowProvisioningUpdates
Locally, this command runs with success when accessing this machine through the "macweb server" to access the GUI. But when running through a session over the SSH, it fails with this "Session expired".
macweb server link: https://www. macweb.com/)
We tried a lot of things that can be found on internet forums and nothing change the outcome. So, we need guidance to solve this issue and here's some info about our currently environment.
AWS EC2:
id ami: ami-0702ae65aba1217f3
Instance: mac1.metal
Processor: Intel Core i7
CPU: 12 vCPU
Memory: 32GB
Region: us-east-2
System OS:
MacOS 12.2 MontereyXcode 13.4.1
The error log we're facing:
2022-08-18 17:07:51.985 xcodebuild[41811:8837406] DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2022-08-18T17:07:52Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action "; responseId = "191ab8ef-8072-4aa3-8c5f-55db30c53938"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}
Full logs attached:
build-mac-error.log
Regards,
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Post
Replies
Boosts
Views
Activity
Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'com.kmushi.pay'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7. With error code STATE_ERROR.VALIDATION_ERROR.90713 for id bf3f38bf-c5ab-4ee3-8937-cbc15b8f27a9
Noticing that the simulator is often in some state that requires it to Quit and restart it.
I often do this:
CMD+R to run.
Make changes.
CMD+R to run (overwrite the existing session).
The app (kinda) quits, but the screen is completely black. Like the app hasn't completely quit.
The result is that Xcode just constantly says "Launching [App]...". And I have to quit the simulator.
Every time my app runs in the simulator I see this error:
Warning: Error creating LLDB target at path '/Users/aaronsmith/Library/Developer/Xcode/DerivedData/Babylist-ahvzjxxrpawwqhecszqeyvjstfca/Build/Products/Debug-iphonesimulator/Babylist.app'- using an empty LLDB target which can cause slow memory reads from remote devices: the specified architecture 'arm64--' is not compatible with 'x86_64-apple-ios13.2.0-simulator' in '/Users/aaronsmith/Library/Developer/Xcode/DerivedData/Babylist-ahvzjxxrpawwqhecszqeyvjstfca/Build/Products/Debug-iphonesimulator/Babylist.app/Babylist'
What is this? I'm on an M1, no build issues. It makes me think the simulator is running under rosetta with x68_64. But I didn't choose to do that.
Mac OS Ventura. Xcode 14 RC.
I am very new to Swift and I am trying to use this function so my app doesn't trigger the Apple Pay notification. (requestAutomaticPassPresentationSuppression)
I am working on react-native. I am trying to create a native module so I can import this function but I am very new to Swift. At this point, I am a bit stuck. Any help would be great.
Thank you
I'm trying to create a XCFramework for a static library that was handed over to us from a vendor (we have C sources and compile it ourselves) that doesn't include Bitcode when checking with otool -l <static_library>.a | grep __LLVM.
Apparently bitcode is stripped by libtool despite using -fembed-bitcode CFLAGS and LDFLAGS. xcodebuild -create-xcframework is failing with the error message:
error: unable to find any architecture information in the binary at '<static_library>.a': Unknown header: 0xb17c0de
0xb17c0de seems like a shorthand for "bitcode" according to posts I've found.
I understand why this fails on Xcode 13 and prior due to the Bitcode requirement, but I'm trying to use Xcode 14 RC to do the same and get the same error message despite Apple now dropping Bitcode support in Xcode 14.
Is there an option I can give xcodebuild -create-xcframework to ignore this bitcode requirement and why is it still a requirement in Xcode 14?
Can I add a bitcode marker after compilation to the .a file to satisfy xcodebuild with some fancy command?
My alternative is to figure out how to get libtool not to drop the bitcode flags, but that seems like working backwards in time and will take me much longer to figure out given the unfamiliar compile setup (automake, cmake, etc.).
An update to Xcode 14 appeared in the Mac App store today 2022-11-12. After updating Xcode from the App store app on my M1 MacBook, and plugging in an iPad, also updated today 2022-11-12 to iOS 15.7, Xcode says: "Failed to prepare the device for development".
A restart of both the Mac and the iPad doesn't fix this issue. Is there a way to get Xcode 14 to debug an 15.7 iPad? Or is a different build required?
There also is no 15.7 directory inside Xcode's iPhoneOS DeviceSupport directory.
I'm using UIPrintInteractionController to display the standard printing window to print a PDF file, passed as NSData using 'setPrintingItem'. Everything was working fine until iOS 16. Now when I call 'presentAnimated', the printing window briefly appears before immediately closing again. In the Xcode debug window I see layout constraint errors - see text below.
I don't think I can affect the layout constraints of the print controller?
2022-09-13 16:57:43.220970+0100 myiOSApp[11359:185527] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x6000022e23a0 h=--& v=--& UIView:0x7fa0e588e5a0.minX == 0.5 (active, names: '|':UIView:0x7fa0e588bbe0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x6000022e3160 h=--& v=--& UIView:0x7fa0e588bbe0.minX == 0 (active, names: '|':UIPrintPreviewPageCell:0x7fa0e588e060 )>",
"<NSLayoutConstraint:0x6000022e0f00 UIView:0x7fa0e588e5a0.leading == UIPrintPreviewPageCell:0x7fa0e588e060.leading (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000022e0f00 UIView:0x7fa0e588e5a0.leading == UIPrintPreviewPageCell:0x7fa0e588e060.leading (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2022-09-13 16:57:43.221720+0100 myiOSApp[11359:185527] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x6000022e23a0 h=--& v=--& UIView:0x7fa0e588e5a0.minX == 0.5 (active, names: '|':UIView:0x7fa0e588bbe0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x6000022e2fd0 h=--& v=--& UIView:0x7fa0e588e5a0.width == 124.438 (active)>",
"<NSAutoresizingMaskLayoutConstraint:0x6000022e3160 h=--& v=--& UIView:0x7fa0e588bbe0.minX == 0 (active, names: '|':UIPrintPreviewPageCell:0x7fa0e588e060 )>",
"<NSLayoutConstraint:0x6000022e0fa0 UIView:0x7fa0e588e5a0.trailing == UIPrintPreviewPageCell:0x7fa0e588e060.trailing (active)>",
"<NSLayoutConstraint:0x6000022e32a0 'UIView-Encapsulated-Layout-Width' UIPrintPreviewPageCell:0x7fa0e588e060.width == 125 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000022e0fa0 UIView:0x7fa0e588e5a0.trailing == UIPrintPreviewPageCell:0x7fa0e588e060.trailing (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2022-09-13 16:57:43.232533+0100 myiOSApp[11359:185527] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x6000022e05a0 h=--& v=--& UIView:0x7fa0e5895a60.minX == 0.5 (active, names: '|':UIView:0x7fa0e5891520 )>",
"<NSAutoresizingMaskLayoutConstraint:0x6000022e1630 h=--& v=--& UIView:0x7fa0e5891520.minX == 0 (active, names: '|':UIPrintPreviewPageCell:0x7fa0e58902c0 )>",
"<NSLayoutConstraint:0x6000022e0500 UIView:0x7fa0e5895a60.leading == UIPrintPreviewPageCell:0x7fa0e58902c0.leading (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000022e0500 UIView:0x7fa0e5895a60.leading == UIPrintPreviewPageCell:0x7fa0e58902c0.leading (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2022-09-13 16:57:43.233227+0100 myiOSApp[11359:185527] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x6000022e05a0 h=--& v=--& UIView:0x7fa0e5895a60.minX == 0.5 (active, names: '|':UIView:0x7fa0e5891520 )>",
"<NSAutoresizingMaskLayoutConstraint:0x6000022e0410 h=--& v=--& UIView:0x7fa0e5895a60.width == 124.438 (active)>",
"<NSAutoresizingMaskLayoutConstraint:0x6000022e1630 h=--& v=--& UIView:0x7fa0e5891520.minX == 0 (active, names: '|':UIPrintPreviewPageCell:0x7fa0e58902c0 )>",
"<NSLayoutConstraint:0x6000022e0690 UIView:0x7fa0e5895a60.trailing == UIPrintPreviewPageCell:0x7fa0e58902c0.trailing (active)>",
"<NSLayoutConstraint:0x6000022e14f0 'UIView-Encapsulated-Layout-Width' UIPrintPreviewPageCell:0x7fa0e58902c0.width == 125 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000022e0690 UIView:0x7fa0e5895a60.trailing == UIPrintPreviewPageCell:0x7fa0e58902c0.trailing (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
I've upgraded to Xcode 14 and the suggested changes to the project included making the WatchKit app and the extension be a single target. Once I did that, my complications and my old extension code can't find the objective-c objects that I had included via a bridging header. I've gone looking in the watch app settings and there is no option for setting the bridging header. None that I can find, I should say. There is no Swift Compiler section at all, and I can't seem to add a user-defined setting either. Now the app won't compile.
If I restore from time machine and try again, then I can't install the app because Xcode tells me that an extensionless WatchKit app has an extension, which of course it does!
So how do I add the bridging header to the WatchKit app?
I'm writing a simple Command line application on macOS with code using C++, using a API called 'std::to_chars' from charconv
void foo(void)
{
if (__builtin_available(macOS 10.15, *))
{
char buffer[10];
std::to_chars_result tcr = std::to_chars( buffer, buffer+5, 5 );
#pragma unused (tcr)
}else{
return;
}
}
Since Xcode complains main.cpp:19:41: error build: 'to_chars<int, 0>' is unavailable: introduced in macOS 10.15
I wrapped the code with an availability check API in C++, __builtin_available(macOS 10.15, *))
But even with this availability check API, Xcode still failed to compile.
Anyone knows why?
The project can be successfully built and run. But when I export for localization, it shows this error message:
Unable to build project for localization string extraction
Searched on google but nothing found.
I'm unable to use XCode 14 to develop my app because as soon as a compiler error is shown, it is immediately withdrawn from the Issue Navigator pane. This makes it impossible to see what is wrong. The errors are also immediately withdrawn from the editor.
This video shows 3 attempts to compile the project: after the first attempt no error shows, after the second attempt the error shows for a moment then is automatically removed (no mouse or keypress from me), after the third attempt same.
https://youtu.be/bmK_k6oLYpQ
I have tried rebooting, and deleting ~/Library/Developer/Xcode/DerivedData, to no effect.
Hi, I use Xcode Instruments to Profile my app, but I don't know why Instruments can not find the right source code path, like the screensh ot shows, the path is wrong, what is ? it looks like a placeholder, is xcode forgetting to replace this placeholder with real file name?
anyone know how to fix this? thank you in advance
I just updated from XCode 13 to 14 and the sluggishness is really noticeable.
I see the colourful wheel of doom running tests and it makes XCode 14 unresponsive for about 2 minutes. it happens when doing a lot of tasks in XCode even accessing the menu bar.
I'm running it on a MacBook pro m1, 16gb.
Rosetta is turned on though that is because I need the simulators for testing.
Those sims don't run without it...why is that the case? It's been a while surely the sims should run native on m1 by now?
Any advice would be great.
I have more questions for later on why XCtest is suddenly broken too in XCode 14.....not enjoying this update at all. 94 failed tests because of the update :(
Im using Version 14.0 (14A309)
In Xcode 13 i used the keybinding Control ⌃ + Option ⌥ + Command ⌘ + F to fix all errors in scope, for example an enum with missing cases.
It is not possible in Xcode 14 since the "Fix All Issues" button is disabled all the time.
You can navigate to "Fix All Issues" from:
Editor -> "Fix All Issues" but its not possible to tap the button.
Hello everyone. There is really annoying regression in xcode 14 and 14.1 beta. We have a large modularized workspace. In workspace there is one ios app target that hosts xctestplan that contains over 50 unit test targets. When we try to run tests with cmd+u xcode immidately freezes and force quit is required. This was not an issue with xcode 13.
I tried to run tests via command line with xcodebuild. This time it stucks at prepare packages stage before building any target. After about 7-10 minutes it continues building targets. So I am guessing there is something wrong with resolving target dependencies in xcodebuild.
Anyway this is super frustrating for us and it holds us back to moving xcode 14. Is there other people experiencing the same issue with xcode 14? Did you find any workaround?
I converted an iOS framework project to a Swift Package.
Everything went smoothly and I can find and add the package to other projects. But Xcode won't display the README for the project. It only displays, "Unable to load the Read Me."
I've stripped the README down to just a header and one line of text.
I've removed the couple of extra files from the project that exist at the root level.
But I still just get the same message.
The project is located at: https://github.com/ecrichlow/IoGInfrastructure-iOS.git
Hi, I'm really hoping someone can help me.
After updating my iPhone 11 to iOS 16 and tried to launch an app from xCode on it, I noticed that I didn't have dev mode enabled. When I went to Settings > Privacy & Security to toggle the Developer Mode on, it wasn't there. There is no Developer Mode option in my settings, the only option and the end of Privacy & Security is Lockdown Mode.
I tried so many troubleshooting techniques and spent a lot of time looking for solutions. I tried powering on and off while connected to my macbook with xcode running and again without xcode running. Made sure my device has the latest update (iOS 16.0.2) and my device has trusted the connection to the Macbook as well. I also had the same problem on my girlfriends brand new iPhone 13, I was really hoping it was just my device but no, her device doesn't have the Dev Mode option either. Out of curiosity I asked my friends at work if they had the option but they did not. I even went as far as going into an Apple store and checking the devices on display and they didn't have the option either. And when I asked the staff their, they didn't know why the option wasn't showing up on mine or even their own personal devices.
The only source that I have found with the same issue as me is this youtube link (https://www.youtube.com/watch?v=5AEusqQV794), where it mentions that this is an issue with iOS 16 public beta users and not developer beta user and the only way to solve this is by sidloading the app which I am not gonna do. Please note that I am not running beta version on my device.
I can't help think that there's something obvious that I'm missing or need to do but just can't find it.
Any help or advice will by really appreciated :)
Thank you
Since Xcode 14 it started to compile all my 3 targets (different app versions) of my project if building just for one target (Simulator). Issues for all 3 targets are displayed at once.
How to disable that ?
Setup
I've been experimenting with migrating to Xcode Cloud for our CI but I'm struggling with getting Snapshot Testing to work.
I've been involved in some discussions here... https://github.com/pointfreeco/swift-snapshot-testing/discussions/553
And I saw this site also which explains a little... https://wojciechkulik.pl/xcode/xcode-cloud-overview-and-setup
But so far I've been unsuccessful in getting it to work at all.
I'm using the swift-snapshot-testing library from PointFree https://github.com/pointfreeco/swift-snapshot-testing and I have overridden the assertSnapshot function to change the snapshot testing directory.
The function looks like this...
func snapshotDirectory(
for file: StaticString,
ciScriptsPathComponent: String = "ci_scripts",
relativePathComponent: String = "Tests"
) -> String {
var sourcePathComponents = URL(fileURLWithPath: "\(file)").pathComponents
if let indexFolder = sourcePathComponents.firstIndex(of: relativePathComponent) {
sourcePathComponents.insert("resources", at: indexFolder)
sourcePathComponents.insert(ciScriptsPathComponent, at: indexFolder)
}
var pathsComponents: [String] = sourcePathComponents.dropLast()
let fileUrl = URL(fileURLWithPath: "\(file)", isDirectory: false)
let folderName = fileUrl.deletingPathExtension().lastPathComponent
pathsComponents.append("__Snapshots__")
pathsComponents.append(folderName)
let directory = String(pathsComponents.joined(separator: "/").dropFirst())
return directory
}
public func assertSnapshot<Value, Format>(
matching value: @autoclosure () throws -> Value,
as snapshotting: Snapshotting<Value, Format>,
named name: String? = nil,
record recording: Bool = false,
timeout: TimeInterval = 5,
file: StaticString = #file,
testName: String = #function,
line: UInt = #line
) {
let failure = verifySnapshot(
matching: try value(),
as: snapshotting,
named: name,
record: recording,
snapshotDirectory: snapshotDirectory(for: file),
timeout: timeout,
file: file,
testName: testName
)
guard let message = failure else { return }
XCTFail("\(message) snap: \(snapshotDirectoryUrl) file: \(file) ", file: file, line: line)
}
Essentially this takes my test file path... repoRoot/Tests/FeatureTests/FeatureTestFile.swift.
And injects some path component into it so that you end up with a directory path... repoRoot/ci_scripts/resources/Tests/FeatureTests/__Snapshots__/FeatureTestFile/.
And then the snapshot file will be located in that directory using the name of the test function with a suffix of .1.txt or .2.txt (etc... for each subsequent snapshot in each function). i.e. testSnapshotStuff.1.txt, testSnapshotStuff.2.txt.
Problem
This all works locally. And all the files are checked into GitHub.
But, when I run this on Xcode Cloud it fails the tests and tells me the files are not there.
Having added some logging in it is writing new snapshot files to where I am expecting them to be so it just looks like those files are not available to the Test environment.
This is where I read about putting them into the ci_scripts file at the root of the repo. Which is what I've done. Files in this directory are supposed to be copied into the test environments so that they can be accessed... but it seems that they're not being.
I have tried using ci_scripts/resources and ci_scripts/Artifacts but it's always the same. The files aren't there and the Xcode Cloud tests write those files there over time.
I'm running out of options of what to do with this now. I just want a way that I can access these snapshot files in the test environment on Xcode Cloud.
Any help would be much appreciated.
Thanks