So i've been trying to use Realm browser with Xcode so that it's easier for me to see and test my objects. But i seem to be running into a couple of problems with this.
The first issue is that with Realm Browser i'm not able to actually open up my files location using the dropdown option 'open common locations' so i can open it via the iPhone simulator. Even when i do open the file using alternative methods i keep on getting the following error in the console.
UserInfo = {
Error Code=8,
NSLocalizedDescription=Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. For sharing files between the Realm Browser and an iOS simulator, this means that you must use a 64-bit simulator.
}
Which is weird because my Macbook is 64 bit since it's the Mid 2013 Macbook Air could anyone help solve this problem at all? Since it would make development so much easier if i could just use the browser application.
So i figured this out and realised that you have to be running the app using an iPhone 5s or higher
You are correct. Realm cannot be opened at the same time between processes of different architectures. iPhone 5 or earlier simulator is running as 32-bit process.
Related
I am using #ionic/storage as it looked quite promising after reading about it in the V2 Docs.
I use Chrome on my Windows 10 laptop so things appeared to be working perfectly fine at first. However, when I tested it on iPad, or even Firefox on my laptop, I was surprised to find out it did not work.
I was able to resolve the issue on Firefox by removing the sqlite plugin (I thought I will add it when I am ready for native testing):
cordova plugin remove cordova-sqlite-storage --save
Sadly, storage still doesn't work on the iPad. I tested it on Safari and Chrome. I am unable to debug this given the lack of developer tools or console.
I am quite frustrated how Apple makes you dependent on using a Mac to develop on their devices.
How do I go about fixing and debugging this?
I first import storage in Ionic 2:
import { Storage } from '#ionic/storage';
Then to save the data, I do this:
this.storage.set(pk, JSON.stringify(reportObj));
Where pk is just a unique key, and reportObj is an object that I stringify before storing. Again, keep in mind this just doesn't work in iOS.
Thanks.
Update:
So I managed to run the app in Safari and found out that .set actually works and the data gets stored in WebSQL. However, the get does not seem to work and I wasn't able to get any useful errors in the console.
OK, so after a lot of trial and error, I found out that the problem is not really with Storage. There appears to be some other issue with my UI, where it doesn't seem to work on iOS.
I decided to answer the part about testing the app on iOS while in development if you are not a Mac user. The best way for this appears to be to use Ionic View. You can use this simply by typing:
ionic upload
Make sure you create your account. In your iPad or iPhone, you can then download Ionic View app from iTune, sign in, and the app will appear there.
As you upload your code, simply upload again and almost instantly the app would upload on the device as you click Sync.
Hope other Windows users benefit from this.
I´ve installed the new iOS 9 Beta and Xcode 7 to test meteor apps with the coming iOS Version. I figured out that there are some network related issues.
The Client (iPhone) can´t connect to the server to subscribe into the published collections. If I cast an eye on the logs it looks like its serving the files in the "public" folder. After serving the public folder it drops a console log "network". Its not really an error message its just say "network". My app was running on iOS 8 without issues.
I´ve also tested it with the leaderboard example. The leaderboard app is running but there are no collections served to display the player names.
anyone with the same issues? or ideas to fix it?
Open up your app in Xcode. You can access it at .meteor/local/cordova-build
Find your app's info.plist in the Xcode browser.
1) Create a new key, NSAppTransportSecurity
2) The value should be a dictionary containing another key NSAllowsArbitraryLoads that is set to true.
This should solve the issue. iOS 9 does not allow you to connect to sites without SSL. This makes it hard to develop without reverting the security setting with the policy above.
More info: https://github.com/meteor/meteor/issues/4560
I just finished developing a Cordova / Phonegapp app. When I test it on iOS simulator it all works fine and quick, but, when testing on device it works only part of it.
My app is a game with the kingdom background and has 8 buttons (8 buildings).
When I click on each building it leads me to a screen representing what it's inside the building, but one of them doesn't work and gets my app frozen.
How can I see fail or crash reports that helps me debug my app on device?
If you provide full path to your file i.e. "file:///Users/.../someDir/some.html" it will work only on simulator running on the same machine where your project is.
I suggest just adding the additional path to the file you want to access i.e. if you are in "/someDir" you will need to provide only "some.html" or if you want to access parent directory just use "../".
As far as debugging Cordova app, I suggest downloading this plugin and using console.log instead of alert.
Hope this helped.
Ok, I found a "spartan" way to debug my app via alert and found that an url wasn't set properly (still don't know why it worked on simulator)
Background
My company recently made a shift to app development. While developing and Q/Aing on Android was relatively painless, iOS, on the other hand is proving to be a pain.
The task involves looking at the page source of our app (which has a custom browser). I heard that Web Inspector is a great tool, so I went with it.
Problem
First of all, Web Inspector has been able to detect the custom browser before.
But quite frequently, Web Inspector's menu gives the "No Inspectable Applications" prompt.
This happens with the exact same version of the app that worked earlier.
There seems to be no trigger whatsoever; yesterday Web Inspector was working with the custom browser, and then after a few hours (during which I may have disconnected and reconnected the iPhone) it stopped working.
I have not been able to figure out why despite breaking my head for a week.
Observations
I have an iPhone 4S running iOS 7.0.4. My Mac Mini has Safari 7.0.
In the phone options
Web Inspector is turned on in the iPhone menu
All privacy modes are set to off - Do Not Track, Block Cookies, etc. (this question)
Javascript is turned on in the phone.
In Safari on my Mac Mini
- Develop menu is enabled (obviously)
More observations
iOS Safari is detected by Web Inspector.
So, how do I go about debugging this? What could be a possible cause and what could be the solution?
I was having the same problem, it was cause I was running iOS 8,fixed by updating Safari to 7.1 .
An update for iOS 9 (using OSX El Capitan):
On your mobile device under Settings -> Safari -> Fraudulent Website Warning = OFF [default = ON]
For me to make it work I needed to go into iPhone's Settings -> Safari > Advanced and enable Web Inspector option. (iOS 9.1)
I was having exactly same trouble. I managed to correct the situation by clearing the cookies and history from the mobile Safari menu. After this, it showed up in the Mac Develop menu.
Hopefully this will correct your situation as well.
this is probably an oversight where someone forgot to include the ios 8 version of Mobile Safari as an inspectable application. Get with it guys. I was able to connect my iPad to a MacMini we have with Yosemite Beta.
So I have also discovered that the web inspector in Yosemite Beta doesn't inspect well. I am able to Breakpoint in Javascript, but items are not inspectable in the inspection pane. The console does report correct information. Don't be fooled as I was! To inspect the value of something in this web inspector you must access the values via the console, type in the variable and it will return the result it has correctly.
As it happens, the solution that worked for me (reliably) was:
Build the app from source locally (in Xcode)
Deploy it to the iPhone, connected through USB
For some reason, Web Inspector works reliably when the app is started this way. I am unable to figure out why, but it works. Comments welcome.
Here's a possibility, mostly because I just ran into this myself...
Is your browser set for private browsing?
If it is, turn that off! You can't use the inspector while it's on.
I'm developing something like file manager for remote filesystem with some basic operations including transferring file(s) between server and iPad and viewing them.
In order to be useful I need my app to open all types of files from other apps (like Mail, Safari, etc.) via "Open in.." dialog to get them into my app, i. e. Dropbox-like behaviour. When I use public.data and public.content, like it is described in this answer (and this), it sometimes work, but most of the time, it isn't. Moreover, iOS 6.1 simulator behaves nondeterministic regarding file handling.
When I Run in Xcode and it launches simulator, it doesn't work. When I let simulator running, Stop in Xcode and then Run in Xcode, it suddenly work. When I completely quit simulator and Run in Xcode I get at start of this loop. Mysterious.
When I run app on physical iPad with iOS 6 and start Safari or Mail and go to some document or attachment in it, [Open in...] dialog appears including my app but tapping does nothing, no reaction.
My goal is to make it work for iOS from 5.1 up.
Base SDK: iOS 6.1
Target: 5.1
I'm rookie here on SO. Although I've read instruction how to write good questions, help me improve my question if you feel it is needed, please.
Using public.item, in documentation:
Documentation UTIs