Questions tagged [ios]

iOS is the dominant mobile operating system that powers all Apple devices like iPhone, iPod touch, and iPad. When seeking programming support on iOS platform, make sure to add the [ios] tag to your questions. For inquiries specifically concerning Objective-C or Swift languages, feel free to include the appropriate tags - [objective-c] or [swift].

How to disable the Rubber/Elastic scrolling feature on your iPad?

On my webpage, there is a combination of vertical and horizontal scrolling. Everything works fine when the user swipes left or right exactly, but issues arise when the swipe is not precise along a straight line (diagonally). In this case, both vertical and ...

Is it possible to link Cookies with Homescreened HTML5 Applications?

It seems that when an HTML5 app is added to the homescreen on iOS, it loses the ability to work with cookies. My setup involves a node.js server running connect. I've come across solutions like that address this issue for other platforms. Is there ...

Efficient Techniques to Eliminate Unwanted Jumping in CSS Transitions

I am currently working on a unique "stack" component that is inspired by the amazing ElastiStack. You can check out a cool demo of my work here. The demo works flawlessly on desktop Chrome, but unfortunately, I have encountered some issues with the transit ...

To access an express server, use port 3000, while port 8081 is designated for react native. Learn how to send

I am currently developing an Avatar Builder app using React Native that I plan to deploy on both iOS and Android platforms. My server is running on Express, which uses localhost:3000, while React Native runs on localhost:8081. import axios from 'axios'; i ...

Understanding JSON Parsing in iOS devices

