Post not yet marked as solved
I am running my app with device: "My Mac (Designed for iPad)".
I am trying to debug a problem where the iPad does not seem to detect when I grant permission to receive push notifications. This issue is only reproduceable on a physical iPad, not on a simulator. I do not have an actual iPad. I am testing with the new feature which makes the M1 simulate a physical iPad (which can use the camera and microphone), and get push notifications.
I was able to reproduce the issue by running the app with the option "My Mac (Designed for iPad)". However, I cannot find the way to reset the cache of the app and completely delete it from my M1. Whenever I re-run (after cleaning Xcode and derived data directory), I do not get prompted for the notifications again and it seems to be getting the answers I replied the first time, i.e. it has push notifications accepted and the user is still signed in.
Is there a way to somehow reset the cache, delete the app from the M1 (or something else) and run the app fresh whenever I want?
By the way, I am using XCode 13.3 MacOS 12.2
Thanks in advance.
Post not yet marked as solved
Hey everyone!
I'm starting a new Multiplatform application with Core Data and CloudKit checked off. Before continuing I want to make sure the data is persisting between devices BUT can't figure out how to test that with the simulator. I can run the app on my Mac (under my apple account), can't run it on my phone (didn't download the beta), and when I try to log into the simulator with my Apple ID it gives me a "Verification Failed - An unknown error occurred". How do you test synced data between simulated devices???
Post not yet marked as solved
I'm attempting to authorize family controls as .individual in the latest Xcode 14 beta (14A5228q).
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .individual)
} catch {
print(error.localizedDescription)
dump(error)
}
Running this on the iPhone 13 Simulator (iOS 16), it throws the following error:
The operation couldn’t be completed. (FamilyControls.FamilyControlsError error 3.)
- Error Domain=FamilyControls.FamilyControlsError Code=3 "(null)" #0
- super: NSObject
I have a dedicated App ID and have enabled the "Family Controls" capability.
An Apple Systems Engineer suggested in this thread that "Requesting FamilyControls authorization on Simulator is supported by the ScreenTime API", although they don't say whether it actually works or not.
The rest of the thread seems to suggest people are also having issues when running on a physical device so I'm reluctant to install the iOS 16 Beta as I use my phone daily for work projects.
Is this FamilyControls authorization supposed to work in Simulator and are there any special considerations when authorizing as .individual?
Post not yet marked as solved
Hello guys,
I am fetching a string from a server, and print it in a text field. It works fine:
let remoteContent = fetched.content
Text(remoteContent)
If I split it, and try to print elements, I get a black screen.
I tried casting substring to String and NSString etc. but didn't manage to get it to work.
I'm new to Swift and I must say... It's quite overwhelming!
Here's the problematic code:
let remoteContentArray = remoteContent.split(separator: Character(","))
Text(String(remoteContentArray[0]))
I tried it in the playground and it works fine.
But in a view no chance.
I tried directly using a dummy string like "some,words,separated,by,commas"
And it works! But why does it behave like this with the fetched string?
PS. Is it just me, or is Swift kinda hostile to learn?
Thanks a lot.
Post not yet marked as solved
How can I create a simulator for an iPhone 6 (runninf iOS12.4) in Xcode 12.3? Entries in the Simulators list shown in Preferences->Components are all greyed out. The entries go up to iOS14.2. If I try to create a new Simulator by clicking + in Window->Devices and Simulators, Simulators tab, the only OS version available in the dropdown is iOS 14.3. If I try to download more Simulator runtimes I see the greyed out list shown in Preferences->Components.
Post not yet marked as solved
I need to create various environments for each ios version between ios version 12 and ios version 15 on Xcode. Thanks a lot
Post not yet marked as solved
When I use the new Xcode 14 Beta 1 to build and run my app, it crashes at runtime, because it can't find the Swift system libraries. If I raise the deployment target to iOS 16.0 it runs flawlessly. I know first beta, but I'm wondering if there is a fix or how can I tell the simulator to look in the correct place for the libraries. It seems like it does not matter what path I provide in LD_RUNPATH_SEARCH_PATHS …
Library not loaded: /usr/lib/swift/libswiftCloudKit.dylib
Referenced from: <C8CD6C46-E376-3DFA-947C-1E0935237691> ~/Library/Developer/CoreSimulator/Devices/1B4680E1-AF12-45E3-871A-278258D0F095/data/Containers/Bundle/Application/C44020CB-D997-4B3E-B4CC-BDAF32A8DA60/MyApp.app/MyApp
Reason: tried:
'~/Library/Developer/Xcode/DerivedData/MyApp-bknqmionydbbegduadhkzusankxj/Build/Products/Debug-iphonesimulator/libswiftCloudKit.dylib' (no such file),
'~/Library/Developer/Xcode/DerivedData/MyApp-bknqmionydbbegduadhkzusankxj/Build/Products/Debug-watchsimulator/libswiftCloudKit.dylib' (no such file),
'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection/libswiftCloudKit.dylib' (no such file),
'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftCloudKit.dylib' (no such file),
'/usr/lib/swift/libswiftCloudKit.dylib' (no such file, no dyld cache),
'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libswiftCloudKit.dylib' (no such file)
Post not yet marked as solved
I want to test app launch performance in my project.
Therefore I tried to use performance test with measure func and XCTApplicationLaunchMetric. But after test completion there is no any result with average time.
Here is a test example:
func testLaunchPerformance() throws {
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
// This measures how long it takes to launch your application.
measure(metrics: [XCTApplicationLaunchMetric()]) {
XCUIApplication().launch()
}
}
}
But when I create a new empty project and add the same performance test – it works and shows app launch results.
1st image is a real project test – there is no test result.
and the 2nd image is a demo empty project test – it has performance result diagram.
I am running test on MacBook with M1 Pro chip. However, when my colleague is running the same performance test on our real project with Intel based MacBook Pro – all is fine, it shows app launch results correctly as my demo project.
I have no idea how it can be fixed, because it seems that it depends on M1 chip 🤷🏻♂️.
May be somebody have a solution?
Post not yet marked as solved
When building the app the simulator does not launch as it previously did, using the latest version on an intel MacBook Pro 2020. I have factory reset the Mac several times and reinstalled Xcode numbers times and have reverted back to previous version which has not worked.
Not had any assistance from this community previously can anyone assist me with this now?
Post not yet marked as solved
Hello!
I have a problem.
When I successfully build the sim it says: (screenshot)
What's happening there?
Thank you!
Post not yet marked as solved
I've downloaded Apple's metal simulator example from here
https://developer.apple.com/documentation/metal/supporting_simulator_in_a_metal_app
and tried simulating an iphone 11 with 11.5 and 12 using iOS, and iPad 9th gen. I get the error below when running the simulator on all the above devices.
-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:]:5252: failed assertion `Draw Errors Validation
Fragment Function(blendFragmentShader): Shader reads texture (prevColor[1]) whose usage (0x04) doesn't specify MTLTextureUsageShaderRead (0x01)
The error occurs in the drawBox:rendererEncoder at the code below when boxIndex = 1
for(MTKSubmesh *submesh in _meshes[boxIndex].submeshes)
{
[renderEncoder drawIndexedPrimitives:submesh.primitiveType
indexCount:submesh.indexCount
indexType:submesh.indexType
indexBuffer:submesh.indexBuffer.buffer
indexBufferOffset:submesh.indexBuffer.offset];
}
I'm using a Macbook pro, macos 12.2 and Xcode 13.3.
I hoped that this example would be an easy way to get experience with metal, but I've not got the experience I need to interpret what I should change to address the "doesn't specify MTLTextureUsageShaderRead" error.
Any help is greatly appreciated.
Post not yet marked as solved
Good afternoon! I just started developing for the iOS so I apologize in advance if this is a stupid question. I did research on this but couldn't find any clear answer.
What's happening is, I'm trying to submit my app to the store. However, according to the App Reviewers it crashes on launch in a 15.5. Problem is, I don't have any physical device and I can't download a 15.5 emulator for some reason. I updated all my emulators on Xcode and looked around for a 15.5 emulator but can't get it working. Could someone please help me?
Thanks in advance!
Post not yet marked as solved
Hello
When I open CarPlay Simulator and connect the phone, it gives the following error:
Accessory is not Supported
Mac Mini MacOS 12.4 with iPhone 13 Pro iOS 15.5
Does anyone have a solution?
Post not yet marked as solved
We’ve run into a strange issue here. We are running an iOS 13 simulator device on Monterey (x86_64) and an app on said device causes a crash (this is expected). However, when the crash reporter attempts to write out the crash report, it crashes. Here is an excerpt from the translated crash report:
Process: ReportCrash [88409]
Path: /System/Library/CoreServices/ReportCrash
Identifier: ReportCrash
Version: ???
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 503
Date/Time: 2022-06-01 15:45:32.9876 -0400
OS Version: macOS 12.3.1 (21E258)
Report Version: 12
Bridge OS Version: 6.4 (19P4243)
Anonymous UUID: 9D02B4AF-C468-6AD7-78E4-48395612A5A9
Time Awake Since Boot: 450000 seconds
System Integrity Protection: enabled
Crashed Thread: 3
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000001206c2008
Exception Codes: 0x0000000000000001, 0x00000001206c2008
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [88409]
VM Region Info: 0x1206c2008 is not in any region. Bytes after previous region: 289083401 Bytes before following region: 123140679340024
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
VM_ALLOCATE (reserved) 10f30e000-10f311000 [ 12K] r--/r-- SM=NUL ...(unallocated)
---> GAP OF 0x6ffefdae2000 BYTES
Stack Guard 70000cdf3000-70000cdf4000 [ 4K] ---/rwx SM=NUL
Application Specific Information:
Pid 91244 'SnoopLlama' CORPSE: Extracting
Completed 8, Recent: Pid 90229 'SnoopLlama' CORPSE
As best we can tell, this only happens on iOS 13 simulator devices (we’ve observed this behavior on iOS 13.4, 13.5, and 13.7) and Monterey x86_64. (It does not happen on iOS 14+, nor on Monterey arm64.) We’ve observed it on macOS 12.3.1 and 12.4, all with Xcode 13.3.1.
Has anybody run into this before?
Post not yet marked as solved
Whenever I run my simulator, it shows up black with white at the top, even though that is not what my storyboard is designed to do.
Post not yet marked as solved
Using Unity 2021.3.3f1. It compiles for all and run (PC, MAC, Android, and iOS) But my main target is iOS
Managed with no big issues to export and opening in XCODE but...
Questions:
01- Dont have an phone I select Simulator and run, and it shows the Simulator with the icon, it launches and closes inmediatelly, the error says:
Products/ReleaseForRunning-iphoneos/UnityFramework.framework/UnityFramework'
(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),
02- I selected on the certificate etc the WIFI option since it will need to access internet, so simulator must get internet from the MAC right?
03-With NO phone, I need to be able to test it, and then for my customer he will just make the whole proccess again but on his AppleDeveloper account (im a hired guy), test it and uploaded to the store.
How do I manage to run/change (ARM and X86_64) it on Simulator on the MacBook Air ? What do i need to touch? Maybe im RT(Wrong)FM
04-I can afford a second handed iPhone 11, but only after get paid for this job, so cant get a physical phone for now.
05-Is there Documentation or tuts from people cominf from unity?
Cheers
A3
Post not yet marked as solved
I have a very simple program, which works python kivy.
In that program I read and write json files.
Everything is fine with every simulator in Xcode Version 13.4.
However when I connect my Phone it can read the json file but can't write in it.
It says;
`File "/Users/batuhan/programs/kivy-ios/2800-ios/YourApp/main.py", line 429, in secom
PermissionError: [Errno 1] Operation not permitted: '/private/var/containers/Bundle/Application/C2508051-03DA-40EC-8587-A40D8B922055/2800.app/YourApp/savelist1.json'
2022-05-19 20:14:09.322995+0300 2800[3486:1776834] Application quit abnormally!
2022-05-19 20:14:09.416628+0300 2800[3486:1776834] Leaving`
As I understand so far it is all about build settings in Xcode.
Because as MacBook user I can write in that json file in simulator and everything works perfect.
I need to give permission to write json file for every user, staff or everyone.
I am just a beginner in Xcode, I think it is related with those settings;
The json file is in same directory with main.py
I've encountered strange crash while using SecKeyCreateRandomKey on iOS 13.4 and 13.5 simulators.
I've used that to generate a private key that will stored in Secure Enclave.
I think the crash happen on this attribute (needed to store the key to the Secure Enclave).
kSecAttrTokenID as String: kSecAttrTokenIDSecureEnclave,
I've tried enabling Swift Error Breakpoint, Exception Breakpoint, Symbolic Breakpoint, activating address sanitizer and zombie objects but I don't still get any useful information.
This is the repo to reproduce the crash (Make sure you choose iOS 13 simulators)
https://github.com/jeffersonsetiawan/SecureEnclaveCrash/
Thank you.
Hello community!
I created an app with a golang shared library which runs a mkdir command at start. The app is working properly on emulator but not on physical device, looks like the emulator is properly sandboxing (wrapping) the shared library but in my iPhone I get a permission denied error (probably due to the app trying to write on File system)
How can I reproduce the same sandboxing approach on my physical iPhone as in the emulator?
Below you can see how the path for each looks like:
Emulator installation path(All goo here):
/Users/simbadmarino/Library/Developer/CoreSimulator/Devices/E6258FFC-CA3F-4B7F-BAAE-DDF717096A91/data/Containers/Data/Application/6BA771DD-BE68-454A-926E-A525188CBE38/.btfs
Phone installation path(Permission errors here):
/private/var/mobile/Containers/Data/Application/CB3B300F-07D8-4641-A6FA-4F584D4C6530/.btfs
Post not yet marked as solved
Unable to build the iOS project with Apple M1 pro chip. Getting an below error for manually added framework.
**Error : **
building for ios simulator but linking in object file built for ios file for architecture arm64
Any help would be really appreciated.