iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

coreml convert flatten to reshape, but npu does not support reshape
I have a model that uses ‘flatten’, and when I converted it to a Core ML model and ran it on Xcode with an iPhone XR, I noticed that ‘flatten’ was automatically converted to ‘reshape’. However, the NPU does not support ‘reshape’. howerver, I got the Resnet50 model on apple models and performance it on XCode with the same iphone XR, I can see the 'flatten' operator which run on NPU. On the other hand, when I used the following code to convert ResNet50 in PyTorch and ran it on Xcode Performance, the ‘flatten’ operation was converted to ‘reshape’, which then ran on the CPU. ? So I dont know how to keep 'flatten' operator when convert to ml model ? coreml tool 7.1 iphone XR ios 17.5.1 from torchvision import models import coremltools as ct import torch import torch.nn as nn network_name = "my_resnet50" torch_model = models.resnet50(pretrained=True) torch_model.eval() width = 224 height = 224 example_input = torch.rand(1, 3, height, width) traced_model = torch.jit.trace(torch_model, (example_input)) model = ct.convert( traced_model, convert_to = "neuralnetwork", inputs=[ ct.TensorType( name = "data", shape = example_input.shape, dtype = np.float32 ) ], outputs = [ ct.TensorType( name = "output", dtype = np.float32 ) ], compute_units = ct.ComputeUnit.CPU_AND_NE, minimum_deployment_target = ct.target.iOS14, ) model.save("my_resnet.mlmodel") ResNet50 on Resnet50.mlmodel My Convertion of ResNet50
1
0
10
51m
Running application on 17.4 Simulator from Xcode 16.0 beta is crashing due to missing SwiftUICore.framework
Hi, I have a project that is pretty complex and includes mostly UIKit/Swift code with some SwiftUI added on top. I also have some SPM modules and internal Cocoapods libraries linking in. The project builds fine with the latest release version of Xcode (15) and runs on 17.4 simulator. WIth Xcode 16.0 Beta however, the project builds and runs fine on iOS 18 simulators, however there is a specific crash that happens at startup on iOS 17.4 simulators. Please see crash log below with the name of my application redacted: dyld[91294]: Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore Referenced from: <14C085D7-ECA8-3287-8038-5DE320ADCEBD> /Users/xxxxxx/Library/Developer/CoreSimulator/Devices/C23AA8A9-8475-4EE2-86B3-136A0EBCC362/data/Containers/Bundle/Application/95A49FCF-A7E3-4A8B-93F1-C4CDDBA74B60/xxxxxx.app/Frameworks/SwiftUI_Common.framework/SwiftUI_Common Reason: tried: '/Users/xxxxxx/Library/Developer/Xcode/DerivedData/xxxxxx-fglltpkbphqqjzgdgdadysinonmq/Build/Products/Debug-iphonesimulator/SwiftUICore.framework/SwiftUICore' (no such file), '/Users/xxxxxx/Library/Developer/Xcode/DerivedData/xxxxxx-fglltpkbphqqjzgdgdadysinonmq/Build/Products/Debug-iphonesimulator/PackageFrameworks/SwiftUICore.framework/SwiftUICore' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore' (no such file), '/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore' (no such file, not in dyld cache), '/Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore' (no such file) It seems like for some reason Xcode is building the app thinking there would be a SwiftUICore.framework on device, but since this framework is new in iOS 18 and does not exist on iOS 17.4, the system is unable to find it and crashes. I have the min deployment target set to iOS 14.5, so I'm not sure why Xcode would make the assumption that SwiftUICore.framework will be available for linking on runtime. Interestingly, I cannot reproduce this same issue on a clean project created using Xcode 16 and targeting min deployment of iOS 15. I was wondering if anyone has any suggestions regarding specific build settings to check and see where the issue might be coming from. Thanks
0
0
36
12h
Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed
I'm the developer of a third-party keyboard app, Snippety - Snippets Manager, which is designed for using snippets rather than regular typing. One of my users has encountered a strange issue: after installing my keyboard (even when it is not actively in use), the predictive text bar starts showing suggestions in Polish. This happens despite the Polish language not being installed on the device. The issue resolves as soon as my keyboard is uninstalled from the system settings. Interestingly, my application (including the keyboard) does not support the Polish language, nor is Polish specified anywhere in the app. The app was developed and published from macOS in English. This seems to be an iOS bug. The only language-related configuration in my keyboard is the PrimaryLanguage key in the Info.plist file, which I set to "mul" because the keyboard is not intended for typing. I also tried setting it to "mis", but the issue persists. The video presenting this issue on an iPhone 15 simulator running iOS 17.5: https://www.dropbox.com/scl/fi/xjdyucxpmv1cv0mnmwzvd/prdictive-text-issue.mp4?rlkey=aphznpdti08pz8xl84ojbyxz3&dl=0 Info.plist for my keyboard: My project settings: Steps to reproduce: Configure iOS to use English language only, with English keyboard Enable predictive text feature in the system Install Snippety keyboard Use the regular keyboard & start typing "dzie" Actual result: Polish predictions appear even though the Polish language is not installed or declared by the keyboard. Expected result: The predictive text should present predictions based on system settings. What is even more weird, I discovered that when I add the keyboard in system settings, it automatically installs Polish language in the system settings. I even changed PrimaryLanguage to "de" (German) in Info.plist but it still installs Polish. See: https://www.dropbox.com/scl/fi/aiv5g4z331zwy827zj47v/incorrect-language-installed.mp4?rlkey=16v5gqmb6mj8yuyyd7jwmjnsw&dl=0 Any ideas what could be wrong? I also created a ticket: #FB13949087 I also found a similar issue from 2018 (O_O) reported here: https://stackoverflow.com/questions/53069262/ios-adds-new-preferred-language-when-installing-my-3rd-party-keyboard
2
0
54
1h
App whitelist profile working on supervised iPhone, but not on paired Watch
Hello, I’ve run into an issue with a configuration profile on my supervised iPhone. I’m wondering if anyone here might be able to help? The profile contains the allowListedAppBundleIDs key within the restrictions payload. My Apple Watch is paired with the iPhone. The iPhone was supervised manually with Apple Configurator, hence the Apple Watch has not been directly supervised itself. The profile works completely as expected when installed on the phone. As soon as the profile is installed on the iPhone, I can witness the apps on the Apple Watch rearrange themselves as some apps are hidden. So clearly the profile is applying its restrictions to the Apple Watch to some degree. My issue however is that apps listed in the whitelist are hidden from the Watch. The apps that are missing from my Watch are Walkie Talkie, Find My Items, Find My Friends, Messages, Alarm, Remote, Now Playing, Sleep, Meditation and Heart Rate. This is despite the following bundle IDs being listed in the whitelist array: com.apple.findmy.findpeople, com.apple.findmy.finddevices, com.apple.HeartRate, com.apple.SessionTrackerApp, com.apple.NanoWorldClock, com.apple.findmy.finditems, com.apple.Mind, com.apple.NanoOxygenSaturation, com.apple.watchmemojieditor com.apple.NanoSleep com.apple.NanoNowPlaying com.apple.noise com.apple.tincan com.apple.NanoRemote com.apple.NanoAlarm com.apple.private.NanoTimer com.apple.NanoStopwatch I’ve done some testing, but not sure what I’ve found really. I’ve so far identified 3 scenarios. Scenario 1: I have the whitelist profile installed on the iPhone. I download an app that appears in the whitelist from my watch (or at least its iPhone version does). The apps show up on the iPhone automatically and can be launched there. These apps cannot be launched on the watch. Scenario 2: I downloaded a few apps to my watch, that didn’t automatically install on my iPhone at the same time. They were on the whitelist. These ones couldn’t be launched from my Watch. I then downloaded them to the iPhone and they could be launched there (since they were on the whitelist). Scenario 3: A couple of 3rd party apps on the whitelist could be downloaded and launched from the watch with the whitelist installed. It seems as though there are different kinds of Apple Watch app and this is what I’ve read elsewhere. First of all there are Watch-only apps, which do not automatically install a companion iPhone app. Secondly there are companion apps, which when installed from the Watch App Store download their companion app to the iPhone in the background. Someone please correct me - I’m bound to be overlooking something here. So maybe the apps that when installed from Watch automatically install on iPhone and can only be launched from the iPhone have a separate bundle ID for their Watch app which I haven’t included? Apps that are on the whitelist AND do not automatically install an iPhone app AND can be launched from the Watch, include: solstice What3words So maybe these do not need a companion app, but have the same Bundle ID as their iPhone app? However, I’m still not sure why many stock Apple Watch apps are missing from the Watch…. The most obvious answer is that I’ve got their Bundle IDs wrong, but I don’t think I have given I extracted the bundle IDs from the App Store pages of the Apple WatchOS apps. I noticed at this Apple Support page (https://support.apple.com/en-gb/guide/deployment/dep34c5cd30f/1/web/1.0) that there is no mention of whitelisting or blacklisting apps on WatchOS using MDM, yet something definitely happens on the watch when the configuration profile is installed on the iPhone. Furthermore, if I tap on a configuration profile, which comprises a blacklist, on my iPhone it will ask me if I want to install it on the iPhone or Watch. The same pop-up question doesn’t happen when the profile contains a whitelist. All this to say, I’m massively confused as to why I can’t get this working. I’d really appreciate anyone’s advice which is bound to be expert. Thank you
0
0
113
2d
Cannot install ios18 beta using ipsw file
None of my device is able to install ios 18 beta using the ipsw file. I am getting this error. Wondering if anyone else have seen this. cfgutil restore -I ~/Downloads/iPhone11,8_18.0_22A5282m_Restore_2.ipsw Waiting for the device [1/2] [*******************************************] 100% Step 2 of 2: Installing iOS [2/2] [*********>............................] 25% cfgutil: error: The operation couldn't be completed. (AMRestoreErrorDomain error 10 - Failed to handle message type StatusMsg (Protocol error)) (Domain: AMRestoreErrorDomain Code: 10) "update" failed on iPhone (ECID: 0x**C****1002E). This is my cfgutil version: cfgutil version cfgutil 2.17 (906) And I am using Macos 14.5 Thanks!
0
0
171
3d
iphone 13 after update ios18 screen is not working,and port charge is not respond
hello yesterday was testing the new ios 18 in my iphone 13 after finish the update, the device is not recieving charge from original charger with original cable, i reboot that from ios normal, and now not recieve any instruction in the screen, how i can fix that? i connect itunes and not recognoce iphone, and i canoot shoutdown... somebody that can help with this super issue
0
0
92
3d
App crashed with NSInvalidUnarchiveOperationException when run from different target and scheme.
Hi, I'm trying to create a new target duplicated from the main target (cdx_ios) called cdx-ios-dev02. I also made a new scheme called cdx-ios-dev02 It can be built just fine however when I run it, it crashed and it throws this exception: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (cdx_ios.AuthObject) for key (root) because no class named "cdx_ios.AuthObject" was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target). If the class was renamed, use setClassName:forClass: to add a class translation mapping to NSKeyedUnarchiver' This is the class: class AuthObject: NSObject, NSCoding { var accessT1: String = "" var t1Type: String = "bearer" var refreshT1: String = "" var expiresIn: Int = 0 var scope: String = "" var jti: String = "" init(accessT1: String = "", t1Type: String = "bearer", refreshT1: String = "", expiresIn: Int = 0, scope: String = "", jti: String = "") { self.accessT1 = accessT1 self.t1Type = t1Type self.refreshT1 = refreshT1 self.expiresIn = expiresIn self.scope = scope self.jti = jti } convenience init(dic: [String: Any]) { self.init() mapping(dic) } required convenience init(coder aDecoder: NSCoder) { let t1 = aDecoder.decodeObject(forKey: "accessT1") as? String ?? "" let t1Type = aDecoder.decodeObject(forKey: "t1Type") as? String ?? "" let refreshT1 = aDecoder.decodeObject(forKey: "refreshT1") as? String ?? "" let expiresIn = aDecoder.decodeInteger(forKey: "expiresIn") let scope = aDecoder.decodeObject(forKey: "scope") as? String ?? "" let jti = aDecoder.decodeObject(forKey: "jti") as? String ?? "" self.init( accessT1: t1, t1Type: t1Type, refreshT1: refreshT1, expiresIn: expiresIn, scope: scope, jti: jti ) } func mapping(_ dic: [String: Any]) { accessT1 = ParseUtil.dictionaryValue(dic, "access_token", "") t1Type = ParseUtil.dictionaryValue(dic, "token_type", "bearer") refreshT1 = ParseUtil.dictionaryValue(dic, "refresh_token", "") expiresIn = ParseUtil.dictionaryValue(dic, "expires_in", 0) scope = ParseUtil.dictionaryValue(dic, "scope", "") jti = ParseUtil.dictionaryValue(dic, "jti", "") } func encode(with nsCoder: NSCoder) { nsCoder.encode(accessT1, forKey: "accessT1") nsCoder.encode(t1Type, forKey: "t1Type") nsCoder.encode(refreshT1, forKey: "refreshT1") nsCoder.encode(expiresIn, forKey: "expiresIn") nsCoder.encode(scope, forKey: "scope") nsCoder.encode(jti, forKey: "jti") } } It worked fine on the original target, cdx-ios. Can anybody help me? Thank you.
2
0
75
3d
Do Universal Links work when the link is wrapped by another link?
Hello, I work for an email marketing company where we send emails through SendGrid. The links go to ebay.com. SendGrid will wrap the links for click tracking purposes, so instead of the link appearing as https://www.ebay.com, it will be something like https://u99798501.ctc.sendgrid.net/... which will then redirect to eBay. We've noticed that when clicking on these SendGrid-tracked links that redirect to eBay, the links do not open in the eBay app, even though we have the eBay app installed. They will instead open up in Safari. Clicking on the https://www.ebay.com links without the wrapping will open in the links in the eBay app. This makes me think that the URL being wrapped by another URL is preventing Universal Links (links opening in the app) from working. However, we're pretty sure this did work at one point. Does anyone know the status of Universal Links with wrapped URLs? Did it change recently? The iOS version that we tested with is 17.5.1. We are opening links from the iOS Gmail app. Thank you!
1
0
52
3d
Are several Proximity and Beacon related libraries methods and properties deprectaed and now unusable in iOS 18 beta?
Hi, Please let me know iOS 18 beta have deprecated/ stopped support for which of the following: proximityUUID CLBeaconRegion (instancetype)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier (void)startRangingBeaconsInRegion:(CLBeaconRegion *)region -startRangingBeaconsSatisfyingConstraint: , is this also deprecated in iOS 18 beta, since: CLBeaconIdentityConstraint is deprecated right? CLBeaconIdentityCondition is not supported in XCode 15.3. What should I do for this? Should I install XCode 16 beta? locationManager:didRangeBeacons:satisfyingConstraint: can we use it in iOS 18 beta, since, CLBeaconIdentityConstraint is deprecated? what is alternative startMonitoring(for:) is also deprecated in iOS 18 beta right? Also, can someone specify or create a documentation on how beaconing shall be monitored, ranged and locationManager delegate methods pertaining to beaconing to be used in iOS 18 beta?
1
0
74
3d
USDZ with vertex color
Hello, I have a USDC file with vertex color (WITHOUT textures), and it displays perfectly in Preview. If I package it in a zip (without compression) and rename the resulting file to USDZ, I can see it without any issues in AVP and Mac. However, if I send it to an iPhone, the vertex color does not display. Is there anything else I need to do besides packaging the USDC without compression in a ZIP? Thank you very much.
0
0
72
4d
NO_CRASH_STACK error on launch
After our update for Xcode 15, we got a notable increase in crashes on our React Native apps on the app launch. The logs said it's a NO_CRASH_STACK (logs attached). And it's weirdly happening mostly on iOS 16 only (we're just assuming in this part) Notes that we are using Sentry for our crash reporter, but since this crash happened at the beginning, we believe the Sentry hasn't even finished initialized yet. So we don't get any data out of it. f73729d3325dbc472c6a7c5fe2e11f0671e14b63.crash 04bf10e9a11bdd5f47f462d0e22eeec2226413fc.crash 6cdc0334d1673c66a117572b314422c15673fbef.crash
2
0
103
3d
Object anchor not working with ARKit in iOS
With WWDC 24, I was excited to see that apple is bringing their APIs from Vision OS to iOS. I tried using the Object Anchoring component in Reality Composer Pro. Which this works with a Vision Pro, it looks like the entity will spawn at origin if we run the same on iOS and the object anchoring doesn't seem to work. Is this intended? Below is how I'm doing this. I added an Anchoring component and added the .referenceObject file I trained using CreateML. This is the code I'm using to load this scene in. // GrootView.swift // ARTest-New // // Created by Sravan Karuturi on 6/10/24. // import SwiftUI import RealityKit import Box struct GrootView: View { @StateObject private var grootVM = GrootViewModel() @State private var ent: Entity? = nil @State var anchor: Entity? = nil @State var wallAnchor: Entity? = nil @State var floorAnchor: Entity? = nil var body: some View { RealityView{ content in #if os(iOS) await content.setupWorldTracking() content.camera = .worldTracking #endif ent = try? await Entity(named: "Box", in: boxBundle) print(ent?.children) anchor = ent?.findEntity(named: "ObjectAnchor") wallAnchor = ent?.findEntity(named: "WallAnchor") floorAnchor = ent?.findEntity(named: "FloorAnchor") let updateSum = content.subscribe(to: SceneEvents.Update.self){ event in if let anc = anchor, anc.isAnchored { print("Found Item") } if let anc = floorAnchor, anc.isAnchored { print("Found Floor") } if let anc = wallAnchor, anc.isAnchored { print("Wall Anchor") } } content.add(ent!) } } } #Preview { GrootView() } While, something similar seems to work on visionOS, the same doesn't seem to work with iOS. When I run this app, we see all the children and the Found Item is printed constantly even when we don't have the item in the scene. Not really sure if this is just not supported yet on iOS ( I really hope that's not the case ) or if I messed up something somehow
2
1
114
4d
Changing from NavigationView to NavigationStack
Hi, I am having trouble changing from deprecated NavigationView to NavigationStack. I have looked through the article, and a number of examples and tutorials - they all show examples where the user clicks on a choice or a button in the view. But in my case, the navigation is programmatic based on changes to a value. I have below the old code, and my attempt at new revised code ( needs to run on IOS16, and cannot use API introduced in IOS 17). The new code compiles fine, but the screen does not navigate to new views as the value changes. I debug print the value as it changes, and the value for 'detailView' does change. The old code works without a problem - just that I get a warning that I am using deprecated APIs. The old code: struct MainView: View { @EnvironmentObject var gameVm: GameViewModel var body: some View { NavigationView { VStack { NavigationLink(destination: PlayView().transition(.slide), tag: .playView, selection: $gameVm.detailView) { EmptyView() } NavigationLink(destination: GamePausedView().transition(.scale), tag: .gamePausedView, selection: $gameVm.detailView) { EmptyView() } NavigationLink(destination: SettingsView().transition(.slide), tag: .settingsView, selection: $gameVm.detailView) { EmptyView() } IdleView().transition(.slide) } } .navigationViewStyle(.stack) } } My attempt at the revised code: struct GameMainView: View { @EnvironmentObject var gameVm: GameViewModel @State private var path = NavigationPath() var body: some View { NavigationStack(path: $path) { VStack { NavigationLink(value: DetailView.playView) { EmptyView() } NavigationLink(value: DetailView.gamePausedView) { EmptyView() } NavigationLink(value: DetailView.settingsView) { EmptyView() } IdleView().transition(.slide) } } .navigationDestination(for: DetailView.self) { dtlViewType in if dtlViewType == .playView { PlayView().transition(.slide) } else if dtlViewType == .settingsView { SettingsView().transition(.slide) } else if dtlViewType == .gamePausedView { GamePausedView().transition(.slide) } } } } What am I doing wrong? Thanks in advance for any help.
2
0
75
3d