Ionic iOS Geolocation - ionic-framework

I build an app which use geolocation but I do not know how to do the question about to "use the users location for tracking".
I tried to add in config.xml this but nothing happened...
How can I solve this?
Here I also added my pod file. I think it get build new every time as I run the ionic app, or?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>ShareApp</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
</plist>

The problem is in your Info.plist, you are not requesting the permissions to access a user's location. The error (and solution) is posted in the console error message you have included.
You need to add the following to your Info.plist (modify/remove based on your individual needs):
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Add your description for requiring permission here</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Add your description for requiring permission here</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Add your description for requiring permission here</string>
This will tell iOS that you would like to access these features and present the user with an option to accept or decline.

Related

This app is not allowed to query for scheme error (have listed correct info.plist info)

I am trying to launch an ios app from my ios app made with flutter using the external_app_launcher and still getting this error (note I am using instagram since it is know, the app I am trying to launch is a different one but I am troubleshooting the functionality of why I am getting this error) I have added the correct info to the info.plist it is below as well
-canOpenURL: failed for URL: "instagram://" - error: "This app is not allowed to query for scheme instagram"
I have added the correct info to the .plist file and here is my code below
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationQueriesSchemes</key>
<string>instagram</string>
<key></key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Shade</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>shade</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
and here is the code I am calling
void _launchApp() async {
await LaunchApp.openApp(
iosUrlScheme: 'instagram://',
);
}
LSApplicationQueriesSchemes is an array.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>scheme1</string>
<string>scheme2</string>
</array>

The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error ) this error appears when I trying to add some permissions info.plist

hello everyone I'm trying to add some permission to the info.plist but I don't know if I add it correctly please check to my file because this error is appears to me.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Insight Software</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>insight_software</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
<dict>
<key>NSPhotoLibraryUsageDescription</key>
<string>Access Photo To chosse photo</string>
<key>NSCameraUsageDescription</key>
<string>allow access to camera to take a picture</string>
<key>NSMicrophoneUsageDescription<key>
<string>allow access to microphon</string>
<dict>
</dict>
</plist>
the last lines of code where I'm trying to add permissions for camera and microphone and photo library . I'm working on macbbok pro M1 and I don't know if this make a difference I search a lot but I didn't find any such of information that tell me how I can add permissions.

Phonegap Facebook Login not returning to my iphone App

I am trying to integrate the FacebookSDK-3.1.1 into my IPhone app (using Phonegap 2.1.0). I can't get back to my app once logged in.
My aim is facebook share using IPhone App.
Below i provide my [PROJECTNAME]-Info.plist file and Cordova.plist file.
Any help would be very much appreciated.
Thanks
[PROJECTNAME]-Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon.png</string>
<string>icon#2x.png</string>
<string>icon-72.png</string>
<string>icon-72#2x.png</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.Kwazzi.phonegap</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string></string>
<key>NSMainNibFile~ipad</key>
<string></string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>FacebookAppID</key>
<string>xxxxxxxxxxxxxxx</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fbxxxxxxxxxxxxxxx</string>
</array>
</dict>
</array>
</dict>
</plist>
Cordova.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIWebViewBounce</key>
<true/>
<key>TopActivityIndicator</key>
<string>gray</string>
<key>EnableLocation</key>
<false/>
<key>EnableViewportScale</key>
<false/>
<key>AutoHideSplashScreen</key>
<true/>
<key>ShowSplashScreenSpinner</key>
<true/>
<key>MediaPlaybackRequiresUserAction</key>
<false/>
<key>AllowInlineMediaPlayback</key>
<false/>
<key>OpenAllWhitelistURLsInWebView</key>
<false/>
<key>BackupWebStorage</key>
<true/>
<key>ExternalHosts</key>
<array>
<string>*</string>
</array>
<key>Plugins</key>
<dict>
<key>org.apache.cordova.facebook.Connect</key>
<string>FacebookConnectPlugin</string>
<key>Device</key>
<string>CDVDevice</string>
<key>Logger</key>
<string>CDVLogger</string>
<key>Compass</key>
<string>CDVLocation</string>
<key>Accelerometer</key>
<string>CDVAccelerometer</string>
<key>Camera</key>
<string>CDVCamera</string>
<key>NetworkStatus</key>
<string>CDVConnection</string>
<key>Contacts</key>
<string>CDVContacts</string>
<key>Debug Console</key>
<string>CDVDebugConsole</string>
<key>Echo</key>
<string>CDVEcho</string>
<key>File</key>
<string>CDVFile</string>
<key>FileTransfer</key>
<string>CDVFileTransfer</string>
<key>Geolocation</key>
<string>CDVLocation</string>
<key>Notification</key>
<string>CDVNotification</string>
<key>Media</key>
<string>CDVSound</string>
<key>Capture</key>
<string>CDVCapture</string>
<key>SplashScreen</key>
<string>CDVSplashScreen</string>
<key>Battery</key>
<string>CDVBattery</string>
</dict>
</dict>
</plist>
You dont have the proper configuration in your [PROJECTNAME]-Info.plist. You miss "CFBundleURLName". Try the code below, it would help you.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.facebook.phonegap.myscheme</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fbxxxxxxxxxxxxxxx</string>
</array>
</dict>
</array>

Opening flex application from mail's attachment in iOS

I've read this post which is really helpful. However I'm trying to open attachments in flex application. Is it possible? Any experience about that?
<iPhone>
<InfoAdditions><![CDATA[
<key>UIApplicationExitsOnSuspend</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>iconsMobile/app32.png</string>
<string>iconsMobile/app128.png</string>
</array>
<key>CFBundleTypeName</key>
<string>File Type Name</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.filename.ext</string>
<string>com.filename.ext2</string>
<string>org.gnu.gnu-zip-archive</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>File Type Name</string>
<key>UTTypeIdentifier</key>
<string>com.instacoll.mockups.lmp</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>ext</string>
<string>ext1</string>
</array>
<key>public.mime-type</key>
<string>application/octet-stream</string>
</dict>
</dict>
</array>
]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
Add this to application xml and replace the ext to your extension it will work..
i add this with multiple extension support if want use ext1 also else remove that entry.
I don't think you can install an app from an email attachment and Flash isn't installed on the iPhone. So essentially, no, you can't open a Flex app from an email attachment.
Thanks, but I've found what I was looking for here:
http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ffe.html#WS901d38e593cd1bac6c9d409a12e26b451be-8000
I had to prepare the proper file descriptor. Works fine.

root.plist changes not visible on iphone

when i add new entries to my settings bundle root.plist file, build and run the app, the new settings are not visible within the app. I've of course used a unique key for the new entries.
In my root.plist file in the xcode project the file shows the changes, but when i get the current file from the iphone via the organizer, the changes are not there.
I am using iOs 4.0.1.
BR,
Martin
Delete and reinstall the app. There's a bug where updated resources may not be installed when the app already exists on the device.
Root.pList
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>iParkschein Einstellungen</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Kennzeichen</string>
<key>Key</key>
<string>kennzeichen_preference</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Stadt</string>
<key>Key</key>
<string>stadt_preference</string>
<key>DefaultValue</key>
<string>Wien</string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Firmenrechnung</string>
<key>Key</key>
<string>firmenrechnung_preference</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Kennzeichen</string>
<key>Key</key>
<string>servicenummer_preference</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
</array>
</dict>
</plist>
if i read the keys from the userdefaults and write them to the console, i get ever key except the servicenummer_preference
BR,
Martin