I am creating an application that needs to connect to an Iot device, so i want to make a wifi hotspot with a custom SSID and password and WPA3.
Could you please provide an example code in Objective-C to get started?
Posts under iPad tag
77 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi,
I'm unable to install provisioning profile on my iPad and I know the xcode component iOS/iPadOs version and iPadOS version should be same or below the latest compared to xcode components.
Now the issue is xcode component version is iOS 18.4 (22E235) SDK + iOS 18.4 (22E238) Simulator (Installed) and iPadOS version is iOS 18.4.1(22E252) could this be cause of issue ?
If yes then when will apple release components for 18.4.1?
Because iOS 18.4.1 release at least 3-4 weeks before this post.
Anyone else having issues with books since the update - where all epubs have been wiped or it is disclosed that it not a format applicable to Apple Books?
The app provides a simple drawing functionality on a canvas without using a storyboard. After creating drawings in portrait mode, rotating the simulator or the iPad-Device to landscape mode does not update or rescale the existing drawings to fit the newly expanded canvas area. The app can also be launched directly in landscape mode, allowing drawings to be created before rotating the device back to portrait mode. However, the issue persists, with the drawings not adjusting to the new canvas dimensions.
The goal is to achieve the same behavior as in the Apple Notes app: when the iPad is rotated, the drawings should adjust to the newly expanded or reduced canvas area. I would appreciate any suggestions or solutions.
Sample Projekt
[https://github.com/GG88IOS/Test_Drawing_App)
I've been beating my head against the wall over a scrollview issue where the top and bottom are cut off in landscape mode. Portrait mode - everything runs swimmingly. The moment I flip the iPad on its side, though, I lose about a quarter of the view on the top and bottom. I thought this was something to do with framing or such; I ran through a myriad of frame, padding, spacer, geometry...I set it static, I set it to dynamically grow, I even created algorithms to try to figure out how to set things to the individual device.
Eventually, I separated the tablet and phone views as was suggested here and on the Apple dev forums. That's when I started playing around with the background image. Right now I have....
ZStack {
Image("background")
.resizable()
.scaledToFill()
.ignoresSafeArea()
ScrollView {
VStack(spacing: 24) {....
The problem is the "scaledToFill". In essence, whenever THAT is in the code, the vertical scrollview goes wonky in landscape mode. It, in essence, thinks that it has much more room at the top and the bottom because the background image has been extended at top and bottom to fill the wider screen of the iPad in landscape orientation.
Is there any way to get around this issue? The desired behavior is pretty straightforward - the background image fills the entire background, no white bars or such, and the view scrolls against it.
So…I am hitting a wall here and could use some guidance towards best practice.
I’ve developed an app in Xcode/SwiftUI that renders just fine on the iPhone - text, images, buttons, frames…everything is nicely centered on the screen or scrolls where and when I want.
The iPad though…not so much. I’m having issues with tops and bottoms being cut off in scrollviews. These are just straight up text screens too - the ones with other elements/controls…they’re rendering fine.
I’ve tried a mix of geometry, vstack, scrollview, padding, spacers…the lot of it. Nothing I seem to do works - the views do not want to fill and fit properly.
And, of course, the issue becomes worse the moment you flip the iPad into landscape view. Or use the 13” models.
I’d imagine others are battling these issues as well and found solutions, so I decided to hit up the brain trust.
We recently migrated our app to use NavigationSplitView on iPad with a sidebar and detail setup, and we got reports that the navigation buttons on the sidebar disappear when returning to our app after using a different app. I reproduced the issue from a new empty project with the following code (issue tested on iOS 17.4 and iOS 18.3, was not able to reproduce on iOS 16.4):
import SwiftUI
@main
struct TestApp: App {
var body: some Scene {
WindowGroup {
NavigationSplitView {
Text("sidebar")
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button(action: {}) {
Image(systemName: "square.and.arrow.down")
}
}
ToolbarItem(placement: .topBarTrailing) {
Button(action: {}) {
Image(systemName: "square.and.arrow.up")
}
}
}
} detail: {
Text("detail")
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button(action: {}) {
Image(systemName: "eraser")
}
}
ToolbarItem(placement: .topBarTrailing) {
Button(action: {}) {
Image(systemName: "pencil")
}
}
}
}
}
}
}
Please check the following GIF for the simple steps, notice how the navbar buttons in the detail view do not disappear:
Here's the console output, it shows that the constraints break internally:
I use swiftui to build apps on iPhone and iPad.
There is no problem with the iPhone app.
The game display is fully shown on iPhone.
However, for the iPad, the game display is not shown and the screen goes black.
I had to tap the button on the upper left side.(looks like a side view button)
After that, the game display is only shown in the left side in a very small size.
How can I make the game display fully shown in the iPad?
I'm trying to determine if it’s possible to detect when a user interacts with a Slide Over window while my app is running in the background on iPadOS. I've explored lifecycle methods such as scenePhase and various UIApplication notifications (e.g., willResignActiveNotification) to detect focus loss, but these approaches don't seem to capture the event reliably. Has anyone found an alternative solution or workaround for detecting this specific state change? Any insights or recommended practices would be greatly appreciated.
Hardware: iPad Pro 11" (M2 Version)
Software: iPadOS 18.4 Beta 4 (most recent as of 2025-03-24)
Got an interesting one today that I am curious if anyone else has run into, and sadly it’s one that does affect my iPad use a lot!
I use the Magic Keyboard 11” on mine. After upgrading to the Public Beta 4 last night, the keyboard works fine, the trackpad shows my grey dot on the screen and even indicates that it recognizes a trackpad click by that grey dot changing slightly.
However, the actual click, nor scrolling, actually works in any way shape or form. The only gesture I’ve seen work up to this point is the three-finger motion to change applications, that’s it.
I have two iPad’s, and two keyboards, and it does not matter which keyboard one I use, which confirms that it’s likely a software issue of some sort. Other reason that’s the case? Hooking up an external trackball and the same behavior happens.
Anyone else run into this?
When an external keyboard is connected to the iPad, the software keyboard often becomes hidden and cannot be made to show again programmatically.
Help! Is there a way to programmatically get the software keyboard to re-appear when an external keyboard is connected without clicking 'Show Keyboard' from the Keyboard Shortcuts menu-item button?
Its corner-casey for sure, (with our own keyboard extension) we have a sub-view that is added to the software keyboard view under a certain use case. When the user has an external keyboard connected, everything is fine until the app is backgrounded. When the app is re-foregrounded the software keyboard often becomes hidden (what the user now sees is a keyboard shortcut menu-item group w/a keyboard button and a mic button.) This makes it impossible for the user to interact with the subview we added (because it is hidden), unless the user manually shows the software keyboard again by clicking "Show Keyboard" from the keyboard shortcut.
The software keyboard view is still the 'firstResponder' (accepting key strokes, etc), we just cannot find a way to programmatically make it visible again. Sigh.
Hello fellow Techies!
I am currently doing the Swift Playgrounds “Keep Going with Apps” on my iPad Pro. Everything has been going as designed until I got to the ‘Add and Delete Creatures‘ module. The lesson concludes with being able to add a creature to your list in the CreatureZoo. When you run the app from the playground, you can fill out the fields and tap ‘Add’ and that is when the app dims and after 5 seconds I get the notification that the app has an unknown crash. I have reviewed the lessons leading up to it, but I can’t find anything wrong. (Full Disclosure: I really have no clue what I am looking at some of time.)
Has anyone else ran into this?
`import SwiftUI
import Guide
struct CreatureEditor: View {
//#-learning-code-snippet(defineVariablesCreatureEditor)
//#-learning-code-snippet(environmentValue)
@State var newCreature : Creature = Creature(name: "", emoji: "")
@EnvironmentObject var data : CreatureZoo
@Environment(.dismiss) var dismiss
var body: some View {
SPCAssessableGroup(view: self) {
VStack(alignment: .leading) {
Form {
Section("Name") {
//#-learning-code-snippet(addACreatureEditorTextField)
TextField("What is your monster's name?", text: $newCreature.name)
}
Section("Emoji") {
TextField("What does your monster look like?", text: $newCreature.emoji)
}
Section("Creature Preview") {
CreatureRow(creature: newCreature)
}
}
}
.toolbar {
ToolbarItem {
Button("Add") {
data.creatures.append(newCreature)
dismiss()
}
}
}
//#-learning-code-snippet(addButtonToToolbar)
}
}
}
struct CreatureEditor_Previews: PreviewProvider {
static var previews: some View {
NavigationStack() {
CreatureEditor().environmentObject(CreatureZoo())
}
}
}’
When I build UITabBarController on (iPad + iOS18), selectedImage on each tabBarItems don't appear. (SwiftUI TabView can change iconImages by state change, so no problem on SwiftUI. But I need to use UITabBarController)
How Could I solve this problem and show the selectedImages?
sample project which produce the problem: github
app crashing in iPad Only and not getting help from logs
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000016d667fd0
Exception Codes: 0x0000000000000002, 0x000000016d667fd0
VM Region Info: 0x16d667fd0 is in 0x16d664000-0x16d668000; bytes after start: 16336 bytes before end: 47
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_SMALL 132c00000-133000000 [ 4096K] rw-/rwx SM=PRV
GAP OF 0x3a664000 BYTES
---> STACK GUARD 16d664000-16d668000 [ 16K] ---/rwx SM=NUL stack guard for thread 0
Stack 16d668000-16d764000 [ 1008K] rw-/rwx SM=SHM thread 0
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [10927]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 UIKitCore 0x186fae04c __66-[UITraitCollection _traitCollectionByModifyingTraitsCopyOnWrite:]_block_invoke_2 + 4
1 UIKitCore 0x186faefdc __54-[UITraitCollection traitCollectionByModifyingTraits:]_block_invoke + 36
2 UIKitCore 0x186fabfc8 -[UITraitCollection _traitCollectionByModifyingTraitsCopyOnWrite:] + 252
3 UIKitCore 0x187109b08 -[UITraitCollection traitCollectionByModifyingTraits:] + 120
4 UIKitCore 0x1871c013c -[UIScreen _defaultTraitCollectionForInterfaceOrientation:inBounds:] + 224
5 UIKitCore 0x1871bff8c -[UIApplication _isOrientationVerticallyCompact:] + 48
6 UIKitCore 0x1871bcd28 -[UIApplication _isStatusBarHiddenForOrientation:] + 24
7 UIKitCore 0x186fe0d10 +[UIWindow(StatusBarManager) _prefersStatusBarHiddenInWindow:targetOrientation:animationProvider:] + 260
8 UIKitCore 0x186fe310c +[UIWindow(StatusBarManager) _prefersStatusBarHiddenInWindow:animationProvider:] + 72
9 UIKitCore 0x186fe2e00 -[UIApplication _isStatusBarEffectivelyHiddenForContentOverlayInsetsForWindow:] + 132
10 UIKitCore 0x186fe0a9c -[UIWindow _sceneSafeAreaInsetsIncludingStatusBar:] + 184
11 UIKitCore 0x187037628 -[UIWindow _normalizedSafeAreaInsets] + 64
12 UIKitCore 0x1870375a0 -[UIWindow safeAreaInsets] + 76
13 UIKitCore 0x186fa6c70 -[UIView _updateSafeAreaInsets] + 68
14 UIKitCore 0x188529824 -[UIView _recursiveEagerlyUpdateSafeAreaInsetsUntilViewController] + 176
We are experiencing problems with the USB port on iPad Pro 11 inch (M4) model number MVW13NF/A. Our custom peripheral device (based on Raspberry Pi Pico + tinyUSB stack, is configured as a network adapter class and has communication with our App over UDP protocol. Our device also acts as a DHCP server, providing the IP address for iPad.
The problem can be described as a “bus stall” or "bus hold" after sleep mode. To reproduce it we just send the iPad into sleep mode using a power button, the USB bus on M4 goes to the suspended state and won’t resume anymore when we wake the iPad up.
The problem has occurred since the upgrade to iOS 18.2.1 and has not been observed before on the previously installed iOS 17 on the same iPad Pro M4.
Also, the problem does not happen on the iPad Pro 11 inch (3rd gen with M1) model number MHW73FD/A, with the same iOS 18.2.1 installed. The problem also does not arise, if we connect our device via USB hub to the same iPad Pro M4.
We have tested different versions of tinyUSB stack (either included in RPi Pico SDK or native unpatched). The problem is independent of the library version. It occurs always if our device is connected directly to the USB port of iPad Pro (M4) with iOS 18. It also stays after upgrading to the latest iOS 18.3 (beta)
In the attached logs is (reduced for clarity) debug output from tinyUSB library about events on the USB bus. These logs were captured via RTT debugging output, using Segger J-Link debugger, so logging process does not affect the timings on the USB bus.
There are three logs attached, for cases 1: "iPad Pro M4 + iOS18" (i.e. problematic case), 2: "iPad Pro M1 + iOS18", and 3: "iPad Pro M4 + iOS18 + external USB hub" (they are non-problematic cases).
case1_usbd_log.txt
case2_usbd_log.txt
case3_usbd_log.txt
This was already posted as feedback with id FB16366509
Im having issue with OneDrive that is affected our company iPads. User are able to drag and drop any folder or files over and now they cant. they are on the latest update for OneDrive and the IOS. Can someone look at this and also i reach to Microsoft and they said that nothing have change on there end.
We’re developing an iPad application that visualizes 2D and 3D building floor plans, including a mesh network of nodes that control lighting and climate. The node count ranges from 1,000 to 15,000.
We’re using SceneKit to dynamically render the floor plan and node mesh on an iPad 10th generation running iPadOS 18.3. While the core visualization works, we are experiencing significant performance degradation as the node count increases.
Specifically:
At 750–1,000 nodes, UI responsiveness noticeably declines.
At 2,000 nodes, navigating the floor plan becomes nearly unusable.
We attempted to optimize performance with a Geometric Pool algorithm, but the impact was minimal. Strangely, the same iPad handles 30,000+ 3D objects effortlessly when using Unity or Unreal Engine, raising the question of whether SceneKit may not be optimized for this scale.
Our questions:
Is SceneKit suitable for visualizing such large node counts, or are we hitting an inherent limitation of the framework?
Are there best practices or optimization techniques for SceneKit that we might be missing?
Should we consider a hybrid approach or fully transition to a different 3D engine for this use case?
We’ve attached a code sample below demonstrating the issue. Any insights, suggestions, or experiences would be greatly appreciated!
ContentView.swift
So my app was rejected in review and the review stated this :
The 13-inch iPad screenshots show an iPhone image that has been modified or stretched to appear to be an iPad image. Screenshots should highlight the app's core concept to help users understand the app’s functionality and value.
I don't want my app to be supported on ipad, as it probably won't look that good on it.
So is there any way i could restrict that to iphones only?
Also the review said that
We have started our review, but we need additional information to continue. Specifically, it appears your app may access or include paid digital content or services, and we want to understand your business model before completing our review.
And they have asked some 5 questions regarding the same.
Now, My application is completely free , yet they are saying that may include paid content.
So where can i turn this off?
In the pricing section , I have selected 0 in my local currency.
Topic:
App Store Distribution & Marketing
SubTopic:
App Review
Tags:
iPad
App Review
Business Models
The SwiftUI Playground code below demonstrates that a .jpeg image can be read and written to the iOS file system. While, a.png image can only be read; the writing request appears to be ignored. Can anyone please tell me how to code to save a .png image using SwiftUI to the iOS file system.
Code:
import SwiftUI
import UniformTypeIdentifiers
/*
(Copied from Playground 'Help' menu popup.)
UIImage Summary
An object that manages image data in your app.
You use image objects to represent image data of all kinds, and the UIImage class is capable of managing data for all image formats supported by the underlying platform. Image objects are immutable, so you always create them from existing image data, such as an image file on disk or programmatically created image data. An image object may contain a single image or a sequence of images for use in an animation.
You can use image objects in several different ways:
Assign an image to a UIImageView object to display the image in your interface.
Use an image to customize system controls such as buttons, sliders, and segmented controls.
Draw an image directly into a view or other graphics context.
Pass an image to other APIs that might require image data.
Although image objects support all platform-native image formats, it’s recommended that you use PNG or JPEG files for most images in your app. Image objects are optimized for reading and displaying both formats, and those formats offer better performance than most other image formats. Because the PNG format is lossless, it’s especially recommended for the images you use in your app’s interface.
Declaration
class UIImage : NSObject
UIImage Class Reference
*/
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
struct ImageFileDoc: FileDocument {
static var readableContentTypes = [UTType.jpeg, UTType.png]
static var writableContentTypes = [UTType.jpeg, UTType.png]
var someUIImage: UIImage = UIImage()
init(initialImage: UIImage = UIImage()) {
self.someUIImage = initialImage
}
init(configuration: ReadConfiguration) throws {
guard let data = configuration.file.regularFileContents,
let some = UIImage(data: data)
else {
throw CocoaError(.fileReadCorruptFile)
}
self.someUIImage = some
}
func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper {
switch configuration.contentType {
case UTType.png:
if let data = self.someUIImage.pngData() {
return .init(regularFileWithContents: data)
}
case UTType.jpeg:
if let data = self.someUIImage.jpegData(compressionQuality: 1.0) {
return .init(regularFileWithContents: data)
}
default:
break
}
throw CocoaError(.fileWriteUnknown)
}
}
struct ContentView: View {
@State private var showingExporterPNG = false
@State private var showingExporterJPG = false
@State private var showingImporter = false
@State var message = "Hello, World!"
@State var document: ImageFileDoc = ImageFileDoc()
@State var documentExtension = ""
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text(message)
Button("export") {
if documentExtension == "png" {
message += ", showingExporterPNG is true."
showingExporterPNG = true
}
if documentExtension == "jpeg" {
message += ", showingExporterJPG is true."
showingExporterJPG = true
}
}
.padding(20)
.border(.white, width: 2.0)
.disabled(documentExtension == "")
Button("import") {
showingImporter = true
}
.padding(20)
.border(.white, width: 2.0)
Image(uiImage: document.someUIImage)
.resizable()
.padding()
.frame(width: 300, height: 300)
}
// exporter .png
.fileExporter(isPresented: $showingExporterPNG, document: document, contentType: UTType.png) { result in
switch result {
case .success(let url):
message += ", .\(documentExtension) Saved to \(url.lastPathComponent)"
case .failure(let error):
message += ", Some error saving file: " + error.localizedDescription
}
}
// exporter .jpeg
.fileExporter(isPresented: $showingExporterJPG, document: document, contentType: UTType.jpeg) { result in
switch result {
case .success(let url):
message += ", .\(documentExtension) Saved to \(url.lastPathComponent)"
case .failure(let error):
message += ", Some error saving file: " + error.localizedDescription
}
}
// importer
.fileImporter(isPresented: $showingImporter, allowedContentTypes: [.png, .jpeg]) { result in
switch result {
case .failure(let error):
message += ", Some error reading file: " + error.localizedDescription
case .success(let url):
let gotAccess = url.startAccessingSecurityScopedResource()
if !gotAccess {
message += ", Unable to Access \(url.lastPathComponent)"
return
}
documentExtension = url.pathExtension
guard let fileContents = try? Data(contentsOf: url)
else {
message += ",\n\nUnable to read file: \(url.lastPathComponent)\n\n"
url.stopAccessingSecurityScopedResource()
return
}
url.stopAccessingSecurityScopedResource()
message += ", Read file: \(url.lastPathComponent)"
message += ", path extension is '\(documentExtension)'."
if let uiImage = UIImage(data: fileContents) {
self.document.someUIImage = uiImage
}else{
message += ", File Content is not an Image."
}
}
}
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Files and Storage
Developer Tools
iPad
Swift Playground
The target was chosen as IPhone and IPad. I can also run this build on my IPad. The info.plist content of all our other applications is the same and there were no problems until today. I don't understand why it is being rejected now.