I've just received my M1 MacMini and i'm trying to get my current project setup and running. My project is using storyboards and all my IBDesignables are in a separate framework embedded inside the project as a separate target. This all functions perfectly on my old machine running Xcode 12.4.
On the M1 the simulator launches and displays the app correctly, but interface builder can't render my custom controls. The error it gives, says it is looking for my framework in:
".../xcode/DerivedData/.../products/Debug-iphoneos/..."
This path doesn't exist but this one does:
"....products/Debug-iphonesimulator/..."
How do I either generate the "Debug-iphoneos" that interface builder is looking for, or how do I tell it to use the one thats present?
I've tried changing some of the settings around "Build active architecture only" and made sure the framework wasn't excluding arm64. But none of this works and i'm out of my depth trying to learn all of this stuff at once
Post
Replies
Boosts
Views
Activity
I can't paste anything into my simulator since switching to an M1 MacMini. I've tried ticking and unticking "automatically sync clipboard". I've also tried using the "send clipboard" option manually, but no success.
I can seem to paste into safari on the simulator, but not any app I create in Xcode. I've tried multiple and even creating a new one fresh.
I get the below snippet in the console complaining its unable to access some file. Looks like its an Xcode / M1 bug.
I'm not running via rosetta.
Does anyone know how to fix this, its become a real blocker for me testing my app
2021-06-11 12:00:28.656521+0100 camlKit-Example[3736:123707] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }}
2021-06-11 12:00:28.656878+0100 camlKit-Example[3736:123707] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }}
2021-06-11 12:00:28.656957+0100 camlKit-Example[3736:123707] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }}
2021-06-11 12:00:28.657397+0100 camlKit-Example[3736:123707] [claims] Upload preparation for claim 1B09A1C9-1B93-4AB0-B91D-F8789C91AB3C completed with error: Error Domain=NSCocoaErrorDomain Code=256 "The file “fb19cda6511c09d17006da7aefa63f10ea73f68b” couldn’t be opened." UserInfo={NSURL=file:///Users/simonmcloughlin/Library/Developer/CoreSimulator/Devices/CD0E07DE-8C9C-4466-978B-1F6E635EE0E2/data/Library/Caches/com.apple.Pasteboard/eb77e5f8f043896faf63b5041f0fbd121db984dd/fb19cda6511c09d17006da7aefa63f10ea73f68b, NSFilePath=/Users/simonmcloughlin/Library/Developer/CoreSimulator/Devices/CD0E07DE-8C9C-4466-978B-1F6E635EE0E2/data/Library/Caches/com.apple.Pasteboard/eb77e5f8f043896faf63b5041f0fbd121db984dd/fb19cda6511c09d17006da7aefa63f10ea73f68b, NSUnderlyingError=0x600002813ae0 {Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)"}}
Just upgraded to Xcode 13. Opened a Swift package i've been working on and getting all kinds of build errors. I clicked "Reset Package Caches" because theres no place to select a run destination, which means I can't clean the project.
It crashes when downloading dependencies with this error on one of them saying it can't figure out what "exactItem" is.
This has been working fine on multiple versions of Xcode 12. Looks like an Xcode bug, any insight would be appreciated
invalidManifestFormat("/var/folders/z5/lvlxhdt138l_7sb148yl_tqc0000gn/T/TemporaryFile.xBESmT.swift:17:76: error: reference to member \'_exactItem\' cannot be resolved without a contextual type\n .package(url: \"https://github.com/krzyzanowskim/CryptoSwift.git\", ._exactItem(\"1.3.2\"))\n ^",
diagnosticFile: Optional(<AbsolutePath:"/Users/simonmcloughlin/Library/Developer/Xcode/DerivedData/iOS-Example-cfdygpazfzfyotasyfwmjjycvhbq/SourcePackages/ManifestLoading/torus-direct-swift-sdk.dia">)) in https://github.com/simonmcl/torus-direct-swift-sdk
I'm experimenting with github actions, xcodebuild -exportLocalizations / xcodebuild -importLocalizations and the web application lokalise.com, trying to automate the localisation process for my app.
As a test I marked all my storyboards as localisable with base (english) localisation, exported the .xcloc and imported it into lokalise. Lokalise correctly imports this as English and shows all the keys / values.
If I make any change to the English translations as a test (such as adding a "$" to the end), Lokalise changes both source and target inside the xliff
<trans-unit id="JOQ-R1-RUU.text">
<source>Total $</source>
<target>Total $</target>
<note>Class = "UILabel"; text = "Total"; ObjectID = "JOQ-R1-RUU";</note>
</trans-unit>
I'm assuming this is what I would want. Given English is my base language. I would want my storyboard to update and display this new value while i'm working on it, not just on my app when its set to English.
However when I import (either manually or via command line) I get a warning about a mismatch with no option to accept the new value. Importing just ignores it and does nothing.
Is there no way to tell Xcode that this is what I want, accept the change?
I have a Swift package that i've been working on for a while. I upgraded to Xcode 13 a month or two ago. I have a couple of large JS files in my package (third party NPM libraries that I can't re-write). Randomly, Xcode will throw an error (but not a real error because I can continue as normal) that It can't load the folder containing the JS files
This doesn't prevent me from doing anything, but its irritating to have this error constantly showing up. Is there anything I can do to solve this or is this an Xcode bug?
Some time ago I was trying to use a Swift package, but there was an issue in the github repo, so I forked it, fixed it and pointed Xcode towards my fork.
I contacted the team and they resolved the issue. I want to go back to using the official version, but Xcode will only pick up my fork. Even if I delete my fork, Xcode thinks it might be private access and is asking me for new credentials, rather than using the url i'm supplying.
I've tried removing the dependency, clearing cache, derived data, package.resolved, restarted Xcode, restarted MacOS etc. Nothing seems to work.
You can see in the below picture i've typed in https://github.com/airgap-it/... but its complaining that it can't find https://github.com/simonmcl/...
Anyone have any idea how to clear whatever is lingering around?
Just downloaded and installed the latest Xcode and simulator (Version 14.0 (14A309)). I have an in progress app that listens to keyboardWillShowNotification to move the screen up.
As of iOS 16, keyboardWillShowNotification keeps firing every (or every few) key strokes. The additional events seem to all come in with animation duration of 0. Seems like a huge bug, maybe i'm missing something
First correct event:
keyboard will show: NSConcreteNotification 0x600002d67f20 {name = UIKeyboardWillShowNotification; userInfo = {
UIKeyboardAnimationCurveUserInfoKey = 7;
UIKeyboardAnimationDurationUserInfoKey = "0.25";
UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {393, 119}}";
UIKeyboardCenterBeginUserInfoKey = "NSPoint: {196.5, 911.5}";
UIKeyboardCenterEndUserInfoKey = "NSPoint: {196.5, 867.5}";
UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 852}, {393, 119}}";
UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";
UIKeyboardIsLocalUserInfoKey = 1;
}}
Second event after typing a few characters:
keyboard will show: NSConcreteNotification 0x600002d1c8e0 {name = UIKeyboardWillShowNotification; userInfo = {
UIKeyboardAnimationCurveUserInfoKey = 7;
UIKeyboardAnimationDurationUserInfoKey = 0;
UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {393, 119}}";
UIKeyboardCenterBeginUserInfoKey = "NSPoint: {196.5, 867.5}";
UIKeyboardCenterEndUserInfoKey = "NSPoint: {196.5, 867.5}";
UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";
UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";
UIKeyboardIsLocalUserInfoKey = 1;
}}
Was successfully able to return to previous experience by adding a check if duration exists and is not zero to my callback logic. Feels like that shouldn't be necessary
if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue, let duration = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? String), duration != "0" {
I have a URL to an Audio track and a URL to custom album artwork image. I'm trying to replicate what apple music does when airplaying, where it shows the image, album title, artist etc, on the other screen while playing the audio
Using the AVPlayerController I can get the audio to play, and I can add the custom artwork to the contentOverlayView. But when I airplay, the contentOverlayView is not passed to the other screen, only the audio track
I tried playing around with adding nowPlayingInfo on the playerItem, but that didn't do anything.
How can I pass the image and other info along when the user clicks airplay on the AVPlayerController?
Since updating to Xcode 14.3 every view controller in every storyboard is not updating its IBDesignable's with an error saying it can't find the right .app with the right architecture. This all worked fine in Xcode 14.2
I'm running on an M1 mac mini
Error below:
/Users/****/Documents/Projects/****/****/Modules/Onboarding/Base.lproj/Onboarding.storyboard Failed to render and update auto layout status for ****ViewController (3EC-3V-hGn): dlopen(****.app, 0x0001): tried: '/****' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot****.app' (no such file), '****.app' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
I've tried following a stackoverflow post that suggested changing "Build Active Architecture Only" to "No" for debug builds. When I rebuilt I got a prompt from Xcode saying the build failed, and it asked me to turn on Rosetta to try again. I didn't try this as it seemed like this is broken, given it works fine on 14.2
I'm trying to automate a testing flow in my app, that requires signing in with apple first. I've figure out how open settings and login with a test apple ID. I've wrapped that up in a function and call that first (with a check to see if its already logged in). When I return to my app, and tapping the sign in with apple button, I can't find anyway to interact with the sign in with apple modal, e.g. asking me if I want to share my email address or not, tapping "continue with password" and so on
I've tried setting up an interruption handler, but it doesn't get triggered
let test = addUIInterruptionMonitor(withDescription: "") { alert in
print("inside alert:\( alert )")
return true
}
I've tried checking for springboard alerts, but its not an alert
let springboardApp = XCUIApplication(bundleIdentifier: "com.apple.springboard")
springboardApp.alerts.exists
I don't know any other tricks, or how to find the bundle ID of this popup. Any advice?
I created a fake apple id for testing/automation, but it forced me to setup 2 factor. I need one without 2 factor. There seems to be no way to turn it off, and creating an "app specific password" isn't accepted in places like the simulator settings app, to sign in with Apple id
Am I missing something? Is there another process to go through? Is there a way to turn off 2FA? Is there a dummy set of credentials that all simulators will accept to sign in with apple? etc
I have an AVPlayerViewController in my app to play custom audio+image or video streamed from an online service. If I set the below, I am able to add info to the nowPlayingInfo dictionary
avplayerController.updatesNowPlayingInfoCenter = false
This works for iOS control centre, it correctly displays my custom album name, artwork etc. But when using airplay for audio, it only displays the track name while playing audio. It doesn't display the artwork or the album etc. However if I set
avplayerController.player?.allowsExternalPlayback = false
It does correctly display artwork, title, album etc. This however disables the airplay button thats inbuilt on the player. I would like this button to remain, but need the artwork to be displayed while airplay-ing. How to I achieve this?
Just heard about Stolen Device Protection. The app i'm building uses biometrics but allows users to enter their own passcode as a fallback. Is it possible to detect via swift if Stolen device mode is active, with restrictions in place? So that I could bump up my own security and maybe force biometrics?
I'm working on some apps at the minute, with the intention of running a lot of automated UI tests. Xcode cloud looks great and has a lot of integrated features, but having to make sure I don't run too many hours so my subscription doesn't stop mid dev cycle, or getting a surprise large bill etc, are things I want to avoid. Even the cheapest paid plan for a year works out about the same cost as an M2 mac mini, which would probably be significantly faster than the cloud nodes.
Github actions allow you to provide your own machines. But actions requires a lot more scripting, and so far they've been very slow to update Macos/Xcode versions (not sure how this will effect supplying own machine). My preference would be to deploy my own machine for Xcode cloud, similar to what we used to be able to do with Xcode server.
I think this is currently impossible right? Is there any word that this might be an added feature in the near future?
I submitted an app for review and it was rejected. We've been in discussion with the review team for over a month now, going back and forth providing contracts, legal agreements, proof of security measures, etc. 3 weeks ago the app was rejected again citing the same reason as the initial rejection (lack of proof of partnership agreements), which we have provided proof of. I replied asking the reviewer to scroll back in the history as this issue was already addressed by the previous reviewer. They once again said that we needed to provide it. I replied again with another message containing all of the proof we have submitted to date, responses from legal teams, compliance teams, from partners themselves, etc
I also opened an appeal with the apple review board, as this feature is identical to features in dozens of other apps listed in the store. And our partners confirmed everything was above board with what we are doing.
After a week of no response I replied to the review asking if its possible to get an update, as the team funding the development of the app are becoming irate with the delays. Its now been 12 days since our last response. Is there any other avenue I can use to try get an update?