Allow external hosts in iframe on xcode 4.1 using phonegap - xcode

I'm trying to create an iPad/iPhone-app that displays an iFrame that links to an external site. (It's doesn't have to be in the App Store).
The problem is that when I load the app, it's takes me to Safari.
I know there was a setting in an earlier version of XCode, where you could specify which external hosts was allowed in the app. And that worked!
I can't seem to find the setting in 4.1...
Anybody know where I can locate it?
Cheers!

Changes to PhoneGap.plist or Cordova.plist
Change/add the following values in PhoneGap.plist or Cordova.plist file of your app.
MediaPlaybackRequiresUserAction: NO
AllowInlineMediaPlayback: YES
OpenAllWhitelistURLsInWebView: YES
and set ExternalHosts list as you require
here i do for showing gopoglemap in app
ExternalHosts
*.google.com
*.gstatic.com

Phonegap reads a setting called 'ExternalHosts' - this one is used to whitelist allowed external domains.
Open phonegap.plist - the key should be there, if not, simply add it.

Related

Office JS Save text as xml file Fails

I want to ask if Office JS is allowed to save local files?
In old question/answers I found various solutions like
FileSaver.js
Download2.js
I tried both but it did not help.
Both are using the technique of embedding a download link in the HTML document dispatching the event programmatically using JS. But click event fails with error = Access is denied
I want to ask if
Office JS API is allowed to create files to local path?
if NO was it allowed in older versions?
If YES do I need to make some configuration changes on Windows 10 desktop PC?
If allowed Please help how to achieve that
I want to create an XML file using JavaScript and save it to local path
thanks

Xamarin Universal Linking not requesting apple-app-site file

I'm trying to implement Universal Linking in my iOS Xamarin app. I've uploaded the apple-app-site-association file to my server, sending it as application/json and tested to ensure it downloads.
I've then added the following to the Entitlements.plist:
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:mydomain.com</string>
<string>applinks:*.mydomain.com</string>
</array>
</dict>
I need the linking to work across all subdomains, so my understanding is to include both the root domain and the wildcard entry, hence the two entries above. The apple-app-site-association file is served from the root domain and all subdomains.
I'm testing my app in debug mode through Visual Studio, to an actual device (iPhone XS). My understanding is that when the app is installed it will attempt to download the apple-app-site-association file from the server, however, when I check my server logs, there is no record of that happening.
I've tried deleting the app from the phone, re-building and running again, but no joy.
I've tried accessing the apple-app-site-association file using a browser and it loads, and the server logs show that it was requested.
Clearly the reason my Universal Linking isn't working is that my app never requests this file, but I'm at a loss now to understand why.
Steps to Setup universal links in Xamarin iOS:
Upload the apple-app-site-association file to the root of your website or in the .well-known subdirectory and make sure it’s served via HTTPS
1.1 If it’s served via HTTPS and you don’t need to target iOS8, don’t bother trying to
sign the JSON file. A plain simple JSON file will do.
Enable the “Associated Domains” functionality in the Apple Developer Center for your app and regenerate the provisioning profile
Add the domain(s) you want to add universal linking for to your iOS Entitlements file in the section “Associated Domains”
Make sure to add the applinks: prefix (ex. applinks:ctcode.wordpress.com)
Implement the logic in the AppDelegate class
Refer: universal links and universal-links-in-ios

magento file upload not working

I have this odd situation. When creating (or updating) a product in the images section whenever I select a file (or multiple files) the list the selected files doesn't appear therefore I can't upload any images to a product. I don't have ANY errors in the console or in the log and the most odd is that when running the code on a localhost it works. All the required folders on the server exists and they are writable. Any ideas on what could be the reason?
Please check Flash browser plugin working. It's should be installed and enabled.
ok, guys, I found the problem. It easy at it seems took me a lot of time to realize that it's only working when accessing the website with www

URL Scheme: what kind of string results

I'm using Marmalade to develop iOS applications via VisualStudio and a PC. The integration of a social feature like HeyZap needs its initialization by the use of:
loadHeyzap("YOUR_APP_ID_HERE","YOUR_APP_URL_HERE", true);
App_ID is the ID as defined in the itunes app page (I got it).
App_URL "should also similarly be replaced with your URL scheme for the iPhone" [from the HeyZap integration doc].
Well, the HeyZap help desk weren't useful to obtain this string via the use of VisualStudio+PC (in fact, they told me "use XCode+Mac instead...").
Since this is a simple string, I suppose I could obtain it starting from known parameters of my app. I suppose to find inside it something like [app_name]&=other-chars-....
Is there a way to build this string without the use of XCode, just starting from info I already have and putting here and there some special chars?
In other words, is there a standard way to automate the build of this string without the neeed to do it via XCode? I wonder to prepare a function in which I would pass my app parameters and I got the URL Scheme string as a result.
Cheers,
Zapp
The answer by Creator is incorrect. A URL schema is how apps can communicate with each other in iOS.
Here is what Apple has to say
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
An example would be:
yourgame://
Here's how you would define one in XCode
When you define a URL schema in XCode, you can call that URL from Safari or any app installed on the device and it will switch to your game.
The way you define it in XCode is by going to your project settings, clicking the Info tab at the top, going to the bottom where it says "URL Types", expand that, and click the + button at the bottom. Then define both the identifier and the URL schemes with something reasonably unique like "yourgamename". Done!
http://i.stack.imgur.com/pxEKd.png
URL scheme is most probably the url of your app in App Store. You can obtain it from iTunesConnect. Go to your application and copy the url of View in App Store link. That's the string you wanted ;-)
Let me know if it doesn't work.
Edit:
Well App url worked for me, dunno why its not working for you. If you want to edit the URL scheme, you can do it without using XCode too. You need to include Info.plist file in the mkb settings. You can edit or check the current URL scheme being used by marmalade there. The default plist file is in the s3e folder. Don't know the exact location.

Onclick for HTML5 Audio with Phonegap and Xcode

I am trying to build an HTML5 soundboard with Phonegap; I want users to tap on an image and hear a short audio clip. I have it working in the browser (Chrome and Safari), but it's not working in Xcode.
Here is a link to a working example:
http://jsfiddle.net/lamike/qHGqh/
Screencast:
http://screencast.com/t/TbXCilji
Thanks for any input!
Have you made sure that any external URLs in your app are listed in the WhiteList? I tried a quick cut and paste project with the code from the JSFiddle and I was able to click Obama and hear the beginning of the podcast.
See the PhoneGap for iOS FAQ: http://wiki.phonegap.com/w/page/41631150/PhoneGap%20for%20iOS%20FAQ
Q. Links to and imported files from external hosts don't load?
A. The latest code has the new white-list feature. If you are referencing external hosts, you will have to add the host in PhoneGap.plist under the "ExternalHosts" key. Wildcards are ok. So if you are connecting to "http://phonegap.com", you have to add "phonegap.com" to the list (or use the wildcard "*.phonegap.com" which will match subdomains as well).

Resources