iOS Ad-hoc Distribution with Google MLKit cocoapods - ios

I have a problem with using Google MLKit framework inside my iOS app. I use Ad-hoc OTA distribution to test the app on selected tester devices. It worked great until I added Google MLKit through cocoapods and I'm not really sure what is the reason. Everything compiles properly, Archive is generated without errors but when testers want to download the app it crashes during the "Installing" stage and shows "Unable to install..." alert.
Few things that I tried already :
changing pods Embed type from "Embed and sign" to "Embed without signing"
changing signing from "Apple Developer" to "Apple Distribution" in pods Build Settings for Release scheme
enabling and disabling Bitcode in MLKit pods
The weird thing is that it downloads properly from Ad-hoc OTA on the device that I use to test it directly from Xcode (but I delete the app before downloading it from the server) but doesn't work on any other device.

To find the specific error details:
Theres a mac app called "console" from apple, can't remember if its installed by default or not. Get one of the devices it doesn't work on, connect it to your mac with console open. Try to do the install and the detailed error should show up inside console. If its working on your device and not someone else's, its some kind of signing issue, like you have a cert installed on your phone that others don't.
Fixing the provisioning issue:
Go to your project, select the main target under the general tab. Scroll down to "frameworks, Libraries, and Embedded Content". Make sure the cocoapods library called "Pods_|project-name|.framework" is set to "Do Not Embed"

Related

Xamarin Deploying iOS App Ad Hoc Failing to Install

I am trying to deploy an iOS app Ad Hoc to an iPhone for beta testing. I've been developing the app on Windows VS, I have a Macbook air with all the necessary software (Xcode, VS, etc), and I have paired to it with VS on my Windows machine. I have also followed the following steps:
Created an Apple Developer account
Created an App ID with the bundle identifier as the same exact one as the one in info.plist
Created a signing certificate using my Macbook Air, downloaded it, and installed it into XCode
Created a provisioning profile with the App ID and the certificate, and made sure to include the device that I want to load the app onto.
Made sure everything above was set to "distribution" and "ad hoc" as needed.
Set Bundle Signing in my iOS project properties to Manual Provisioning, and selected the Signing Identity and Provisioning Profile to the ones that I created for this deployment.
Set the build to Release and the target to Remote Device
Ensured that the deployment target in info.plist was set to the highest available, which is 15.4, though my iPhone is at 15.6 (could this be the problem?)
Set the IPA Packaging Options to "Build iTunes Package Archive (IPA)"
Set "Include iTunesArtwork images and the iTunesMetadata.plist" to true in the same area
Successfully built the iOS project and produced a .ipa file
After all that, I've been trying to get the .ipa onto my phone, which is definitely the device I added to the provisioning profile.
I've tried two methods to do this, and both have failed:
Connecting my phone to my Windows machine and opening iTunes. Dragging the .ipa file onto the device. The app shows up on my phone, but when I try to open it, I get this error:
"This app could not be installed because its integrity could not be verified". Though it should have been.. The device is linked to the provisioning profile that was used to create the darn thing.
Connected my phone to my Macbook Air and accessed the device through XCode > Window > Devices and Simulators. I emailed myself the .ipa file and downloaded it onto the machine (the Microsoft docs explicitly state that emailing the .ipa should work just fine). In the "Intalled apps" section of the device, I clicked the little '+' and then pointed it to the downloaded .ipa. After a few seconds, it pops up an alert window that says "Unable to install *.iOS".
Other things I have tried since this has been a problem:
Recreating the above steps by re-registering my device, creating new certificates, downloading, installing, all that business.
Messing with the deployment target version.
Jumping out from behind the couch and startling it to make it do what it's supposed to.
I swear I'm done with Xamarin forever after this problem is solved, but all the headaches I've experienced have made me think twice about whether to even bother with .NET Maui haha thanks for any help you can provide
Firstly, the error This app could not be installed because its integrity could not be verified" may be caused by the proper certificate or the test devices are not visible in 'Devices' (UDIDs added) in developer.apple.com/account.I found two simialr issues, you can refer to them: link1, link2.
Secondly, have you follow this docs on how to generate the IPA file?

Watchkit app showing error during installation - The WatchKit app has an invalid stub executable

