ParseKit framework in Xcode is red, won't build - xcode4

I'm trying to add ParseKit to a new command line project in Xcode, but the framework shows as red in the Project Navigator. When I try to build, I get this error
error: /Users/acdlite/Xcode/Chemistry Parser/../parsekit-trunk/build/Debug/ParseKit.framework: No such file or directory
I've followed the directions given by the developer in this answer: How to embed ParseKit as a private framework in a Mac App bundle.
To my knowledge, red indicates that the file is not at the specified location. The file inspector says it should be located at /parsekit-trunk/build/Debug/ParseKit.framework, which actually doesn't exist if I try to navigate there in the Finder. So then where is it located? I have no idea.
I've followed all the steps from scratch like a dozen times now, including checking out the code via SVN. It's driving me crazy, and I feel like an idiot. I wish I could be more specific but I am truly lost as to where to go from here.

Alright, after at least 20 attempts I eventually got it working. Mostly, I followed the steps given by the developer in this answer: How to embed ParseKit as a private framework in a Mac App bundle
However, following the steps exactly didn't work. For the life of me, I couldn't get the ParseKit framework to show up as an option when I attempted to add it as a dependency of my Target. Xcode would just say "No filter results found." So I skipped that step. I also did not add a "Copy Files" build phase. Doing so resulted in a dependency error.
This was way harder than it should have been, and I don't know if that's because I'm stupid or Xcode is poorly designed. Probably a combination of both.
By the way, I'm using Xcode version 4.6.1 (4H512).

Related

Still getting ITMS-90809: Deprecated API Usage after using --optimize=force-rejected-types-removal

This has been killing me for the last couple of days. I have read everything I can find on this error and have done what xamarin says but it still doesn't work.
I can't get my builds to get through azure pipeline xamarin.ios build and deploy to apple.
When I build locally I get messages like
MTOUCH : warning MT1502: One or more reference(s) to type 'UIKit.UIWebView' already exists inside 'Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' before linking
with a companion message that says no references after linking
when I use --warn-on-type-ref=UIKit.UIWebView with the optimize arg.
When I build on azure in my pipeline, I only see the MT1502 but nothing saying anything after linking. The build gets submitted to Apple and fails because of the ITMS message.
I don't know what to do. I am using the latest macOS vm image, mono 6.8.0.123, xamarin.ios 13.16.0.13, xcode 11.4.1. The pipeline worked fine before April 30 deadline, now no matter what, I can't get the linker to strip UIWebView.
Let me know what other info would be helpful. I am completely stuck at this point.
Thanks.
I just got my build to pass Apple's inspection.
What ended up working for me was building locally and packaging the ipa file. On my mac I then changed the ipa extension to zip and unzipped it. I used terminal to go to the YOURAPPNAME.app "folder" and used grep -r UIWebView . to search for references. Don't forget the . so it searches the current directory. I missed that at first and got some message that grep was listening on stdin.
For me that resulted in a line like this:
Binary file ./Frameworks/PersonalizedAdConsent.framework/PersonalizedAdConsent matches
Now, the important thing to note is the linker never warned about this, so I was completely unaware of it. In my case it was part of Firebase/Admob. I was only one release behind and updating to the latest fixed my problem.
I still am using --optimize=force-rejected-types-removal --warn-on-type-ref=UIKit.UIWebView -warnaserror:1503 as my mtouch args. But builds now get through.
I hope this helps point you guys in the right direction, I've spent the last 3 days just trying to get builds to upload reading every post I could find on the web on this problem.
Solved !! I had to update the way how nugets are included to the iOS project .csproj file. The problem was that linker despite the --optimize=force-rejected-types-removal flag was not removing the UIWebView component form Xamarin.Forms 4.6 probably because it did not see it.
My project was created over two years ago and I was still using the packages.config file. After the update the flag started to work and grep query returned 0 :). The best way is to compare the old .csproj file with freshly created iOS project .csproj file and see how VS is referencing nugets.

Cannot Build Xamarin.Forms From Source Code

I have downloaded the Xamarin.Forms solution from GitHub and I am trying to build the solution. Visual Studio does not build, generating more than 70 errors, as simple as the one below:
"The type or namespace name 'IOnClickListener' could not be found (are
you missing a using directive or an assembly reference?"in
Xamarin.Forms.Platform.Android\AppCompat\ButtonRenderer.cs
When I investigate the code, I see that there is really no reference to Android.Views.View in the using statements, so it seems fair.
Am I making a mistake somewhere?
It's not easy to get to the answer without digging into the logs but here are some steps that have helped me in the past.
Android Specific Steps:
Check the logs for any problems that stand out, look at the top most error first and work your way down. Output window -> Show output from Xamarin Diagnostic
If you find unzipping problems you might have to visit the Xamarin folders to delete the zip causing problems and Xamarin will download a new one.
C:\Users{USER}\AppData\Local\Xamarin
If you get loads of Xaml and Resource errors you might have to delete the contents of the file.
Resources\Resource.Designer.cs
After deleting the content(not the file), clean the solution, rebuild the project.
If you still have problems try to either downgrade Xamarin.Forms or upgrade it.
Change Api level to a higher one on the project properties.
Hope one of these helps.

