i followed these instructions for building an adhoc version in xcode 4.0 (4.3 compilier)
i used the distribution profile instead of dev
added entitlements.plist
same project worked for adhoc before i upgraded to 4.3
http://diaryofacodemonkey.ruprect.com/2011/03/18/ad-hoc-app-distribution-with-xcode-4/
now:
project compiles finde (via archive) i can share it.
i can push the file into itunes
BUT
i cant get the app on my device. i always get an error "invalid rights"
Maybe someone can help me on this.
Try using the same profile for Debug and Build and Run (as debug, not release) with the target set to your Device.
Related
I've spent the weekend and have still failed to get a "Hello, World" working.
Visual Studio:
2022 Version 17.0.4
2022 Preview Version 17.1.0 Preview 1.1
uno-check says everything is fine:
Here are my runtimes:
Neither WUX or MUX (UWP or Desktop) flavors of WinUI work. Android emulators coming up but the Hello World not deploying. Local Android device detected, but not deploying. Linux (Skia.GTK) not working.
WASM IS able to display the text "Hello, World".
Wow! I was jazzed after watching every minute of the recent version 4 release conference. But if it is this difficult to just get the thing running ... ?
I'm determined to get it working ... but it appears to be a major unproductive project to do so. Am I the only one in the world having difficulty?
Mark
Ok, I was able to get WinUI (Desktop), WASM, Skia (WPF for Windows 7), Skia (GTK for Linux), and Android working with "Hello, World". Let me share what I learned and hopefully spare others this painful experience I've had.
Of course, before doing the following steps you'll want to install and run unocheck, so follow the documentation to do so and make sure all issues are resolved.
Once you pass unocheck, then:
First, forget about using .NET 6! They aren't ready.
This is what cost me most of my time. Uno 4 may advertise as .NET 6 compatible and they're getting close ... but they are not there yet.
Forget about using project templates within Visual Studio. Amazingly, even after releasing version 4.0 they haven't completed a template for the most important project that developers want: WinUI 3 Desktop. So, for now, just focus on using the CLI to install and invoke templates.
Open the cmd prompt and install templates with the following command:
dotnet new -i Uno.ProjectTemplates.Dotnet
This will install several templates. If you want to create a cross-platform application based on WinUI 3 Desktop (Win32) version, then:
First create the containing folder (like C:\Users\Mark\Code). Then, using the command prompt, navigate to this folder and from within this folder enter the following command:
dotnet new unoapp-winui -o SolutionName
This will produce a .NET 5 solution with a packaged WinUI 3 Desktop as the main development head. The WinUI 3 head will have a dependency on the latest WindowsAppSDK ver. 1.0 (formerly Project Reunion).
DO NOT USE THE COMMAND:
dotnet new unoapp-winui-net6 -o SolutionName
This will produce a .NET 6 solution that will be screwed up and won't work.
Hopefully, they'll have all this corrected in the coming weeks. I would just wait until NVentive releases updated Templates for Visual Studio that support WinUI 3 for .NET 6. Then it will be easy to upgrade your solution from .NET 5 to .NET 6.
When you run the dotnet new unoapp-winui -o SolutionName command, you will notice that several of the projects fail to "restore" properly:
To solve this, use the command prompt to navigate into each of the failed projects and enter the command:
dotnet restore
Now you're ready to use Visual Studio to launch your solution. Select the WinUI 3 Packaging Project as your startup project and attempt to run "Hello, World".
4. You may get this error:
Error MSB3270 There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference ..."
If so, open your build configuration and check whether your packaging and main WinUI 3 project use different CPU targets as shown here (BFRLE is the name of my solution):
I fixed this by changing the target platform of BFRLE.Windows.Desktop to x64 to match the packaging project. While you're in the configuration manager be sure that the Android project is deployed (otherwise it won't deploy during debugging).
Next, make sure that you install the GTK+3 runtime on your computer. you can do so here:
https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases
The absence of this runtime is NOT checked for in unocheck.
I also installed WSL.
At this point you ought to be able to run "Hello, World" as a local WinUI 3 Desktop app, as an IIS Express-hosted WASM app, as a Skia.WPF.Host app, and as a Skia.Gtk app. I didn't try to run the MacOS or iOS flavors since these require physical hardware. I did try to connect my old Android phone (Galaxy Note 5, OS 7 API 24). To get a phone recognized of course you have to enable Developer Mode and enable USB Debugging (see online docs). To get my phone recognized ... had to disable Fast Deployment. Even after this got my phone communicating, I was not able to successfully deploy to this old phone (I suspect I need to update my phone).
In order to use a virtual Android emulator you need to go to the project properties of the Android project and ENABLE Fast Deployment and Incremental Android Packaging as shown below:
You can accelerate your virtual Android emulator by enabling settings in Windows and your BIOS as explained here:
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows
The steps above finally got things working for me. It didn't matter whether I was using VS 2022 or VS 2022 preview -- so that's one less thing you have to worry about.
Now on to the more interesting problems of getting a real application to run cross-platform.
Just after switching from Xcode 10 to 11, I am unable to install my app on any device
The error at launch time after installation succeeded says :
Install claimed to have succeeded, but application could not be found on device.
Details says :
Could not locate installed application
Domain: com.apple.platform.iphoneos
Code: -1
Recovery Suggestion: Install claimed to have succeeded, but application could not be found on device. bundleId = myBundleId
--
Installed application was not present in database of installed apps after multiple lookup attempts.
Domain: com.apple.platform.iphoneos
Code: -1
However everything works fine on a simulator.
I tried to delete derived data, clean project, delete the app ..
Very strange : After submitting the app to testlfight I can download it and it works.
But when I build a new app to Xcode it launch the app just downloaded from tesflight and not the version pushed via Xcode ..
For me, it's a problem with ipatool.
Here's a way to find out details why it failed to create a proper iPhone App (.ipa) file from the build output/Xcode archive:
Go to Product > Archive, then open Window > Organizer > Distribute App.
It should show you "IPA processing failed" with a big red error symbol.
Now, open the logs and search along these lines:
timestamp Assertion failed: Expected n archs in otool output:
and
timestamp /Path/to/ Xcode-beta.app/Contents/Developer/usr/bin/ipatool exited with 1
While this can't be the final solution, try removing all problematic libraries mentioned in the logs between the two lines until ipatool exists successfully.
I also had this issue/error message. I realized that I had automatic signing deactivated and I had selected a provisioning profil with a distribution certificate.
Solution:
So if you want to run the app on your iphone directly from Xcode (not through testflight) you have to make sure you use a provisioning profil with a developer certificate.
This is probably not the case for most people facing this issue, but I faced it once several days ago and easily dealt with it by cleaning the build folder and switching to a legacy build. The second time I faced it, none of the suggested solutions seemed to be working.
I then noticed that because I'd almost run out of storage on my device, iOS had "offloaded" almost all of my apps. If there is a small cloud under your apps and the app needs to "install" again before launching, then this is the case with your phone too. Trying to launch all of the apps that I don't use regularly (so I never noticed the little clouds) "reinstalled" all of them and solved the issue entirely. Maybe this helps someone facing this for similar reasons.
I have the same problem,I modify the project setting
File --> Workspace Setting --> Build System --> Legacy Build System
it's OK for me
I also got this alert. That's because i run the app in release Build Configuration, but with a appstore Provisioning Profile . It's not allowed. So i change the appstore Provisioning Profile to a dev Profile. Then everything is ok.
Hope this can help you.
I found a way to solve this problem. After I upgraded iOS 13.1, the real machine also ran. Later, I found out that because I had archive operation the day before, the real machine running certificate changed from distribution mode to development mode and everything worked normally.
For my case (xcode 11, ios 12.4), change the Bundle identifier can solve this issue...
Before changing Bundle id, I've tried
using beta xcode
deleting app on iphone
deleting derived data
cleaning project
reopen xcode
Here's another solution. I had previously installed three other apps using XCode and got this error message when I tried to install a fourth.
I simply deleted one of my three existing apps (after hours of hair pulling and SO searching) and tried again. It worked.
Platform: iPad 2018 on v13.1 with XCode v11.1,
I was using different signing team/certificate for ...Tests target.
Setting the same for main target helped.
Update pods if you have.
pod update
just it.
I use in order to develop cross platform application in xamarin forms but I have an issue. I use vs 2015 enterprise. There is a problem, when I simulate my application on iphoneSimulator. I selected "Configuration" mode as Debug and "Platform" mode as IphoneSimulator. In Windows side I use Xamarin.ios 11.2 and macbook side is same xamarin.ios sdk too. And I can connect windows to macbook successfully. I use xcode version 9.2.
When I run my application,
Launch failed. The app 'ADF.XPF.iOS' could not be launched on 'iPhone 5s iOS 11.2'. Error: error MT0069: The app directory '/Users/yazilim/Library/Caches/Xamarin/mtbs/builds/ADF.XPF.iOS/3d07b519b07c870401ed8b5058cf1d91/bin/iPhoneSimulator/Debug/trgovegmmobil.app' does not exist.
Can you help me about it ?
I also met this before.
1.Delete the app in simulator
2.Delete bin,obj folder
3.Run again
This should solve the problem.
I hope this is helpful for somebody.
I had the same problem.
The message says that some folder of the path does not exists, so in my case i went to the MAC and i realized than the folder mtbs was not created.
Solution
Create the missing folder
After that clean, rebuild and launch the application again.
The accepted answer did not work for me. I took a slightly more radical reproach, and re-cloned my entire GitHub repository on my windows machine. I didn't change anything on the mac, and it worked first time.
I had a similar problem, nothing helped until I manually added the Xamarin.Build.Download package version 0.10.0
YourApp.iOS.csproj:
<PackageReference Include = "Xamarin.Build.Download" Version = "0.10.0" />
I created an empty Single View application using Xcode 4.2 on OSX Lion 10.7.2 targeting iPhone 5. The project built happily however when launching the simulator I receive the following error message:
iOS Simulator could not find the SDK. The SDK may need to be reinstalled.
I then tried targeting the iPad with the same results. I removed Xcode using the terminal and downloaded a fresh copy from the AppStore. The clean installation generates the exact same error.
It seems that the SDK is not being deployed during installation. Any advice or tips on how I can correctly install the iOS 5 SDK for the simulator to work?
Update
I downloaded the iOS 4.3 simulator which was not installed. The simulator works perfectly if I select the 4.3 SDK but for some reason is not recognizing the folder containing the 5.0 SDK.
Update
I reformatted the MacBook, reloaded a clean OSX Lion without restoring any backups and installed Xcode. Running the simulator directly after the installed worked, however after a reboot and relaunching Xcode the error came back. The SDK itself seems to have been corrupted. Will try and reinstall Xcode again.
After some testing it turns out the problem is caused by a 3rd Party Software. Recently the developer of TotalFinder removed the Asepsis portion of the system and created a separate application for the handling of DS_Store files.
Unfortunately, this breaks the iOS Simulator once installed, and even after uninstalling Asepsis, I needed to rebuild my whole machine to get rid of the error.
Update
BinaryAge is aware of the issue with regards to Xcode 4.2 and it is now listed on the know issues page and a warning banner displayed on the download link.
Final Update
It seems BinaryAge has changed the way Asepsis works and this is no longer an issue with the latest versions.
Did you try "File -> Reset Content and Settings ..." in the simulator ? I also encountered the similar problem, but it worked after I reset the simulator! In fact, I also found it worked after I removed all the existing projects and created new ones, but it occurred again after I restart xcode. Fortunately the "Reset" always works for me and I hope it can be helpful for your case.
I have build signed the iPhone application with Adhoc provisioning profile,after installing the application directly through Xcode it launched and then closed. I want to know this is correct behavior or something is wrong in my source code?
I am using Snow Leopard 10.6.6 version of Mac OS.
Please consider the following :
restart xCode
ensure the adHoc provisioning profile is properly installed on the device using the Organizer.
do a clean & build
use the organizer summary panel to add application on your device.
if still failing, please try to restart your device.
if still failing, provide us logs you might have within the console.
Hope this helps.