ITMS-90842: Invalid SDK usage with AppClip and Flutter - ios

Until I upload myapp to appstore
I have this issue:
Please correct the following issues, then upload again.
ITMS-90842: Invalid SDK usage - App clip
'Runner.app/AppClips/RunnerAppClip.app' uses the SDK selector
'requestAlwaysAuthorization', which is not supported. Ensure your app clip is
using supported SDK features.
I am used location permission but how exclude specific location from AppClip

You can include/exclude specific lines of code from your App Clip target using a Swift Compilation Flag.
To do this you can open the Build Settings of your App Clip target and add some custom flag like APPCLIP.
Then in your code...
#if !APPCLIP
//Location code that uses `requestAlwaysAuthorization`
#endif

Related

Can't install app on iOS 12 after adding lockscreen widget with Xcode 14

I'm struggling with widget extension configuration for an App which supports iOS 12-iOS 16 versions, and containing today widget, home screen widget, Lock Screen widget and Apple Watch extension.
It's fully functional on iOS 14-15-16 devices (I followed Apple WWDC 22 video : Widgets Reloaded), but users running iOS 12 for example, they can't install the app. The App Store let them download the app, but at installation, it fails every time. I manage to reproduce on iOS 12.3 simulator, with the current error. I understand that the NSExtension does not exist on iOS 12, but I can't found a way to remove the new iOS 16 lockscreen widget extension for old firmwares.
This app could not be installed at this time.
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Appex bundle at /Users/XXX/Library/Developer/CoreSimulator/Devices/XXXXX-D905-49CF-BD5F-EF2CDCF23F0E/data/Library/Caches/com.apple.mobile.installd.staging/temp.TMGGEs/extracted/Dev-XXX.app/Watch/Watch.app/PlugIns/XXComplicationExtension.appex
with id com.XXXXX.dev.watchkitapp.watchkitextensioncomplication specifies a value (com.apple.widgetkit-extension) for the NSExtensionPointIdentifier key in the NSExtension dictionary in its Info.plist that does not correspond to a known extension point.
Any ideas? I can just add or remove the XXComplicationExtension.appex in the watch app target, no option like for frameworks to make it optional.

Cordova app not showing in the share list IOS

I want to show my app in the share list. The app is been developed in cordova. It is working fine in android but not working in IOS.
I have tried it with the following plugin.
https://github.com/j3k0/cordova-plugin-openwith
Followed the instruction given in that plugin, It works fine for Android but not working in IOS.
Cordova version : 8.1.2
Mac OS version : 10.14.5 Mojave
xcode version : 10.2.1
I want my app to be visible in the IOS share list and would be able to share specified file to my app.
I figured it out of how to display the app in the share list of IOS.
In my case the In the Xcode > Deployment Info the Deployment Target was different for both, project target and share extension target.
Make value of both the Deployment Target same and your app will be visible in the share list in IOS.
To resolve the Data content is invalid error
In the plugin OpenWithPlugin.m file on line no 235.
replace
if (![data isKindOfClass:NSData.class] || ![text isKindOfClass:NSString.class]) {
[self debug:#"[checkForFileToShare] Data content is invalid"];
return;
}
with
if (![data isKindOfClass:NSData.class]) {
[self debug:#"[checkForFileToShare] Data content is invalid"];
return;
}
where ![text isKindOfClass:NSString.class] is throwing Data content is invalid error.
and
On line no 258
remove
#"text" : text,
This will solve the error of Data content is not valid
It will be helpful for any one facing this issue.

Open Safari from XCTestCase

According to Apple's documentaion, I should be able to launch an app based on its bundle ID using the code below.
// Open safariapp
let safariApp = XCUIApplication(bundleIdentifier: "com.apple.mobilesafari")
// Launch safari app
safariApp.launch()
Unfortunately, this code will not compile because Xcode claims that XCUIApplication can not take any initialization arguments. This is my error:
Argument passed to call that takes no arguments
This functionality is available starting with the Xcode 9 SDK, so you'll need to update your Xcode version and migrate to Swift 3.2 or 4.
Source: https://developer.apple.com/documentation/xctest/xcuiapplication/2879415-init

appcelerator iOS application error with geolocation module

We are developing app for iOS and Android and we are using Ti.Gelocation to getCurrentPosition and then set the Region of the MapView of ti.map module.
The app is already on marketplace and downloaded, so we are developing an important upgrade with this new feature. We dont't have problem with Android platform, but with iOS version of the app we get a several error invoking Ti.Geolocation module
The error on iOS 9.x on iPad and iPhone (we have no test on iPod) is:
-[__NSCFString containsObject:] unrecognized selector sent to instance 0x1463d500 at GeoView.js (line xxxx)
This error happens with the project with it.vocami.vocamiapp app-id, in the test project (ap-id=it.vocami.vocamitest) that we use for research and test of new features, no error happens and all run good. When we add at every level of our code (in the first row too), for example, Ti.Geolocation.locationServiceEnabled, in the main vocamiapp project, we get the error.
We have tried all we could think but at the end, if we change the app-id, the code runs otherwise we get the error. We cannot change the app-id because we need to update our published app.
We are developing with AppceleratorStudio version 4.5.0.021602170281 and Ti SDK ver 5.2.0GA on Mac OS X 10.10.5.
I just recently was "hit" by the fact that when I made my app ready for Google Play I use a specific key/user to sign it with. That behaves differently from just running it locally on the phone.
I had to make sure that I had registered two certificates with Google's API in the developer console. It didn't give me exactly the message that you show - but wouldn't show the map with a location. And the way I read the location prior to showing it on the map led me in the wrong direction looking at permissions on Android first :-)
/John

How to provide Aviary Apikey and Secret to Cordova Plugin for iOS

I currently try to get the aviary sdk to run in combination with a cordova app under iOS.
After installing cordova (3.6.3-0.2.13) and the latest Aviary SDK (4.3.0) and the aviary plugin from https://github.com/m1is/AviaryCordovaPlugin I managed to get a simple example app to work with android.
When I try to build the exact same app for iOS with xcode(6.0.1) and i try to call the cordova.plugins.Aviary.show method, I get the following error in the xcode console:
WebKit discarded an uncaught exception in the
webView:decidePolicyForNavigationAction:request:frame:decisionListener:
delegate: You must provide your Aviary
API key before creating an instance of the AFPhotoEditorController.
Please see the Aviary SDK documentation for details.
I understand from reading the SDK documentation for iOS that aviary changed the apikey/secret setup to require it to put it in the code:
The API key and secret must be provided before instantiating an
instance of AFPhotoEditorController.
and here my problem arises: I do not have any idea on how to submit the apikey/secret to the SDK, all tries changing or adding stuff to the Aviary.m file were unsuccessful (probably since I have no knowledge of ObjectiveC.
So I wonder if anybody had the same problem and is able to point me to the right direction on how to setup the apikey and secret so my cordova app would run under iOS.
It looks like the plugin maintainer was focused on android and the iOS version is unfortunately not on the same standard. If you still have this issue you can solve it by manually editing the plugin's iOS code. Just locate the line self.aviary = [[AFPhotoEditorController alloc] initWithImage:image]; in Aviary.m and add the following few lines above it:
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[AFPhotoEditorController setAPIKey:#"YourAviaryAPIKey" secret:#"YourAviarySecret"];
});

Resources