And yet, another glaring hole in my knowledge about developing things pops up..
But, after some internetz, I find that in order to make geolocation work in react native apps, I need to:
You need to include the NSLocationWhenInUseUsageDescription key in Info.plist to enable geolocation when using the app.
that makes sense, this is the bit that makes the native tools talk to the js framework (I think).. but how do I add a value to that plist file? What does that key look like?
After pressing on the plus button marked in red circle search for
=> Privacy - Location When In Use Usage Description ... Then you will have to add a description right beside it
This should be your result
PS make sure you open info.plist as property list to implement the way i'm showing.
Hope this helps !
Related
I'm new to xcode and react-native. I'm trying to use react-native-image-picker to add a user profile (uploaded to s3). react-native-image-picker's getting started assumes you have knowledge of info.plist. I'm not 100% sure how to proceed given:
For iOS 10+, Add the NSPhotoLibraryUsageDescription,
NSCameraUsageDescription, and NSMicrophoneUsageDescription (if
allowing video) keys to your Info.plist with strings describing why
your app needs these permissions
I know the info.plists are found in the ios folder, but
which info.plist do these permissions need to get added to (there's multiple inside ios folder: build, RNapp, RNapp-tvOS, RNapp.xcodeproj, etc)?
how does the XML look?
Should this be happening in xcode instead of my text editor?
docs
if you don't providing the privacy key in Info.plist, then your app is crash. You can see its log why crashed.
You will find these code below in the info.plist of your xcode , open in text editor.
adding these will grant the permission for using camera, PhotoLibrary, Video
<key>NSCameraUsageDescription</key>
<string>${PRODUCT_NAME} Camera Usage</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>${PRODUCT_NAME} PhotoLibrary Usage</string>
<key>NSVideoSubscriberAccountUsageDescription</key>
<string>${PRODUCT_NAME} Video Subscribe Usage</string>
add ti info.plist
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Library Access Warning</string>
You want to edit the plist that you need the permissions for. If you are making a mobile app that would be: RNapp.
You could do this in a text editor but the easiest way to do it is in Xcode.
Open the plist, on the last item (making sure it is not expanded_ hit the + button to create a new row to provide a key to define a value for. Xcode should autocomplete on the keys you provided above and set the value to the appropriate type.
Hope this helps.
I am trying to create an interface that is similar to the interface on this website for the skill tree: http://www.pathofexile.com/passive-skill-tree. What is the best way to go about doing this and have the same or similar user interaction. ie. you click on a node and it activate or deactivates it. The movement of the tree and zooming on it would be nice as well. Would like to try to stay away from webView as I am thinking about features I want to add. Thanks in advance just want to see what a good way to do this is.
you can use webView and have almost a copy-paste of the presented webpage html source and load it.
However with native components you can have better performance, but it will "not a copy"
Native componets:
IIViewDeckController for iOS
iHasApp for iOS
iHasApp for iOS
There are more on that side. Consider a combination of they,
On the image below, i have a module datastore as part of the IdeaProjects project.
For display purposes, the name of the project is irrelevant for me. Is there a way i can chose to not display it?
Folder name can be hidden if you switch to the Packages view. It's not ideal as you might want to see other files as well, but I'm afraid it's the only way right now.
You are welcome to submit a request to make it configurable.
I'm using OSX's Notification Center APIs for the first time and can't seem to figure out how to make my app's icon to show up in the Notification badge.
The default "your app doesn't have an icon" icon keeps showing up:
Here's what I've done so far
I have created an icns file that includes 512, 256, 128, 32 & 16px versions
dragged the icon into the "App Icon" section of the target's summary
I made to sure to check the box to copy the icon into the project
the plist's "Icon file" section references the correct icon name (minus the .icns) part
Any ideas? The icon doesn't show up when I run the app thru Xcode or when I export an archive either.
I also have extracted the Sparrow.icns file from Sparrow.app and tried using that one instead of the one I made. That didn't work either.
I was able to fix this issue by incrementing the Build number in the General section for the build Target.
You can force the Notification Center to refresh all of the icons by deleting the Notification Center database file (~/Library/Application Support/NotificationCenter/SOME_UUID.db) and then killing the Notification Center process (e.g., from Activity Monitor).
Unfortunately this has the side effect of deleting your notification history, but this wasn't too much of an issue for me.
There's actually an ongoing debate on Apple's developer forums (link, link for people with access) about this. As far as I know, there's currently no real solution, but you can try the following:
Change your app's bundle ID and try it again. If you change it, clean your app, and change back, some people have reported success with seeing their icon show up.
Log in as another user. The caching Notification Center uses may be per-user, so you might be able to get the properly-iconned notifications as a different person.
The folder location has been moved for OSX 10.10+.
Following command takes to you to its new location:
$ cd `getconf DARWIN_USER_DIR`/com.apple.notificationcenter/db
and then
$ open .
Easiest way that I managed to get the icon to show up is change the Bundle Identifier in your project. This works on OSX 10.10.5 and XCode 7.2
(Once notification center picks up the change, you can change it back to your original bundle identifier if you already have a provisioning profile associated with it)
I have solved the issue by archiving my app and adding a copy to my applications folder. When the app is in Application folder, the icon is always visible even you run the app from XCode...
I tried all of the above suggestions but the only thing that worked for me on 10.14 was to delete DerivedData:
rm -rf ~/Library/Developer/Xcode/DerivedData
If anyone still having this issue, and none of the methods above worked, here is how I solved it:
open Notifications from the System Preference (easiest is to open Alfred or spotlight and type Notifications)
find your application and remove it (press backspace/delete button)
NOTE: this may remove all notifications
I am using Xcode 11.5 and I had the same problem. In my case tough, it was sufficient to clean build output, close and reopen the project. Then do a fresh build and let it run again. The icon was there afterwards.
Side note: I've placed the app icon for every size in the assets.xcassets file, except 1024 x 1024 pixels. Don't know if this is relevant or not. Hope that helps.
I want to use icons like opened/closed folder in my table (UITableView)?
UPD:
For example, in Java you can get a standard image "folder" and use it in the FileTree:
new
DefaultTreeCellRenderer().getDefaultClosedIcon()
And also can use the constants of L&F (colors, styles, icons).
In the iOS, I found only these standard icons.
But not folder icons...
I'm not quite sure exactly what you want - the folder icon from iOS? Could you explain a little better?
If it is a folder icon that you want, there's no quick way to get it from code - doing so would use private API's and your app is likely to be rejected from the app store.
If you want something like a folder icon, a good way to get it would be by taking a screenshot of the iPhone simulator and editing it to the right size etc.