iOS on Stack Overflow | Featured questions tagged ios
1,065 FOLLOWERS
Featured questions tagged iOS on stackoverflow.com . Stack Overflow is the largest online community for programmers to learn, share their knowledge, and advance their careers
iOS on Stack Overflow | Featured questions tagged ios
7h ago
I am starting a new Xcode Project for macOS app. During the initial development I found that some part of the app should be shared between different targets like macOS App, Quick Look etc. The goal was to user Framework. By selecting Project in Project navigator and using the plus icon, I have created a new Framework target and called it Shared.
Next, in my App Project I have added it into the project and checked if it is correctly linked. The framework was Embedded and Signed. Both targets have the same Signing & Capabilities settings.
After I move a code into Shared framework it was time ..read more
iOS on Stack Overflow | Featured questions tagged ios
7h ago
I would like to migrate Facebook mediation with Google Mobile Ads.
Pod:
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleMobileAdsMediationFacebook'
Getting the below error after migrating to the latest version 11.2.0.
Undefined symbol: _GADUnifiedNativeIconAsset
It is working fine if I downgrade pod to pod 'Google-Mobile-Ads-SDK', '10.14.0'
Kindly let me know if anyone has an idea to fix the above issue with the latest pod file ..read more
iOS on Stack Overflow | Featured questions tagged ios
7h ago
I'm encountering an issue with SwiftUI view alignment when the device orientation changes or when the app transitions from the background to the foreground. Despite my efforts, the views(Tabbar) seem to be misaligned, causing a poor user experience.
Below is a simplified version of the code I'm using to display the UI:
@main
struct SSWIFTUIApp: App {
var body: some Scene {
WindowGroup {
TabbarViewApp()
}
}
}
struct TabbarViewApp: View {
init() {
let app = UITabBarAppearance()
app.configureWithOpaqueBackground()
app.backgrou ..read more
iOS on Stack Overflow | Featured questions tagged ios
3d ago
I'm using flutter module to add some screens in my native iOS app. same thing is used on android side as well. Now I want to add dev, prod flavour to the app. I've managed to do so in flutter module and I can launch it as well using terminal
flutter run --flavor dev/prod
this works as expected. But now I want to trigger this from my native app. I've created same schemas in iOS side but it always launches the last generated flavour of flutter module not the one I'm trying to run.
I've already read this git issue. It has no solution and the last commit just says Yeah you can do it but not how ..read more
iOS on Stack Overflow | Featured questions tagged ios
3d ago
After upgrading from Xcode 12, on any version of Xcode 13 or later, the following error occurs when running the sudo sh install-appledoc.sh command:
Build input file cannot be found: '~/<ProjectDir>/appledoc/default_templates.zip'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'appledoc' from project 'appledoc')
After researching the issue, the best lead I could find was to make sure that the target does not have any excluded architectures, which it does not. I can also confirm the noted file does exist at the stated ..read more
iOS on Stack Overflow | Featured questions tagged ios
1w ago
regards documentation of Firebase I have (I suppose) collapsible message. I had a similar problem with Android, but after removing the whole notification object from the payload it started working. But on iOS sending notification with (only) data as payload nothing helped - only last notification appears after switching network from offline to online.
Honestly, I tried many different ways (with or without apns header, without apns etc.) and I see a dead end. Help!
For now, my payload looks:
message: {
token: 'some token',
data: {
title: 'some title',
body: 'some body',
content ..read more
iOS on Stack Overflow | Featured questions tagged ios
1w ago
I'm using SPM in my project and am trying to integrate Apple/swift-openapi-generator. My project is divided into several modules, for which I'm using SPM. To manage dependencies, I have a Package.swift file.
// swift-tools-version:5.8
import Foundation
import PackageDescription
let openAPIRuntime = Target.Dependency.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime")
let openAPIURLSession = Target.Dependency.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
let openAPIGenerator = Target.PluginUsage.plugin(name: "OpenAPIGenerator", package: "swift-openapi ..read more
iOS on Stack Overflow | Featured questions tagged ios
1w ago
So I have this code:
struct ContentView: View {
@State private var names = ["Ted", "Barney", "Lily", "Robin", "Marshal"]
var body: some View {
List {
ForEach(names, id: \.self) { name in
ListRowView(name: name)
}
.onDelete(perform: deleteName)
}
.listStyle(.plain)
.scrollContentBackground(.hidden)
}
func deleteName(at offsets: IndexSet) {
names.remove(atOffsets: offsets)
}
}
struct ListRowView: View {
let name: String
var body: some View {
HStack {
i ..read more
iOS on Stack Overflow | Featured questions tagged ios
1w ago
I'm trying to display a bounding box around a detected QR code, but the box isn't showing up. Think it may be something with a mismatch in coordinate systems but not totally sure.
import SwiftUI
import AVFoundation
import Combine
struct ContentView: View {
@StateObject private var viewModel = QRCodeScannerViewModel()
var body: some View {
VStack {
if let url = viewModel.detectedURL {
Text(url)
.foregroundColor(.blue)
.padding()
} else {
Text("Scanning for QR Codes ..read more
iOS on Stack Overflow | Featured questions tagged ios
1w ago
I have a SDK distributed as XCFramework via cocoapods. I have added the PrivacyInfo file in the Resource folder and specify in the podspec as below.
s.resource_bundles = {"MyFramework_Privacy" => ["Resources/PrivacyInfo.xcprivacy"]}
Also verified that PrivacyInfo file has been copied in to different arch folders in XCframework
However when the consumer app use our SDK and were notified by Apple that they need to provide usage reasons for the required reason APIs and I am not sure why the PrivacyInfo.xcprivacy file that we have shipped not been considered. Any idea please ..read more