I have an app that supports Watchkit. When I run the application onto the iPhone, it builds fine but displays an alert in Xcode "The WatchKit app has an invalid stub executable". I have used the bundle identifier properly and installed the provisioning profiles and certificates properly as well. Any clue on this, please?
Pls note that I am building this project in Xcode 10.3 as the included frameworks are still in Swift 4.2 and couldn't be upgraded to Swift 5.
This was a known issue in Xcode 10 beta where the proposed solution was to clean the build folder and run again. I imagine you've tried that of course, but I have to mention it.
Also ensure you have selected to "Trust this computer" on the Apple Watch. If you haven't done that, then with Xcode open;
a) Connect the iPhone that you have your watch paired to the computer via cable.
b) Restart Apple Watch
c) Accept Trust This Computer when prompted on Apple Watch.
This error is more related to ipa making process than any project settings..
Avoid using older xcodes just to make ipa from the archive created using latest xcode as sometimes we don't have permission to export build.
You can use xcodebuild command to create ipa from archive and resolve this error, but can't make it to appstore as xocdebuild also come with a bug that it doesn't create support directories for watchapp (WatchKitSupport) and swift (SwiftSupport). However with this ipa, application will get installed on Apple Watch without any errors.
Also you may find a valid command which would make valid ipa but other options also have the same issues. Eg xcrun
Solution to this is make this folder structure by yourself and create ipa.
Related links:
1- Binary Rejection - Invalid Watchkit Support
2- How to generate .ipa file from command line with watchkit app
3- Getting error in watch app installation

Uploading expo application version to app store

I have been uploading versions of my app for a while, and suddenly, after an update of mac os, I cannot upload my app anymore, I've upgraded my mac os version, xcode and still nothing....
UPDATE
Its important to note that this is a react native application that i am generating using expo by running expo build ios
these are the errors that i am getting...
ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements
in your app bundle signature do not match the ones that are contained
in the provisioning profile. The bundle contains a key that is not
included in the provisioning profile:
'com.apple.developer.icloud-services' in
'Payload/ExpoKitApp.app/ExpoKitApp'."
WARNING ITMS-90725: "SDK Version Issue. This app was built with the
iOS 11.4 SDK. Starting March 2019, all iOS apps submitted to the App
Store must be built with the iOS 12.1 SDK or later, included in Xcode
10.1 or later."
Does anyone have an idea?
The first part, ITMS-90163, is an error -- basically stating that your app is trying to use iCloud but the provisioning profile (that you set up at developer.apple.com) doesn't have iCloud enabled. This is what's blocking your upload.
Since you say this just started happening, probably this means the iCloud switch in Xcode got flipped on accidentally (if your app is not a actually using iCloud).
In Xcode 10.1, be sure your project is selected in the upper left and your target is selected, then click on the Capabilities tab and scroll down until you see iCloud, and click it OFF. Important: This is only a reasonable choice if your app does not use iCloud.
If your app does use iCloud, you instead need to generate a new provisioning profile. You can do this manually by going to developer.apple.com, and click on Account in the upper right. Click "Certificates, IDs, & Profiles", and follow Apple's instructions. However, you can have Xcode managing provisioning profiles for you automatically, by clicking on the General tab and then checking the box "Automatically Manage Signing".
The second part, ITMS-90725, is just a warning, so it's not blocking you from uploading (though it will be a problem in March). To resolve this, first, be sure you are on Xcode 10.1 or later. (While in Xcode, go up to the menu bar and click Xcode -> About Xcode to check.). It's possible that you could be using Xcode 10.1 and still not using the latest SDK for some reason. Under Build Settings, check Base SDK. It should just say "iOS".

iOS: Cannot install app as IPA

I followed the steps to create an IPA of my app and would like to install via iTunes. After importing to library, I can see my app listed in the Apps section and a button says "Will Install" is on the right side of the list item. Also the app's icon appears in the iOS desktop view.
However, after clicking sync, which gave no errors, the app does not show itself on the desktop of the device.
I tried to deploy directly using Xcode's organizer and that worked fine.
I also tried to drag my provisioning profile into iTunes to no avail.
What am I missing here?
I'm using iTunes 11.0.2, Xcode4.6.2.
I've also tried distributing my app through iTunes to beta testers, but I didn't succeed- always had errors and errors.
Use the iPhone Configuration Utility for Mac OS X or for Windows- this works auto-magically, with no errors.
Guaranteed.

Distribute Archive shows Mac OS instead of iOS

I created a brand new project in the latest version of Xcode and have been building and running it fine in both Simulator and on Devices plugged into my Mac.
Recently I needed to archive & export an .ipa for someone else to install (still using my developer profile and one of my developer devices), but was unable to do so because when I click on the "Distribute" button on the "Archive" tab of the Organizer window, the top choice is "Submit to Mac App store" instead of the iOS store.
Nothing in my project settings indicates Mac OS instead of iOS, so I'm baffled as to why this is happening. I've tried duplicating the Target/Product, but the results are the same. I've also had someone else build the project on a different Mac and they experience the same problem.
Is this a known bug in Xcode and is there some way to get past it?
Thanks,
BT
Check if you have accidentally made your Info.plist part of your target. It shouldn't be. Uncheck it in the Target Membership pane or remove it from the Copy Bundle Resources build phase.
(Found answer via this question: My iPhone app is being archived as "Mac App Archive" and not "iOS app archive".)

Resources