ios

Dateformatter issue in swift

让人想犯罪 __ 提交于 2021-02-19 09:03:51
问题 My API sending me date string in UTC like 2/20/2016 11:45 AM. For displaying date in my timezone, I am converting date from UTC to Local time zone like below code let sourceDateString = "12/20/2016 11:45 AM" let formatter = DateFormatter() formatter.dateFormat = "MM/dd/yyyy hh:mm a" formatter.timeZone = TimeZone(identifier: "UTC") let date = formatter.date(from: sourceDateString) print(date) formatter.timeZone = NSTimeZone.local formatter.dateFormat = "MMM dd,yyyy hh:mm a" let strDate =

twitter rest api - post a status with a user mention

倾然丶 夕夏残阳落幕 提交于 2021-02-19 08:55:05
问题 Using twitter's rest api, and specifcally the method : https://dev.twitter.com/docs/api/1/post/statuses/update I'm trying to post a tweet that will include a user mention ( @[screenname] ). However, it seems as though twitter won't allow me to post any @ sign unless I encode it. I've tried several encoding techniques, but non seem to provide me with the suitable encoding twitter is looking for. As to the question, What should "@" be substitute with so twitter will allow me to pass the message

twitter rest api - post a status with a user mention

走远了吗. 提交于 2021-02-19 08:55:05
问题 Using twitter's rest api, and specifcally the method : https://dev.twitter.com/docs/api/1/post/statuses/update I'm trying to post a tweet that will include a user mention ( @[screenname] ). However, it seems as though twitter won't allow me to post any @ sign unless I encode it. I've tried several encoding techniques, but non seem to provide me with the suitable encoding twitter is looking for. As to the question, What should "@" be substitute with so twitter will allow me to pass the message

iOS Login Prompt Uses Bundle Name Unfollow

不问归期 提交于 2021-02-19 08:27:31
问题 When using Unity Facebook SDK version 7.18 on iOS, the login permission prompt on iOS seems to be using the Bundle Name (CFBundleName) instead of Bundle Display Name (CFBundleDisplayname) in Info.plist. The FacebookDisplayName is also set, but it is not using that. Bundle Name by default is set to $(PRODUCT_NAME), but I don't think we'd want to change PRODUCT_NAME or Bundle Name. What is the proper way to change or localize the app name shown in this dialog? FB Login Dialog text: "App Name"

how to hide html elements in wkwebview in IOS?

偶尔善良 提交于 2021-02-19 08:11:51
问题 i want to hide certain html elements in wkwebview using swift 4, xcode 9. i know how to do it in android and have added the code below. i just need an equivalent code for ios in swift 4 for wkwebView. myWebView.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { myWebView.loadUrl("javascript:(function() { " + "document.getElementById('divHeader') [0].style.display='none'; " + "})()"); } }); myWebView.loadUrl(URL); 回答1: Use WKWebView import

background-attachment: fixed on mobile

点点圈 提交于 2021-02-19 08:11:34
问题 I'm trying to set a background image for an spn web app and I need the background to be fixed (that it won't be scrolled with the rest of the page). this is the body css: body { background-color: rgb(51, 102, 102); background-image: url('../images/background.png'); background-attachment: fixed; background-position: center; color: #eee; } Safari in IOS and Chrome on Android repeat the background instead of fixing it at one point. I've seen on the internet it's been disabled on mobile but is

how to hide html elements in wkwebview in IOS?

落花浮王杯 提交于 2021-02-19 08:11:22
问题 i want to hide certain html elements in wkwebview using swift 4, xcode 9. i know how to do it in android and have added the code below. i just need an equivalent code for ios in swift 4 for wkwebView. myWebView.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { myWebView.loadUrl("javascript:(function() { " + "document.getElementById('divHeader') [0].style.display='none'; " + "})()"); } }); myWebView.loadUrl(URL); 回答1: Use WKWebView import

Create SKView programmatically?

谁都会走 提交于 2021-02-19 08:05:06
问题 I like my code to be explicit so I want to remove the storyboard file and create SKView programmatically. What I have tried so far: I created a SpriteKit game project in xcode . Deleted the storyboard file. Deleted sroryboard property from Info.plist Added this code found in an example to the AppDelegate : - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

Missing Push Notification Entitlement: While Resigining ipa

眉间皱痕 提交于 2021-02-19 07:57:45
问题 Team, We are releasing new update to our project, In the last version we dont have Push Notifications now are implementing all the process. We work for a client where we used to send ipa file with our distribution profile (Push notifications are working for the ipa we are sending). Once we send the working ipa, they will resign the ipa with there Distribution Profiles and Upload to appstore. We have checked all the scenarios like, App Id enabled with Push Notification,SSl generated for