I've developed a cross platform for iOS and android using Xamarin Forms. My app uses several screens and some tjird party dependencies such as Facebook, google maps and firebase.
Everything works good until I went to compile it in release mode. Assuming I want to support both armv7 and arm64, these are the app size:
* without linking and optimization: 103mb.
* with full optimization (link all + LLVM): 73mv.
With the optimization and without armv7 I'm getting 40mb - that's my desired result size.
To solve this issue I thought that I should enable bitcode compilation. However, even with the alpha tools, including visual studio for mac and mono v5 I'm getting "platform not supported: iOS" when enabling this feature. On the other hand, I dogged at the source code and saw that mono does allow it, and besides they allows watch and tv apps, which requires bitcode...
Does anybody knows how to enable it for iOS? I'll be huge (!) assistance for me!
Thanks!
So I couldn't find any solution and had to submit my app w/o bitcode support.
However, for everyone who may tackle this issue in the future and wish to use bitcode because of app size - I want to clarify this: Bitcode, as part of iOS 9 App Thining, is only relevant to future architecture releases, i.e. Apple will auto-slice your arm7+arm64 app when you'll upload it to the App Store, without any action from your side (besides linking your code ("Link All") and supporting both architectures).
You can check the estimated app size, but you shouldn't do it in Xamarin Studio since it shows the universal app version, and not the device-specific thinned one. To check what the size will be for device X, you should:
Create Ad-Hoc Distribution profile Apple Developer Site.
Create an archive at Xamarin Studio.
Open Xcode (if it was previously opened - close an re-open).
Open the Organizer.
Click on Export, then on "Ad Hoc".
You should see a dialog asking if you want universal ipa or device specific ipa. Universal IPA is a generic IPA containing the data for every device, so you can send it to everyone. The size of this ipa will be the size you saw in Xamarin Studio (before compression). A device-specific ipa is an ipa for specific device, after performing Thining. This is the ipa your users will download. So - select the device you wish to check.
Now you'll be able to get a device-specific ipa which matches the size for this specific device. Note that the same information will appear in iTunes Connect after you'll upload your build.
See:
So to summarize it: Currently you can't use bitcode in Xamarin apps (iOS and Forms, obviously). The option does exists in mono, but not included (it was explicitly disabled in the shipped mono runtime). However, that doesn't mean that the estimated app size that's being displayed in Xamarin Studio will be your users app size, since it varies on iOS 9+ App Thining feature, which doesn't need bitcode to be activated.
Related
I want to use the DJI SDK Mobile SDK to fly a drone.
SO,I use the DJI Developer site (https://developer.dji.com/mobile-sdk/documentation/application-development-workflow/workflow-integrate.html)to integrate android studio projects.
However, even if the program is entered according to the site, "Hello, world" is not displayed on the virtual device.
Specifically, "import SDK Demo keep stopping." is displayed after the app starts for a moment on the virtual device.
Please help me !!!
Android Studios version : 3.5
Mobile SDKs version :4.2
I tried Android Studio with some version(ex.3.0/3.5).But, everytime "Hello, world" is not displayed on the virtual device.
Without having more details about what you've done, it is hard to say what your problem is.
HOWEVER, the SDKs require an "Application Key" to be generated via your DJI account, whereby you access a special web page that allows you to give a name to the App you propose to create, as well as a bundle identifier like : com.yourCompany.yourNewApp. After providing such basic "App" info's that DJI webpage will generate a long hexadecimal number which is your App Key. So again, without that App Key (number) being added (edited into) to your App, you will not be going anywhere. DJI uses this App Key for keeping track of all developer's Apps, and where those Apps are running.
Specifically, the DJI SDK gives an immediate error as soon as the SDK initialization is attempted, when/where attempted without a valid App Key.
So again, without more details from your problem, it is hard to say that the problem/solution (stated here) applies to you. But this certainly is a very common "newbie" or "getting started" problem.
I'm relatively new to coding so I have a website that I wanted to convert to an APK to upload to Google Play, so as I'm relatively new I used the program website2apk, all that went OK so when I went to upload it to Google Play I had this error
"
Unoptimised APK
Warning:
This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimising your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower installation success rates and take up storage on users' devices.
Resolution:
Use the Android App Bundle to automatically optimise for device configurations, or manage it yourself with multiple APKs."
So I installed Android Studio and tried importing the APK and the build is greyed out.
So decompiled it and tried importing the project, However I try to import it I get this (see the screenshot: http://prntscr.com/o2aoak).
So from there I'm clueless on what to do as I have tried both options and both don't seem to work.
Then when I tried create project from existing files it said I need to migrate to Gradle and I don't know how to do that.
I am trying to use AppCenter to distribute my app to iOS beta testers.
I have included the nuget packages for Microsoft.AppCenter and Microsoft.AppCenter.Distribute
I followed the developer.xamarin instructions for creating an IPA
An IPA did not appear in the Bin > iOS Device > Ad Hoc (or Release) folder as expected. An application (.exe) file was created.
This is most likely the area I need help on.
In AppCenter I selected Distribute and got to the Upload a Build screen, I could not find an IPA file on my computer.
when pressing the Where Can I Find my IPA file? link, I was transferred to https://openapi.appcenter.ms/, which I didn't understand how to use to find the file. Perhaps this link is incorrect or someone can tell me how to use these apis to find the file?
I have never connected my Windows Visual Studio Xamarin to a Mac. LivePlayer on an iPhone works beautifully. I was hoping to get to be able to distribute my app without using a physical Mac.
Thank you for any help. If you can point me towards other tutorials on setting up and using AppCenter to distribute to iPhone beta users, I would appreciate it.
To order generate an .ipa file for distribution a Mac needs to be involved in the build process.
If you do not have access to a Mac for local development and the application source code is located in a git repository hosted in GitHub, BitBucket, or Visual Studio Team Services, then you can link App Center to the git repository and configure App Center to perform the build for distribution purposes.
For a live/testing Universal Windows Platform(UWP) application how I can get crash reports? Is there any SDK for UWP, Like for iOS/Android platform Crashlytics provide symbolicated report about an application crash.
Following Details I want in a crash report
1. Device Details - like Device Name, Model etc
2. OS Version
3. File Name - In which app crash
4. Line Number - In which app crash
5. Parents Method - Parents Method of method in which app crash
6. Other threads details
I want something similar to Crashlytics SDK, like for iOS. Here the screenshot one of my iOS application which contains crash details
I suggest that you may use Hockeyapp, you may merge Hockeyapp SDK to your app, it will help you collect crash report and some other things. HockeySDK.UWP is in process now, you may use HockeySDK.WINRT instead. Here is the link.
Hockeyapp for UWP is in "preseason" so currently in development but available for users already.
just sign up for Hockeyapp with a free accound and apply for "preseason" you'll get access to UWP and other beta features in a few days. (at least I received access quite fast on multiple accounts)
when you have access it's just adding this nuget package:
https://www.nuget.org/packages/HockeySDK.UWP
Microsoft Application Insights also has some good functionality for this but it's deprecated since last month where Microsoft tells you to move to Hockeyapp
I have obtained the trial license from ABBYY and obtained the trial SDK for iPhone. But I can not build and debug the project on my device. It gives an error : "_OBJC_CLASS_$_CMocrManager", referenced from:
The application works fine in simulator (with one image provided in the sample).
Please help, i have attached the screenshot.
I have contacted the Tech support of abbyy mobile sdk and following was the response regarding build number:
"I found out that there is no way to see the build number of the dll library on Mac OS (it could be seen only in Windows, I apologize for the inconvenience)."
And then regarding the build error i followed following instructions given by them:
You use the latest release of ABBYY Мobile OCR Engine, so the issue is in the project settings.
Below please find the instruction how to run the sample for iPhone on Xcode 4.3, iPhoneSDK 5.1.
When you launch Xcode and open the “Sample.private.xcodeproj” project, Xcode displays the Workspace window. The toolbar provides quick access to the group of the buttons “View” in the right upper corner. Click here the button “Hide or show the Navigator” (or the same via the main xCode menu: View → Navigators → Show Project Navigator).
The “Project navigator” appears in the left side of the Workspace window containing the single project “Sample.private”.
Click the “Sample.private” project icon in the project navigator. The panel “Project Editor” appears to the right of the project navigator, displaying the element Project → Sample.private and the element Target → Sample.
Select Project → Sample.private and set up the following settings on the tab BuildSettings:
• Build Settings → the section Architectures:
Base SDK = "Latest iOS (iOS 5.1)"
Build Active Architecture Only = Yes
The rest of Architectures Settings should become automatically:
Architectures = Standard (armv7)
Supported Platforms = iphonesimulator iphoneos
Valid Architectures = armv6 armv7
• Specify the developer license for the parameter Code Signing Identity in the section Code Signing.
• To specify which OS version is the minimum that your application will support, set the iOS Deployment Target in the section Deployment.
Select Targets → Sample. Here also open the tab Build Settings and do almost the same as for Project → Sample.private:
• Build Settings → the section Architectures:
Build Active Architecture Only = Yes
Check up the rest of Architectures settings:
Architectures = armv6
"Base SDK" = "Latest iOS (iOS 5.1)"
Supported Platforms = iphonesimulator iphoneos
Valid Architectures = armv6
• Specify the developer license for the parameter Code Signing Identity in the section Code Signing.
• To specify which OS version is the minimum that your application will support, set the iOS Deployment Target in the section Deployment:
iOS Deployment Target = OS version of iPhone on which the sample start is planned.
Then adjust the scheme Run Sample.app that opens by default from the main xCode menu: Product → Edit Scheme:
• the parameter Destination should be iOS Device (in a case if a mobile device is disconnected from the computer at present) or there should be a name of the device connected to your computer at present on which you are going to run the sample.
• change the parameter Build Configuration on the tab Info to iPhone.Debug.
Now try to launch the sample on the device.
Besides, our testing engineers have noticed that you can have a message like “Error launching remote program: failed to get the task for xxx.” when the sample is installed on the device and does not work in the debug mode. A solution of this issue is described in details at different forums of iOS developers. You can try to solve this by deleting all provisioning profiles except the developer one from mobile device.
And I was able to succesfully build the sample.
Thanks nikolay and sharptooth for helping me in this.
That's a link problem. The linker warning that preceeds the error message says clearly that the .a file that constitutes the SDK (libAbbyyMsdk.a) is compiled for the architecture that differs from the armv6 architecture for which the project is being targeted. Either you contact the vendor and ask them for a armv6 targeted version of the .a file or you target your project for the same architecture as the .a file.