I've managed to get both an iPad and iPhone hooked up to xcode, and can successfully deploy to the device. For some reason I'm getting network errors every time I try an access a feature that requires the internet, so I think there must be some setting in XCode I'm missing.
Do I need to specifically tell xcode that I permit the device to access the network?
Turns out it was an issue with PhoneGap (used to create cross-platform apps by using HTML5).
The error I was getting was similar to this:
SampleApp[549:17803] ERROR whitelist rejection: url='http://code.jquery.com/jquery-1.6.4.min.js'
And the solution can be found here:
http://www.anujgakhar.com/2011/11/22/phonegap-gotcha-error-whitelist-rejection/
"In your PhoneGap.plist file, you need to add the allowed URLs to the ExternalHosts array. I added “*” as I did not want to add each individual URL separately to the list but that’s your choice."
Related
I'm just trying to load my first app up to App Connect in order to let a few friends test it. So they can download it.
Got though the first few headaches like Frameworks not being set up correctly...
Now of course the final authorisation has failed due to lack of certain images and icons non of which I'm bothered to do right now I just want to be able to remotely share the app.
Do I really have to get all that stuff fixed first?
Is it not possible to share a slightly rough version via TestFlight?
EDIT:
These are my errors. Not sure what the first error means but the others obviously for missing image data.
First, I'd recommend fixing those errors anyway. They're simple. Just add an app icon with the correct sizes. It doesn't have to be a good/final icon yet. You can use my script here: https://gist.github.com/DaveWoodCom/0b9dd0efb9d10f0f0ba9977ccc35a86a
that takes a simple 1024x1024 png file and resizes it to all the required sizes for you. It even gives you a Contents.json asset catalog file.
Second, if you're just sending the beta to your friends, you don't really need to go through TestFlight review yet. You can either create a user account in App Store Connect for each of your friends (note: I'd recommending using your own email address me+friendsname#yourdomain.com for their accounts so they can't actually log into ASC and see any of your data), or you can create an Adhoc distribution profile for your app and include your friends device UUID's. Then you build your .ipa file and send it to them to install. You could even use a new project I've just created: https://github.com/DaveWoodCom/OTAgo and let them install the app over the air, via a web site. Note that project is brand new and thus is still in beta (will change a lot in the coming weeks, but it should be decent enough for your use case).
I am trying to create an app using arcore-unity-sdk-preview, which is supported by Google.
However, in order to use this ARCore, arcore-preview.apk must be installed. Otherwise, ARCore will stop working.
If I distribute the app I created in the store, the user will not be able to use the app unless I receive the arcore-preview.apk. Is there a solution to this problem?
Or are still experiencing this issue because it's not fully released yet?
If know about this, please help me.
As you said, distribution is still an issue because it's not fully released.
To work around this issue, you could upload the apk somewhere / ship it in your app's files and install it programmatically but the user has to allow installation of apps from unknown sources (Settings > Security > Unknown Sources)
For one of our clients, we have developed an OTA app store for distribution.
To enable testing if the apps are installed, in each of the apps I wrote, I added two custom URL schemes: one that's just the app id, and one with the app id and the version (both with . replaced by -); so for example com-mycompany-app and com-mycompany-app-1-2-0 for com.mycompany.app, version 1.2.0.
Then, in our "app store" I just use [[UIApplication sharedApplication] canOpenUrl:] to determine if an App is installed or the latest version, and if so, replace the "Install" button with an "Open" button.
When installing the app through XCode, it works great. However, when I install the same app OTA, through my "app store", the canOpenUrl: call always returns NO. To see if it was a caching thing, I have tried restarting the "app store" app after OTA install has finished, but I get the same results.
Is this an issue with my manifest plist file? In the Info.plist that belongs to the target, the custom URL Scheme stuff is obviously there, but it's not in the manifest's. However, I would imagine it only uses the manifest to launch initial install...shouldn't the Info.plist be used during actual install to register these sorts of things? Is there something else I'm missing?
Thanks!
Edit: I'm using a custom build script to actually create the .ipa and .plist files that are being used for OTA distribution. I tried using iPhone Configuration Utility to install the IPA directly, and my app store was able to recognize those URLs as being openable. The only possible things I can think of are either that the plist I'm using to download & install needs to have some sort of reference to these custom URL schemes, or it's actually a legitimate bug in Apple's OTA framework.
I got this working, in case anyone is watching this or stumbles upon a similar issue.
The only thing I changed -- and there's no documentation saying the old way wouldn't or shouldn't work -- was to use periods in my URL scheme, instead of hyphens. So com-company-app:// became com.company.app:// (same as the bundle ID), and likewise with the version-appended one.
I don't know if my old URL schemes were violating official URL spec, or if you're supposed to use reverse-DNS, but everything is working, now.
I have place several NSLog() in my iOS application, is it possible to see all the logs later on my Mac that was generated when the app ran on iPhone handset even when iPhone was not connected with Mac.
Thanks
No. You can however redirect NSLog to a file, using something like this: http://blog.coriolis.ch/2009/01/09/redirect-nslog-to-a-file-on-the-iphone/
Then you can access the file via Xcode, or upload it with your app. File usage and privacy issues apply.
Keep in mind that NSLog is supposed to be turned off in published apps, so you may want to use a different logging app. A number of NSLog alternatives are available.
Unfortunately this is not possible.
The only thing that you can get is a Crash Log.
If you need a better logging system, I suggest to take a look to CocoaLumberjack, a very powerful logging framework that gives you the opportunity to save log in files and, eventually, send them to a server.
You also have many different levels like: log info, log error, log warning, etc...
You can view crash logs from your iPhone in the Organizer.
If you want to view your own log statements, you could consider TestFlight ( http://testflightapp.com ). They offer an SDK which includes features for remote logging.
I'm fairly certain that's not possible. The device needs to be connected to the Mac in order to run in Xcode's debug mode, and you need to be in debug mode to view the console, which contains your NSLogs.
There is a crash log for every crash that occurs on the phone, which is readable after connecting to your mac. These NSLog's don't appear in this log nor do they appear anywhere else in a (semi) permanent manner.
It's possible using custom macros and a custom class which will write each message in the documents directory in a file.
If the file sharing is enabled in the app you can later download them in iTunes.
Seeing the logs in mac might not be possible. But you can send the log to testflight using TFLog(). But you will need to distribute your app through testflightapp. And integrate the sdk. I think that is what you are looking for. try out - testflightapp.com
Is there any provision in iOS wherein the referral parameters used to start the iTunes application are passed on to the application on its first run?
For example in Android, if I use a link such as http://market.an......com.company.pany&referrer=heythere to download an app on Android and actually install the app, the Market app passes the "referrer" parameter and its value to the app on its first run, which the app can use to any extent.
Is there a similar provision in iOS?
We also struggled with this when we built our last mobile app, Kindred Photobooks. The best way we found is to basically bundle that information in the link and use fingerprinting to make that data available after install, which is working really well.
You can try to build fingerprinting in in house. Basically the steps would be the following:
1. When a link gets created, appending parameters to the link, or create a link reference in some backend database if you want shortened links
2. When a user clicks on that link, collect a fingerprint of their device from everything you can read in the browser (for example: IP, OS, screen size, etc) and redirect that user to the app store.
3. When the app opens, create a similar fingerprint from the same parameters collected in app, and match it up in your database to the outstanding fingerprint.
4. If there is a match, you can return those link parameters to the app through install.
Alternatively, if you don't want to build all that infrastructure and handle the many edge cases, we bundled it up into a free service called Branch. Check it out at http://branch.io
No, there is no such thing on iOS. But you can and should file a feature request at bugreport.apple.com, if you really need this feature.
As of iOS6, if someone installs your applications via a smart banner, you can pass a url to your app on startup. You do this by using the app-argument parameter:
A URL that provides context to your native app. If you include this, and the user has your app installed, she can jump from your website to the corresponding position in your iOS app. Typically, it is beneficial to retain navigational context because:
It should work on install:
When the app finishes downloading [after clicking install on an app banner], the View button changes to an Open button, and tapping the banner will open the app while preserving the user’s context from your website.
More here: http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
I think this will work (but the jury is still out: Does app-argument on Apple Smart Banner get passed to app on install? ), but testing this is tough: How to test Smart App Banner Urls on in Dev environment
No, AppStore doesn't pass any parameters to application - it just unzips ipa to application folder (container).