weinre with iPhone simulator - ios

I am experimenting the PhoneGap development for IPhone. The environment is XCode 4.1, PhoneGap 1.0. I am using the Weinre remote debugger according to the tutorial provided by PhoneGap, when I run the app in IPhone Simulator, I got this error shown in XCode output:
2011-08-31 09:31:15.275 Contacts[898:11803] ERROR whitelist rejection: url='http://localhost:8080/target/target-script-min.js#anonymous'
The URL is pointing to the Weinre server and it works in browser. I can't find anything about the "whitelist rejection" error in google. Any idea what does this mean?
Thanks!

whitelist support was recently added to phonegap.
see here and here.
to fix this, you just need to add the needed domains in your PhoneGap.plist to your ExternalHosts-Array.
In your case, it would be localhostand would look like this:
just code, because can't post an image:
<key>ExternalHosts</key>
<array>
<string>localhost</string>
<string>debug.phonegap.com</string>
</array>

Now that Apache Foundation has taken over the name has changed from PhoneGap.plist to Cordova.plist, but it's still ExternalHosts, this helped me get Weinre running which makes a huge difference when debugging directly on an iDevice.

Related

React JS not opening in apple browsers

I have a website created in react js, when I try to open it on windows or android the loading happens normally.
But on IOS devices it doesn't load anything from the site.
I tried to use https://polyfill.io/v3/polyfill.min.js in my index but I still couldn't.
PS: I don't have a mac to debug, tests only on an iphone version 15, I didn't find the iphone ios console to see the errors.
Problem solved, first step was to update the browserslist.
Second it was seen that the application was with storage in localStorage above what safari was handling, thus causing the error.
Removed localStorage.
Link:
https://github.com/browserslist/browserslist
Link:
https://stackoverflow.com/questions/1921048/limit-of-localstorage-on-iphone#:~:text=Mobile%20Safari%20on%20the%20iPhone,limit%2C%20afaik%2C%20on%20localStorage.

Angular route is not working with Cordova iOS

I'm facing an issue with Cordova, Cordova-ios 6.2.0 and Angular 12.0.
When I'm building my app with Cordova and launch it in an emulator (or with a device), I'm arriving to a white screen.
I did some research and try some "fix" but nothing worked.
Finlly, I've find that it could be because of the balise.
So, I tried to play with the tag and modify the href with ., ./, / but nothing worked.
I've tried without and it worked, but without routing.
Has someone already had this problem?
The Angular router needs the app to be hosted on a "proper" HTTP scheme and does not work with file: URLs. You can check how your app runs, if you open the JavaScript console for your app running on an iOS device with Chrome and typing location.href. If you see file: you need to set up a custom scheme.
Please checkout the documentation and this announcement https://cordova.apache.org/announcements/2020/06/01/cordova-ios-release-6.0.0.html

Trigger.io: iOS 9 iPad Multitasking error

UPDATE: This problem is now solved by using the latest version of Trigger.io
This question is about how to get around the ITMS-90475 error using Trigger.io (and not xcode).
After the release of iOS 9, i get the following error when submitting an app to the App Store that is built using Trigger.io/Forge:
ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch story board in bundle
I am developing on linux, and not using xcode to upload my app. From other stackoverflow answers (e.g. this: https://stackoverflow.com/a/32563605/1030104) I see one solution is to disable multitasking support using xcode.
Does anyone know whether this is possible to do using only Trigger.io and not xcode?
According to this answer, your bundle should be valid if you deactivate multitasking for your app. Add this to your Info.plist:
<key>UIRequiresFullScreen</key>
<string>YES</string>
As you're using Trigger.io, this means you have to edit the Info.plist file in between forge build and forge package either programatically (as part of your build process) or by editing the file manually.
For your target, check Requires Full Screen on the General Page:
try adding the bellow code to the info.plist
<key>UIRequiresFullScreen</key>
<true/>

Index.html not found on PhoneGap application when testing on a device

I have created a small IPhone Application with PhoneGap (1.5), and I would now like to test it on my device.
I have set the output to my IPhone, and clicked build. The application is added, but I receive the following error when trying to run it on the phone:
ERROR: Start Page at 'www/index.html' was not found.
It works fine if I try it on the simulator, so what might I have forgotten?
I guess you could try to remove your www folder from your project and try to re-add it this way
PhoneGap application: "ERROR: Start Page at `www/index.html` was not found"
Hope it helps
I found out that there might have been an issue when I set up the application in the first place. First of all I saw that I referenced to an older version (1.4) of PhoneGap. I downloaded the newer version of the javascript component and replaced it, but it didn't help.
I then simply just created a new solution an copied the code from my old project and then it worked.
I am sorry to say that I don't know excately what went wrong.

Can't connect to Facebook via Facebook iOS SDK

I'm trying to connect to facebook from my iOS application, so I can make a wall-post.
I've tried using Sharekit, and also the Facebook mobile API.
Using the 'stable' Sharekit, I can connect, but I'm lacking features I need with that version.
So I've tried using the latest Sharekit from GIT, with no luck.
After providing my facebook login information, I always receive an error of the following flavour:
"This page contains the following errors: 'error on line 2 at column 75: EntityRef: expecting ';'"
Occasionally I'll get a different line # or slightly different error message, but there's always an EntityRef problem on a line/column.
Giving up on that, I tried using the facebook mobile SDK and have the exact same problem.
I then tried the facebook sample app, and have the same problem.
I've setup a facebook app account, and I've specified that AppID (247969245245487) in all the place I believe I need to:
static NSString* kAppId = #"247969245245487" in the sample app's appdelegate
#define SHKFacebookAppID #"247969245245487" in SHKConfig.h for Sharekit.
Likewise, I've got the following in the info.plist for both apps:
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb247969245245487</string>
</array>
I'm using XCode 4.0.2.
I'm at a bit of a loss here... any tips or thoughts on where I could start debugging?
I'm experiencing the same problem, and I'm not sure what's changed on Facebook's end that causes the problem, but I do believe it's on their end. That said I did find a "solution" that worked for my customers:
If your simulator or device has the Facebook Mobile app installed, an updated version was recently made available on the app store. When I updated to that latest version, the problem went away for me.
When the simulator or device doesn't have the official Facebook app installed, the iOS SDK (for me) doesn't generate the same error.
So again, I only experienced it on devices that had the Facebook app installed, and then the problem was "fixed" when I updated to the latest version of that app. Maybe this'll work for you too?

Resources