I have received this JSON data for currency exchange rates: {"Curs":[{"ID":"AED","Name":"Dirhamul Emiratelor Arabe","Curs":"0.8013","Multiplier":"1","Data":"2011-03-21"},{"ID":"AUD","Name":"Dolarul australian","Curs":"2.9611","Multiplier":"1","Data":"2011- ...

Methods for Hiding and Revealing a UIView with the Press of a Single UIBarButtonItem

In my iOS app, I have created a right bar button item programmatically and added it to my view controller. Additionally, I have also added a UIView to the view controller. The action for my bar button item has been set. Currently, the UIView is hidden when ...

Want smooth transitions between pages?

I need assistance with implementing swipe navigation for my app. Unfortunately, the code I currently have appears to be faulty. This is only my second attempt at creating an app and any guidance would be greatly appreciated. I am having difficulty sharing ...

React-Native Error: Invalid element type detected

While attempting to run my React Native app on my iPhone using Expo, I encountered an error displayed in a red background area. Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite ...

What is the best way to customize the renderItem method in React Native's SectionList to be based on sections instead of

I've been exploring the FB docs and came across a mention of being able to override the default item-based renderItem method with a section-based render in the SectionList component in React Native. However, I'm struggling to find a way to actually impleme ...

PHP Webservice is failing to return the encoded response accurately

A piece of PHP code that I developed successfully registers user details from my iPhone app and returns JSON output. Here is the code snippet: header('Content-type: application/json'); include 'connection.php'; $response = array(); $username = $_POST['us ...

Searching text on an iPhone using regex patterns

Currently, I have been utilizing the following regular expression: <li class=\"b_algo\"><h2><a href=\"(.*?)\" In my search within NSString, I am interested in modifying this search to also include : <li class=\ ...

In the realm of Swift programming, lies the intriguing task of parsing a JSON file that is securely stored on a

I am new to the concept of JSON parsing. Currently, I am attempting to retrieve data from a local JSON file in my Swift project. I have successfully implemented the code to fetch the data. However, I am facing difficulties in creating an array of objects b ...

Storing JSON information on your iPhone: Should you store the JSON string as is, or convert it into an object and utilize NSCoding + NSKeyedArchiver for storage?

When it comes to creating an iPhone application, one important aspect to consider is how to handle data retrieved from a remote server. In my specific case, I am using the Json Framework to parse json data and display it in a UIview. The question arises wh ...

How can an AngularJS/Ionic mobile application incorporate an external JavaScript script?

Can external JavaScript scripts be executed in an AngularJS/Ionic mobile app, particularly on non-jailbroken iOS devices? We are considering creating a launcher version of our app that downloads the required scripts and then installs and runs them. I have ...

Identifying the device name in Safari on iOS 13 despite the inaccurate display of the user agent - a step-by-step guide

Following the release of Apple's iOS 13, I discovered that window.navigator.userAgent in Safari on iPad iOS 13 is identical to that on MacOS. It appears like this: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) ...

Is the user currently browsing the 'Home screen webpage' or using the Safari browser?

In JavaScript, is there a method to determine if the user has accessed the website from their home screen after adding it to their home screen, or if they are browsing via Safari as usual? ...

Develop a CSS layout for the specified design

Aiming to achieve a unique layout using dynamic html strings. The challenge arises when transitioning to the second page as the layout does not adjust upward and images cannot be added to the first page. Attempting to implement the following sample code ...

The keyboard fails to open when trying to input text on a WKWebView

Is there a way to programmatically open the keyboard in a WkWebView for tel text input after a JavaScript function call? I want the keyboard to display for efficiency reasons when a certain input is activated, but it doesn't gain focus automatically. I'v ...

Failed Attempt to Execute React Native Application using Command Prompt (iOS)

I'm currently working through the React Native tutorial found on their official website. During my project building process, I utilized the following command: react-native run-ios An error was encountered: Found Xcode project TestProject.xcodeproj xcru ...

Parsing JSON Response in iOS using Swift and Alamofire

After receiving the JSON response from my server, this is what I found: { "case_details": { "status": "PENDING", "caseNumber": "ARBIT.CASE(C)/1/2017", "party": "COMBITHERM APPARATE-UND ANLAGENBAU GMBH .Vs. COXWELL DOMES ENGINEERS PVT. LTD. & ...

The dimensions of text that wraps itself around multiple lines are distinct from those of text that remains on a single line

Hello everyone, I need some assistance with setting up my WordPress blog. I have integrated both Facebook and native WordPress comments on my website: . My aim is to make the formatting of the WordPress comments resemble that of Facebook comments as closel ...

Issues Arise with Nativescript Layout When Content is Not in View on iOS

This problem has been giving me a hard time for the past few days. I hope someone can help me figure out what's wrong. I have a view that shows a nested list inside a main list. The main list contains header details. Everything looks fine when the initial ...

clearing all input fields upon submission in React Native

I need help resolving an error that occurs when I try to clear text input fields on a button press. Instead of clearing the fields, it throws an undefined error because I am trying to set the value as {this.state.inputTextValue} and then clear it using set ...

Having trouble getting a button's OnClick event to work with Bootstrap on iOS devices

Here is an example of the issue I'm experiencing: http://jsfiddle.net/d01sm5gL/2/ The onclick event functions correctly on desktop browsers, however when using iOS8, the event does not trigger. I have tried calling the function manually through the d ...

Appium encountered an error on iOS with the message: "NSCocoaErrorDomain Error Code 260: The file named 'WebDriverAgentRunner-Runner.app' cannot be opened as it does not exist"

While running appium on a real iPhone, I encountered the following error message. Despite searching for a solution, I have not been able to resolve it yet. [XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appiu ...

Event object not being passed to function in UIWebView Javascript onclick event

When inserting HTML dynamically using simple NSStrings and then loading it into a UIWebview, the following approach is taken: [NSString stringWithFormat:@"<div onclick=\"MyClickEvent(e);\"....some more text here"> A function is defined li ...

What are the steps to successfully implement "Pointermove" event delegation in Safari iOS for parent/child elements?

I've encountered an issue that I'm struggling to find a solution for. My goal is to implement an event delegate using pointermove on a parent container, and I need to be able to detect when the event transitions between a child element and the pa ...

iOS devices will not scroll horizontally if there is a div that scrolls vertically within a div that scrolls horizontally

Picture a div that scrolls horizontally, housing two vertical-scrolling divs. You'll need to scroll left and right to navigate, then up and down inside the inner divs to read the content. /* RESET TO MINIMUM */ body, html { height: 100%; mar ...

How can I use PHP's openssl_encrypt() function in Objective-C for iOS development?

I am attempting to utilize the openssl_encrypt() method from php in iOS Objective-C. In order to do so, I have written the following code snippet: #import <CommonCrypto/CommonHMAC.h> #import <CommonCrypto/CommonCryptor.h> - (void)v ...

What is the best approach to extract information from this JSON Pokemon Dictionary using the Pokemon API in Swift 3?

I am facing an issue concerning the parsing of JSON data from the latest version of the Pokemon API. Specifically, I am having trouble extracting the values of the "name" within the "type" key. Here is an example of the JSON: "types": [ { "sl ...

Mapping an array of dictionaries containing key-value pairs to a specific class using a string identifier

I am trying to work with an Array of objects that are retrieved from a string. The information is received in an encrypted form through an API call, and upon decryption, it takes the form of a JSON structure presented below: { "request_id”:”abcds ...

Managing user sessions for a mobile app login in PHP: Best practices

As a professional PHP programmer, my expertise lies in web development and I have limited knowledge about coding for iOS and Android platforms. Currently, I have created RESTful APIs for two mobile apps, one for iOS and the other for Android, which replic ...

Converting XML data into a properly formatted JSON string

Looking to feed XML into an api endpoint, but first need to convert it to a JSON valid string. Many online parsers convert XML to a JSON object with the same structure as the XML, but that's not what I want. I need the XML converted into a string for use a ...

Using Alamofire and SwiftyJSON subscripts in Swift 3

For some reason, my code isn't working as expected and the result is always nil. I have incorporated Alamofire and SwiftyJSON into my code. Here is a snippet: let urlString = "myurl" let params: Parameters = [ "accessProvider": AccessProvider, ...

Subprocess capacitor encountered a hiccup while initiating the creation of a fresh Ionic project

Recently, I encountered an issue while working with Ionic Framework and AngularJs. Everything was running smoothly until I tried creating a new project using Ionic/Angular js. The problem arose with the capacitor, as seen below: https://i.stack.imgur.com/ ...

Switching from JSON to model on iOS involves converting the data and then employing tableviewCells or reusable UIView components based on the model type. From there, the values from the subviews

In a specific requirement, the server will send us a list of screens, each with its own set of questions. The questions can vary in type: Some may need a TextField for answering (with input validations) Others may have radio buttons (YES and NO options) T ...

Utilizing iOS Local Storage for Efficient Form Submission Handling

I feel like my brain is on the verge of exploding. I just can't seem to get this to work as intended, and I'm struggling to pinpoint the issue. Currently, I have a form that needs to be processed using AJAX. Before proceeding with that, I want to store ...

Converting NSMutableDictionary to JSON results in unexpected formatting issues on iOS

One of the challenges I'm facing is converting a NSMutableDictionary to JSON on iOS. NSMutableDictionary *offers = [[NSMutableDictionary alloc] init ]; for(int i=0;i<2;i++) { NSMutableDictionary *myOffer = [[NSMutableDictionary alloc ...

Tips for executing a function when the PhoneGap/jQuery Mobile iOS app loads

Since implementing jQuery Mobile, the code that used to work fine is no longer executing the onbodyload function. I am not getting any of the test alerts and it seems like the issue lies in the execution of the onbodyload function. How can I fix this? < ...

Storing an array in a file using Swift

In the process of developing an application, I have successfully implemented functionality to: Check for an internet connection; Receive a JSON file from the server and store the data in a file if the server is reachable; Read from the file if the connec ...

a fixed width layout with two columns aligned at the top

I've been struggling to design a two-column, top-aligned layout with fixed width for data that will be inserted into text in a WebView for an iPhone app. The first column needs to have a set width so the items in the second column can align perfectly. I' ...

Mapping an array element to a string using Codable object

I am facing a peculiar issue where my back-end returns an object structured like this: { "user": { "name": [ "John" ], "familyName": [ "Johnson" ] } } Each property is presented as an array cont ...

Registering your phone with Gigya

Currently, I am utilizing Gigya as the single sign-on system for my iOS application. It has been successfully integrated, allowing users to log in using their Twitter, Facebook accounts, or through manual email registration. However, due to the limitation ...

Utilize jQuery and JavaScript dynamically in an HTML document on iOS devices

Having some trouble with this code snippet and getting it to work as intended. - (void)viewDidLoad { [super viewDidLoad]; _webview.delegate = self; [_webview loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBun ...

How to break down nested arrays into multiple arrays in Swift 4?

Using JSON parsing in my news API development brought about significant improvements. Here's how the JSON data structure is organized: > { "status": "ok", "source": "associated-press", "sortBy": "top", -"articles": [ -{ "author": "CHRISTINA A. CA ...

Tips on adding additional information to a current JSON array using SwiftyJSON

I am currently working with an array of SwiftyJson data that has been declared and populated with relevant information. The code snippet used to populate the hoge array is as follows: self.hoge = JSON(data: data!) However, I now need to add new SwiftyJSON ...

Swiftly accessing information from the internet

Can someone please guide me on how to retrieve data from a website using Swift? My goal is to be able to update the content on the website without having to make changes to the entire application. I believe I just need to fetch text from a server (and I'm ...

Flexible Array Properties within Custom Object

Trying to construct a unique object from server feedback that contains constant fields plus an object array is my current task. I'll refer to it as a DynamicResponse. Each instance of DynamicResponse will have the same kind of custom objects in its ar ...

Is it possible to implement a wsdl webservice in Phonegap?

Does anyone know the best way to call a wsdl webservice in Phonegap? Any suggestions on source code or tutorials that could be helpful? ...

iOS authentication token combining PHP

Currently, I am working on an iOS application that requires user login using a unique user ID and password. The existing flow of the process is outlined below: 1) Users input their user ID and password. 2) Upon clicking the login button, a PHP webservice ...

What is the best way to begin IMA HTML5 SDK ads with sound off?

One challenge I encountered was getting autoplay video to work on iOS 10 using HTML5. To achieve this, I utilized the following code: <video autoplay loop muted playsinline controls> <source src="http://distribution.bbb3d.renderfarming.net/vi ...

The process of uploading images functions without any issues with all devices, except for the

Issue with Image Uploading on iPhone Devices in PHP (CodeIgniter) The problem occurs when trying to upload images taken on iPhones, while non-captured or other images fail to upload. Here is a snippet of the code: <?php ..... ..... $thi ...

I encountered error number 8 when trying to send push notifications to iOS devices

var apn = require('apn'); var gcm = require('android-gcm'); export default function notification( devicetype, devicetoken, alert, userid, action, profilepic, image, youtubeimage, id ) { if(devicetoken != "(null)") { var ...

There is a button on my website that uses a small piece of Javascript to post a tweet, but unfortunately, it is not functional on mobile devices

Check out this link to view the demonstration - http://codepen.io/illpill/pen/VbeVEq function sendTweet(message, author) { window.open('https://twitter.com/intent/tweet?hashtags=thequotemachine&text=' + encodeURIComponent('"' + m ...

Unable to see or play local mp4 file in Ionic iOS application

I am facing an issue with my Ionic app where I am trying to show a video playing in the background. The Jaeger25 HTMLVideo plugin works perfectly for Android, but when it comes to iOS, the video simply refuses to play. The video file is located in the www/ ...

Avoiding duplicate touch events with an if statement

I am currently working on a module for a responsive website that involves tapping the initial screen to reveal a panel from the right. The user can then tap a close button to hide the panel. However, there is an issue where if the user taps multiple times ...

Does Xamarin.Forms have a feature similar to html datalist that enables the selection of predefined values while also allowing for the input of free text?

We are currently developing a Xamarin forms application. One of the necessary features is a selection field where users can either choose from predefined options or enter their own text value, similar to using a text field. In HTML, this could be easily ...

Tips for showing the parsed JSON data in a TableView using a TextField

Hello there, I am just starting out with iPhone development and need some guidance. I'm currently working on incorporating a webservice to fetch JSON response strings, parsing them using JSONvalue and displaying the parsed data on labels through buttons.. ...

Retrieving information from dictionary in swift version 4

Currently, I am utilizing an API and trying to display its data in a table view. import UIKit import Alamofire class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var tableView: UITableView! @IBOu ...

Interested in learning how to extract an array from a description in Swift 4?

Currently delving into Swift 4, I've come across an algorithm that generates the base 64 representation of an array, as shown below: extension String { func fromBase64() -> String? { guard let data = Data(base64Encoded: self) else { ...

Notify users at scheduled time using Firebase and Cloud functions

I have developed a unique platform that allows fitness coaches to effectively communicate and share workout plans with their clients. However, I am looking to further enhance this platform by introducing a new feature: the ability for coaches to configure ...

NSInvalidArgumentException' error: 'Unrecognized selector sent to instance of __NSCFString

Below is the code snippet I am referring to: The nameLabel text attribute is set as the UserFullName from the unknown_object array in dict_Details. And here is my response: The getUserReviewsResponse data shows a status code of 200 and includes an ar ...

Trouble with HTML5 videos not functioning on Apple iOS gadgets

Having trouble playing my HTML5 videos on iOS devices, specifically iPhone 7.0 and iPad 7.0.4. Currently experiencing an issue where the iPad shows only an empty container and the iPhone displays a play button with a line through it. Any thoughts on what m ...

Learn how to automatically fill prototype cell text labels with NSDictionary data pulled from JSON through AFNetworking

Recently delving into iOS development, I have been working on downloading JSON data using AFNetworking and storing it in a Dictionary object. Check out the code snippet below to see how this is accomplished: -(void)locationRequest { NSURL *url = [NSURL U ...

Effortless retrieveJSON() method

SwiftyJSON is a valuable asset for Swift developers. It can be easily imported into projects using different methods such as CocoaPods or Carthage. I frequently utilize SwiftyJSON in my projects since handling JSON files is often necessary. To streamline ...

Sending an HTTP Post Request in Swift using dataUsingEncoding may corrupt the string

I am currently collaborating on an App with a colleague who posed this inquiry: Post request always wrapped by optional text. He is handling the iOS development, while I'm working on the Android side. The challenge lies in my lack of familiarity with Swift ...

Links are functional in browsers, but seem to be unresponsive on iPad devices

I'm currently developing a website that allows users to navigate using swipe gestures. Each slide contains multiple links that should redirect users to different locations upon clicking. However, I've encountered a bizarre issue where the links are not fun ...

learn to extract json information from a php web service using nsserialization

Currently, I am tackling json parsing using nsserialization. My aim is to parse a json data in uicollectionview. Below is the JSON API data I am working with: { "result": "Successful", "data": [ { "id": "2", "product_name": "6" Round ...

How to parse an array in JSON using Swift 3 and iterate through it

Figuring out how to parse JSON data in Swift 3 has been more challenging than I anticipated, especially coming from a Javascript background. Received response from API: [ { "ID": 1881, "image": "myimageURL", }, { "ID": 6333, "image": "myi ...

What is the best way to convert an array to JSON in Swift?

I am having trouble extracting the value "maxtemp_c" from a JSON request. This is my attempt so far, but I keep encountering issues when trying to parse the JSON data and end up with a nil value: //I have the URL of the json let url = URL(string: "http:/ ...

The hexadecimal code for the textured background color of an iOS Scroll View in CSS

Can someone share the specific CSS color code with me? I would like to apply this same color to my website. Appreciate it! ...

Eliminate brackets from JSON string

Upon extracting a string from a JSON response: NSString *messageFromResponse = [NSString stringWithFormat:@"%@",[[JSON objectForKey:@"Response"]valueForKey:@"Message"]]; NSLog(@"<%@>", messageFromResponse); The extracted string appears as follows ...

Rebounding Movement on iPad (React)

I've tried numerous solutions, but none seem to work. I have a page with scrollable content if necessary. While it functions properly in Windows Chrome and Firefox, iOS and Safari introduce an undesired vertical bouncing scroll. Some users have recommende ...

AngularJS iOS keyboard not disappearing post iOS 10 update

After updating my device to iOS 10, I encountered an issue with hiding the iOS keypad when switching from one view to another. This functionality was working perfectly fine on iOS 9.3. Previously, I had programmed it to intercept certain elements and auto ...

What is the location where UIWebView saves HTML5 offline files?

I'm curious about the location where HTML5 offline content is stored when saved from a UIWebView in an iOS app. Is it saved locally within my app's access, or somewhere else? ...