Browser Widget in IOS not working
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Browser Widget in IOS not working
Hi
Hope someone can assist me.
I cannot get the browser widget to work in the iPhone simulator, it just shows as a blank white screen.
The stack works fine on my mac displaying the web page and other stacks run fine in the iPhone simulator and the simulator will display a page using the mobile safari browser so I'm not clear what I'm doing wrong.
I used a test stack, added the browser widget, set the url to a working http:// address in the properties and specified the browser widget be included in the application settings.
Any thoughts ideas gratefully accepted. What I'm trying to do is add a local help page for a mobile app I'm working on.
Roger
Hope someone can assist me.
I cannot get the browser widget to work in the iPhone simulator, it just shows as a blank white screen.
The stack works fine on my mac displaying the web page and other stacks run fine in the iPhone simulator and the simulator will display a page using the mobile safari browser so I'm not clear what I'm doing wrong.
I used a test stack, added the browser widget, set the url to a working http:// address in the properties and specified the browser widget be included in the application settings.
Any thoughts ideas gratefully accepted. What I'm trying to do is add a local help page for a mobile app I'm working on.
Roger
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Browser Widget in IOS not working
Hi Roger,
Here are some things to check:
1. In case you have selected to manually add any inclusions to the standalone, make sure you add the Browser Widget Inclusion (in "Inclusions" pane in the Standalone Application Settings)
2. If you are using a http URL, iOS will block it for security reasons. To cope with that:
- Use a https URL instead (recommended) OR
- Disable ATS (App Transport Security) in the Standalone Application Settings for iOS (not recommended)
Best regards,
Panos
--
Here are some things to check:
1. In case you have selected to manually add any inclusions to the standalone, make sure you add the Browser Widget Inclusion (in "Inclusions" pane in the Standalone Application Settings)
2. If you are using a http URL, iOS will block it for security reasons. To cope with that:
- Use a https URL instead (recommended) OR
- Disable ATS (App Transport Security) in the Standalone Application Settings for iOS (not recommended)
Best regards,
Panos
--
Re: Browser Widget in IOS not working
Thanks Panos
It was the ATS setting that was stopping the browser widget display the site.
Once I disabled it the widget sprung into action.
I expect disabling the ATS is not a good thing so I'll have to author the help pages with standard live code controls rather than just use a web page.
Thanks again.
Roger
It was the ATS setting that was stopping the browser widget display the site.
Once I disabled it the widget sprung into action.
I expect disabling the ATS is not a good thing so I'll have to author the help pages with standard live code controls rather than just use a web page.
Thanks again.
Roger
Re: Browser Widget in IOS not working
I believe there's a way to enable ATS, but to add specific websites that normal HTTP should be used for to your application's plist. This will allow you to use a browser widget to display your help docs over HTTP, but still leave ATS enabled. This blog has some detailed information: https://ste.vn/2015/06/10/configuring-a ... osx-10-11/
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
Re: Browser Widget in IOS not working
I tried to modify the info.plist (LC8,1,2RC3 on OS X) inside the bundle with this, as suggested:
but it does not work.
Any suggestions?
Trevix
Code: Select all
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>mywebsite.it</key>
<dict>
<!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<!--Include to allow HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<!--Include to specify minimum TLS version-->
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
Any suggestions?
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Browser Widget in IOS not working
Hi Trevix,
Editing the info.plist *in the ios_standalone.app* bundle will not work. You have to either
1. edit the template plist in LiveCode Indy.app to include those changes and then create your ios standalone.
OR
2. create a info.plist file that has those changes and add it to the "Copy Files" section, and then create the ios standalone
================================
To do option (1):
1. Open a terminal
2. Type:
sudo nano path/to/LC Application Folder/Contents/Tools/Runtime/iOS/Device-10_1/Settings.plist
3. Add those key-value pairs
4. Press Ctrl + O, then Enter and then Ctrl + X to exit
5. Your changes should now be saved. You don't need to add anything in the Copy Files section
=================================
To do option (2):
1. Navigate to LC Application Folder / Contents / Tools / Runtime / iOS / Device-10_1
2. Copy the Settings.plist file, and paste it to your desktop
3. Open Desktop / Settings.plist with e.g. TextWrangler editor (The file should be read-only. Make sure you add write permissions first)
4. Add those key-value pairs into Settings.plist
5. Save
6. Rename Settings.plist to Info.plist
7. LC > Myapp > Standalone App Settings - add the desktop Info.plist file into the Copy Files
8. LC > Myapp > Build Standalone Application
9. *Remove existing Myapp from your iOS device
10. Install new Myapp to your iOS device
Best,
Panos
--
Note: The */Device-10_1/* in the paths I described should be used in case you test on a device, and use Xcode 8.1 to build the standalone.
If you want to test in the simulator, replace */Device-10_1/* with */Simulator-10_1/*
Editing the info.plist *in the ios_standalone.app* bundle will not work. You have to either
1. edit the template plist in LiveCode Indy.app to include those changes and then create your ios standalone.
OR
2. create a info.plist file that has those changes and add it to the "Copy Files" section, and then create the ios standalone
================================
To do option (1):
1. Open a terminal
2. Type:
sudo nano path/to/LC Application Folder/Contents/Tools/Runtime/iOS/Device-10_1/Settings.plist
3. Add those key-value pairs
4. Press Ctrl + O, then Enter and then Ctrl + X to exit
5. Your changes should now be saved. You don't need to add anything in the Copy Files section
=================================
To do option (2):
1. Navigate to LC Application Folder / Contents / Tools / Runtime / iOS / Device-10_1
2. Copy the Settings.plist file, and paste it to your desktop
3. Open Desktop / Settings.plist with e.g. TextWrangler editor (The file should be read-only. Make sure you add write permissions first)
4. Add those key-value pairs into Settings.plist
5. Save
6. Rename Settings.plist to Info.plist
7. LC > Myapp > Standalone App Settings - add the desktop Info.plist file into the Copy Files
8. LC > Myapp > Build Standalone Application
9. *Remove existing Myapp from your iOS device
10. Install new Myapp to your iOS device
Best,
Panos
--
Note: The */Device-10_1/* in the paths I described should be used in case you test on a device, and use Xcode 8.1 to build the standalone.
If you want to test in the simulator, replace */Device-10_1/* with */Simulator-10_1/*
Re: Browser Widget in IOS not working
The first option seems to be the best (once for all).
But my ignorance on the use of the Terminal is evident:
- I replaced the path with:
- In order to verify the above, I tried with another path (just to see what's happening):
- I also don't understand why is it different to use the terminal or to copy the settings.plist to the desktop, open it with BBedit, modify it,save it and copy it back.
Thanks
Trevix
But my ignorance on the use of the Terminal is evident:
- I replaced the path with:
but the terminal considers "(" as an unexpected token. Should I rename the LC App?sudo nano /Applications/LiveCode Indy 8.1.2 (rc 3).app/Contents/Tools/Runtime/iOS/Device-10_1
- In order to verify the above, I tried with another path (just to see what's happening):
The Terminal dose not show the content as expected, only "File: /Applications/Livecode" on the top of the window and "[ New File ]" in the bottom. Is this correct?sudo nano /Applications/LiveCode 5.5.5.app/Contents/Tools/Runtime/iOS/Device-6_1/Settings.plist
- I also don't understand why is it different to use the terminal or to copy the settings.plist to the desktop, open it with BBedit, modify it,save it and copy it back.
Thanks
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Browser Widget in IOS not working
Hi Trevix,
You are having those problems in the Terminal because the path contains spaces. So when the first space is met, the Terminal thinks this is the end of the command, and interprets everything after the space as arguments to this command. You have to escape the spaces, so you should type something like:
Best,
Panos
--
You are having those problems in the Terminal because the path contains spaces. So when the first space is met, the Terminal thinks this is the end of the command, and interprets everything after the space as arguments to this command. You have to escape the spaces, so you should type something like:
Code: Select all
sudo nano /Applications/LiveCode\ Indy\ 8.1.2\ \(rc\ 3\).app/Contents/Tools/Runtime/iOS/Device-10_1/Settings.plist
I have not used BBEdit and I am not sure how flexible it is with changing permissions. But what you suggest will probably work. I just personally find it easier to do that via Terminal, since it is a one-step process.- I also don't understand why is it different to use the terminal or to copy the settings.plist to the desktop, open it with BBedit, modify it,save it and copy it back.
Best,
Panos
--
-
- Posts: 12
- Joined: Thu Feb 12, 2015 12:22 pm
Re: Browser Widget in IOS not working
Please see my post in Re: Loading Local Files with Browser Widget on Android
dbeugeling
dbeugeling
- Attachments
-
- Browsertest2.livecode.zip
- (1.24 KiB) Downloaded 294 times