ios9

ios 9 objective-c screen size issues

假装没事ソ 提交于 2019-12-28 04:33:28
问题 I upgrade to ios 9 and xcode 7 (from xcode 6.2) and now this happens when I start my app: There is now all this black bars above and below. My appDelegate is like so: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. // self.window.backgroundColor = [UIColor whiteColor]; // [self.window

iOS9 Swift File Creating NSFileManager.createDirectoryAtPath with NSURL

末鹿安然 提交于 2019-12-28 03:56:26
问题 Before iOS9, we had created a directory like so let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as! String let logsPath = documentsPath.stringByAppendingPathComponent("logs") let errorPointer = NSErrorPointer() NSFileManager.defaultManager().createDirectoryAtPath(logsPath, withIntermediateDirectories: true, attributes: nil, error: errorPointer) But with iOS9 they removed String.stringByAppendingPathComponent. The auto convert tool replaced

iOS9 ATS: what about HTML5 based apps?

僤鯓⒐⒋嵵緔 提交于 2019-12-28 03:30:11
问题 According to the documentation from https://developer.apple.com/library/content/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW14, Apple forces to use HTTPS over HTTP in iOS 9. App Transport Security App Transport Security (ATS) lets an app add a declaration to its Info.plist file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should

App Transport Security and IP addresses in iOS9

扶醉桌前 提交于 2019-12-28 01:49:09
问题 I develop my iOS app using a local server running on my dev box. When testing on devices, I connect directly via an IP address, which is over HTTP and not HTTPS (so I don't have to deal with self-signed certs while in development, which the device wouldn't even like anyways). I thought that this would be sufficient: However, cannot get it to work without also adding NSAllowsArbitraryLoads = YES , AKA this: Now, I will have to remember to remove this when rolling a production build but not

iOS Creating an Object Best Practice

こ雲淡風輕ζ 提交于 2019-12-25 14:49:06
问题 I've created a wizard for user's to sign up using my app, however, I'm having some doubts as to how I should store their information along the way. I have a User model, which is filled out when users are pulled from the database, however, there are some required fields on this model that wouldn't be filled out if I were to use it as the object that is passed along as the user goes through the the wizard. Here is my User model: final class User: NSObject, ResponseObjectSerializable,

iOS 9 custom URL scheme not working

一世执手 提交于 2019-12-25 09:57:54
问题 My web application is making use of iFrame to launch a App using custom URL scheme. With the latest release iOS 9 this has stopped working. On going through articles online, I have some understanding now that Universal Links are way to go about it or else we can use below hack/code to still launch the app(this results in a alert message asking user to Open/Cancel the call, which doesn't look nice). window.location = app:// Wanted to check with experienced people here, if there is any other

Short URL not opened in App with Universal Links

旧城冷巷雨未停 提交于 2019-12-25 09:14:53
问题 I have set up Universal links in my iOS app, and it works with full URL like : example.com/path/ Recently, I want short URL like: t.cn/m , which map to example.com/path/ , can be opened in my App directly. So I added appplinks:t.cn at association domain in Capabilities. But it doesn't work. It can't be opened directly in my App.It's opened with safari and i have to click the "open" button on pull-down-banner in safari to open in my App. It seems like short URL can't be opened directly in my

One label's constraints added using IB, one label's constraints added programmatically

我们两清 提交于 2019-12-25 07:34:52
问题 My goal is to position two labels on top of each other. I dragged a label onto the storyboard, labelA, and I pinned it a random distance from the top, and I centered labelA horizontally in the view, resulting in blue constraints. Then I dragged a second label, labelB, onto the storyboard and moved it below labelA (say, 1 inch separating the two labels). Now, I am trying to programmatically set the constraints for labelB to move it on top of labelA: import UIKit class ViewController:

WatchOS 2 not reading NSData from iPhone AppDelegate

南楼画角 提交于 2019-12-25 06:44:45
问题 I need help or an extra eye to find out why my query and methods aren't returning data to the Apple Watch. I am trying to populate my table with images that have PFFiles stored in my parse database. When my messages require a String back, they are going through, but not when I'm requesting NSData back. I am having to ask for an NSData file back because the Watch does not conform to parse protocols, I've learned. So I am trying to convert them on the AppDelegate side, then transfer as NSData.

How to handle multiple images with large size?

痴心易碎 提交于 2019-12-25 06:32:04
问题 I have list of selected images from Photos gallery. The array list contain selected PHAssets from Photos <PHAsset: 0x131334350> 768AD8BA-FE7A-4EE9-B2CF-4DD4AEBE2AE9/L0/001 mediaType=1/0, sourceType=1, (2448x3264), creationDate=2016-03-11 06:50:09 +0000, location=1, hidden=0, favorite=0 ", "<PHAsset: 0x131334260> CA962E42-A367-4E8D-85C8-934F8C76FE78/L0/001 mediaType=1/0, sourceType=1, (2448x3264), creationDate=2016-03-11 06:50:08 +0000, location=1, hidden=0, favorite=0 " Now i want to store