iOS8 simulators error

Try to start my project on one iOS8 simulator and Xcode shows error:
An error was encountered while running (Domain = NSMachErrorDomain, Code = 5)
No one of iOS8 simulator can't be started. What to do?
"iOS Simulator" -> "Reset Content And Settings..."
^ this helps.
I ran into the same error just this morning, and I haven't completely figured it out, but I have observed something which might help you (or both of us, if anyone else stumbles across this and has more information). I was building a project which contained:
the app itself
a Today extension (widget)
a Framework to share code between the app and the widget
The widget comes with TodayViewController.h/m, and I wanted to share this view controller with the app. So I changed the target membership of TodayViewController.m to my framework rather than the widget. (Did this in the Target Membership in the right sidebar.) I also set the TodayViewController.h to be part of the framework as a public header. When I did this, and then did a clean, I got this error when trying to run the app in the simulator, and also an "unknown error (null)" when trying to run on device. If I set TodayViewController.m's target membership to both the framework and the widget, I'm able to run the app in the simulator just fine.
Now, I don't know why this would be the case. I've declared my widget to depend on the framework, so it seems like it should work without my setting the target membership of TodayViewController.m to both widget and framework. If anyone else knows why this is the case, I'm all ears. But this is what I've found so far.
I had the same problem tonight too. I was not able to get my app to run if my resource directory was a "folder reference" (aka blue folder). Once I re-added my resource directory as a "folder group" (normal folder) instead my app ran fine. Not sure if this is the case for you, but it solved my problem. GL.
I ran into the same problem today using DP3.
When I tried to delete the Derived Data folder from Organizer, it showed me some kind of permission error. I then manually deleted the folder from Finder, rebuilt, and voila! It worked!
If you ever get and error like this, where xcode doesn't say much, just a error code, try first to check the actual problem on the system console.
Applications -> Utilities -> Console
On my case I was able to see that xcode was trying to copy the widget's binary and it was not able to find it. I was able to find out that without at least one compiled file on the extension's target, xcode is not going to create the binary for the extension.

Error building QtCore

I am trying to build QtCore.lib and I get this weird error.
PRJ0019: A tool returned an error code from "MOC kernel\qtimer.cpp"
I am able to build qtmain.lib but not able tp go any further.
moc.exe is available in bin folder and the path is added to my PATH.
kernel\qtimer.cpp file is also present in corelib folder.
Any help in this regard will be appreciated. I am building with Qt-4.5.2 source.
In Qt 4.5.2 moc.exe has some issues. An email I sent to Qt Support mentions it moc'ing files that were not modified. It could have further issues, which could be related to what you are experiencing.
Sorry I can't recall the exact details. To make things worse the link Qt Support had sent me at the time is broken.
They had suggested using 4.5.3. I think we ended up staying on 4.5.1, which we are still using today, although the move to 4.7.x. is occurring as I write this. :)

How to fix XCode 4 error: app depends on itself. This target might include its own product...?

How to fix XCode 4 build and clean error: "XXX.app depends on itself. This target might include its own product"...?
Upgraded my dev environment to latest Xcode 4.
Opened an existing project previously built and cleaned in XCode 3.x.x.
Attempted to clean: Clean failed with the same error "target might include..."
Attempted to build for debug on simulator. Build failed with the same error.
I've been stumped by this one. The responses to correct this have all been around Xcode 3.x.x
I thought others might run into this and want an answer.
After much gnashing of teeth, I found an answer (there may be other more elegant ways to fix this):
Go to Project Navigator.
Scroll down the list of Classes, Resources and find the PRODUCT group. The actual product in the group may display in red if you previously cleaned it in XCode 3.x.x.
DELETE the entire PRODUCT group.
You can then re-run your clean or build action.
Hope this helps others and prevents alot of frustration.
Click Products/***.app file.
and you can see the file info in Utilities Window.
Uncheck Target! That's it!
Just delete product.app from Copy Bundle resources. Its under Targets->Build Phases->Copy Bundle Resources. Also make sure to create a snapshot of a working project before making any significant changes. Happy Coding...

Resources